3159 Commits

Author SHA1 Message Date
LongYinan
aa9e13df1f
chore(release): publish
- @napi-rs/cli@3.0.0-alpha.89
 - @napi-rs/triples@2.0.0-alpha.51
@napi-rs/cli@3.0.0-alpha.89 @napi-rs/triples@2.0.0-alpha.51
2025-06-13 00:07:08 -07: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
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]
6f74589a25
chore(deps): update dependency oxlint to v1 (#2705)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-10 21:42:29 +08: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
668b53e849
Release independent packages
- napi@3.0.0-beta.8
- napi-derive@3.0.0-beta.8
napi-derive@3.0.0-beta.8 napi@3.0.0-beta.8
2025-06-08 21:44:17 +08:00
LongYinan
984d166275
chore(release): publish
- @napi-rs/cli@3.0.0-alpha.88
 - @napi-rs/triples@2.0.0-alpha.50
 - @napi-rs/wasm-runtime@0.2.11
@napi-rs/cli@3.0.0-alpha.88 @napi-rs/triples@2.0.0-alpha.50 @napi-rs/wasm-runtime@0.2.11
2025-06-08 21:43:08 +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
LongYinan
3f4338a907
fix(napi): memory leak in Object Property (#2699) 2025-06-07 22:24:05 +08:00
lyonbot
193b0e0043
fix: (wasm-runtime) fix race condition (#2698)
Co-authored-by: LongYinan <lynweklm@gmail.com>
2025-06-07 22:09:47 +08:00
renovate[bot]
c47d0e75f3
chore(deps): update dependency oxlint to ^0.18.0 (#2697)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-06 23:59:20 +00: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
17cced98de
chore(release): publish
- @napi-rs/cli@3.0.0-alpha.87
 - @napi-rs/triples@2.0.0-alpha.49
@napi-rs/cli@3.0.0-alpha.87 @napi-rs/triples@2.0.0-alpha.49
2025-06-05 11:22:33 +08:00
LongYinan
21e5580f28
fix(cli): remove require in utils (#2693) 2025-06-05 11:08:05 +08:00
LongYinan
19146503ff
Release independent packages
- napi@3.0.0-beta.7
- napi-build@2.2.1
napi-build@2.2.1 napi@3.0.0-beta.7
2025-06-04 20:25:05 +08:00
LongYinan
3450c7af43
fix(napi-build): compatible with v2 2025-06-04 20:24:02 +08:00
LongYinan
4c771618b8
chore(release): publish
- @napi-rs/cli@3.0.0-alpha.86
 - @napi-rs/triples@2.0.0-alpha.48
@napi-rs/cli@3.0.0-alpha.86 @napi-rs/triples@2.0.0-alpha.48
2025-06-04 18:27:31 +08:00
LongYinan
fdbc070d6a
fix(cli): uses_default_features should also treat as enabled typeDef (#2691) 2025-06-04 18:27:03 +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
napi-build@3.0.0-alpha.0 napi-derive@3.0.0-beta.6 napi@3.0.0-beta.6
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
napi-derive@3.0.0-beta.5 napi@3.0.0-beta.5
2025-06-04 17:07:12 +08:00
LongYinan
0309ae9031
chore(release): publish
- @napi-rs/cli@3.0.0-alpha.85
 - @napi-rs/triples@2.0.0-alpha.47
@napi-rs/cli@3.0.0-alpha.85 @napi-rs/triples@2.0.0-alpha.47
2025-06-04 17:01:49 +08:00
liuyi
c9ff0ec464
feat(cli): detect type-def feature in cli (#2690) 2025-06-04 15:19:28 +08:00
liuyi
5a17b88636
fix: revalidate shared libs if type def not found (#2689) 2025-06-04 15:05:24 +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
renovate[bot]
bce635862d
chore(deps): update yarn to v4.9.2 (#2686)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-03 22:42:56 +00:00
LongYinan
1427056fe5
chore(release): publish
- @napi-rs/cli@3.0.0-alpha.84
 - @napi-rs/triples@2.0.0-alpha.46
@napi-rs/cli@3.0.0-alpha.84 @napi-rs/triples@2.0.0-alpha.46
2025-06-03 20:19:23 +08:00
LongYinan
375b32b2b1
chore: clippy fix 2025-06-03 20:18:57 +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
LongYinan
fc62b69abc
chore(release): publish
- @napi-rs/cli@3.0.0-alpha.83
 - @napi-rs/triples@2.0.0-alpha.45
@napi-rs/cli@3.0.0-alpha.83 @napi-rs/triples@2.0.0-alpha.45
2025-06-03 19:50:46 +08:00
LongYinan
da42542f0a
fix(cli): dtsHeader content 2025-06-03 19:50:31 +08:00
LongYinan
9dd929db4a
chore: update napi-derive-backend version in napi-derive 2025-06-03 19:41:59 +08:00
LongYinan
2f64f200da
Release independent packages
- napi@3.0.0-beta.4
- napi-derive@3.0.0-beta.4
napi-derive@3.0.0-beta.4 napi-sys@3.0.0-alpha.3 napi@3.0.0-beta.4
2025-06-03 19:25:47 +08:00
LongYinan
b3a477cac0
chore(release): publish
- @napi-rs/cli@3.0.0-alpha.82
 - @napi-rs/triples@2.0.0-alpha.44
@napi-rs/cli@3.0.0-alpha.82 @napi-rs/triples@2.0.0-alpha.44
2025-06-03 19:22:17 +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
LongYinan
b8d6e7bcee
fix(sys): napi10 types (#2682) 2025-06-02 23:37:16 +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
renovate[bot]
23dbcd81fe
chore(deps): lock file maintenance (#2678)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-02 12:36:03 +08:00
renovate[bot]
4ce77e1ef1
chore(deps): update dependency oxlint to ^0.17.0 (#2675)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-30 23:28:25 +00:00
Cong-Cong Pan
6bbf25a3f3
perf(napi): hash map (#2671) 2025-05-30 23:38:17 +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
6fd2f0d962
Release independent packages
- napi@3.0.0-beta.3
- napi-sys@3.0.0-alpha.2
- napi-derive@3.0.0-beta.3
napi-derive@3.0.0-beta.3 napi-sys@3.0.0-alpha.2 napi@3.0.0-beta.3
2025-05-29 23:14:41 +08:00