LongYinan
e175512d43
fix(napi): async task finally is not called ( #2824 )
2025-08-01 15:05:08 +08:00
github-actions[bot]
e44329a059
chore(napi): release v3.1.5 ( #2820 )
...
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-07-31 09:53:58 +08:00
LongYinan
10416f1b43
fix(napi): relax the lifetime restriction in PromiseRaw callbacks ( #2819 )
2025-07-31 09:51:10 +08:00
github-actions[bot]
045f0afedd
chore(napi): release v3.1.4 ( #2818 )
2025-07-31 07:01:10 +08:00
LongYinan
7a26a98ee9
fix(napi): the generic trait rectiction of Env::spawn should be ScopedTask ( #2817 )
2025-07-31 00:49:24 +08:00
github-actions[bot]
a40e2368e6
chore: release ( #2814 )
...
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-07-30 11:56:41 +08:00
翠
bde407ddab
fix(napi-derive): generate types for threadsafe_function with WEAK=true correctly ( #2813 )
2025-07-30 00:24:15 +08:00
github-actions[bot]
069661e91d
chore: release ( #2805 )
...
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-07-24 21:41:32 +08:00
LongYinan
552f9c9ac4
chore(cli): setjmp link path ( #2808 )
2025-07-24 21:24:28 +08:00
Cong-Cong Pan
7c3dc968c1
perf(napi): optimize HashMap allocation in FromNapiValue implementation for HashMap ( #2796 )
...
* perf(napi): optimize HashMap allocation in FromNapiValue implementation for HashMap
* fix type
---------
Co-authored-by: LongYinan <lynweklm@gmail.com>
2025-07-24 15:41:00 +08:00
github-actions[bot]
da45fc2d30
chore(napi): release v3.1.2 ( #2795 )
...
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-07-22 18:02:31 +08:00
LongYinan
bb9883ab09
fix(napi-derive): lifetime codegen issue ( #2794 )
2025-07-22 17:54:18 +08:00
Cong-Cong Pan
a2ade0dfe5
perf(napi): use Vec with_capacity in FromNapiValue ( #2793 )
2025-07-22 17:40:15 +08:00
github-actions[bot]
63d536be4f
chore(napi): release v3.1.1 ( #2792 )
...
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-07-21 20:47:24 +08:00
LongYinan
b6f883a053
Revert "fix(napi): callback should be Fn rather than FnOnce" ( #2791 )
...
This reverts commit 7449e5f5cc24e3b92e83aeba68991da7cf8a5b2c.
2025-07-21 20:45:17 +08:00
github-actions[bot]
03805d1d3a
chore: release ( #2788 )
...
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-07-21 16:12:40 +08:00
LongYinan
16dbf68dca
chore(napi): add UnwindSafe and RefUnwindSafe back to AbortSignal and AsyncWorkPromise ( #2789 )
2025-07-21 16:03:24 +08:00
LongYinan
1ca2bad43f
feat(napi): provide ScopedTask to resolve JsValue with lifetime ( #2786 )
2025-07-21 13:55:44 +08:00
LongYinan
c657665a01
ci: pin release-plz action
2025-07-21 10:39:48 +08:00
LongYinan
a9dc138aa0
Release independent packages
...
- napi@3.0.0
- napi-derive@3.0.0
- napi-sys@3.0.0
2025-07-17 17:40:38 +08:00
LongYinan
a30d42c624
style: rust warning ( #2776 )
2025-07-12 23:38:42 +08:00
LongYinan
b5fa1ff688
Release independent packages
...
- napi@3.0.0-beta.12
- napi-derive@3.0.0-beta.12
2025-07-04 22:50:28 +08:00
LongYinan
0119f09237
feat(napi): support untyped TypedArray slice ( #2762 )
2025-07-03 16:50:35 +08:00
Brooooooklyn
2fed7f85e0
fix(napi): spawn_future_with_callback lifetime ( #2760 )
2025-07-03 07:09:22 +00:00
LongYinan
5add173ca2
feat(napi): support c string for object apis ( #2759 )
2025-07-03 14:08:05 +08:00
LongYinan
7e34e30b66
feat!(napi): create function from #[napi] fn ( #2757 )
2025-07-02 16:54:31 +08:00
Cong-Cong Pan
6222b39f5a
perf(napi): use Cell<bool> to replace AtomicBool ( #2506 )
...
* perf: use Cell<bool> to replace AtomicBool
* cargo fmt
---------
Co-authored-by: LongYinan <lynweklm@gmail.com>
2025-07-02 09:29:07 +08:00
LongYinan
a64df02e84
perf(napi): sender in Promise does not need to be Arc ( #2756 )
2025-07-01 08:40:24 -07:00
LongYinan
718b7d1ee0
fix(napi): drop SymbolRef and ObjectRef properly ( #2755 )
2025-07-01 08:28:42 -07:00
LongYinan
99f4c089d4
feat(napi): add napi_ref impl for Object Symbol and External ( #2754 )
2025-07-01 00:45:32 -07:00
LongYinan
0a8de79fc4
Release independent packages
...
- napi-build@2.2.2
2025-06-30 17:15:43 +08:00
LongYinan
caf0400090
Release independent packages
...
- napi@3.0.0-beta.11
- napi-derive@3.0.0-beta.11
2025-06-30 17:12:39 +08:00
LongYinan
092f887f39
fix(napi-derive): generate object key types properly ( #2752 )
2025-06-30 17:10:17 +08:00
LongYinan
b5e9c41d14
fix(napi): remove DerefMut impl for all TypedArray types ( #2750 )
2025-06-29 08:49:29 -07:00
LongYinan
56998d5f12
fix(napi): callback should be Fn rather than FnOnce ( #2749 )
...
In ThreadsafeFunction::call_with_return_value
2025-06-28 21:57:54 +08:00
CPunisher
b25c5de30c
fix(build): increase wasi stack size ( #2748 )
2025-06-27 19:29:54 +08:00
LongYinan
3898211b3a
Release independent packages
...
- napi@3.0.0-beta.10
- napi-derive@3.0.0-beta.10
2025-06-25 16:06:28 +08:00
LongYinan
8c3db48686
style: run clippy on nightly Rust ( #2744 )
2025-06-25 13:55:11 +08:00
Cameron
562bb698d6
fix(napi-derive): single parentheses arg is provided in ThreadsafeFunction ( #2742 )
...
* test: add repro for #2726
* fix
---------
Co-authored-by: LongYinan <lynweklm@gmail.com>
2025-06-24 16:09:47 +00:00
LongYinan
3e2fe8a2a3
fix(napi): create external TypedArray in Electron env ( #2740 )
2025-06-24 22:48:00 +08:00
LongYinan
b40aaa8d71
Release independent packages
...
- napi@3.0.0-beta.9
- napi-derive@3.0.0-beta.9
2025-06-24 16:33:32 +08:00
LongYinan
a773f8d438
fix(napi): prevent panic in ThreadsafeFunctionHandle::drop if ThreadsafeFunction::create fail ( #2731 )
2025-06-24 15:01:08 +08:00
LongYinan
8df3f942e6
fix(napi): wrong drop impl for TypedArray::with_external_data ( #2724 )
2025-06-23 17:48:21 +08:00
LongYinan
1a90e82bb1
perf(napi): remove unnecessary wrap in Task ( #2714 )
2025-06-13 00:02:14 -07:00
LongYinan
2b443401ac
fix(napi): set AbortError name ( #2713 )
2025-06-11 14:05:40 -07:00
LongYinan
fcfac5083a
fix(napi): avoid allocate empty Box if closures is empty ( #2712 )
...
Ref: https://github.com/napi-rs/napi-rs/pull/2711
2025-06-11 13:19:38 -07:00
LongYinan
97ed022e46
fix(napi): avoid add finalizer if properties is empty ( #2711 )
2025-06-11 12:47:49 -07:00
LongYinan
668b53e849
Release independent packages
...
- napi@3.0.0-beta.8
- napi-derive@3.0.0-beta.8
2025-06-08 21:44:17 +08:00
LongYinan
54935e34fa
fix(napi-derive): panic while creating type definition when Rust comment contains escape syntax ( #2701 )
2025-06-08 18:25:09 +08:00
LongYinan
814bc79412
fix(napi-derive): using js_name generating wrong type defs ( #2700 )
...
This commit introduces two main changes:
1. Refactors the variable names used during the creation of
`NapiStruct` in `crates/macro/src/parser/mod.rs`. The goal is to
make the source of `NapiStruct.name` (the Rust identifier) and
`NapiStruct.js_name` (the JavaScript name, potentially from a
`#[napi(js_name = "...")]` attribute) more explicit. This change
is primarily for code readability and maintainability. The core
logic remains the same.
2. Adds a new test case to `examples/napi` to specifically verify
the behavior of `#[napi(js_name = "...")]` on structs. This
includes:
- A new Rust struct `OriginalRustNameForJsNamedStruct` in
`examples/napi/src/class.rs` decorated with
`#[napi(js_name = "MyJsNamedClass")]`.
- Corresponding tests in `examples/napi/__tests__/values.spec.ts`
that check for correct class instantiation, method calls, and
type alias generation (`OriginalRustNameForJsNamedStruct` as an
alias for `MyJsNamedClass`).
Note: I encountered some issues running the full build and tests for the example due to pre-commit hooks in the testing environment that I couldn't bypass. However, I believe the changes are correct based on static analysis and focused checks.
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2025-06-08 17:14:57 +08:00