napi-derive
napi-derive@3.0.0-alpha.19
11/13/2024
What's Changed
- fix(napi-derive): object lifetime compile issue by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2351 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@3.0.0-alpha.18...napi-derive@3.0.0-alpha.19 (opens in a new tab)
napi-derive@3.0.0-alpha.18
11/7/2024
What's Changed
- chore(napi-derive): remove unused dependency
regex
fromnapi-derive-backend
by @Adjective-Object (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2344 (opens in a new tab)
New Contributors
- @Adjective-Object (opens in a new tab) made their first contribution in https://github.com/napi-rs/napi-rs/pull/2344 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@3.0.0-alpha.17...napi-derive@3.0.0-alpha.18 (opens in a new tab)
napi-derive@3.0.0-alpha.17
10/31/2024
What's Changed
- feat(napi): introduce AsyncBlock to let user dispose resources after future done by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2338 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-sys@3.0.0-alpha.0...napi-derive@3.0.0-alpha.17 (opens in a new tab)
napi-derive@3.0.0-alpha.16
10/28/2024
What's Changed
- fix(napi-derive): ra warning on Rust 1.82 by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2329 (opens in a new tab)
- feat(napi): implmenet Set by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2330 (opens in a new tab)
- feat(napi): support return *const c_char to JavaScript directly by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2332 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@3.0.0-alpha.15...napi-derive@3.0.0-alpha.16 (opens in a new tab)
napi-derive@3.0.0-alpha.15
10/21/2024
What's Changed
- refactor!(napi): remove &str FromNapiValue by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2323 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@3.0.0-alpha.14...napi-derive@3.0.0-alpha.15 (opens in a new tab)
napi-derive@3.0.0-alpha.14
10/13/2024
What's Changed
- feat(napi,napi-derive): allow lifetime in Class by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2298 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@3.0.0-alpha.13...napi-derive@3.0.0-alpha.14 (opens in a new tab)
napi-derive@3.0.0-alpha.13
10/2/2024
What's Changed
- fix(napi-derive-backend): should respect origin name for class factory by @richerfu (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2280 (opens in a new tab)
- refactor!(napi,napi-derive): add lifetime to ClassInstance by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2286 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@3.0.0-alpha.12...napi-derive@3.0.0-alpha.13 (opens in a new tab)
napi-derive@3.0.0-alpha.12
9/23/2024
What's Changed
- feat(napi-derive): add async_runtime attribute by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2270 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@3.0.0-alpha.11...napi-derive@3.0.0-alpha.12 (opens in a new tab)
napi-derive@3.0.0-alpha.11
9/21/2024
What's Changed
- feat(napi-derive): allow napi fn with lifetime by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2266 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@3.0.0-alpha.11...napi-derive@3.0.0-alpha.11 (opens in a new tab)
napi-derive@3.0.0-alpha.10
9/20/2024
What's Changed
- refactor(napi-derive): expand order by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2265 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@3.0.0-alpha.9...napi-derive@3.0.0-alpha.10 (opens in a new tab)
napi-derive@3.0.0-alpha.9
9/19/2024
What's Changed
- fix(derive): fix clippy warning with newer rust version by @richerfu (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2262 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@3.0.0-alpha.8...napi-derive@3.0.0-alpha.9 (opens in a new tab)
napi-derive@2.16.12
9/12/2024
What Changed
- fix(napi-derive): string enum validate logic #2213 @Brooooooklyn (opens in a new tab)
- fix(napi-derive): warning in empty enum codegen #2214 @Brooooooklyn (opens in a new tab)
- fix(napi,napi-derive): ffi lifetime and pointer sound issues #2216 @cathy-sjh (opens in a new tab)
- fix(napi-derive): replace self when function returns
Result
#2224 @CPunisher (opens in a new tab) - perf(macro): constructor don't support asynchronous function #2239 @richerfu (opens in a new tab)
- fix(napi-derive): call flush on the BufWriter #2242 @richerfu (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@2.16.10...napi-derive@2.16.12 (opens in a new tab)
napi-derive@3.0.0-alpha.8
9/12/2024
What's Changed
- fix: missing impl for FromNapiValue due to object_from_js being false by @SyMind (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2197 (opens in a new tab)
- fix(napi-derive): add more cases for typegen of function args by @CPunisher (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2210 (opens in a new tab)
- fix(napi-derive): string enum validate logic by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2213 (opens in a new tab)
- fix(napi-derive): warning in empty enum codegen by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2214 (opens in a new tab)
- fix(napi,napi-derive): ffi lifetime and pointer sound issues by @cathy-sjh (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2216 (opens in a new tab)
- fix(napi-derive): replace self when function returns
Result
by @CPunisher (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2224 (opens in a new tab) - feat: support structured enum with discriminated unions by @CPunisher (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2222 (opens in a new tab)
- fix(napi-derive): tuple object and enum by @CPunisher (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2227 (opens in a new tab)
- perf(macro): constructor don't support asynchronous function by @richerfu (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2239 (opens in a new tab)
- fix(napi-derive): call flush on the BufWriter by @richerfu (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2242 (opens in a new tab)
New Contributors
- @CPunisher (opens in a new tab) made their first contribution in https://github.com/napi-rs/napi-rs/pull/2210 (opens in a new tab)
- @cathy-sjh (opens in a new tab) made their first contribution in https://github.com/napi-rs/napi-rs/pull/2216 (opens in a new tab)
- @markovalenko (opens in a new tab) made their first contribution in https://github.com/napi-rs/napi-rs/pull/2220 (opens in a new tab)
- @DonIsaac (opens in a new tab) made their first contribution in https://github.com/napi-rs/napi-rs/pull/2233 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@3.0.0-alpha.7...napi-derive@3.0.0-alpha.8 (opens in a new tab)
napi-derive@2.16.11
8/10/2024
What Changed
- fix(napi-derive): add more cases for typegen of function args by @CPunisher (opens in a new tab) #2210
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@2.16.10...napi-derive@2.16.11 (opens in a new tab)
napi-derive@2.16.10
7/23/2024
What Changed
- fix(napi-derive): call flush on the BufWriter by @lbarthon (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2195 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@2.16.9...napi-derive@2.16.10 (opens in a new tab)
napi-derive@3.0.0-alpha.7
7/23/2024
What's Changed
- fix(napi-derive): call flush on the BufWriter by @lbarthon (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2195 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@3.0.0-alpha.6...napi-derive@3.0.0-alpha.7 (opens in a new tab)
napi-derive@2.16.9
7/16/2024
What's Changed
- fix: napi getter macros by @SyMind (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2188 (opens in a new tab)
New Contributors
- @SyMind (opens in a new tab) made their first contribution in https://github.com/napi-rs/napi-rs/pull/2188 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@2.16.8...napi-derive@2.16.9 (opens in a new tab)
napi-derive@3.0.0-alpha.6
7/16/2024
What's Changed
- fix: napi getter macros by @SyMind (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2188 (opens in a new tab)
New Contributors
- @SyMind (opens in a new tab) made their first contribution in https://github.com/napi-rs/napi-rs/pull/2188 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/@napi-rs/cli@3.0.0-alpha.59...napi-derive@3.0.0-alpha.6 (opens in a new tab)
napi-derive@2.16.8
7/1/2024
What changed
- fix(napi-derive): missing declare keyword for function
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@2.16.7...napi-derive@2.16.8 (opens in a new tab)
napi-derive@3.0.0-alpha.3
7/1/2024
What's Changed
- fix(napi-derive): class constructor and factory should support custom error status by @richerfu (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2161 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@3.0.0-alpha.2...napi-derive@3.0.0-alpha.3 (opens in a new tab)
napi-derive@2.16.4
5/6/2024
What's Changed
- style: fix clippy errors by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2090 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@2.16.3...napi-derive@2.16.4 (opens in a new tab)
napi-derive@2.16.3
4/18/2024
What Changed
- fix(napi-derive): bail the unexpected factory directive by @Brooooooklyn (opens in a new tab) #2051
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.16.4...napi-derive@2.16.3 (opens in a new tab)
napi-derive@2.16.2
4/10/2024
What's Changed
- feat(napi-derive): enhance the error messages in object validator by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2034 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@2.16.1...napi-derive@2.16.2 (opens in a new tab)
napi-derive@2.16.1
3/26/2024
What's Changed
- feat(napi-derive): add optional enum_string case conversion by @andrewtoth (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1995 (opens in a new tab)
New Contributors
- @andrewtoth (opens in a new tab) made their first contribution in https://github.com/napi-rs/napi-rs/pull/1995 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@2.16.0...napi-derive@2.16.1 (opens in a new tab)
napi-derive@2.16.0
2/28/2024
What's Changed
- feat(napi-derive): add use_nullable attribute by @sup39 (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1971 (opens in a new tab)
- style(napi-derive): clippy fix by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1976 (opens in a new tab)
- fix(napi-derive): HashMap/IndexMap and slice generated types by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1977 (opens in a new tab)
- fix(napi-derive): wrong dependency condition by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1980 (opens in a new tab)
New Contributors
- @sup39 (opens in a new tab) made their first contribution in https://github.com/napi-rs/napi-rs/pull/1971 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.15.4...napi-derive@2.16.0 (opens in a new tab)
napi-derive@2.15.1
2/8/2024
What's Changed
- fix(napi-derive): serde Number typing by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1941 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.15.1...napi-derive@2.15.1 (opens in a new tab)
napi-derive@2.15.0
1/26/2024
What's Changed
- feat(napi): new Function/FunctionRef API by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1913 (opens in a new tab)
- fix(napi-derive): JsArrayBuffer generated type by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1922 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@2.14.6...napi-derive@2.15.0 (opens in a new tab)
napi-derive@2.14.6
12/27/2023
What's Changed
- fix(napi-derive): proc-macro crash on enum by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1870 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@2.14.5...napi-derive@2.14.6 (opens in a new tab)
napi-derive@2.14.5
12/27/2023
What's Changed
- fix(napi-derive): catch_unwind on constructor by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1869 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/@napi-rs/cli@3.0.0-alpha.24...napi-derive@2.14.5 (opens in a new tab)
napi-derive@2.14.4
12/13/2023
What's Changed
- fix(napi-derive): upgrade syn by @forehalo (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1849 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@2.14.3...napi-derive@2.14.4 (opens in a new tab)
napi-derive@2.14.3
12/11/2023
What's Changed
- fix(napi-derive,cli): register function cross crates by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1848 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/@napi-rs/cli@3.0.0-alpha.15...napi-derive@2.14.3 (opens in a new tab)
napi-derive@2.14.2
11/20/2023
What's Changed
- fix(napi-derive): compile warning by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1820 (opens in a new tab)
- fix(napi): compile error for wasm32-unknown-unknown target by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1822 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@2.14.1...napi-derive@2.14.2 (opens in a new tab)
napi-derive@2.14.1
11/8/2023
What's Changed
- fix(napi-derive): async task void output type by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1795 (opens in a new tab)
- fix(napi-derive): async task optional output type by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1796 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-sys@2.3.0...napi-derive@2.14.1 (opens in a new tab)
napi-derive@2.14.0
11/7/2023
What's Changed
- fix(napi-derive): throw is not a valid identifier when generating getters and setters by @yoogoc (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1701 (opens in a new tab)
- feat: integrate with emnapi, support wasm32-wasi-preview1-threads target by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1669 (opens in a new tab)
napi-derive@2.12.5
4/26/2023
What's Changed
- fix(napi-derive): increase initial ref count in async fn by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1577 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@2.12.4...napi-derive@2.12.5 (opens in a new tab)
napi-derive@2.12.4
4/25/2023
What's Changed
- feat: clean napi-derive noop feature code path by @forehalo (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1571 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.12.5...napi-derive@2.12.4 (opens in a new tab)
napi-derive@2.12.3
4/11/2023
Core features
#[napi(string_enum)]
pub enum Status {
Pristine,
Loading,
Ready,
}
⬇️⬇️⬇️⬇️⬇️
export const enum Status {
Pristine = 'Pristine',
Loading = 'Loading',
Ready = 'Ready'
}
What's Changed
- feat(napi-derive): add support for string enums by @nebarf (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1551 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@2.12.2...napi-derive@2.12.3 (opens in a new tab)
napi-derive@2.12.2
3/22/2023
What's Changed
- fix(cli,napi-derive): backward compatible with older cli with #1531 by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1536 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@2.12.1...napi-derive@2.12.2 (opens in a new tab)
napi-derive@2.12.1
3/21/2023
What's Changed
- fix(cli,napi-derive): re-export types from shared crate by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1531 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@2.12.0...napi-derive@2.12.1 (opens in a new tab)
napi-derive@2.12.0
3/21/2023
What's Changed
- feat: export registers in wasm32 target by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1529 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.11.4...napi-derive@2.12.0 (opens in a new tab)
napi-derive@2.11.2
3/14/2023
What's Changed
- chore(napi-derive): remove thread_local from dependenies by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1506 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@2.11.1...napi-derive@2.11.2 (opens in a new tab)
napi-derive@2.11.1
2/18/2023
Changes
- Part of https://github.com/napi-rs/napi-rs/releases/tag/%40napi-rs%2Fcli%402.14.8 (opens in a new tab) by @forehalo (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/@napi-rs/cli@2.14.8...napi-derive@2.11.1 (opens in a new tab)
napi-derive@2.10.1
1/31/2023
What's Changed
- fix(napi-derive): incorrect Task output type in some cases by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1466 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@2.10.0...napi-derive@2.10.1 (opens in a new tab)
napi-derive@2.10.0
1/24/2023
Highlights
ThreadsafeFunction
as params and object fields
#[napi]
pub fn accept_callback(callback: ThreadsafeFunction<u32>) {
std::thread::spawn(move || {
callback.call(200);
});
}
⬇️⬇️⬇️⬇️⬇️
export function acceptCallback(callback: (err: Error | null, value: number) -> any)
Disable ToNapiValue
for Object
With the object_to_js = false
filed, the ThreadsafeFunction
could be set as an Object field.
#[napi(object, object_to_js = false)]
pub struct Options {
pub enable_jsx: bool,
pub on_data: ThreadsafeFunction<Vec<u8>>,
}
What's Changed
- feat(napi-derive): generate ThreadsafeFunction types by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1449 (opens in a new tab)
- feat(napi-derive): allow partial implement From/To Napivalue for Object by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1448 (opens in a new tab)
- chore(napi-derive): allow unsafe async &mut self by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1453 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/@napi-rs/cli@2.14.4...napi-derive@2.10.0 (opens in a new tab)
napi-derive@2.9.5
1/14/2023
What's Changed
- fix(napi-derive): fix union type generation for ts function notation by @h-a-n-a (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1439 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/@napi-rs/cli@2.14.3...napi-derive@2.9.5 (opens in a new tab)
napi-derive@2.9.4
1/13/2023
What's Changed
- fix(napi-derive): remove ts type on field attrs for feature
noop
by @h-a-n-a (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1436 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.10.6...napi-derive@2.9.4 (opens in a new tab)