LongYinan
c067e0d7bb
chore(cli): skip Buffer import if fs is enable ( #2779 )
2025-07-17 14:10:48 +08:00
LongYinan
2700b04782
fix(cli): ohos binding
2025-07-13 00:04:52 +08:00
LongYinan
16b5a37951
fix(cli): ohos js binding logic ( #2775 )
2025-07-12 23:13:23 +08:00
LongYinan
0a8a499fa6
fix(cli): binding format ( #2774 )
2025-07-12 17:55:04 +08:00
LongYinan
69d28061ff
feat(cli): support ohos ( #2773 )
2025-07-12 17:29:15 +08:00
JounQin
93b9aa267c
fix(cli): check kHandle instead ( #2768 )
2025-07-07 17:24:52 +08:00
LongYinan
485befffcb
chore(example): add define_class example ( #2765 )
2025-07-06 21:43:35 -07:00
renovate[bot]
0443dc5133
chore(deps): update dependency vite-plugin-node-polyfills to ^0.24.0 ( #2767 )
...
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-07 01:47:54 +00: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
LongYinan
99f4c089d4
feat(napi): add napi_ref impl for Object Symbol and External ( #2754 )
2025-07-01 00:45:32 -07:00
LongYinan
092f887f39
fix(napi-derive): generate object key types properly ( #2752 )
2025-06-30 17:10:17 +08:00
LongYinan
2273031264
test(napi): add fixture for #2746 ( #2747 )
2025-06-25 22:35:25 +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
renovate[bot]
adcd6aaa3b
chore(deps): update dependency electron to v37 ( #2741 )
...
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-24 23:59:29 +08:00
LongYinan
3e2fe8a2a3
fix(napi): create external TypedArray in Electron env ( #2740 )
2025-06-24 22:48:00 +08:00
renovate[bot]
a023dd54c7
chore(deps): update dependency vite to v7 ( #2736 )
...
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-24 17:57:14 +08:00
LongYinan
3dce1533fd
test(napi): add fixture for re-export complex class ( #2733 )
2025-06-24 16:31:26 +08:00
LongYinan
1486b1f174
test(napi): add complex pub type fixture ( #2732 )
2025-06-24 15:37:43 +08:00
LongYinan
a773f8d438
fix(napi): prevent panic in ThreadsafeFunctionHandle::drop if ThreadsafeFunction::create fail ( #2731 )
2025-06-24 15:01:08 +08:00
renovate[bot]
99d2930f7d
chore(deps): update dependency @oxc-node/core to ^0.0.29 ( #2718 )
...
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-19 19:55:55 +00:00
renovate[bot]
c63d5acbcf
chore(deps): update dependency sinon to v21 ( #2715 )
2025-06-13 09:39:10 -07:00
Kevin Deng
e7af6608fc
fix(cli): wasm url in binding files ( #2710 )
2025-06-11 12:03:32 -07:00
LongYinan
e9835c4e75
chore(cli): link npm cli issues in native binding load errors ( #2707 )
...
* chore(cli): link npm cli issues in native binding load errors
* run fmt
2025-06-11 12:02:19 -07:00
renovate[bot]
a48b6b1fc9
chore(deps): update dependency @oxc-node/core to ^0.0.28 ( #2702 )
...
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-09 08:21:20 +00: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
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
a79f9846b6
fix(cli): dtsHeader option merge orders
2025-06-03 19:59:52 +08:00
LongYinan
4629423a5f
chore: update tests fixture
2025-06-03 19:53:48 +08:00
liuyi
d874a46647
fix: type generation for shared libs ( #2684 )
2025-06-03 19:19:29 +08:00
LongYinan
d5a16483c5
fix(napi-derive): Either<f64, u32> should generate number ts type ( #2683 )
2025-06-02 23:53:14 +08:00
Hana
f4731bb566
feat!(napi): support custom tsfn result error code ( #2672 )
2025-06-02 22:47:50 +08:00
LongYinan
b93bdfd3eb
test: stress test on aarch64 linux gnu platform ( #2662 )
...
* test: stress test on aarch64 linux gnu platform
* remove configs in yarnrc
* clippy
2025-06-02 22:45:01 +08:00
Cong-Cong Pan
9173e8eb28
feat!(napi): define propertes support symbol as name ( #2673 )
...
* feat: define properties support symbol as name
* fix
* fix
2025-05-30 23:37:19 +08:00
LongYinan
3a720f09cf
feat(sys): sync Node-API version changes ( #2661 )
...
* feat(sys): sync Node-API version changes
* upgrade electron
* move node_api_create_buffer_from_arraybuffer to experimental
2025-05-25 00:48:56 +08:00
LongYinan
f8fab45de7
feat(napi): serialize BigInt to serde::Value ( #2659 )
2025-05-24 23:18:40 +08:00
LongYinan
3c5f22001b
fix(napi): wrong error status in ThreadsafeFunction callback ( #2656 )
2025-05-22 17:24:46 +08:00
LongYinan
7182db3a81
feat(napi): EscapableHandleScope API ( #2652 )
2025-05-19 19:52:21 +08:00
LongYinan
92b094e487
feat(napi): new handle scope API ( #2650 )
2025-05-18 23:16:40 +08:00
LongYinan
18816c710c
refactor!(napi): move JsObjectValue into bindgen_runtime ( #2649 )
2025-05-18 22:29:45 +08:00
LongYinan
a9c8ae0f99
fix(napi-derive): disallow JsValue assign to napi class as a field ( #2648 )
2025-05-18 21:04:30 +08:00
LongYinan
74f349c180
fix(napi): reuse issue on AbortSignal ( #2646 )
...
- Close https://github.com/napi-rs/napi-rs/issues/2141
2025-05-18 15:57:10 +08:00
LongYinan
b1fb82dade
fix!(napi): unsound issues in Error ( #2644 )
...
- Close https://github.com/napi-rs/napi-rs/issues/1640
2025-05-17 22:44:24 +08:00
LongYinan
4407678a25
fix(napi-derive): #[cfg_attr(feature = "xxx", napi)] ( #2640 )
2025-05-17 20:37:36 +08:00
LongYinan
8e481c1eba
style: clippy fix ( #2639 )
2025-05-16 22:24:11 +08:00