From a0ee93da3983b67dd3859022ec4e4e5a22ff85be Mon Sep 17 00:00:00 2001 From: Puru Vijay Date: Sun, 21 Jul 2024 11:19:15 +0530 Subject: [PATCH 1/4] Push --- package-lock.json | 14 +++++++------- package.json | 2 +- src/common/traverse.ts | 2 +- src/hooks/mongo-keys.ts | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package-lock.json b/package-lock.json index 976e15a..c4fe75a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,7 @@ "debug": "^4.3.5", "graphql": "^16.9.0", "lodash": "^4.17.21", - "neotraverse": "^0.6.11" + "neotraverse": "^0.6.14" }, "devDependencies": { "@feathers-plus/batch-loader": "^0.3.6", @@ -7893,9 +7893,9 @@ } }, "node_modules/neotraverse": { - "version": "0.6.11", - "resolved": "https://registry.npmjs.org/neotraverse/-/neotraverse-0.6.11.tgz", - "integrity": "sha512-OdydhNAkoRxXyxz1d8Cx2rQS0wfTcoSlBNIuv/PMC/0CrwTYUBMy+kIa7h3y18lVyvgARazb4ugVZ5n/aly2PA==", + "version": "0.6.14", + "resolved": "https://registry.npmjs.org/neotraverse/-/neotraverse-0.6.14.tgz", + "integrity": "sha512-co+mqQYo1wf3CRWRHWOT1ZgG7gsdNZSrrQkWxVnGAlD/UA/IZuPlE9UNkGZRwTLeml+dT5BytRW4ANqzPQeNLg==", "license": "MIT", "engines": { "node": ">= 18" @@ -17816,9 +17816,9 @@ "dev": true }, "neotraverse": { - "version": "0.6.11", - "resolved": "https://registry.npmjs.org/neotraverse/-/neotraverse-0.6.11.tgz", - "integrity": "sha512-OdydhNAkoRxXyxz1d8Cx2rQS0wfTcoSlBNIuv/PMC/0CrwTYUBMy+kIa7h3y18lVyvgARazb4ugVZ5n/aly2PA==" + "version": "0.6.14", + "resolved": "https://registry.npmjs.org/neotraverse/-/neotraverse-0.6.14.tgz", + "integrity": "sha512-co+mqQYo1wf3CRWRHWOT1ZgG7gsdNZSrrQkWxVnGAlD/UA/IZuPlE9UNkGZRwTLeml+dT5BytRW4ANqzPQeNLg==" }, "node-gyp": { "version": "9.4.0", diff --git a/package.json b/package.json index d4d6cd7..015b6cc 100644 --- a/package.json +++ b/package.json @@ -67,7 +67,7 @@ "debug": "^4.3.5", "graphql": "^16.9.0", "lodash": "^4.17.21", - "neotraverse": "^0.6.11" + "neotraverse": "^0.6.14" }, "devDependencies": { "@feathers-plus/batch-loader": "^0.3.6", diff --git a/src/common/traverse.ts b/src/common/traverse.ts index a33d6b2..58212a0 100755 --- a/src/common/traverse.ts +++ b/src/common/traverse.ts @@ -1,4 +1,4 @@ -import traverser from 'neotraverse'; +import traverser from 'neotraverse/legacy'; export function traverse>( items: T | T[], diff --git a/src/hooks/mongo-keys.ts b/src/hooks/mongo-keys.ts index b8819ff..f03189d 100755 --- a/src/hooks/mongo-keys.ts +++ b/src/hooks/mongo-keys.ts @@ -1,5 +1,5 @@ import type { HookContext } from '@feathersjs/feathers'; -import traverse from 'neotraverse'; +import traverse from 'neotraverse/legacy'; import { checkContext } from '../utils/check-context'; /** From 2b5faa9d7e3c8cd9fba13a2d0054e0590380e6b0 Mon Sep 17 00:00:00 2001 From: Puru Vijay Date: Sun, 21 Jul 2024 11:29:36 +0530 Subject: [PATCH 2/4] Remove this type for traverse --- src/hooks/mongo-keys.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hooks/mongo-keys.ts b/src/hooks/mongo-keys.ts index f03189d..07f7c71 100755 --- a/src/hooks/mongo-keys.ts +++ b/src/hooks/mongo-keys.ts @@ -26,7 +26,7 @@ export function mongoKeys( checkContext(context, 'before', null, 'mongoKeys'); const query = context.params.query || {}; - traverse(query).forEach(function (this: any, node: any) { + traverse(query).forEach(function (node: any) { const typeofNode = typeof node; const key = this.key; const path = this.path; From 6b70d67ec2a0eaf4b75d69fe120c3183a4a9597c Mon Sep 17 00:00:00 2001 From: fratzinger <22286818+fratzinger@users.noreply.github.com> Date: Sun, 21 Jul 2024 22:00:16 +0200 Subject: [PATCH 3/4] ci: update gh actions versions --- .github/workflows/nodejs.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 075bc6b..846971b 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -7,9 +7,9 @@ jobs: matrix: node-version: [18.x, 20.x, 22.x] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} - run: npm install @@ -18,9 +18,9 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Use Node.js 20.x - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: 20.x - run: npm install From aeec72d58cffc169152ccf3d02504ce101c28aaa Mon Sep 17 00:00:00 2001 From: fratzinger <22286818+fratzinger@users.noreply.github.com> Date: Sun, 21 Jul 2024 22:01:49 +0200 Subject: [PATCH 4/4] ci: use node@22.5.1 explicitly --- .github/workflows/nodejs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 846971b..93cf86b 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -5,7 +5,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: [18.x, 20.x, 22.x] + node-version: [18.x, 20.x, 22.5.1] steps: - uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node-version }}