github-actions[bot]
be4b16ca00
chore: release ( #3048 )
...
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-12-02 22:41:52 +08:00
github-actions[bot]
98c987fde3
chore: release ( #3024 )
...
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-12-02 17:29:09 +08:00
LongYinan
4ca47e1aef
chore(napi): add back pub NODE_VERSION_* ( #3046 )
2025-12-02 17:22:39 +08:00
LongYinan
cf0465f390
chore(sys): add back non dyn-symbols behavior ( #3045 )
2025-12-02 16:46:42 +08:00
Stanisław Czech
295c6b3c60
fix(napi): bigInt comparison ( #3039 )
2025-12-02 14:58:37 +08:00
Copilot
a67347189d
feat(napi-derive): add tracing feature for debug logging NAPI function calls ( #3041 )
2025-12-02 14:20:08 +08:00
Copilot
e4f5360dcd
feat(napi): add node_api_create_object_with_properties support for enum creation ( #2990 )
2025-11-27 23:21:23 +08:00
Stanisław Czech
dc4d475eee
chore(napi): add Eq and PartialEq trait to BigInt ( #3033 )
2025-11-25 17:33:51 +08:00
LongYinan
a10be50edb
fix(napi): shutdown runtime at env cleanup on windows ( #3026 )
2025-11-25 17:31:09 +08:00
spacebear
6449f7d310
chore: update MSRV in README.md ( #3023 )
...
The MSRV changed to 1.88.0 as of napi-build 2.3.0 https://crates.io/crates/napi-build/versions
2025-11-19 13:10:34 +08:00
github-actions[bot]
67e711d69b
chore: release ( #3009 )
...
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-11-10 12:33:53 +08:00
github-actions[bot]
f71d660b43
chore: release ( #3002 )
...
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-11-07 21:24:30 +08:00
LongYinan
2a34f77272
fix(napi): TypedArraySlice creation ( #3004 )
2025-11-07 21:22:48 +08:00
LongYinan
2ceecf6ea1
chore(napi): Promise and ThreadsafeFunction::call_async don't require tokio ( #2998 )
2025-11-07 15:10:31 +08:00
github-actions[bot]
39230082f6
chore: release ( #2977 )
...
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-11-06 17:08:41 +08:00
LongYinan
52c0da5c19
fix(napi): memory leak in PromiseRaw cleanup callback ( #2995 )
...
* fix(napi): fix memory leak in Promise::from_unknown()
This commit fixes a memory leak that occurred when converting a Promise
from an Unknown object, specifically manifesting in Deno environments.
The issue was in the `promise_callback_finalizer` function, which had
a type mismatch when cleaning up callback allocations:
1. The callback was stored as `Box<(Cb, *mut bool)>` (a tuple containing
the callback and an executed flag pointer)
2. The finalizer incorrectly cast it as `Box<Cb>` when trying to free it
3. This caused improper deallocation and memory leaks
The fix ensures:
- The executed flag allocation is always properly cleaned up
- The callback tuple is cast to the correct type `(Cb, *mut bool)`
before being dropped
- All allocations are properly freed in both execution paths (callback
executed or not executed)
Fixes #2926
---------
Co-authored-by: Claude <noreply@anthropic.com>
2025-11-06 17:07:00 +08:00
Boshen
606ff62192
feat(sys): use libloading to load napi symbols at runtime on all platform ( #2996 )
2025-11-06 17:05:29 +08:00
richerfu
31bde7a763
chore(napi): mark tsfn data as pub and split SendableResolver to indent file ( #2992 )
2025-11-04 18:14:14 +08:00
richerfu
dd2625339e
chore(napi): mark SendableResolver and PromiseRaw as pub ( #2981 )
2025-10-29 15:12:09 +08:00
LongYinan
3d5f5bf2ce
docs: add sponsors
2025-10-24 23:18:20 +08:00
github-actions[bot]
0db7ceb47d
chore: release ( #2913 )
...
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-10-24 09:47:01 +08:00
LongYinan
d9498f5cec
fix(napi): stop ref error object in wasm targets ( #2975 )
2025-10-24 09:36:59 +08:00
LongYinan
637e3e7a34
chore(napi): bump rust-version ( #2966 )
2025-10-21 00:12:39 +08:00
renovate[bot]
7ea726b485
fix(deps): update rust crate ctor to v0.6.0 ( #2951 )
...
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-08 21:37:00 +00:00
LongYinan
8f40ebd206
fix(napi): cleanup memory issues ( #2949 )
2025-10-05 19:35:20 +08:00
richerfu
9df9f890f7
feat(napi): add on_abort for AbortSignal ( #2942 )
...
* feat(napi): add on_abort for AbortSignal
* chore: upgrade example code
* fix: fix lint error
* fix: fix lint error
* Update examples/napi/src/task.rs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update crates/napi/src/bindgen_runtime/js_values/task.rs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* fmt
---------
Co-authored-by: LongYinan <lynweklm@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-03 16:14:32 +08:00
SkyBird
807f579796
feat(cli): add support for loongarch64-unknown-linux-gnu ( #2887 )
...
* feat(target): add support for loongarch64-unknown-linux-gnu
* docs(README): update platform support status
* Update cli/src/utils/target.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update .github/workflows/test-release.yaml
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: LongYinan <lynweklm@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-09 23:29:22 +08:00
LongYinan
08869f5e7f
fix(napi): node_api_create_external_string_utf16 on wasm ( #2912 )
2025-09-08 22:37:33 +08:00
github-actions[bot]
2cb9c17e1c
chore: release ( #2893 )
...
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-09-08 15:02:06 +08:00
LongYinan
3894db5e42
fix(napi): JsStringUtf8 memory leak ( #2911 )
2025-09-08 13:45:17 +08:00
LongYinan
484ca281dd
feat(napi): implement from_static on JsStringLatin1 and JsStringUtf16 ( #2908 )
2025-09-05 12:48:41 +08:00
LongYinan
07380dfe49
feat(napi): support external JsStringLatin1 and JsStringUtf16 ( #2898 )
2025-09-01 10:40:40 +08:00
MK (fengmk2)
466fd50d4f
chore(cli): show NAPI options on new command ( #2892 )
...
- Fix typo "THis" → "This" in promise.rs documentation
- Add pageSize option to NAPI version selection in CLI new command
Before
```bash
? Minimum node-api version (with node version requirement)
napi1 (>= 8.6.0 < 9 || >= 9.0.0 < 10 || >= 10.0.0)
napi2 (>= 8.10.0 < 9 || >= 9.3.0 < 10 || >= 10.0.0)
❯ napi3 (>= 6.14.2 < 7 || >= 8.11.2 < 9 || >= 9.11.0 < 10 || >= 10.0.0)
napi4 (>= 10.16.0 < 11 || >= 11.8.0 < 12 || >= 12.0.0)
napi5 (>= 10.17.0 < 11 || >= 12.11.0 < 13 || >= 13.0.0)
napi6 (>= 10.20.0 < 11 || >= 12.17.0 < 13 || >= 14.0.0)
napi7 (>= 10.23.0 < 11 || >= 12.19.0 < 13 || >= 14.12.0 < 15 || >= 15.0.0)
```
After
```bash
? Minimum node-api version (with node version requirement)
napi1 (>= 8.6.0 < 9 || >= 9.0.0 < 10 || >= 10.0.0)
napi2 (>= 8.10.0 < 9 || >= 9.3.0 < 10 || >= 10.0.0)
❯ napi3 (>= 6.14.2 < 7 || >= 8.11.2 < 9 || >= 9.11.0 < 10 || >= 10.0.0)
napi4 (>= 10.16.0 < 11 || >= 11.8.0 < 12 || >= 12.0.0)
napi5 (>= 10.17.0 < 11 || >= 12.11.0 < 13 || >= 13.0.0)
napi6 (>= 10.20.0 < 11 || >= 12.17.0 < 13 || >= 14.0.0)
napi7 (>= 10.23.0 < 11 || >= 12.19.0 < 13 || >= 14.12.0 < 15 || >= 15.0.0)
napi8 (>= 12.22.0 < 13 || >= 14.17.0 < 15 || >= 15.12.0 < 16 || >= 16.0.0)
```
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-authored-by: Claude <noreply@anthropic.com>
2025-08-23 18:12:26 +08:00
github-actions[bot]
93ad5ab916
chore: release ( #2882 )
...
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-08-16 17:07:19 +08:00
lghuahua
9d338543b9
chore(napi): extends the Set types interoperability ( #2875 )
2025-08-15 19:12:46 -07:00
github-actions[bot]
264a8797c8
chore: release v3.2.3 ( #2866 )
2025-08-13 10:13:04 -07:00
LongYinan
cdfef770e3
fix(napi): link issue on cargo test --features noop ( #2872 )
2025-08-13 10:08:09 -07:00
renovate[bot]
3cf39a7005
fix(deps): update rust crate ctor to v0.5.0 ( #2865 )
...
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-10 17:59:10 +00:00
github-actions[bot]
72ad262a29
chore(napi): release v3.2.2 ( #2852 )
...
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-08-08 22:16:45 +08:00
LongYinan
8cada96703
fix(napi): no need to cleanup thread_local stuff ( #2851 )
2025-08-08 20:57:23 +08:00
github-actions[bot]
ce1fdbcdeb
chore: release ( #2848 )
...
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-08-08 20:21:05 +08:00
LongYinan
913e42f47c
fix(napi): ensure tokio runtime is initialized for dlopen ( #2850 )
...
* fix(napi): ensure tokio runtime is initialized for dlopen
Fixes async functions panic when using nodejs dlopen by ensuring
the tokio runtime is properly initialized before accessing it.
When modules are loaded via dlopen instead of require, the runtime
initialization might not happen through the normal module registration
path. This fix adds start_async_runtime() calls to all runtime access
functions to handle this scenario.
Fixes #2847
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com>
* Fix
* Fix
* Remove
* cargo check
* fix for wasm
---------
Co-authored-by: Claude <noreply@anthropic.com>
2025-08-08 20:12:14 +08:00
LongYinan
dca00683d8
fix(napi): handle the return_if_invalid for Array param ( #2846 )
...
* fix(napi): handle the return_if_invalid for Array param
* Update crates/backend/src/codegen/fn.rs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update crates/backend/src/codegen/fn.rs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-08-08 15:10:43 +08:00
github-actions[bot]
fa9d578d3b
chore: release ( #2843 )
...
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-08-07 23:39:50 +08:00
Mikaël Francoeur
83389a186b
feat(napi): add ScopeGenerator trait ( #2831 )
...
* add lifetime to iterator
* Add ScopedIterator
* fix type gen
* Clippy fix
---------
Co-authored-by: LongYinan <lynweklm@gmail.com>
2025-08-07 21:44:01 +08:00
LongYinan
b997c4eeaf
fix(napi): user_defined_rt can only be used once ( #2841 )
2025-08-07 02:58:03 -07:00
Mikaël Francoeur
88fca29e3b
feat: make generator an iterator ( #2784 )
...
* make the generator an iterator
* add JSDoc for generators
* prevent naming conflicts
* add JSDoc struct
* update snapshot
* clippy
* Update typedef
* update fmt
* Apply code review
* test compatible
---------
Co-authored-by: LongYinan <lynweklm@gmail.com>
2025-08-07 08:03:37 +00:00
翠
7f5013eee3
feat(napi): add Error.cause support to napi::Error ( #2829 )
...
Co-authored-by: LongYinan <lynweklm@gmail.com>
2025-08-05 12:53:36 +08:00
github-actions[bot]
b35ff14e77
chore(napi): release v3.1.6 ( #2825 )
...
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-08-01 15:10:53 +08:00
LongYinan
e175512d43
fix(napi): async task finally is not called ( #2824 )
2025-08-01 15:05:08 +08:00