630 Commits

Author SHA1 Message Date
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
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]
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
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
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
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
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
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
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
3f4338a907
fix(napi): memory leak in Object Property (#2699) 2025-06-07 22:24:05 +08:00
Hana
e31b898a35
feat(napi): support setting error_status of ThreadsafeFunctionBuilder (#2695) 2025-06-06 16:27:52 +08:00
Hana
0a90c8a8f2
feat(napi): support build_threadsafe_function variant with error status (#2694) 2025-06-05 21:35:18 +08:00
LongYinan
19146503ff
Release independent packages
- napi@3.0.0-beta.7
- napi-build@2.2.1
2025-06-04 20:25:05 +08:00
LongYinan
8256b9515e
Release independent packages
- napi@3.0.0-beta.6
- napi-derive@3.0.0-beta.6
- napi-build@3.0.0-beta.0
2025-06-04 18:24:11 +08:00
LongYinan
a8d39e98df
Release independent packages
- napi@3.0.0-beta.5
- napi-derive@3.0.0-beta.5
2025-06-04 17:07:12 +08:00
Cong-Cong Pan
a6f133cf7f
perf(napi): PersistedPerInstanceHashMap can be thread local (#2681)
* perf: PersistedPerInstanceHashMap can be thread local

* fix

* fix

* fix cargo clippy
2025-06-04 11:46:36 +08:00