Commit graph

51 commits

Author SHA1 Message Date
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
dependabot[bot]
dfe84e51c1
build(deps-dev): bump @types/dockerode from 3.3.0 to 3.3.1 2022-01-03 22:15:36 +00:00
LongYinan
e452c00fb4
feat: edition 2021 2021-12-08 13:18:47 +08:00
LongYinan
8b362d8eb1 Revert "build(deps): bump chalk from 4.1.2 to 5.0.0"
This reverts commit b357f6e6a5.
2021-12-07 10:50:39 +08:00
dependabot[bot]
b357f6e6a5
build(deps): bump chalk from 4.1.2 to 5.0.0 2021-12-06 21:51:23 +00:00
dependabot[bot]
f0da66a47e
build(deps): bump table from 6.7.3 to 6.7.5 2021-12-06 21:51:14 +00:00
LongYinan
d9c53d728b
feat(napi): support TypedArray input and output 2021-12-02 11:26:52 +08:00
dependabot[bot]
3f7fdaba8c
build(deps): bump chalk from 4.1.2 to 5.0.0 2021-11-29 21:30:11 +00:00
dependabot[bot]
eb5f53a2cf
build(deps): bump table from 6.7.2 to 6.7.3 2021-11-08 21:34:14 +00:00
LongYinan
af86f6f7a4
chore: make examples private 2021-10-31 23:33:51 +08:00
dependabot[bot]
b656254232
build(deps-dev): bump @types/dockerode from 3.2.7 to 3.3.0 2021-10-18 21:39:27 +00:00
dependabot[bot]
83c131b4bd
build(deps): bump table from 6.7.1 to 6.7.2 2021-10-04 21:54:41 +00:00
forehalo
2467b7139b
Introduce #[napi] procedural macro to automation development boilerplate (#696)
* napi procedural macro for basic rust/JavaScript types
* introduce the `compat-mode` for `napi` and `napi-derive` crates for backward compatible
* remove #[inline] and let compiler to decide the inline behavior
* cli now can produce the `.d.ts` file for native binding
* many tests and example for the new procedural macro

Co-authored-by: LongYinan <lynweklm@gmail.com>
2021-09-23 01:29:09 +08:00
LongYinan
61c73fcf5e
chore(memory-testing): make pkg private 2021-09-15 00:14:49 +08:00
dependabot[bot]
6470174b6a
build(deps): bump dockerode from 3.3.0 to 3.3.1
Bumps [dockerode](https://github.com/apocas/dockerode) from 3.3.0 to 3.3.1.
- [Release notes](https://github.com/apocas/dockerode/releases)
- [Commits](https://github.com/apocas/dockerode/commits)

---
updated-dependencies:
- dependency-name: dockerode
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-13 21:07:16 +00:00
dependabot[bot]
695353024a
build(deps): bump chalk from 4.1.1 to 4.1.2 2021-08-02 21:56:52 +00:00
dependabot[bot]
441739d9b1
build(deps-dev): bump @types/dockerode from 3.2.6 to 3.2.7 2021-08-02 21:44:01 +00:00
dependabot[bot]
10b4510dad
build(deps-dev): bump @types/dockerode from 3.2.4 to 3.2.6 2021-07-19 21:34:07 +00:00
dependabot[bot]
5128ac45c4
build(deps-dev): bump @types/dockerode from 3.2.3 to 3.2.4 2021-07-12 21:33:43 +00:00
LongYinan
4ffc513c3f
style: typo 2021-05-29 23:36:49 +08:00