2718 Commits

Author SHA1 Message Date
renovate[bot]
ec39912527
fix(deps): update dependency @tybys/wasm-util to ^0.9.0 (#2096)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-07 07:23:32 +00:00
LongYinan
4572ede9f5
refactor(napi): split T and CallJsBackArgs generic type (#2091) 2024-05-06 18:25:40 +08:00
Ranger
e9123e2c43
fix(napi): make sure env without exception pending before throw error (#2092) 2024-05-06 18:11:53 +08:00
LongYinan
3fc19fb2a3
style: fix clippy errors (#2090)
* style: fix clippy errors

* ci: rename wasip1 target name
2024-05-06 13:53:49 +08:00
Huakun Shen
ebc1e2ca18
fix(napi): set explicit target flag for x86_64 CI template (#2077) 2024-05-06 13:20:21 +08:00
renovate[bot]
09582c480f
chore(deps): update yarn to v4.2.1 (#2082)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-06 11:57:40 +08:00
Simon Hausmann
67ee2d085f
fix(napi): panic in JsArrayBufferValue as_ref/as_mut with Rust 1.78 (#2083)
In Rust 1.78, when debug assertions are enabled, slice::from_raw_parts panics if the provided data is a null pointer. This is possible through JsArrayBufferValue::new() as well as through
JsArrayBuffer::into_value, when napi_get_arraybuffer_info returns a null pointer
due to a zero length buffer.
2024-05-06 11:56:58 +08:00
renovate[bot]
f727a020b2
chore(deps): lock file maintenance (#2078) 2024-05-01 10:27:34 +00:00
renovate[bot]
d022f64834
fix(deps): update dependency @napi-rs/cross-toolchain to ^0.0.16 (#2079) 2024-05-01 18:15:26 +08:00
naskya
68b5f2c587
feat(napi): support chrono datetime with timezones (#2074)
* feat(napi): implement From/ToNapiValue for chrono::DateTime<Local> and chrono::DateTime<FixedOffset> (#1902)

* chore(napi): update tests

Co-authored-by: sup39 <dev@sup39.dev>

---------

Co-authored-by: sup39 <dev@sup39.dev>
2024-04-30 22:51:40 +08:00
LongYinan
a54b759bb1
chore(release): publish
- @napi-rs/cli@3.0.0-alpha.54
 - @napi-rs/triples@2.0.0-alpha.16
@napi-rs/cli@3.0.0-alpha.54 @napi-rs/triples@2.0.0-alpha.16
2024-04-23 14:34:12 +08:00
LongYinan
3e44ae3c16
fix(cli): non-fs polyfilled browser worker binding (#2067) 2024-04-23 14:26:27 +08:00
renovate[bot]
da31e367e1
chore(deps): update dependency vite-plugin-node-polyfills to ^0.21.0 (#2066)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-23 12:54:22 +08:00
LongYinan
71f78cb430
chore(release): publish
- @napi-rs/wasm-runtime@0.2.3
@napi-rs/wasm-runtime@0.2.3
2024-04-23 12:24:57 +08:00
LongYinan
521bc12e43
fix(wasm-runtime): missing fs-proxy.cjs 2024-04-23 12:24:37 +08:00
LongYinan
131046b7cb
chore(release): publish
- @napi-rs/cli@3.0.0-alpha.53
 - @napi-rs/triples@2.0.0-alpha.15
 - @napi-rs/wasm-runtime@0.2.2
@napi-rs/cli@3.0.0-alpha.53 @napi-rs/triples@2.0.0-alpha.15 @napi-rs/wasm-runtime@0.2.2
2024-04-23 12:17:07 +08:00
LongYinan
46cbcf3ff1
feat(cli): allow sync fs operation between workers/mainThread (#2064)
* feat(cli): allow sync fs operation between workers/mainThread

* allow sync fs operation between workers/mainThread (#2065)

* Fix

* Update fixture

* flaky test

* Fix cross compile target

* Update zig

* macos-cross test was filtered

---------

Co-authored-by: Toyo Li <lifenglin314@outlook.com>
2024-04-23 12:14:06 +08:00
LongYinan
9b6361afc3
chore(release): publish
- @napi-rs/cli@3.0.0-alpha.52
 - @napi-rs/triples@2.0.0-alpha.14
 - @napi-rs/wasm-runtime@0.2.1
@napi-rs/cli@3.0.0-alpha.52 @napi-rs/triples@2.0.0-alpha.14 @napi-rs/wasm-runtime@0.2.1
2024-04-22 18:07:46 +08:00
LongYinan
184806c5a4
chore: upgrade oxlint 2024-04-22 14:53:53 +08:00
LongYinan
12aec3c135
fix(cli): pass fs to browser worker binding (#2062) 2024-04-22 14:44:37 +08:00
inokawa
0adc36ce1c
feat(cli): support generation of literal union from string enum (#2054)
* feat(cli): support generation of literal union from enum

* Remove const

---------

Co-authored-by: LongYinan <lynweklm@gmail.com>
2024-04-22 14:28:04 +08:00
LongYinan
6b2164c85d
chore(release): publish
- @napi-rs/cli@3.0.0-alpha.51
 - @napi-rs/triples@2.0.0-alpha.13
 - @napi-rs/wasm-runtime@0.2.0
@napi-rs/cli@3.0.0-alpha.51 @napi-rs/triples@2.0.0-alpha.13 @napi-rs/wasm-runtime@0.2.0
2024-04-19 16:46:32 +08:00
LongYinan
51c2f1da78
chore: upgrade @tybys/wasm-util (#2059) 2024-04-19 16:45:22 +08:00
LongYinan
10602fb76f
fix(cli): new project issue (#2058) 2024-04-19 16:43:29 +08:00
LongYinan
4ccbb61179
feat(cli): improve the browser binding (#2056) 2024-04-19 16:12:30 +08:00
LongYinan
cd3a850dcb
ci: improve test speed (#2057) 2024-04-19 16:00:20 +08:00
LongYinan
22c751ced0
fix(napi-derive): bail the unexpected factory directive (#2051)
- Close https://github.com/napi-rs/napi-rs/issues/2048
2024-04-18 00:14:00 +08:00
LongYinan
8f5d7e5274
fix(napi): handle panic in async block (#2050)
- Close https://github.com/napi-rs/napi-rs/issues/2047
2024-04-17 23:34:47 +08:00
LongYinan
3187e30d5b
chore(release): publish
- @napi-rs/cli@3.0.0-alpha.50
 - @napi-rs/triples@2.0.0-alpha.12
@napi-rs/cli@3.0.0-alpha.50 @napi-rs/triples@2.0.0-alpha.12
2024-04-17 20:23:19 +08:00
LongYinan
7e33eb729f
feat(cli): optimize wasm output binary (#2049) 2024-04-17 20:13:02 +08:00
LongYinan
27134b8ca4
chore(release): publish
- @napi-rs/cli@3.0.0-alpha.49
 - @napi-rs/triples@2.0.0-alpha.11
@napi-rs/cli@3.0.0-alpha.49 @napi-rs/triples@2.0.0-alpha.11
2024-04-16 18:24:34 +08:00
LongYinan
0e60651149
chore: dedupe electron 2024-04-16 18:24:25 +08:00
LongYinan
b3dd94649a
feat(cli): allow to define dtsHeader in napi config (#2045) 2024-04-16 17:40:41 +08:00
LongYinan
a2d78fadf9
fix(cli): wasi targets linker envs (#2044) 2024-04-16 16:43:44 +08:00
renovate[bot]
6871b67589
chore(deps): update dependency electron to v30 (#2043)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-16 14:17:22 +08:00
LongYinan
dacfeac1f5
Release independent packages
napi@3.0.0-alpha.2
napi@3.0.0-alpha.2
2024-04-15 23:59:37 +08:00
LongYinan
e3a403b441
feat(napi): allow user defined tokio runtime (#2040) 2024-04-15 23:58:28 +08:00
LongYinan
4544095425
chore(release): publish
- @napi-rs/cli@3.0.0-alpha.48
 - @napi-rs/triples@2.0.0-alpha.10
@napi-rs/cli@3.0.0-alpha.48 @napi-rs/triples@2.0.0-alpha.10
2024-04-15 23:20:08 +08:00
Louis
19dbadefba
fix(ThreadsafeFunction): ensure CalleeHandled works as expected (#2039)
This was refactored in 4719caa64377f7d926c92a4c1051474ae79036c4. This codepath
was swapped, as the fatal exception must be the normal codepath when the callee
handled field is false. This fixes it by swapping this if statement, all the
other calls have been checked and seem fine.
2024-04-15 23:19:15 +08:00
LongYinan
cc937e1dba
feat(cli): allow control the wasm Memory options via napi config (#2038) 2024-04-15 23:19:02 +08:00
翠 / green
923b82aee9
feat(napi): allow &External to be created from napi value (#2037) 2024-04-15 17:54:10 +08:00
LongYinan
af625fc7df
chore(release): publish
- @napi-rs/cli@3.0.0-alpha.47
 - @napi-rs/triples@2.0.0-alpha.9
@napi-rs/cli@3.0.0-alpha.47 @napi-rs/triples@2.0.0-alpha.9
2024-04-13 19:01:15 +08:00
LongYinan
7999475f76
Release independent packages
napi-build@2.1.3
2024-04-13 18:55:53 +08:00
LongYinan
16f0d49284
chore: increase wasi memory limits (#2035) 2024-04-13 18:35:08 +08:00
LongYinan
f1b8ab5e64
chore(release): publish
- @napi-rs/cli@3.0.0-alpha.46
 - @napi-rs/triples@2.0.0-alpha.8
2024-04-10 17:03:00 +08:00
LongYinan
63c8ab3f20
Release independent packages
napi@3.0.0-alpha.1
napi-derive@3.0.0-alpha.1
napi-sys@2.4.0
napi-derive@3.0.0-alpha.1 napi-sys@2.4.0 napi@3.0.0-alpha.1
2024-04-10 17:03:00 +08:00
LongYinan
e274cf7ae6
feat(napi-derive): enhance the error messages in object validator (#2034) 2024-04-10 16:52:23 +08:00
LongYinan
67f03a7fd4
ci: fix flaky tests (#2033)
* ci: fix flaky tests

* chore: remove useless deps

* chore: decresse worker_threads counts
2024-04-10 15:43:05 +08:00
Ranger
e86e3add2b
fix(napi): napi_adjust_external_memory should be hidden with wasm target (#2031) 2024-04-10 14:57:04 +08:00
LongYinan
5570d8b4f7
chore: use oxlint (#2032) 2024-04-10 14:26:34 +08:00