17 Commits

Author SHA1 Message Date
LongYinan
de954666e0
feat(cli): new project from github project template (#2723) 2025-06-23 16:21:48 +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
renovate[bot]
77fe9757fc
chore(deps): lock file maintenance (#2380)
* chore(deps): lock file maintenance

* Fix typecheck

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: LongYinan <lynweklm@gmail.com>
2024-12-03 15:28:37 +08:00
Ranger
2fa0e62376
chore: add .idea folder to ignore (#1801) 2023-11-13 10:07:50 +08:00
LongYinan
1867c9f476
build: add libc++ in aarch64-linux-gnu Docker (#1511) 2023-03-12 17:25:53 +08:00
LongYinan
1531489e18
chore: upgrade to yarn3 2022-01-24 17:25:40 +08:00
LongYinan
7f0507097d
docs: add discord badge 2021-08-09 22:18:48 +08:00
LongYinan
b835c7ef3f
feat(build): remove ureq to support windows arm64 2021-05-31 23:31:17 +08:00
LongYinan
f03ada59df
ci: setup benchmark action 2020-10-14 01:02:00 +08:00
LongYinan
d141edb02d
build(sys): make cargo docs work 2020-08-13 23:38:01 +08:00
LongYinan
2073f23a91
feat(cli): start new cli 2020-07-29 23:06:37 +08:00
LongYinan
244db37c3b
refactor: decouple sys module of new napi-rs into a crate 2020-07-15 00:59:41 +08:00
LongYinan
7eb0d9b0f6
chore: update gitignore 2020-04-26 19:50:32 +08:00
LongYinan
090e7d6fb3
chore: prepare for release 2020-03-16 14:30:54 +08:00
LongYinan
e0e85502af
feat: upgrade to std-future 2020-02-18 21:09:17 +08:00
LongYinan
894c7c962a
feat: support node10 2018-04-29 22:16:28 +08:00
LongYinan
c05ab719b3
init 2018-04-28 16:26:38 +08:00