Skip to content

Commit 3ad96d6

Browse files
authored
Merge pull request #4 from feathersjs/chore/update-deps-250908
chore: update deps & skip v9
2 parents 6d7b883 + 366078e commit 3ad96d6

File tree

19 files changed

+1173
-1184
lines changed

19 files changed

+1173
-1184
lines changed

.github/workflows/nodejs.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,9 @@ jobs:
1919
runs-on: ubuntu-latest
2020
steps:
2121
- uses: actions/checkout@v4
22-
- name: Use Node.js 22.x
23-
uses: actions/setup-node@v4
22+
- uses: actions/setup-node@v4
2423
with:
25-
node-version: 22.x
24+
node-version: 24.x
2625
- run: npm install
2726
- run: npm run build
2827

@@ -31,10 +30,9 @@ jobs:
3130
runs-on: ubuntu-latest
3231
steps:
3332
- uses: actions/checkout@v4
34-
- name: Use Node.js 22.x
35-
uses: actions/setup-node@v4
33+
- uses: actions/setup-node@v4
3634
with:
37-
node-version: 22.x
35+
node-version: 24.x
3836
- run: npm install
3937
- run: npm run build
4038
- run: npx --yes @arethetypeswrong/cli --pack . --profile esm-only

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v22.16.0
1+
v22.19.0

package-lock.json

Lines changed: 1063 additions & 1083 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "feathers-utils",
3-
"version": "8.0.0",
3+
"version": "9.0.0",
44
"description": "Useful hooks and utils for use with feathers services.",
55
"main": "./dist/index.js",
66
"module": "./dist/index.js",
@@ -33,7 +33,7 @@
3333
}
3434
},
3535
"scripts": {
36-
"build": "tsc --noEmit && tsdown",
36+
"build": "tsup-node",
3737
"docs:dev": "vitepress dev docs --port 5177",
3838
"docs:build": "vitepress build docs",
3939
"docs:preview": "vitepress preview docs --port 4177",
@@ -84,6 +84,7 @@
8484
"dist/**"
8585
],
8686
"dependencies": {
87+
"@feathersjs/adapter-commons": "^5.0.34",
8788
"@feathersjs/errors": "^5.0.34",
8889
"fast-copy": "^3.0.2",
8990
"fast-equals": "^5.2.2",
@@ -99,27 +100,26 @@
99100
"@feathersjs/memory": "^5.0.34",
100101
"@feathersjs/socketio": "^5.0.34",
101102
"@feathersjs/socketio-client": "^5.0.34",
102-
"@shikijs/vitepress-twoslash": "^3.8.0",
103-
"@tailwindcss/vite": "^4.1.11",
103+
"@shikijs/vitepress-twoslash": "^3.12.2",
104+
"@tailwindcss/vite": "^4.1.13",
104105
"@tsconfig/node22": "^22.0.2",
105106
"@types/lodash": "^4.17.20",
106107
"@types/markdown-it": "^14.1.2",
107-
"@types/node": "^24.0.14",
108+
"@types/node": "^24.3.1",
108109
"@vitest/coverage-v8": "^3.2.4",
109-
"dedent": "^1.6.0",
110-
"eslint": "^9.31.0",
110+
"dedent": "^1.7.0",
111+
"eslint": "^9.35.0",
111112
"glob": "^11.0.3",
112113
"gray-matter": "^4.0.3",
113-
"lru-cache": "^11.1.0",
114+
"lru-cache": "^11.2.1",
114115
"markdown-it": "^14.1.0",
115-
"npm-check-updates": "^18.0.1",
116+
"npm-check-updates": "^18.1.0",
116117
"prettier": "^3.6.2",
117118
"shx": "^0.4.0",
118119
"sift": "^17.1.3",
119-
"tailwindcss": "^4.1.11",
120-
"tsdown": "^0.12.9",
121-
"typescript": "^5.8.3",
122-
"unplugin-unused": "^0.5.1",
120+
"tailwindcss": "^4.1.13",
121+
"tsup": "^8.5.0",
122+
"typescript": "^5.9.2",
123123
"vitepress": "^2.0.0-alpha.8",
124124
"vitest": "^3.2.4"
125125
},

src/hooks/set-data/set-data.hook.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import type { FeathersError } from '@feathersjs/errors'
66
import { Forbidden } from '@feathersjs/errors'
77

88
import type { HookContext, NextFunction } from '@feathersjs/feathers'
9-
import { type PropertyPath } from 'lodash'
9+
import type { PropertyPath } from 'lodash'
1010
import { contextToJson } from '../../utils/context-to-json/context-to-json.util.js'
1111
import { getDataIsArray } from '../../utils/index.js'
1212
import type { PredicateItemWithContext } from '../../types.js'

src/hooks/set-result/set-result.hook.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import type { FeathersError } from '@feathersjs/errors'
66
import { Forbidden } from '@feathersjs/errors'
77

88
import type { HookContext, NextFunction } from '@feathersjs/feathers'
9-
import { type PropertyPath } from 'lodash'
9+
import type { PropertyPath } from 'lodash'
1010
import { contextToJson } from '../../utils/context-to-json/context-to-json.util.js'
1111
import { getResultIsArray } from '../../utils/index.js'
1212
import type { DispatchOption, PredicateItemWithContext } from '../../types.js'

src/hooks/throw-if-is-provider/throw-if-is-provider.hook.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import type { HookContext } from '@feathersjs/feathers'
22
import type { PredicateFn, TransportName } from '../../types.js'
33
import { throwIf } from '../throw-if/throw-if.hook.js'
4-
import { toArray } from 'lodash'
54
import { every, isProvider } from '../../predicates/index.js'
65
import type { FeathersError } from '@feathersjs/errors'
76
import { MethodNotAllowed } from '@feathersjs/errors'
7+
import { toArray } from '../../internal.utils.js'
88

99
const defaultError = (context: HookContext) =>
1010
new MethodNotAllowed(

src/hooks/transform-data/transform-data.hook.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ describe('transformData', () => {
2525

2626
it('context is 2nd param', () => {
2727
let contextParam
28-
transformData((_rec: any, context: any) => {
28+
transformData((_rec: any, { context }: any) => {
2929
contextParam = context
3030
})(hookBefore)
3131
assert.deepEqual(contextParam, hookBefore)

src/hooks/transform-query/transform-query.hook.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ export const transformQuery = <
1111
transformer: TransformerFn<Q, H>,
1212
) => {
1313
return (context: H, next?: NextFunction) => {
14-
context.params.query = transformer(context.params.query ?? {}, context)
14+
context.params.query = transformer(context.params.query ?? {}, {
15+
context,
16+
i: 0,
17+
})
1518

1619
if (next) {
1720
return next().then(() => context)
Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,42 @@
11
import { lowercase } from './lowercase.transformer.js'
22

3+
const options = { context: {} as any, i: 0 }
4+
35
describe('transformers/lowercase', () => {
46
it('single string', () => {
57
const item = { name: 'TEST' }
6-
lowercase('name')(item)
8+
lowercase('name')(item, options)
79
expect(item).toEqual({ name: 'test' })
810
})
911

1012
it('multiple strings', () => {
1113
const item = { name: 'TEST', email: 'TEST@EXAMPLE.COM' }
12-
lowercase(['name', 'email'])(item)
14+
lowercase(['name', 'email'])(item, options)
1315
expect(item).toEqual({ name: 'test', email: 'test@example.com' })
1416
})
1517

1618
it('throws error for non-string values', () => {
1719
const item = { name: 123 }
18-
expect(() => lowercase('name')(item)).toThrow(
20+
expect(() => lowercase('name')(item, options)).toThrow(
1921
"Expected string (lowercase 'name')",
2022
)
2123
})
2224

2325
it('ignores null or undefined values', () => {
2426
const item = { name: null, email: undefined }
25-
lowercase(['name', 'email'])(item)
27+
lowercase(['name', 'email'])(item, options)
2628
expect(item).toEqual({ name: null, email: undefined })
2729
})
2830

2931
it('does not throw if field is missing', () => {
3032
const item = { name: 'Test' }
31-
lowercase('missingField')(item)
33+
lowercase('missingField')(item, options)
3234
expect(item).toEqual({ name: 'Test' })
3335
})
3436

3537
it('handles dot.notation', () => {
3638
const item = { user: { name: 'TEST' } }
37-
lowercase('user.name')(item)
39+
lowercase('user.name')(item, options)
3840
expect(item).toEqual({ user: { name: 'test' } })
3941
})
4042
})

0 commit comments

Comments
 (0)