908 Commits

Author SHA1 Message Date
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
LongYinan
280ab7fdda
fix(sys): always require libloading because of msvc (#3047) 2025-12-02 21:38:48 +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
LongYinan
54a9654fae
fix(napi-derive): add paren for function types (#3044) 2025-12-02 14:56:17 +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
renovate[bot]
51e781e035
fix(deps): update rust crate convert_case to 0.10 (#3031)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-23 13:30:08 +00: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
LongYinan
f61c6e9f6e
fix(build): add back undefined symbols lookup behavior (#3015) 2025-11-10 12:27:40 +08:00
LongYinan
8a60cd0f64
build(napi): fix tsdown config (#3010) 2025-11-10 11:42:38 +08:00
renovate[bot]
347caf4c1c
fix(deps): update rust crate convert_case to 0.9 (#3001)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-08 22:07:16 +00:00
github-actions[bot]
26f1805ec6
chore: release (#3006)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-11-07 22:51:05 +08:00
LongYinan
25c159c500
fix(napi-derive): TypedArray typegen (#3005) 2025-11-07 22:47:15 +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
khj809
694db41895
feat(napi-derive): add discriminant_case to allow changing case of discriminant (#2960) 2025-10-23 10:25:17 +08:00
LongYinan
637e3e7a34
chore(napi): bump rust-version (#2966) 2025-10-21 00:12:39 +08:00
LongYinan
656bdca927
refactor(napi-derive): make typegen easier to read (#2956) 2025-10-11 14:46:38 +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
Toyo Li
65a85053d3
fix(build): export emnapi_thread_crashed (#2920) 2025-09-13 13:21:03 +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
LongYinan
cf5807f9f9
fix(napi-derive): codegen issue for &'env [u8] param (#2881) 2025-08-15 05:18:51 -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