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
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
LongYinan
1228e918e9
Release independent packages
...
- napi-derive@3.0.0-alpha.3
2024-07-01 13:28:46 +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
2024-06-27 20:46:29 +08:00
magic-akari
734d74bd02
fix(typegen): add missing declare keyword ( #2117 )
2024-05-19 16:53:23 +08:00
LongYinan
4572ede9f5
refactor(napi): split T and CallJsBackArgs generic type ( #2091 )
2024-05-06 18:25:40 +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
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
63c8ab3f20
Release independent packages
...
napi@3.0.0-alpha.1
napi-derive@3.0.0-alpha.1
napi-sys@2.4.0
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
2a7c000275
Release independent packages
...
- napi@3.0.0-alpha.0
- napi-derive@3.0.0-alpha.0
2024-03-20 22:46:59 +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
e3e8a0fb39
Release independent packages
...
napi@2.16.0
napi-derive@2.16.0
2024-02-28 15:06:11 +08:00
LongYinan
117e4ce153
fix(napi-derive): wrong dependency condition ( #1980 )
2024-02-25 15:25:42 +08:00
LongYinan
3e187151a6
fix(napi-derive): HashMap/IndexMap and slice generated types ( #1977 )
2024-02-25 00:56:30 +08:00
LongYinan
5af366b042
style(napi-derive): clippy fix ( #1976 )
2024-02-25 00:54:33 +08:00
サポミク
ebe97257a6
feat(napi-derive): add use_nullable attribute ( #1971 )
...
* feat(napi-derive): add use_nullable attribute
Co-authored-by: naskya <m@naskya.net>
* chore(napi-derive): update tests
Co-authored-by: naskya <m@naskya.net>
---------
Co-authored-by: naskya <m@naskya.net>
2024-02-24 21:49:54 +08:00
Louis
43415251b8
feat(napi): allow Reference as a class method param ( #1966 )
...
As of before this commit, there was a lock in the codegen preventing Reference
from being used as a function argument outside of a Reference<Self>.
This changes it, allowing Reference of any class to be added as a class method
argument anywhere. It has the same limitations as reference, as in it requires
the class to have been created with a factory or constructor. This change
implements FromNapiValue on Reference, which will unwrap the class and call the
existing from_value_ptr method. It also updated typegen so that we only emit
the reference type if we're in an impl block that doesn't match the Reference
we're getting. This ensures that typegen works as expected with the previous
behaviour.
2024-02-22 22:37:50 +08:00
LongYinan
97039b2f08
Release independent packages
...
- napi@2.15.2
- napi-derive@2.15.2
2024-02-17 22:58:31 +08:00
LongYinan
c49309fdc2
fix(napi): memory leak while using Reference ( #1954 )
...
- Close https://github.com/napi-rs/napi-rs/issues/1952
2024-02-17 22:14:27 +08:00
LongYinan
20e0983288
style: apply clippy fix ( #1953 )
2024-02-17 14:12:24 +08:00
LongYinan
5ac153388f
feat(napi): accept slice as TypedArray ( #1951 )
2024-02-15 23:40:45 +08:00
LongYinan
b6adf8ae5c
Release independent packages
...
napi-derive@2.15.1
2024-02-08 20:41:49 +08:00
LongYinan
adbd34c0b9
fix(napi-derive): serde Number typing ( #1941 )
2024-02-08 18:20:46 +08:00
LongYinan
a6aaa94e7d
Release independent packages
...
- napi@2.15.0
- napi-derive@2.15.0
2024-01-26 14:32:24 +08:00
LongYinan
f69771e2d4
fix(napi-derive): JsArrayBuffer generated type
2024-01-26 14:32:24 +08:00
LongYinan
5be7ab0f6b
feat(napi): new Function/FunctionRef API
2024-01-26 02:27:46 +00:00
LongYinan
85807ad790
Release independent packages
...
- napi-derive@2.14.5
2023-12-27 12:53:10 +08:00
LongYinan
02dd4c3fd3
fix(napi-derive): catch_unwind on constructor ( #1869 )
...
- Close https://github.com/napi-rs/napi-rs/issues/1852
2023-12-27 12:49:10 +08:00
LongYinan
af248435ac
Release independent packages
...
- napi-derive@2.14.4
2023-12-13 13:27:53 +08:00
liuyi
e32c105a26
fix(napi-derive): upgrade syn ( #1849 )
2023-12-13 12:40:01 +08:00
LongYinan
1dda26e6cd
Release independent packages
...
napi-derive@2.14.3
2023-12-11 10:52:55 +08:00
LongYinan
dab4ce7fe0
fix(napi-derive,cli): register function cross crates ( #1848 )
2023-12-11 00:36:26 +08:00
LongYinan
e4ac44e560
Release independent packages
...
- napi@2.14.1
- napi-derive@2.14.2
2023-11-20 17:18:35 +08:00
LongYinan
8a9c42a985
fix(napi): compile error for wasm32-unknown-unknown target
...
- Close https://github.com/napi-rs/napi-rs/issues/1816
2023-11-20 17:10:58 +08:00
LongYinan
6a1943ba54
style(napi): clippy fix ( #1815 )
2023-11-17 20:42:53 +08:00
LongYinan
529317b5ef
Release independent packages
...
- napi-derive@2.14.1
2023-11-08 20:58:25 +08:00
LongYinan
e930a6aab3
fix(napi-derive): async task optional output type ( #1796 )
2023-11-08 20:06:27 +08:00
LongYinan
938f4df83d
fix(napi-derive): async task void output type ( #1795 )
2023-11-08 20:05:09 +08:00
LongYinan
688ee04247
Release independent packages
...
- napi-build@2.1.0
- napi-derive@2.14.0
- napi@2.14.0
- napi-sys@2.3.0
2023-11-07 14:18:36 +08:00
LongYinan
546b108a5b
feat(napi): support async class factory ( #1779 )
...
- Close https://github.com/napi-rs/napi-rs/issues/1777
2023-11-06 10:58:23 +08:00
LongYinan
0dc1ef738b
fix(napi): asan caught memory safety issue
2023-11-04 15:26:07 +08:00
Jez
afd3395bb4
fix(napi-derive): import FromNapiValue and ToNapiValue from napi::bindgen_prelude when generating enum ( #1713 )
2023-11-02 23:05:16 +08:00
LongYinan
9db4581d7f
feat: bump msrv to 1.65 ( #1755 )
2023-10-17 20:18:29 +08:00
LongYinan
05b4be4d80
style: clippy fix ( #1711 )
2023-08-30 16:41:13 +08:00
yoogo
4259e85e0e
fix(backend): attribute of a struct marked as #[napi(constructor)] contain Rust keywords, causing to throw is not a valid identifier when generating getters and setters
2023-08-17 20:48:54 +08:00
LongYinan
07d03c9435
chore: MSRV 1.63.0
2023-08-10 10:44:55 +08:00