Commit Graph
437 Commits
Author SHA1 Message Date
LongYinan 56c64a1f87 chore(release): publish
- @node-rs/argon2@2.2.1
 - @node-rs/bcrypt@1.10.9
 - @node-rs/crc32@1.10.8
 - @node-rs/helper@1.6.2
 - @node-rs/jieba@2.0.3
 - @node-rs/jsonwebtoken@0.5.11
 - @node-rs/xxhash@1.7.8
2026-09-10 13:41:17 +08:00
LongYinan f8d6b3eb8c fix: record and lock Rust release dependencies (#1206)
* fix: record and lock Rust release dependencies

* chore: group Cargo lockfile maintenance
2026-09-10 12:02:39 +08:00
LongYinan fa136aca9e chore(release): publish
- @node-rs/argon2@2.2.0
2026-08-30 01:19:02 +08:00
LongYinan 227a5bfb13 feat(argon2): add parseOptions to read parameters from hash string (#1195)
* feat(argon2): add parseOptions to read parameters from hash string

* feat(argon2): bound parseOptions input and expose saltLen

* fix(argon2): raise parseOptions input bound to 1 MiB

* docs(argon2): document parseOptions 1 MiB cap

* fix(argon2): drop parseOptions-only encoded length cap
2026-08-30 01:12:59 +08:00
LongYinan 3b2896520f chore(release): publish
- @node-rs/argon2@2.1.0
 - @node-rs/bcrypt@1.10.8
 - @node-rs/crc32@1.10.7
 - @node-rs/helper@1.6.1
 - @node-rs/jieba@2.0.2
 - @node-rs/jsonwebtoken@0.5.10
 - @node-rs/xxhash@1.7.7
2026-08-13 18:09:40 +08:00
LongYinan b0ea4a01b8 perf(argon2): simdutf8, crate PHC decode, argon2-rust 1.1 (#1189)
* perf(argon2): validate UTF-8 with simdutf8 before owning the string

Check the JS byte slice with simdutf8, then build String via
from_utf8_unchecked so from_utf8 does not walk the bytes again.

* perf(argon2): decode PHC Base64 with a LUT instead of the engine

Salt and tag fields are tens of bytes. A 256-entry table plus leftover-bit
checks beats the generic base64 crate, and on aarch64 argon2-rust's SIMD
would not even run for a 16-byte salt.

* perf(argon2): decode PHC fields with argon2-rust SIMD Base64

Use the new encode_base64/decode_base64 entry points. decode_phc still
owns param order and data=. Temporarily depends on the local
argon2-rust tree until 1.1.0 is on crates.io.

* feat(argon2): consume argon2-rust 1.1 PHC APIs

Drop the local PHC parser, encoder, and compare. Hash and verify go
through hash_encoded_with_ad, decode_phc, and verify_with_ad.
Require argon2-rust 1.1 from crates.io; the sibling path dep is gone.
2026-08-13 16:30:24 +08:00
LongYinan 2b8b617be0 feat(argon2): switch backend to argon2-rust (#1188)
* feat(argon2): switch backend to argon2-rust

Replace RustCrypto argon2 with argon2-rust 1.0.0 from crates.io.
Keep the public JS API. Verify accepts node-argon2 PHC param order
and associatedData. The bench pins the same raw params, salt, and
tag across implementations.

* fix(argon2): keep Node 22 tests and bound verify threads

Skip the node:crypto.argon2Sync comparison on runtimes that lack it.
Cap worker threads at available parallelism so a PHC p= value cannot
spawn one OS thread per lane. Allocate tag buffers with try_reserve
instead of vec! so a huge outputLen is a JS error, not a process abort.

* fix(argon2): skip node-argon2 interop when its native addon is missing

node-argon2 0.45 has no darwin-x64 prebuild. Intel macOS CI runs x64
Node on an ARM host, so a static import crashed the whole spec file.

* test(argon2): compare against node:crypto argon2

Drop the node-argon2 native addon from tests. Interop uses the
builtin KDF, which is available on every CI host that has it.
2026-08-13 11:01:01 +08:00
renovate[bot]andLongYinan 05156db802 chore(deps): update rust crate jsonwebtoken to v11 (#1177)
* chore(deps): update rust crate jsonwebtoken to v11

* fix(jsonwebtoken): handle non-exhaustive Algorithm in v11

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: LongYinan <lynweklm@gmail.com>
2026-08-13 00:23:31 +08:00
LongYinan 1933745e96 chore: upgrade all npm deps (#1187)
* chore: upgrade all npm deps

* fix: update tsconfig for TypeScript 7

Remove deprecated downlevelIteration and importsNotUsedAsValues options,
and explicitly include node types required by TypeScript 7.

* fix: download test artifacts into package dirs

@napi-rs/cli 3.8 requires all configured targets when running
napi artifacts. Test jobs only have one platform, so download
bindings directly into the workspace like the package template.

* fix: download bindings into packages/ for tests

upload-artifact uses packages/ as the common root, so the artifact
contains argon2/*.node not packages/argon2/*.node. Download into
packages/ so binaries land where the loaders expect them.

* fix: add WASI .d.cts files required by @napi-rs/cli 3.8

napi artifacts now requires a complete WASI loader set including
*.wasi.d.cts. Also upload the full WASI support files from the wasm
build job for the publish path.

* fix: upload only wasm artifacts from WASI builds

WASI loaders and types stay committed in the repo and updated with
the codegen; CI only needs the built .wasm binaries.
2026-08-12 23:51:31 +08:00
renovate[bot] 14750503ca chore(deps): update dependency argon2 to ^0.45.0 (#1172)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-07-19 01:47:41 +00:00
Copilot 20873f3352 fix(jieba): compile error: adapt to jieba-rs 0.10.1 Token API (#1152)
* fix: adapt jieba bindings to jieba-rs 0.10.1 Token API changes

* chore: update yarn.lock

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
2026-06-15 12:20:58 +08:00
1295b2d5ef 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>
2026-04-29 17:56:57 +08:00
b636e314f2 chore(deps): lock file maintenance (#1115)
* chore(deps): lock file maintenance

* fix(jieba): update KeywordExtractConfig builder API for jieba-rs 0.9

Agent-Logs-Url: https://github.com/napi-rs/node-rs/sessions/560e52ee-b4ea-4982-b284-b0cccdf4f949

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: Brooooooklyn <3468483+Brooooooklyn@users.noreply.github.com>
Co-authored-by: LongYinan <lynweklm@gmail.com>
2026-04-14 10:30:58 +08:00
renovate[bot] 52f4f63a86 chore(deps): update dependency @oxc-node/core to ^0.1.0 (#1107)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-04-01 06:49:43 +00:00
renovate[bot] 8465bff5bf chore(deps): update dependency @oxc-node/cli to ^0.1.0 (#1106)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-04-01 05:37:20 +00:00
LongYinan a58bd486fe bench(xxhash): add xxhash-addon (#1070)
- Close https://github.com/napi-rs/node-rs/issues/1066

```
┌─────────┬───────────────────────┬──────────────────┬───────────────────┬────────────────────────┬────────────────────────┬─────────┐
│ (index) │ Task name             │ Latency avg (ns) │ Latency med (ns)  │ Throughput avg (ops/s) │ Throughput med (ops/s) │ Samples │
├─────────┼───────────────────────┼──────────────────┼───────────────────┼────────────────────────┼────────────────────────┼─────────┤
│ 0       │ '@node-rs/xxhash h32' │ '48809 ± 0.08%'  │ '47542 ± 417.00'  │ '20543 ± 0.07%'        │ '21034 ± 186'          │ 20488   │
│ 1       │ 'xxhash c++'          │ '58475 ± 0.11%'  │ '56417 ± 83.00'   │ '17178 ± 0.09%'        │ '17725 ± 26'           │ 17102   │
│ 2       │ 'xxhash-addon'        │ '39398 ± 0.08%'  │ '38875 ± 125.00'  │ '25465 ± 0.06%'        │ '25723 ± 83'           │ 25383   │
│ 3       │ 'xxhashjs h32'        │ '339072 ± 0.29%' │ '332833 ± 2999.0' │ '2959 ± 0.16%'         │ '3005 ± 27'            │ 2950    │
└─────────┴───────────────────────┴──────────────────┴───────────────────┴────────────────────────┴────────────────────────┴─────────┘
┌─────────┬───────────────────────┬──────────────────┬───────────────────┬────────────────────────┬────────────────────────┬─────────┐
│ (index) │ Task name             │ Latency avg (ns) │ Latency med (ns)  │ Throughput avg (ops/s) │ Throughput med (ops/s) │ Samples │
├─────────┼───────────────────────┼──────────────────┼───────────────────┼────────────────────────┼────────────────────────┼─────────┤
│ 0       │ '@node-rs/xxhash h32' │ '58699 ± 0.10%'  │ '56959 ± 125.00'  │ '17099 ± 0.08%'        │ '17556 ± 39'           │ 17037   │
│ 1       │ 'xxhash-addon'        │ '82534 ± 0.10%'  │ '82541 ± 1874.0'  │ '12152 ± 0.09%'        │ '12115 ± 275'          │ 12117   │
│ 2       │ 'xxhashjs h32'        │ '338332 ± 0.12%' │ '333500 ± 3500.0' │ '2958 ± 0.11%'         │ '2999 ± 32'            │ 2956    │
└─────────┴───────────────────────┴──────────────────┴───────────────────┴────────────────────────┴────────────────────────┴─────────┘
┌─────────┬──────────────────────┬───────────────────┬────────────────────┬────────────────────────┬────────────────────────┬─────────┐
│ (index) │ Task name            │ Latency avg (ns)  │ Latency med (ns)   │ Throughput avg (ops/s) │ Throughput med (ops/s) │ Samples │
├─────────┼──────────────────────┼───────────────────┼────────────────────┼────────────────────────┼────────────────────────┼─────────┤
│ 0       │ '@node-rs/xxhash 64' │ '20434 ± 0.27%'   │ '19958 ± 208.00'   │ '49296 ± 0.06%'        │ '50105 ± 519'          │ 48938   │
│ 1       │ 'xxhash C++'         │ '20656 ± 0.14%'   │ '20333 ± 250.00'   │ '48648 ± 0.05%'        │ '49181 ± 610'          │ 48412   │
│ 2       │ 'xxhash-addon'       │ '20713 ± 0.16%'   │ '20333 ± 292.00'   │ '48680 ± 0.06%'        │ '49181 ± 714'          │ 48279   │
│ 3       │ 'wasm'               │ '28572 ± 0.11%'   │ '27792 ± 417.00'   │ '35293 ± 0.08%'        │ '35982 ± 548'          │ 35000   │
│ 4       │ 'xxhashjs h64'       │ '9252214 ± 0.68%' │ '9229625 ± 171416' │ '108 ± 0.62%'          │ '108 ± 2'              │ 109     │
└─────────┴──────────────────────┴───────────────────┴────────────────────┴────────────────────────┴────────────────────────┴─────────┘
┌─────────┬──────────────────────┬───────────────────┬────────────────────┬────────────────────────┬────────────────────────┬─────────┐
│ (index) │ Task name            │ Latency avg (ns)  │ Latency med (ns)   │ Throughput avg (ops/s) │ Throughput med (ops/s) │ Samples │
├─────────┼──────────────────────┼───────────────────┼────────────────────┼────────────────────────┼────────────────────────┼─────────┤
│ 0       │ '@node-rs/xxhash 64' │ '21228 ± 0.36%'   │ '20416 ± 457.00'   │ '47759 ± 0.08%'        │ '48981 ± 1077'         │ 47109   │
│ 1       │ 'xxhash-addon'       │ '21369 ± 0.63%'   │ '20625 ± 500.00'   │ '47502 ± 0.07%'        │ '48485 ± 1148'         │ 46797   │
│ 2       │ 'wasm'               │ '28157 ± 0.11%'   │ '27708 ± 375.00'   │ '35764 ± 0.08%'        │ '36091 ± 495'          │ 35516   │
│ 3       │ 'xxhashjs h64'       │ '8963346 ± 0.56%' │ '8867771 ± 135188' │ '112 ± 0.54%'          │ '113 ± 2'              │ 112     │
└─────────┴──────────────────────┴───────────────────┴────────────────────┴────────────────────────┴────────────────────────┴─────────┘
```
2026-02-02 11:21:28 +08:00
LongYinan 9764f3cf63 fix(deps): update rand_core (#1069) 2026-02-02 11:04:11 +08:00
renovate[bot] 2386a451f1 fix(deps): update rust crate rand_core to 0.10 (#1067)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-01 15:09:50 +00:00
LongYinan e52eb6e400 bench(argon2): fix unaligned params (#1054) 2026-01-12 23:02:08 +08:00
Tianxiu (Tyson) Zhou 4ba2583a6c docs(argon2): fix default argon2 params docs #982 2026-01-12 22:41:16 +08:00
d85d35a23e fix(deps): upgrade napi-rs/cli and fix build errors (#1048)
---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: LongYinan <lynweklm@gmail.com>
2026-01-12 14:01:13 +08:00
renovate[bot] 2ae4c9be60 chore(deps): update dependency @oxc-node/core to ^0.0.34 (#1039)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-20 18:39:57 +00:00
renovate[bot] d1e5e133a6 chore(deps): update dependency argon2 to ^0.44.0 (#1033)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-16 02:00:11 +00:00
renovate[bot] 44f61aa29d chore(deps): update dependency @oxc-node/core to ^0.0.32 (#1031)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-15 17:36:46 +00:00
renovate[bot] dedcd99c25 chore(deps): update dependency @oxc-node/core to ^0.0.29 (#1021)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-19 16:10:04 +00:00
renovate[bot] 6bb995e322 chore(deps): update dependency @oxc-node/core to ^0.0.28 (#1019)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-09 12:59:50 +00:00
renovate[bot] b9e9592f6f chore(deps): update dependency @oxc-node/core to ^0.0.27 (#1004)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-03 17:45:19 +00:00
renovate[bot] b6c016281f chore(deps): update dependency @oxc-node/core to ^0.0.26 (#1003)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-03 10:39:12 +00:00
renovate[bot] e47c918539 chore(deps): update dependency @oxc-node/core to ^0.0.25 (#1001)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-02 10:10:35 +00:00
renovate[bot] c6fc743b70 chore(deps): update dependency @oxc-node/core to ^0.0.24 (#1000)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-28 13:41:24 +00:00
renovate[bot] 74c95075a7 chore(deps): update dependency argon2 to ^0.43.0 (#997)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-24 06:14:10 +00:00
renovate[bot] 813ca42b77 chore(deps): update dependency @oxc-node/core to ^0.0.23 (#993)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-10 08:13:24 +00:00
renovate[bot] 606d38ec56 chore(deps): update dependency @oxc-node/core to ^0.0.22 (#990)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-02 11:53:22 +00:00
renovate[bot] 5600b76a01 chore(deps): update dependency @oxc-node/core to ^0.0.21 (#985)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-16 14:29:40 +00:00
renovate[bot] 9e1e6f8da9 chore(deps): update dependency @oxc-node/core to ^0.0.20 (#980)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-05 11:36:59 +00:00
renovate[bot] 3029a99f12 fix(deps): update rust crate rand_core to 0.9 (#963)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-27 21:30:46 +00:00
renovate[bot] 29a1c80bc4 chore(deps): update dependency @oxc-node/core to ^0.0.19 (#957)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-20 04:35:07 +00:00
renovate[bot] 8fdb41870c chore(deps): update dependency @oxc-node/core to ^0.0.18 (#955)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-20 02:17:48 +00:00
renovate[bot] 0dcc4dba7a chore(deps): update dependency @oxc-node/core to ^0.0.17 (#954)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-13 10:14:33 +00:00
renovate[bot] 37e3e83397 chore(deps): update dependency @oxc-node/core to ^0.0.16 (#947)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-13 07:49:56 +00:00
LongYinan 83ca124b3e chore(release): publish
- @node-rs/argon2@2.0.2
 - @node-rs/bcrypt@1.10.7
 - @node-rs/crc32@1.10.6
 - @node-rs/jieba@2.0.1
 - @node-rs/jsonwebtoken@0.5.9
 - @node-rs/xxhash@1.7.6
2024-12-05 13:42:26 +08:00
renovate[bot] 40f35d6fe5 chore(deps): update dependency @types/crc to v4 (#935)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-25 16:58:20 +08:00
renovate[bot]andLongYinan 6c02bbc4c2 chore(deps): update dependency tinybench to v3 (#916)
* chore(deps): update dependency tinybench to v3

* upgrade benchmark

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: LongYinan <lynweklm@gmail.com>
2024-10-28 09:50:54 +08:00
LongYinan 0271649c1b chore(release): publish
- @node-rs/argon2@2.0.1
 - @node-rs/bcrypt@1.10.6
 - @node-rs/crc32@1.10.5
 - @node-rs/jieba@2.0.0
 - @node-rs/jsonwebtoken@0.5.8
 - @node-rs/xxhash@1.7.5
2024-10-27 19:53:51 +08:00
LongYinan 579248efce chore: fix version commands 2024-10-27 19:53:05 +08:00
LongYinan ef96dda6e4 chore: refresh the infra (#915) 2024-10-27 15:04:00 +08:00
Linus UnnebäckandLongYinan 50be77d07d bench(bcrypt): add @cwasm/openbsd-bcrypt and @cwasm/openwall-bcrypt to benchmark (#649)
* Add @cwasm/openbsd-bcrypt and @cwasm/openwall-bcrypt to benchmark

* tinybench

---------

Co-authored-by: LongYinan <lynweklm@gmail.com>
2024-10-27 00:18:23 +08:00
LongYinan 5232a7eedd chore: remove npm dirs (#913) 2024-10-27 00:08:23 +08:00
LongYinan afd2a544b8 feat!(jieba): upgrade to jieba@0.7 (#912)
Also provide customizable API for Jieba and TfIdf
2024-10-26 23:25:58 +08:00
Pavlo Vuiko ec14da02c7 fix(jsonwebtoken): disable audience validation if it was not passed in options (#910) 2024-10-24 12:01:31 +08:00