From 1610576fed2d48d20df8368bdb5271c53a2d67eb Mon Sep 17 00:00:00 2001 From: Nathaniel Dsouza Date: Fri, 7 Aug 2020 17:46:03 -0400 Subject: [PATCH 1/7] Update MFA companion package (#27) --- companion-packages/meteorrn-ndev-mfa/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/companion-packages/meteorrn-ndev-mfa/index.js b/companion-packages/meteorrn-ndev-mfa/index.js index 2492c2d..93b70e5 100644 --- a/companion-packages/meteorrn-ndev-mfa/index.js +++ b/companion-packages/meteorrn-ndev-mfa/index.js @@ -26,7 +26,7 @@ let assembleChallengeCompletionArguments = async function (finishLoginParams, co assertion = {challengeId, challengeSecret, ...code}; } else { - assertion = await solveU2FChallenge(res); + throw new Error("Code must be a U2FAuthorizationCode"); } methodArguments.push(assertion); } From c09de54bcb843a93b410cc7469e8627b1159c34e Mon Sep 17 00:00:00 2001 From: Nathaniel Dsouza Date: Sun, 9 Aug 2020 14:36:17 -0400 Subject: [PATCH 2/7] Create manual.yml --- .github/workflows/manual.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/manual.yml diff --git a/.github/workflows/manual.yml b/.github/workflows/manual.yml new file mode 100644 index 0000000..4cfe17a --- /dev/null +++ b/.github/workflows/manual.yml @@ -0,0 +1,30 @@ +# This is a basic workflow that is manually triggered + +name: Send Review Message + +# Controls when the action will run. Workflow runs when manually triggered using the UI +# or API. +on: + workflow_dispatch: + # Inputs the workflow accepts. + inputs: + name: + # Friendly description to be shown in the UI instead of 'name' + description: 'Release name' + # Default value if no value is explicitly provided + default: '100' + # Input has to be provided for the workflow to run + required: true + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "greet" + reviewMessage: + # The type of runner that the job will run on + runs-on: ubuntu-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Runs a single command using the runners shell + - name: Send review message + run: echo "This PR for release ${{ github.event.inputs.name }} needs review from the community. Check out the changelog and provide your feedback!" From bdf9e061b08df13eb4af787d0a86f5a100395026 Mon Sep 17 00:00:00 2001 From: Nathaniel Dsouza Date: Tue, 11 Aug 2020 18:15:45 -0400 Subject: [PATCH 3/7] Create stale.yml --- .github/workflows/stale.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/stale.yml diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 0000000..3404517 --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,19 @@ +name: Mark stale issues and pull requests + +on: + schedule: + - cron: "30 1 * * *" + +jobs: + stale: + + runs-on: ubuntu-latest + + steps: + - uses: actions/stale@v1 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + stale-issue-message: 'Stale issue message' + stale-pr-message: 'Stale pull request message' + stale-issue-label: 'no-issue-activity' + stale-pr-label: 'no-pr-activity' From 447db9b7ab6baf30982c302e3156019cf18a7624 Mon Sep 17 00:00:00 2001 From: Nathaniel Dsouza Date: Tue, 11 Aug 2020 18:16:26 -0400 Subject: [PATCH 4/7] Update stale.yml --- .github/workflows/stale.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 3404517..74262fe 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -13,7 +13,7 @@ jobs: - uses: actions/stale@v1 with: repo-token: ${{ secrets.GITHUB_TOKEN }} - stale-issue-message: 'Stale issue message' - stale-pr-message: 'Stale pull request message' + stale-issue-message: 'Closing this issue due to no activity. Feel free to reopen.' + stale-pr-message: 'Closing this PR due to no activity. Feel free to reopen.' stale-issue-label: 'no-issue-activity' stale-pr-label: 'no-pr-activity' From ee5fb452df513199584b35c62fa22281d6f271b1 Mon Sep 17 00:00:00 2001 From: Nathaniel Dsouza Date: Tue, 11 Aug 2020 18:18:21 -0400 Subject: [PATCH 5/7] Update index.js --- companion-packages/meteorrn-ndev-mfa/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/companion-packages/meteorrn-ndev-mfa/index.js b/companion-packages/meteorrn-ndev-mfa/index.js index 93b70e5..bebbac3 100644 --- a/companion-packages/meteorrn-ndev-mfa/index.js +++ b/companion-packages/meteorrn-ndev-mfa/index.js @@ -1,6 +1,6 @@ import Meteor, { Accounts } from '@meteorrn/core'; -import {authorizeActionChallengeHandler, authorizeActionCompletionHandler, resetPasswordCheckMFARequired, registrationChallengeHandlerTOTP, registrationCompletionHandlerTOTP, resetPasswordChallengeHandler, registrationChallengeHandlerU2F, registerCompletionHandlerU2F, loginChallengeHandler, loginCompletionHandler } from './method-names'; +import { loginChallengeHandler, loginCompletionHandler } from './method-names'; let useU2FAuthorizationCode = function (code) { if(typeof(code) !== "string" || code.length !== 6) { From 20b499d910bdbe0a73023fb321f4f17f12f76783 Mon Sep 17 00:00:00 2001 From: Nathaniel Dsouza Date: Tue, 11 Aug 2020 18:19:35 -0400 Subject: [PATCH 6/7] Add a semicolon --- companion-packages/meteorrn-local/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/companion-packages/meteorrn-local/index.js b/companion-packages/meteorrn-local/index.js index 038a691..19c5ac0 100644 --- a/companion-packages/meteorrn-local/index.js +++ b/companion-packages/meteorrn-local/index.js @@ -55,7 +55,7 @@ const Local = { else { await _storeLocalCol(); } - } + }; const loadData = async () => { From d74626598611c293b3b5199cb792ceff7458a666 Mon Sep 17 00:00:00 2001 From: Nathaniel Dsouza Date: Tue, 11 Aug 2020 18:36:55 -0400 Subject: [PATCH 7/7] Remove unused assignment to options (#34) * Remove unused assignment to options * Mark SHA256 insufficient as wontfix * Remove unused variable self * Remove unused variable serializedValue * Remove unused state properties loading --- examples/Login.jsx | 2 +- lib/utils.js | 2 +- src/Collection.js | 2 -- src/ReactiveDict.js | 2 -- 4 files changed, 2 insertions(+), 6 deletions(-) diff --git a/examples/Login.jsx b/examples/Login.jsx index 44734b8..75e8ba2 100644 --- a/examples/Login.jsx +++ b/examples/Login.jsx @@ -4,7 +4,7 @@ import { withTracker, Meteor } from 'meteor-react-native'; class Login extends React.Component { - state = {email:"", password:"", loading:false}; + state = {email:"", password:""}; onLogin = () => { let { email, password } = this.state; diff --git a/lib/utils.js b/lib/utils.js index b31a8a0..b21c97e 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -8,7 +8,7 @@ export function uniqueId() { export function hashPassword(password) { return { - digest: SHA256(password).toString(), + digest: SHA256(password).toString(), // lgtm [js/insufficient-password-hash] algorithm: 'sha-256', }; } diff --git a/src/Collection.js b/src/Collection.js index f624e6f..f390644 100644 --- a/src/Collection.js +++ b/src/Collection.js @@ -154,7 +154,6 @@ export class Collection { update(id, modifier, options = {}, callback = () => {}) { if (typeof options == 'function') { callback = options; - options = {}; } if (!this._collection.get(id)) @@ -202,7 +201,6 @@ export class Collection { } helpers(helpers) { - var self = this; let _transform; if (this._transform && !this._helpers) _transform = this._transform; diff --git a/src/ReactiveDict.js b/src/ReactiveDict.js index e6f877e..6b0bc61 100644 --- a/src/ReactiveDict.js +++ b/src/ReactiveDict.js @@ -74,8 +74,6 @@ export default class ReactiveDict { ) throw new Error('ReactiveDict.equals: value must be scalar'); - const serializedValue = stringify(value); - let oldValue = undefined; if (Object.keys(this.keys).indexOf(key) != -1) { oldValue = parse(this.keys[key]);