3188 Commits

Author SHA1 Message Date
LongYinan
0a8de79fc4
Release independent packages
- napi-build@2.2.2
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
napi-derive@3.0.0-beta.11 napi@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
2273031264
test(napi): add fixture for #2746 (#2747) 2025-06-25 22:35:25 +08:00
LongYinan
3898211b3a
Release independent packages
- napi@3.0.0-beta.10
- napi-derive@3.0.0-beta.10
napi-derive@3.0.0-beta.10 napi@3.0.0-beta.10
2025-06-25 16:06:28 +08:00
LongYinan
9a376fe3f1
test(cli): prevent path error on Windows (#2745) 2025-06-25 16:03:53 +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
27d0d923c6
fix(cli): throw error if targets are duplicated (#2743) 2025-06-24 23:48:27 +08:00
LongYinan
3e2fe8a2a3
fix(napi): create external TypedArray in Electron env (#2740) 2025-06-24 22:48:00 +08:00
LongYinan
71da5b6dc1
chore(release): publish
- @napi-rs/cli@3.0.0-alpha.91
 - @napi-rs/triples@2.0.0-alpha.53
@napi-rs/cli@3.0.0-alpha.91 @napi-rs/triples@2.0.0-alpha.53
2025-06-24 17:58: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
6c2b0b54de
fix(cli): build config (#2735) 2025-06-24 17:56:59 +08:00
LongYinan
b40aaa8d71
Release independent packages
- napi@3.0.0-beta.9
- napi-derive@3.0.0-beta.9
napi-derive@3.0.0-beta.9 napi@3.0.0-beta.9
2025-06-24 16:33:32 +08:00
LongYinan
aeefd091b1
chore(release): publish
- @napi-rs/cli@3.0.0-alpha.90
 - @napi-rs/triples@2.0.0-alpha.52
@napi-rs/cli@3.0.0-alpha.90 @napi-rs/triples@2.0.0-alpha.52
2025-06-24 16:32:30 +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
LongYinan
0d1a4c4a94
fix(cli): handle CI.yaml targets omit (#2730) 2025-06-24 13:21:01 +08:00
dependabot[bot]
52206cc4ce
chore(deps): bump pbkdf2 from 3.1.2 to 3.1.3 (#2729)
Bumps [pbkdf2](https://github.com/crypto-browserify/pbkdf2) from 3.1.2 to 3.1.3.
- [Changelog](https://github.com/browserify/pbkdf2/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crypto-browserify/pbkdf2/compare/v3.1.2...v3.1.3)

---
updated-dependencies:
- dependency-name: pbkdf2
  dependency-version: 3.1.3
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-24 13:16:03 +08:00
LongYinan
1481031f37
fix(cli): handle the wasi names in new command (#2725) 2025-06-23 21:23:42 +08:00
LongYinan
8df3f942e6
fix(napi): wrong drop impl for TypedArray::with_external_data (#2724) 2025-06-23 17:48:21 +08:00
LongYinan
de954666e0
feat(cli): new project from github project template (#2723) 2025-06-23 16:21:48 +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
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