Skip to content

Commit 1295b2d

Browse files
renovate[bot]ClaudeclaudeBrooooooklyn
authored
chore(deps): update dependency ava to v8 (#1123)
* chore(deps): update dependency ava to v8 * fix: update ava v8 configuration and Node.js requirements - Change ava extensions config from object to array format for v8 - Update CI Node.js version matrix from ['20', '22', '24'] to ['22', '24'] - Ava v8 requires Node.js >= 22.20 due to iterator helper methods Agent-Logs-Url: https://github.com/napi-rs/node-rs/sessions/8e1e8303-351c-476e-9f4d-3d39ff8d992e * fix: remove sse4_crc32 dependency incompatible with Node.js 24 - Remove sse4_crc32 and @types/sse4_crc32 from crc32 package dependencies - Update crc32 benchmark to exclude sse4_crc32 comparisons - sse4_crc32 v7.0.0 lacks prebuilt binaries for Node.js 24 (ABI v137) - Bench CI now passes on Node.js 24 Agent-Logs-Url: https://github.com/napi-rs/node-rs/sessions/1b2c25e3-3d62-43a9-bc72-9f521bb287a4 * fix: remove nodejieba dependency incompatible with Node.js 24 Agent-Logs-Url: https://github.com/napi-rs/node-rs/sessions/bd608fb3-0247-49b5-9740-224f9847e188 * fix: remove xxhash dependency incompatible with Node.js 24 The xxhash npm package v0.3.0 does not have prebuilt binaries for Node.js 24 (ABI version 137), causing benchmark failures with "Cannot find module '../build/Release/hash'" errors. Removed xxhash from devDependencies and updated benchmark/xxhash.ts to run benchmarks without the xxhash C++ comparison. The benchmark still includes comparisons with xxhash-addon, xxhashjs, and webpack's wasm implementation. This follows the same pattern used for sse4_crc32 and nodejieba dependencies. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * fix: exclude Node.js 24 from armv7 test matrix The armv7-unknown-linux-gnueabihf platform doesn't have Node.js 24 docker images available. Restrict testing to Node.js 22 only for this platform. Agent-Logs-Url: https://github.com/napi-rs/node-rs/sessions/cee7816f-b688-4ae5-af92-6f51d48c387c Co-authored-by: Brooooooklyn <3468483+Brooooooklyn@users.noreply.github.com> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: anthropic-code-agent[bot] <242468646+Claude@users.noreply.github.com> Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com> Co-authored-by: Brooooooklyn <3468483+Brooooooklyn@users.noreply.github.com>
1 parent f655725 commit 1295b2d

9 files changed

Lines changed: 81 additions & 438 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ jobs:
287287
- host: windows-latest
288288
target: 'x86_64-pc-windows-msvc'
289289
architecture: x64
290-
node: ['20', '22', '24']
290+
node: ['22', '24']
291291
runs-on: ${{ matrix.settings.host }}
292292

293293
steps:
@@ -328,7 +328,7 @@ jobs:
328328
strategy:
329329
fail-fast: false
330330
matrix:
331-
node: ['20', '22', '24']
331+
node: ['22', '24']
332332
runs-on: ubuntu-latest
333333

334334
steps:
@@ -375,7 +375,7 @@ jobs:
375375
strategy:
376376
fail-fast: false
377377
matrix:
378-
node: ['20', '22', '24']
378+
node: ['22', '24']
379379
runs-on: ubuntu-latest
380380

381381
steps:
@@ -428,7 +428,7 @@ jobs:
428428
strategy:
429429
fail-fast: false
430430
matrix:
431-
node: ['20', '22', '24']
431+
node: ['22', '24']
432432
runs-on: ubuntu-24.04-arm
433433

434434
steps:
@@ -473,7 +473,7 @@ jobs:
473473
strategy:
474474
fail-fast: false
475475
matrix:
476-
node: ['20', '22', '24']
476+
node: ['22', '24']
477477
runs-on: ubuntu-24.04-arm
478478

479479
steps:
@@ -517,7 +517,7 @@ jobs:
517517
strategy:
518518
fail-fast: false
519519
matrix:
520-
node: ['20', '22']
520+
node: ['22']
521521
runs-on: ubuntu-latest
522522

523523
steps:
@@ -566,7 +566,7 @@ jobs:
566566
strategy:
567567
fail-fast: false
568568
matrix:
569-
node: ['20', '22', '24']
569+
node: ['22', '24']
570570
runs-on: ubuntu-latest
571571
steps:
572572
- uses: actions/checkout@v6

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"@napi-rs/wasm-runtime": "^1.1.1",
2525
"@tybys/wasm-util": "^0.10.1",
2626
"@types/node": "^25.0.6",
27-
"ava": "^7.0.0",
27+
"ava": "^8.0.0",
2828
"cross-env": "^10.1.0",
2929
"husky": "^9.1.7",
3030
"lerna": "^9.0.3",
@@ -49,9 +49,9 @@
4949
},
5050
"ava": {
5151
"cache": false,
52-
"extensions": {
53-
"ts": "module"
54-
},
52+
"extensions": [
53+
"ts"
54+
],
5555
"files": [
5656
"packages/*/__test__/**/*.spec.ts"
5757
],

packages/crc32/benchmark/crc32.ts

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { Bench } from 'tinybench'
22
import { crc32 as crc32Node } from 'crc'
3-
import Sse4Crc32 from 'sse4_crc32'
43
import { crc32 as crc32NodeZlib } from 'node:zlib'
54

65
import { crc32c, crc32 } from '../index.js'
@@ -21,23 +20,18 @@ eleifend felis viverra. Suspendisse elit neque, semper aliquet neque sed,
2120
egestas tempus leo. Duis condimentum turpis duis.`)
2221

2322
const initialCrc32 = crc32Node(TEST_BUFFER)
24-
const initialCrc32c = Sse4Crc32.calculate(TEST_BUFFER)
23+
const initialCrc32c = crc32c(TEST_BUFFER)
2524

2625
console.assert(crc32(TEST_BUFFER) === initialCrc32)
27-
console.assert(crc32c(TEST_BUFFER) === initialCrc32c)
2826
console.assert(crc32NodeZlib(TEST_BUFFER) === initialCrc32)
2927

3028
const suite = new Bench({
3129
name: 'crc32c without initial crc',
3230
})
3331

34-
suite
35-
.add('@node/rs crc32c', () => {
36-
crc32c(TEST_BUFFER)
37-
})
38-
.add('sse4_crc32', () => {
39-
Sse4Crc32.calculate(TEST_BUFFER)
40-
})
32+
suite.add('@node/rs crc32c', () => {
33+
crc32c(TEST_BUFFER)
34+
})
4135

4236
await suite.run()
4337

@@ -47,13 +41,9 @@ const suite2 = new Bench({
4741
name: 'crc32c with initial crc',
4842
})
4943

50-
suite2
51-
.add('@node/rs crc32c', () => {
52-
crc32c(TEST_BUFFER, initialCrc32c)
53-
})
54-
.add('sse4_crc32', () => {
55-
Sse4Crc32.calculate(TEST_BUFFER, initialCrc32c)
56-
})
44+
suite2.add('@node/rs crc32c', () => {
45+
crc32c(TEST_BUFFER, initialCrc32c)
46+
})
5747

5848
await suite2.run()
5949

packages/crc32/package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,9 @@
4848
"devDependencies": {
4949
"@napi-rs/cli": "^3.5.1",
5050
"@types/crc": "^4.0.0",
51-
"@types/sse4_crc32": "^7.0.4",
5251
"buffer": "^6.0.3",
5352
"crc": "^4.3.2",
5453
"cross-env": "^10.1.0",
55-
"sse4_crc32": "^7.0.0",
5654
"tinybench": "^6.0.0"
5755
},
5856
"napi": {

packages/jieba/benchmark/jieba.ts

Lines changed: 6 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,10 @@ import { join } from 'node:path'
33
import { fileURLToPath } from 'node:url'
44

55
import { Bench } from 'tinybench'
6-
import nodejieba from 'nodejieba'
76

87
import { Jieba } from '../index.js'
98
import { dict } from '../dict.js'
109

11-
const { load, cut, tag } = nodejieba
12-
1310
const __dirname = join(fileURLToPath(import.meta.url), '..')
1411

1512
const fixture = readFileSync(join(__dirname, 'weicheng.txt'), 'utf8')
@@ -25,51 +22,24 @@ const preface = `
2522

2623
const prefaceLength = preface.length
2724

28-
async function createBench(
29-
suitename: string,
30-
transform: (o: string[]) => string,
31-
napi: () => any[],
32-
jieba: () => any[],
33-
) {
25+
async function createBench(suitename: string, napi: () => any[]) {
3426
const suite = new Bench({
3527
name: suitename,
3628
})
37-
console.assert(transform(napi()) === transform(jieba()))
3829

39-
suite.add('@node-rs/jieba', napi).add('nodejieba', jieba)
30+
suite.add('@node-rs/jieba', napi)
4031

4132
await suite.run()
4233

4334
console.table(suite.table())
4435
}
4536

46-
load()
4737
const jieba = Jieba.withDict(dict)
4838

49-
await createBench(
50-
`Cut ${prefaceLength} words`,
51-
(output) => output.join(''),
52-
() => jieba.cut(preface),
53-
() => cut(preface),
54-
)
39+
await createBench(`Cut ${prefaceLength} words`, () => jieba.cut(preface))
5540

56-
await createBench(
57-
`Cut ${fixture.toString().length} words`,
58-
(output) => output.join(''),
59-
() => jieba.cut(fixture),
60-
() => cut(fixture),
61-
)
41+
await createBench(`Cut ${fixture.toString().length} words`, () => jieba.cut(fixture))
6242

63-
await createBench(
64-
`Tag ${prefaceLength} words`,
65-
(output) => typeof output,
66-
() => jieba.tag(preface),
67-
() => tag(preface),
68-
)
43+
await createBench(`Tag ${prefaceLength} words`, () => jieba.tag(preface))
6944

70-
await createBench(
71-
`Tag ${fixture.toString().length} words`,
72-
(output) => typeof output,
73-
() => jieba.tag(fixture),
74-
() => tag(fixture),
75-
)
45+
await createBench(`Tag ${fixture.toString().length} words`, () => jieba.tag(fixture))

packages/jieba/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@
5252
"devDependencies": {
5353
"@napi-rs/cli": "^3.5.1",
5454
"cross-env": "^10.1.0",
55-
"nodejieba": "^3.5.2",
5655
"tinybench": "^6.0.0"
5756
},
5857
"napi": {

packages/xxhash/benchmark/xxhash.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ import { fileURLToPath } from 'node:url'
55
import { Bench } from 'tinybench'
66
// @ts-expect-error
77
import createWasmHasher from 'webpack/lib/util/hash/xxhash64.js'
8-
// @ts-expect-error
9-
import xxhash from 'xxhash'
108
import xxhashAddon from 'xxhash-addon'
119
import xxhashjs from 'xxhashjs'
1210

@@ -25,9 +23,6 @@ suite
2523
.add('@node-rs/xxhash h32', () => {
2624
xxh32(FX, 0)
2725
})
28-
.add('xxhash c++', () => {
29-
xxhash.hash(FX, 0)
30-
})
3126
.add('xxhash-addon', () => {
3227
XXHash32.hash(FX)
3328
})
@@ -69,9 +64,6 @@ xx64Suite
6964
.add('@node-rs/xxhash 64', () => {
7065
xxh64(FX).toString(16)
7166
})
72-
.add('xxhash C++', () => {
73-
xxhash.hash64(FX, 0)
74-
})
7567
.add('xxhash-addon', () => {
7668
XXHash64.hash(FX)
7769
})

packages/xxhash/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@
5454
"cross-env": "^10.1.0",
5555
"tinybench": "^6.0.0",
5656
"webpack": "^5.104.1",
57-
"xxhash": "^0.3.0",
5857
"xxhash-addon": "^2.0.3",
5958
"xxhashjs": "^0.2.2"
6059
},

0 commit comments

Comments
 (0)