deps(node): migrate the Node binding to napi-rs 3 (#347)

Bumps napi 2.16 -> 3.9 and napi-derive 2.16 -> 3.5 (cargo) and @napi-rs/cli
2.18 -> 3.7 (npm). napi 3's derive macros emit #[allow(unsafe_code)], which the
workspace-wide forbid(unsafe_code) cannot permit, so the Node crate gets its own
[lints] block mirroring the workspace with unsafe_code relaxed to deny — forbid
stays in force for every other crate. The CLI-3-regenerated index.d.ts / index.js
keep the identical 626-symbol public API (only the codegen format changed). MSRV
stays 1.88 (napi 3.9 requires exactly that); ureq is intentionally left at 2.x.
Verified locally: cargo clippy clean, 1108/1108 Node tests pass.

Supersedes the napi half of the cargo group bump and the @napi-rs/cli npm bump.
This commit is contained in:
kingchenc
2026-06-28 00:45:38 +02:00
committed by GitHub
parent c6972dd476
commit 025d453293
6 changed files with 9909 additions and 6615 deletions
+2 -2
View File
@@ -44,7 +44,7 @@
}
},
"engines": {
"node": ">= 20"
"node": ">= 22"
},
"optionalDependencies": {
"wickra-linux-x64-gnu": "0.9.7",
@@ -64,6 +64,6 @@
"bench": "node benchmarks/throughput.js"
},
"devDependencies": {
"@napi-rs/cli": "^2.18.0"
"@napi-rs/cli": "^3.7.2"
}
}