70 Commits

Author SHA1 Message Date
LongYinan
8a60cd0f64
build(napi): fix tsdown config (#3010) 2025-11-10 11:42:38 +08:00
LongYinan
eea268d3dd
ci: fix memory testing hang (#3008) 2025-11-09 00:21:36 +08:00
LongYinan
8120ca0ac4
chore(cli): throw error if wasi file not found when NAPI_RS_FORCE_WASI=error (#2919)
* chore(cli): throw error if wasi file not found when NAPI_RS_FORCE_WASI=error

* update snapshot
2025-09-11 16:29:05 +08:00
LongYinan
8c3db48686
style: run clippy on nightly Rust (#2744) 2025-06-25 13:55:11 +08:00
LongYinan
5956a00b39
chore(memory-testing): js style fix (#2623) 2025-05-11 22:58:54 +08:00
LongYinan
9de545e7a2
refactor!(napi): add lifetime to Object (#2619) 2025-05-11 19:51:29 +08:00
LongYinan
bcf5e14aa8
feat(napi): add from_napi_value for Ref<T: FromNapiValue> (#2603) 2025-05-05 23:38:46 +08:00
LongYinan
d942a6bab9
test: fix flaky (#2601) 2025-05-05 14:56:07 +08:00
renovate[bot]
2189377875
fix(deps): update dependency pretty-bytes to v7 (#2579)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-03 15:51:40 +08:00
LongYinan
5554c663ac
chore(cli): update deps (#2542) 2025-04-01 23:49:56 +08:00
LongYinan
c62acd2bfe
chore: upgrade npm dependencies (#2516) 2025-03-16 22:29:04 +08:00
LongYinan
d96bd288de
fix!(napi): upgrade to ctor 0.3.6 (#2472) 2025-02-20 12:22:29 +08:00
LongYinan
0ce8fab19c
chore(napi): merge thread cleanup (#2469) 2025-02-16 16:55:16 +08:00
LongYinan
98cb7671d3
feat(napi): impl ReadableStream and AsyncGenerator (#2418)
* feat(napi): impl ReadableStream and AsyncGenerator

* clippy fix

* Into<Vec<u8>> trait

* Skip node18 stream test due to Node.js bug

* Cleanup

* Also skip wasi test

* Merge test

* Skip wasi

* Useless expect-error
2025-01-03 17:09:42 +08:00
LongYinan
8fffa49282
fix(napi): resuse threads worker on Node.js (#2399) 2024-12-18 23:48:30 +08:00
LongYinan
4496ffd220
chore: refresh npm dependencies (#2303) 2024-10-13 23:50:57 +08:00
LongYinan
afd081d003
feat(napi,napi-derive): allow lifetime in Class (#2298) 2024-10-10 05:59:14 +02:00
LongYinan
bc9e931a4e
feat(napi): provide PromiseRaw for non-await scenario (#2168) 2024-07-06 19:09:16 +08:00
LongYinan
4572ede9f5
refactor(napi): split T and CallJsBackArgs generic type (#2091) 2024-05-06 18:25:40 +08:00
LongYinan
4719caa643
feat(napi): support Return generic of ThreadsafeFunction (#1997)
* feat(napi): support to use tuple with either (#1993)

`Either` uses `ValidateNapiValue` + `TypeName` to validate and report error on value not being matched. So there's no way to remove these super traits from it. So I implemented these types to `Tuple` types.

* feat(napi): support `Return` generic of ThreadsafeFunction

* depracate JsFunction

* CalleeHandled tsfn should handle Result in callback

* Pass env to call_with_return_value callback

* Fix compile

* clippy fix

* Fix electron test

* Function args

---------

Co-authored-by: Hana <andywangsy@gmail.com>
2024-03-20 21:37:08 +08:00
LongYinan
0007e3aaf6
chore: upgrade all dependencies (#1933) 2024-02-01 12:14:56 +08:00
LongYinan
751312cec9
test: add test file name into error message (#1821) 2023-11-20 15:56:20 +08:00
LongYinan
8c911b5d34
chore: upgrade emnapi dependencies (#1817) 2023-11-19 15:13:06 +08:00
renovate[bot]
60deb42056
fix(deps): update dependency dockerode to v4 (#1753)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-12 11:21:04 +08:00
LongYinan
6d62b3f714
chore: upgrade dependencies (#1657) 2023-07-17 14:56:02 +08:00
LongYinan
1d78f6c294
chore: upgrade npm dependencies (#1557) 2023-04-11 10:47:52 +08:00
forehal
a781a4f27e feat(cli): brand new cli tool with both cli and programmatical usage (#1492)
BREAKING CHANGE: requires node >= 16 and some cli options have been renamed
2023-04-06 11:04:53 +08:00
LongYinan
3d48d4464b
fix(cli,napi-derive): re-export types from shared crate (#1531)
* fix(cli,napi-derive): re-export types from shared crate

* chore: publish

 - @napi-rs/cli@2.15.1-alpha.0

* Clippy fix

* Fix memory testing
2023-03-21 18:12:52 +08:00
LongYinan
62b16d6a89
chore: upgrade npm dependencies (#1443) 2023-01-19 00:32:52 +08:00
overlookmotel
ce2a29fca7
fix(napi): arraybuffer memory leak (#1420) 2023-01-09 14:47:36 +08:00
LongYinan
b7ba068853
test: fix memory test assertion 2022-12-28 22:28:47 +08:00
Sergey Tatarintsev
81498ecbea
test: Memory leak reproduction for futures 2022-12-28 21:19:01 +08:00
LongYinan
6e4b16fe5d
style: clippy fix 2022-12-16 20:19:39 +08:00
LongYinan
28be7e256b
chore(cli): upgrade Node.js dependencies (#1368) 2022-11-20 22:59:35 +08:00
LongYinan
6ff69a1dab
test(memory-testing): adjust buffer tests 2022-10-02 12:28:56 +08:00
LongYinan
c76be2f1e0
ci: do not throw if docker container stop failed 2022-10-02 11:14:52 +08:00
LongYinan
47de6301ee
fix(napi): should also delete the reference while dropping the Buffer 2022-10-02 10:14:25 +08:00
LongYinan
184c4af588
chore: upgrade npm dependencies 2022-08-23 20:18:25 +08:00
LongYinan
16ec32b68e
fix(napi): memory leak in Buffer/ArrayBuffer 2022-07-11 21:34:27 +08:00
LongYinan
552ec43fae
fix(napi): use Mutex instead of Atomic in ThreadSafeFunction 2022-07-10 00:07:56 +08:00
LongYinan
5cfff2ad5c
chore(cli): upgrade npm dependencies 2022-07-06 21:18:00 +08:00
LongYinan
8bb4db349d
chore: upgrade dependencies 2022-06-04 01:26:35 +08:00
LongYinan
a2b993acd2
chore: upgrade npm dependencies (#1182) 2022-05-14 18:56:50 +08:00
LongYinan
cf6b2c9241
chore: upgrade dependencies 2022-04-27 00:57:57 +08:00
LongYinan
63a557f6cc test(napi): add memory tests for Reference 2022-04-13 13:24:53 +08:00
LongYinan
6a252c70d2 fix(napi): make buffer Send & Sync safe 2022-04-13 13:24:53 +08:00
LongYinan
11967dec79
chore: upgrade dependencies 2022-04-01 12:10:56 +08:00
LongYinan
5005aaa5af
chore: upgrade dependencies 2022-03-13 18:30:11 +08:00
LongYinan
d55e4f6f1f
style: format toml files 2022-02-11 10:46:17 +08:00
LongYinan
1531489e18
chore: upgrade to yarn3 2022-01-24 17:25:40 +08:00