From 1f17edc2487bbe86a77e24da636832b00e1148e0 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Thu, 20 May 2021 11:11:07 +0200 Subject: [PATCH 01/10] fix undefined variable, this probably breaks restoring the last url --- src/domain/navigation/URLRouter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/domain/navigation/URLRouter.js b/src/domain/navigation/URLRouter.js index b38791a0..28488129 100644 --- a/src/domain/navigation/URLRouter.js +++ b/src/domain/navigation/URLRouter.js @@ -86,7 +86,7 @@ export class URLRouter { tryRestoreLastUrl() { const lastNavPath = this._urlAsNavPath(this._history.getLastUrl() || ""); if (lastNavPath.segments.length !== 0) { - this._applyNavPathToNavigation(navPath); + this._applyNavPathToNavigation(lastNavPath); return true; } return false; From fa7e24fed76b496f00b77a03d24163be4221d141 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Thu, 20 May 2021 11:11:57 +0200 Subject: [PATCH 02/10] tune linting so it doesn't produce errors anymore and enable in CI --- .eslintignore | 1 + .eslintrc.js | 4 +++- .github/workflows/{unittests.js.yml => checks.yml} | 7 +++++-- .gitignore | 1 + package.json | 3 ++- 5 files changed, 12 insertions(+), 4 deletions(-) create mode 100644 .eslintignore rename .github/workflows/{unittests.js.yml => checks.yml} (85%) diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 00000000..732865cb --- /dev/null +++ b/.eslintignore @@ -0,0 +1 @@ +src/matrix/storage/memory \ No newline at end of file diff --git a/.eslintrc.js b/.eslintrc.js index 8ed0e1a7..2a14eac6 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,6 +10,8 @@ module.exports = { }, "rules": { "no-console": "off", - "no-empty": "off" + "no-empty": "off", + "no-prototype-builtins": "off", + "no-unused-vars": "warn", } }; diff --git a/.github/workflows/unittests.js.yml b/.github/workflows/checks.yml similarity index 85% rename from .github/workflows/unittests.js.yml rename to .github/workflows/checks.yml index b52381f7..e5d3f95c 100644 --- a/.github/workflows/unittests.js.yml +++ b/.github/workflows/checks.yml @@ -1,7 +1,7 @@ # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions -name: Unit tests +name: Code checks on: push: @@ -20,9 +20,12 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Run unit tests + - name: Install uses: actions/setup-node@v2 with: node-version: ${{ matrix.node-version }} - run: npm install --also=dev + - name: Unit tests - run: npm test + - name: Lint + - run: npm run lint-ci \ No newline at end of file diff --git a/.gitignore b/.gitignore index bd1c201e..7f6220cf 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ bundle.js target lib *.tar.gz +.eslintcache \ No newline at end of file diff --git a/package.json b/package.json index 3e69a0be..34f08269 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,8 @@ "doc": "doc" }, "scripts": { - "lint": "eslint src/", + "lint": "eslint --cache src/", + "lint-ci": "eslint src/", "test": "impunity --entry-point src/main.js --force-esm-dirs lib/ src/", "start": "node scripts/serve-local.js", "build": "node --experimental-modules scripts/build.mjs", From 9df18b839eae07687b352a212a7b2f1bae70c9ed Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Thu, 20 May 2021 11:13:52 +0200 Subject: [PATCH 03/10] wrong extension --- .github/workflows/{checks.yml => checks.js.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{checks.yml => checks.js.yml} (100%) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.js.yml similarity index 100% rename from .github/workflows/checks.yml rename to .github/workflows/checks.js.yml From 145d7f6f478013047ad7c012ff37e255d313fbd9 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Thu, 20 May 2021 11:19:04 +0200 Subject: [PATCH 04/10] why is this not showing up anymore? trying to rename back to old name --- .github/workflows/{checks.js.yml => unittests.js.yml} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename .github/workflows/{checks.js.yml => unittests.js.yml} (97%) diff --git a/.github/workflows/checks.js.yml b/.github/workflows/unittests.js.yml similarity index 97% rename from .github/workflows/checks.js.yml rename to .github/workflows/unittests.js.yml index e5d3f95c..9c244488 100644 --- a/.github/workflows/checks.js.yml +++ b/.github/workflows/unittests.js.yml @@ -1,7 +1,7 @@ # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions -name: Code checks +name: Unit tests on: push: From ce2acfc6591c8e1a06c243565a640a62d1fd63bb Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Thu, 20 May 2021 11:22:53 +0200 Subject: [PATCH 05/10] try fix action --- .github/workflows/unittests.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unittests.js.yml b/.github/workflows/unittests.js.yml index 9c244488..58cf2b28 100644 --- a/.github/workflows/unittests.js.yml +++ b/.github/workflows/unittests.js.yml @@ -19,8 +19,8 @@ jobs: node-version: [14.x] steps: - - uses: actions/checkout@v2 - name: Install + - uses: actions/checkout@v2 uses: actions/setup-node@v2 with: node-version: ${{ matrix.node-version }} From 7ea38a3f4cb211992e73639fc41d589b828c5f5c Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Thu, 20 May 2021 11:23:45 +0200 Subject: [PATCH 06/10] try fix action --- .github/workflows/unittests.js.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/unittests.js.yml b/.github/workflows/unittests.js.yml index 58cf2b28..b2661729 100644 --- a/.github/workflows/unittests.js.yml +++ b/.github/workflows/unittests.js.yml @@ -19,11 +19,12 @@ jobs: node-version: [14.x] steps: - - name: Install + - name: Install tools - uses: actions/checkout@v2 uses: actions/setup-node@v2 with: node-version: ${{ matrix.node-version }} + - name: Install project dependencies - run: npm install --also=dev - name: Unit tests - run: npm test From 3649bf1f04b830b3961612fd5ce74e3ecaff6463 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Thu, 20 May 2021 11:24:22 +0200 Subject: [PATCH 07/10] try fix action --- .github/workflows/unittests.js.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/unittests.js.yml b/.github/workflows/unittests.js.yml index b2661729..9f585889 100644 --- a/.github/workflows/unittests.js.yml +++ b/.github/workflows/unittests.js.yml @@ -19,8 +19,9 @@ jobs: node-version: [14.x] steps: - - name: Install tools + - name: Checkout project source - uses: actions/checkout@v2 + - name: Install tools uses: actions/setup-node@v2 with: node-version: ${{ matrix.node-version }} From e6c0df5ab248db80a62ac97bf811cc4d9c9501c7 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Thu, 20 May 2021 11:25:53 +0200 Subject: [PATCH 08/10] try fix action --- .github/workflows/unittests.js.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/unittests.js.yml b/.github/workflows/unittests.js.yml index 9f585889..93c331c6 100644 --- a/.github/workflows/unittests.js.yml +++ b/.github/workflows/unittests.js.yml @@ -20,14 +20,14 @@ jobs: steps: - name: Checkout project source - - uses: actions/checkout@v2 + uses: actions/checkout@v2 - name: Install tools uses: actions/setup-node@v2 with: node-version: ${{ matrix.node-version }} - name: Install project dependencies - - run: npm install --also=dev + run: npm install --also=dev - name: Unit tests - - run: npm test + run: npm test - name: Lint - - run: npm run lint-ci \ No newline at end of file + run: npm run lint-ci \ No newline at end of file From 3e42231e7a723744a7de6ece58784702282ca122 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Thu, 20 May 2021 11:29:20 +0200 Subject: [PATCH 09/10] rename workflow --- .github/workflows/unittests.js.yml | 33 ------------------------------ 1 file changed, 33 deletions(-) delete mode 100644 .github/workflows/unittests.js.yml diff --git a/.github/workflows/unittests.js.yml b/.github/workflows/unittests.js.yml deleted file mode 100644 index 93c331c6..00000000 --- a/.github/workflows/unittests.js.yml +++ /dev/null @@ -1,33 +0,0 @@ -# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node -# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions - -name: Unit tests - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -jobs: - build: - - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [14.x] - - steps: - - name: Checkout project source - uses: actions/checkout@v2 - - name: Install tools - uses: actions/setup-node@v2 - with: - node-version: ${{ matrix.node-version }} - - name: Install project dependencies - run: npm install --also=dev - - name: Unit tests - run: npm test - - name: Lint - run: npm run lint-ci \ No newline at end of file From ab841a84a3d1d117c248741391ca1075fcab7c51 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Thu, 20 May 2021 11:30:42 +0200 Subject: [PATCH 10/10] rename workflow --- .github/workflows/codechecks.js.yml | 33 +++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/codechecks.js.yml diff --git a/.github/workflows/codechecks.js.yml b/.github/workflows/codechecks.js.yml new file mode 100644 index 00000000..c6def19b --- /dev/null +++ b/.github/workflows/codechecks.js.yml @@ -0,0 +1,33 @@ +# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions + +name: Code checks + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [14.x] + + steps: + - name: Checkout project source + uses: actions/checkout@v2 + - name: Install tools + uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + - name: Install project dependencies + run: npm install --also=dev + - name: Unit tests + run: npm test + - name: Lint + run: npm run lint-ci \ No newline at end of file