2728 Commits

Author SHA1 Message Date
LongYinan
70a5fce68d
Release independent packages
- napi@3.0.0-alpha.6
napi@3.0.0-alpha.6
2024-07-07 20:55:20 +08:00
LongYinan
3a511bacee
fix(napi): Promise callbacks should require static lifetime (#2172) 2024-07-07 20:42:17 +08:00
LongYinan
27030c8dae
refactor(napi): simplify Promise implementation (#2171) 2024-07-07 14:59:03 +08:00
LongYinan
807b987a20
fix(napi): PromiseRaw does not require napi4 and tokio_rt napi-derive@3.0.0-alpha.4 napi@3.0.0-alpha.5 2024-07-06 23:59:26 +08:00
LongYinan
eb09a6f7f5
Release independent packages
- napi@3.0.0-alpha.5
- napi-derive@3.0.0-alpha.4
2024-07-06 23:48:30 +08:00
LongYinan
16386638c2
fix(napi-derive): Result type in async fn (#2169) 2024-07-06 23:46:24 +08:00
LongYinan
bc9e931a4e
feat(napi): provide PromiseRaw for non-await scenario (#2168) 2024-07-06 19:09:16 +08:00
LongYinan
a4cd94ea30
Release independent packages
- napi@3.0.0-alpha.4
napi@3.0.0-alpha.4
2024-07-06 14:34:06 +08:00
LongYinan
aef57fb196
feat(napi): impl from_string for Uint8Array (#2167) 2024-07-06 14:32:09 +08:00
LongYinan
a7ef9be9ca
chore: external all dependencies in cli cjs build (#2166) 2024-07-06 14:11:21 +08:00
LongYinan
286c8d0cf4
chore(release): publish
- @napi-rs/cli@3.0.0-alpha.56
 - @napi-rs/triples@2.0.0-alpha.18
@napi-rs/cli@3.0.0-alpha.56 @napi-rs/triples@2.0.0-alpha.18
2024-07-05 11:44:59 +08:00
Jade-fu
2265ca3e1a
fix(napi): asynchronous functions can return any errors (#2165)
* feat(napi): asynchronous functions can return any errors as long as they implement the Into<Error> trait.

* chore: use impl Into<Error>
2024-07-04 14:47:32 +08:00
renovate[bot]
c61aa20dfe
chore(deps): update dependency esbuild to ^0.23.0 (#2164)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-03 23:07:29 +08:00
renovate[bot]
296f0dd72b
chore(deps): update dependency esbuild to ^0.22.0 (#2162)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-01 14:41:37 +08:00
LongYinan
1228e918e9
Release independent packages
- napi-derive@3.0.0-alpha.3
napi-derive@3.0.0-alpha.3
2024-07-01 13:28:46 +08:00
renovate[bot]
793d734189
chore(deps): lock file maintenance (#2163)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-01 13:25:59 +08:00
Jade-fu
c2bda9a900
fix(napi-derive): class constructor and factory should support custom error status (#2161) 2024-06-30 16:12:00 +08:00
LongYinan
657fbfb113
Release independent packages
- napi@3.0.0-alpha.3
- napi-derive@3.0.0-alpha.2
napi-derive@3.0.0-alpha.2 napi@3.0.0-alpha.3
2024-06-27 20:46:29 +08:00
renovate[bot]
64868476fa
chore(deps): update dependency oxlint to ^0.5.0 (#2159)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-27 20:41:04 +08:00
Gentle
7c4072b237
let docs.rs generate all documentation (#2160)
without this, all-features = true has no effect

Co-authored-by: Gentle <ramon.klass@gmail.com>
2024-06-27 20:40:34 +08:00
LongYinan
04bd89b9a4
chore(napi): exclude libuv api on wasm targets (#2156) 2024-06-24 23:36:05 +08:00
LongYinan
a7d85b0549
chore(napi): remove stale tokio feature (#2155) 2024-06-24 17:41:58 +08:00
LongYinan
d7a5a7e9a1
test(napi): spwan thread in thread (#2139) 2024-06-24 16:09:07 +08:00
renovate[bot]
f9721584f8
chore(deps): update oven-sh/setup-bun action to v2 (#2153)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-24 11:38:59 +08:00
renovate[bot]
59aaf2209d
chore(deps): update yarn to v4.3.1 (#2150)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-21 09:58:09 +00:00
renovate[bot]
c59e075f58
fix(deps): update dependency @octokit/rest to v21 (#2149) 2024-06-21 12:45:53 +08:00
Dennis Duda
bd5b86e13b
chore(napi): reduce monomorphization load of various functions (#2143)
* refactor(napi): reduce monomorphization load of `JsObject::{get, set}`

Outside of `std::panicking::try` and `tokio`, these functions were the highest-up in `cargo-llvm-lines`.

Moves most of the logic out into non-generic functions.

* refactor(napi): reduce monomorphization load of `JsDeferred::new`

* refactor(napi): reduce monomorphization load of `call_js_cb`

---------

Co-authored-by: LongYinan <lynweklm@gmail.com>
2024-06-18 22:41:49 +08:00
renovate[bot]
433d27a4e7
chore(deps): update docker/build-push-action action to v6 (#2142)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-18 13:50:02 +08:00
LongYinan
ea623903d8
chore: clippy fix (#2144) 2024-06-18 13:20:43 +08:00
Özgür Akkurt
14d88997d7
chore(napi): print anyhow error in debug mode to show trace (#2140) 2024-06-17 11:45:10 +08:00
Ranger
19e3488efc
fix(napi): JsString should respect \0 character to align with String (#2138)
* fix(napi): JsString should respect \0 character to align with String

* chore(test): update snapshot
2024-06-12 15:20:27 +08:00
renovate[bot]
bd864d2906
chore(deps): update dependency c8 to v10 (#2134)
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [c8](https://togithub.com/bcoe/c8) | [`^9.1.0` -> `^10.0.0`](https://renovatebot.com/diffs/npm/c8/9.1.0/10.0.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/c8/10.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/c8/10.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/c8/9.1.0/10.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/c8/9.1.0/10.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>bcoe/c8 (c8)</summary>

### [`v10.0.0`](https://togithub.com/bcoe/c8/blob/HEAD/CHANGELOG.md#1000-2024-06-10)

[Compare Source](https://togithub.com/bcoe/c8/compare/v9.1.0...v10.0.0)

##### ⚠ BREAKING CHANGES

-   **deps:** Node 18 is now the minimum supported Node.js version

##### Bug Fixes

-   **deps:** update test-exclude with new glob / minimatch ([#&#8203;531](https://togithub.com/bcoe/c8/issues/531)) ([e33cf30](e33cf30d0c))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/napi-rs/napi-rs).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zOTMuMCIsInVwZGF0ZWRJblZlciI6IjM3LjM5My4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
2024-06-11 14:01:29 +08:00
renovate[bot]
50b9110ea1
chore(deps): update dependency electron to v31 (#2136) 2024-06-11 12:50:00 +08:00
Ranger
0749ef1832
fix(cli): rename env CC to TARGET_CC avoid proc-macro build failed (#2137) 2024-06-11 12:49:19 +08:00
renovate[bot]
2cbec7fec9
chore(deps): update yarn to v4.3.0 (#2135)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-10 22:44:14 +00:00
renovate[bot]
3bd548d317
chore(deps): update dependency oxlint to ^0.4.0 (#2126)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-09 21:07:46 +08:00
renovate[bot]
0da9e777f4
chore(deps): lock file maintenance (#2129)
* chore(deps): lock file maintenance

* fix lint

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: LongYinan <lynweklm@gmail.com>
2024-06-09 20:52:58 +08:00
Kreijstal
ac47a92424
feat(build): add windows gnu target (#2026)
* squash  attempt number 2

* Add clang64

this adds clang64 compiler to the test suite

---------

Co-authored-by: LongYinan <lynweklm@gmail.com>
2024-06-09 00:54:59 +08:00
renovate[bot]
7f7dfab001
chore(deps): update dependency @rollup/plugin-commonjs to v26 (#2132)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-07 16:20:08 +08:00
Gentle
2f21ba1872
chore(napi): make Ser and De public #2131
also adds helper functions needed to work with Ser and De

Co-authored-by: Gentle <ramon.klass@gmail.com>
2024-06-07 16:19:55 +08:00
Ranger
80d9d87ef9
chore(example): remove JsFunction from example (#2123)
* chore(example): remove jsfunction

* feat(napi): implement ToNapiValue for Ref as required by TSFN

* fix(test): tsfn test build failed

* chore: lint code

* fix(test): fix tsfn unit test
2024-05-26 21:07:01 +08:00
Ranger
a3b01870a3
feat(napi): support External for compact mode and add JsExternal as deprecated (#2125) 2024-05-26 14:43:33 +08:00
Ranger
879008c4b6
feat(napi): implement ToNapiValue for Ref as required by TSFN (#2122) 2024-05-23 09:50:03 +08:00
renovate[bot]
34723ca005
chore(deps): update dependency vite-plugin-node-polyfills to ^0.22.0 (#2119)
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [vite-plugin-node-polyfills](https://togithub.com/davidmyersdev/vite-plugin-node-polyfills) | [`^0.21.0` -> `^0.22.0`](https://renovatebot.com/diffs/npm/vite-plugin-node-polyfills/0.21.0/0.22.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/vite-plugin-node-polyfills/0.22.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/vite-plugin-node-polyfills/0.22.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/vite-plugin-node-polyfills/0.21.0/0.22.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/vite-plugin-node-polyfills/0.21.0/0.22.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>davidmyersdev/vite-plugin-node-polyfills (vite-plugin-node-polyfills)</summary>

### [`v0.22.0`](https://togithub.com/davidmyersdev/vite-plugin-node-polyfills/releases/tag/v0.22.0)

[Compare Source](https://togithub.com/davidmyersdev/vite-plugin-node-polyfills/compare/v0.21.0...v0.22.0)

-   Stop defining globals when they are disabled

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/napi-rs/napi-rs).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNjMuNSIsInVwZGF0ZWRJblZlciI6IjM3LjM2My41IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
2024-05-20 12:22:55 +08:00
renovate[bot]
4b3a84bcd0
fix(deps): update dependency emnapi to v1.2.0 (#2118)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-19 13:22:40 +00:00
magic-akari
734d74bd02
fix(typegen): add missing declare keyword (#2117) 2024-05-19 16:53:23 +08:00
Ranger
c52d2042a2
feat(napi): Function build_thfn support calledhandled mode (#2114)
* feat(napi): Function build_thfn support calledhandled mode

* test(example): add calleehandle example
2024-05-18 20:20:12 +08:00
Louis
c223954dc6
chore(napi): allow value attribute on enum variants (#2115)
This allows us to customize the enum value for string_enum. So far, only the case attribute was allowing us to customize the value of those variants, this is a next step in allowing the value to be different from the actual name.

This has a new test, and snapshots have been updated accordingly.

@Brooooooklyn - could we include that in napi v2 and tag after it?
2024-05-17 11:22:33 +08:00
renovate[bot]
04da0d9fd1
chore(deps): update dependency sinon to v18 (#2112)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-16 14:27:55 +08:00
LongYinan
f553952458
ci: fix alpine image build 2024-05-14 15:19:08 +08:00