napi
napi@2.16.13
10/21/2024
What Changed
- fix(napi): needless cast to
CString
before callnapi_create_string_utf8
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.16.12…napi@2.16.13
napi@3.0.0-alpha.16
10/21/2024
What’s Changed
- chore(napi): display the real info for TypedArray by @richerfu in https://github.com/napi-rs/napi-rs/pull/2310
- fix(napi): before using from_raw_parts should check if data is null by @richerfu in https://github.com/napi-rs/napi-rs/pull/2311
- fix(napi): TypedArray is not ArrayBuffer in Deno by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/2314
- fix(napi): needless cast to CString before call napi_create_string_utf8 by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/2321
- docs: update n-api version matrix docs url by @selfisekai in https://github.com/napi-rs/napi-rs/pull/2319
- chore(deps): update dependency oxlint to ^0.10.0 by @renovate in https://github.com/napi-rs/napi-rs/pull/2318
- refactor!(napi): remove &str FromNapiValue by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/2323
New Contributors
- @selfisekai made their first contribution in https://github.com/napi-rs/napi-rs/pull/2319
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@3.0.0-alpha.15…napi@3.0.0-alpha.16
napi-derive@3.0.0-alpha.15
10/21/2024
What’s Changed
- refactor!(napi): remove &str FromNapiValue by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/2323
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@3.0.0-alpha.14…napi-derive@3.0.0-alpha.15
napi@3.0.0-alpha.15
10/14/2024
What’s Changed
- refactor!(napi): Ref::unref accept &mut self instead of self by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/2308
- refactor!(napi): pass self to Task::finally instread of &mut self by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/2309
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@3.0.0-alpha.14…napi@3.0.0-alpha.15
napi@2.16.12
10/13/2024
What Changed
- fix(napi): data maybe null in custom_gc #2304
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.16.11…napi@2.16.12
napi@3.0.0-alpha.14
10/13/2024
What’s Changed
- chore(napi): env doesn’t need to be mut by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/2292
- refactor!(napi): remove clone fn on ThreadsafeFunction by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/2291
- feat(napi,napi-derive): allow lifetime in Class by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/2298
- fix(napi): data maybe null in custom_gc by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/2304
- feat(napi): support arraybuffer for de by @richerfu in https://github.com/napi-rs/napi-rs/pull/2296
New Contributors
- @jackyzha0 made their first contribution in https://github.com/napi-rs/napi-rs/pull/2297
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@3.0.0-alpha.13…napi@3.0.0-alpha.14
napi-derive@3.0.0-alpha.14
10/13/2024
What’s Changed
- feat(napi,napi-derive): allow lifetime in Class by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/2298
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@3.0.0-alpha.13…napi-derive@3.0.0-alpha.14
napi@3.0.0-alpha.13
10/2/2024
What’s Changed
- refactor!(napi,napi-derive): add lifetime to ClassInstance by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/2286
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@3.0.0-alpha.12…napi@3.0.0-alpha.13
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 in https://github.com/napi-rs/napi-rs/pull/2280
- refactor!(napi,napi-derive): add lifetime to ClassInstance by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/2286
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@3.0.0-alpha.12…napi-derive@3.0.0-alpha.13
napi@3.0.0-alpha.12
9/23/2024
What’s Changed
- feat(napi): mark create_buffer as deprecated & use BufferSlice to replace JsBuffer for ser by @richerfu in https://github.com/napi-rs/napi-rs/pull/2267
- chore(deps): update dependency esbuild to ^0.24.0 by @renovate in https://github.com/napi-rs/napi-rs/pull/2268
- chore(example): use BufferSlice to replace JsBuffer by @richerfu in https://github.com/napi-rs/napi-rs/pull/2269
- feat(napi-derive): add async_runtime attribute by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/2270
- chore(napi): remove once_cell by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/2271
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@3.0.0-alpha.11…napi@3.0.0-alpha.12
napi-derive@3.0.0-alpha.12
9/23/2024
What’s Changed
- feat(napi-derive): add async_runtime attribute by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/2270
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@3.0.0-alpha.11…napi-derive@3.0.0-alpha.12
napi-derive@3.0.0-alpha.11
9/21/2024
What’s Changed
- feat(napi-derive): allow napi fn with lifetime by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/2266
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@3.0.0-alpha.11…napi-derive@3.0.0-alpha.11
napi@3.0.0-alpha.11
9/20/2024
What’s Changed
- refactor(napi-derive): expand order by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/2265
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@3.0.0-alpha.9…napi@3.0.0-alpha.11
napi-derive@3.0.0-alpha.10
9/20/2024
What’s Changed
- refactor(napi-derive): expand order by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/2265
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@3.0.0-alpha.9…napi-derive@3.0.0-alpha.10
napi@2.16.11
9/19/2024
What Changed
- fix(napi): nullptr handling in TypedArrays #2258 @Xanewok
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.16.10…napi@2.16.11
napi@3.0.0-alpha.10
9/19/2024
What’s Changed
- fix(napi): nullptr handling in
TypedArray
s by @Xanewok in https://github.com/napi-rs/napi-rs/pull/2258 - chore: enable corepack in Debian base Dockerfile by @stevefan1999-personal in https://github.com/napi-rs/napi-rs/pull/2252
- refactor(napi): allow create BufferSlice from external data by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/2263
New Contributors
- @Xanewok made their first contribution in https://github.com/napi-rs/napi-rs/pull/2258
- @stevefan1999-personal made their first contribution in https://github.com/napi-rs/napi-rs/pull/2252
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@3.0.0-alpha.8…napi@3.0.0-alpha.10
napi-derive@3.0.0-alpha.9
9/19/2024
What’s Changed
- fix(derive): fix clippy warning with newer rust version by @richerfu in https://github.com/napi-rs/napi-rs/pull/2262
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@3.0.0-alpha.8…napi-derive@3.0.0-alpha.9
napi@2.16.10
9/12/2024
What Changed
- fix(napi,napi-derive): ffi lifetime and pointer sound issues https://github.com/napi-rs/napi-rs/pull/2216 @cathy-sjh
- chore(napi): mark JsArraybufferValue’s value pub https://github.com/napi-rs/napi-rs/pull/2226 @richerfu
- fix(napi): use error_ref should checkout it at first https://github.com/napi-rs/napi-rs/pull/2235 @richerfu
- fix(napi): windows function registration timing https://github.com/napi-rs/napi-rs/pull/2248 @Brooooooklyn
- perf(napi): remove unnecessary checks for strings from napi_get_value_string_utf8 #2247 @SyMind
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.16.9…napi@2.16.10
napi-derive@2.16.12
9/12/2024
What Changed
- fix(napi-derive): string enum validate logic #2213 @Brooooooklyn
- fix(napi-derive): warning in empty enum codegen #2214 @Brooooooklyn
- fix(napi,napi-derive): ffi lifetime and pointer sound issues #2216 @cathy-sjh
- fix(napi-derive): replace self when function returns
Result
#2224 @CPunisher - perf(macro): constructor don’t support asynchronous function #2239 @richerfu
- fix(napi-derive): call flush on the BufWriter #2242 @richerfu
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@2.16.10…napi-derive@2.16.12
napi@3.0.0-alpha.9
9/12/2024
What’s Changed
- test: skip unstable test in WASI env by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/2196
- fix(napi): allow ThreadsafeFunction in Either by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/2204
- chore: implement serde::Serialize for Either by @lbarthon in https://github.com/napi-rs/napi-rs/pull/2209
- ci: fix Address Sanitizer check by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/2212
- fix(napi,napi-derive): ffi lifetime and pointer sound issues by @cathy-sjh in https://github.com/napi-rs/napi-rs/pull/2216
- feat: support structured enum with discriminated unions by @CPunisher in https://github.com/napi-rs/napi-rs/pull/2222
- feat(napi): mark JsArraybufferValue’s value pub by @richerfu in https://github.com/napi-rs/napi-rs/pull/2226
- fix(napi): use error_ref should checkout it at first by @richerfu in https://github.com/napi-rs/napi-rs/pull/2235
- fix(napi): windows function registration timing by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/2248
- perf(napi): remove unnecessary checks for strings from napi_get_value_string_utf8 by @SyMind in https://github.com/napi-rs/napi-rs/pull/2247
- refactor!(napi): Ref should not hold the value ptr by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/2243
New Contributors
- @CPunisher made their first contribution in https://github.com/napi-rs/napi-rs/pull/2210
- @cathy-sjh made their first contribution in https://github.com/napi-rs/napi-rs/pull/2216
- @markovalenko made their first contribution in https://github.com/napi-rs/napi-rs/pull/2220
- @DonIsaac made their first contribution in https://github.com/napi-rs/napi-rs/pull/2233
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@3.0.0-alpha.7…napi@3.0.0-alpha.9
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 in https://github.com/napi-rs/napi-rs/pull/2197
- fix(napi-derive): add more cases for typegen of function args by @CPunisher in https://github.com/napi-rs/napi-rs/pull/2210
- fix(napi-derive): string enum validate logic by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/2213
- fix(napi-derive): warning in empty enum codegen by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/2214
- fix(napi,napi-derive): ffi lifetime and pointer sound issues by @cathy-sjh in https://github.com/napi-rs/napi-rs/pull/2216
- fix(napi-derive): replace self when function returns
Result
by @CPunisher in https://github.com/napi-rs/napi-rs/pull/2224 - feat: support structured enum with discriminated unions by @CPunisher in https://github.com/napi-rs/napi-rs/pull/2222
- fix(napi-derive): tuple object and enum by @CPunisher in https://github.com/napi-rs/napi-rs/pull/2227
- perf(macro): constructor don’t support asynchronous function by @richerfu in https://github.com/napi-rs/napi-rs/pull/2239
- fix(napi-derive): call flush on the BufWriter by @richerfu in https://github.com/napi-rs/napi-rs/pull/2242
New Contributors
- @CPunisher made their first contribution in https://github.com/napi-rs/napi-rs/pull/2210
- @cathy-sjh made their first contribution in https://github.com/napi-rs/napi-rs/pull/2216
- @markovalenko made their first contribution in https://github.com/napi-rs/napi-rs/pull/2220
- @DonIsaac made their first contribution in https://github.com/napi-rs/napi-rs/pull/2233
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@3.0.0-alpha.7…napi-derive@3.0.0-alpha.8
napi@2.16.9
8/10/2024
What Changed
- chore: implement
serde::Serialize
forEither
by @lbarthon #2209
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.16.8…napi@2.16.9
napi-derive@2.16.11
8/10/2024
What Changed
- fix(napi-derive): add more cases for typegen of function args by @CPunisher #2210
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@2.16.10…napi-derive@2.16.11
napi-derive@2.16.10
7/23/2024
What Changed
- fix(napi-derive): call flush on the BufWriter by @lbarthon in https://github.com/napi-rs/napi-rs/pull/2195
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@2.16.9…napi-derive@2.16.10
napi-derive@3.0.0-alpha.7
7/23/2024
What’s Changed
- fix(napi-derive): call flush on the BufWriter by @lbarthon in https://github.com/napi-rs/napi-rs/pull/2195
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@3.0.0-alpha.6…napi-derive@3.0.0-alpha.7
napi-derive@2.16.9
7/16/2024
What’s Changed
- fix: napi getter macros by @SyMind in https://github.com/napi-rs/napi-rs/pull/2188
New Contributors
- @SyMind made their first contribution in https://github.com/napi-rs/napi-rs/pull/2188
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@2.16.8…napi-derive@2.16.9
napi-derive@3.0.0-alpha.6
7/16/2024
What’s Changed
- fix: napi getter macros by @SyMind in https://github.com/napi-rs/napi-rs/pull/2188
New Contributors
- @SyMind made their first contribution in https://github.com/napi-rs/napi-rs/pull/2188
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
napi@3.0.0-alpha.6
7/7/2024
What’s Changed
- refactor(napi): simplify Promise implementation by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/2171
- fix(napi): Promise callbacks should require static lifetime by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/2172
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@3.0.0-alpha.5…napi@3.0.0-alpha.6
napi@3.0.0-alpha.5
7/6/2024
What’s Changed
- feat(napi): impl from_string for Uint8Array by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/2167
- feat(napi): provide PromiseRaw for non-await scenario by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/2168
Full Changelog: https://github.com/napi-rs/napi-rs/compare/@napi-rs/cli@3.0.0-alpha.56…napi@3.0.0-alpha.5
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
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 in https://github.com/napi-rs/napi-rs/pull/2161
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@3.0.0-alpha.2…napi-derive@3.0.0-alpha.3
napi@2.16.8
6/27/2024
What Changed
- feat(napi): support chrono datetime with timezones by @naskya (https://github.com/napi-rs/napi-rs/pull/2074)
- chore(napi): let docs.rs generate all documentation by @Gentle #2160
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.16.7…napi@2.16.8
napi@3.0.0-alpha.3
7/1/2024
What’s Changed
- docs(cli): fix typo by @naskya in https://github.com/napi-rs/napi-rs/pull/2108
- chore(deps): update dependency sinon to v18 by @renovate in https://github.com/napi-rs/napi-rs/pull/2112
- chore(napi): allow value attribute on enum variants by @lbarthon in https://github.com/napi-rs/napi-rs/pull/2115
- feat(napi): Function build_thfn support calledhandled mode by @richerfu in https://github.com/napi-rs/napi-rs/pull/2114
- fix(typegen): add missing
declare
keyword by @magic-akari in https://github.com/napi-rs/napi-rs/pull/2117 - fix(deps): update dependency emnapi to v1.2.0 by @renovate in https://github.com/napi-rs/napi-rs/pull/2118
- chore(deps): update dependency vite-plugin-node-polyfills to ^0.22.0 by @renovate in https://github.com/napi-rs/napi-rs/pull/2119
- feat(napi): implement ToNapiValue for Ref as required by TSFN by @richerfu in https://github.com/napi-rs/napi-rs/pull/2122
- feat(napi): support External for compact mode by @richerfu in https://github.com/napi-rs/napi-rs/pull/2125
- chore(example): remove JsFunction from example by @richerfu in https://github.com/napi-rs/napi-rs/pull/2123
- chore(napi): make Ser and De public by @Gentle in https://github.com/napi-rs/napi-rs/pull/2131
- chore(deps): update dependency @rollup/plugin-commonjs to v26 by @renovate in https://github.com/napi-rs/napi-rs/pull/2132
- Add windows gnu target by @Kreijstal in https://github.com/napi-rs/napi-rs/pull/2026
- chore(deps): lock file maintenance by @renovate in https://github.com/napi-rs/napi-rs/pull/2129
- chore(deps): update dependency oxlint to ^0.4.0 by @renovate in https://github.com/napi-rs/napi-rs/pull/2126
- chore(deps): update yarn to v4.3.0 by @renovate in https://github.com/napi-rs/napi-rs/pull/2135
- fix(cli): rename env CC to TARGET_CC avoid proc-macro build failed by @richerfu in https://github.com/napi-rs/napi-rs/pull/2137
- chore(deps): update dependency electron to v31 by @renovate in https://github.com/napi-rs/napi-rs/pull/2136
- chore(deps): update dependency c8 to v10 by @renovate in https://github.com/napi-rs/napi-rs/pull/2134
- fix(napi): JsString should respect \0 character to align with String by @richerfu in https://github.com/napi-rs/napi-rs/pull/2138
- feat(error): print anyhow error in debug mode to show trace by @ozgrakkurt in https://github.com/napi-rs/napi-rs/pull/2140
- chore: clippy fix by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/2144
- chore(deps): update docker/build-push-action action to v6 by @renovate in https://github.com/napi-rs/napi-rs/pull/2142
- Reduce monomorphization load of various functions by @seritools in https://github.com/napi-rs/napi-rs/pull/2143
- fix(deps): update dependency @octokit/rest to v21 by @renovate in https://github.com/napi-rs/napi-rs/pull/2149
- chore(deps): update yarn to v4.3.1 by @renovate in https://github.com/napi-rs/napi-rs/pull/2150
- chore(deps): update oven-sh/setup-bun action to v2 by @renovate in https://github.com/napi-rs/napi-rs/pull/2153
- test(napi): spwan thread in thread by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/2139
- chore(napi): remove stale tokio feature by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/2155
- chore(napi): exclude libuv api on wasm targets by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/2156
- let docs.rs generate all documentation by @Gentle in https://github.com/napi-rs/napi-rs/pull/2160
- chore(deps): update dependency oxlint to ^0.5.0 by @renovate in https://github.com/napi-rs/napi-rs/pull/2159
New Contributors
- @magic-akari made their first contribution in https://github.com/napi-rs/napi-rs/pull/2117
- @Gentle made their first contribution in https://github.com/napi-rs/napi-rs/pull/2131
- @Kreijstal made their first contribution in https://github.com/napi-rs/napi-rs/pull/2026
Full Changelog: https://github.com/napi-rs/napi-rs/compare/@napi-rs/cli@3.0.0-alpha.55…napi@3.0.0-alpha.3
napi@2.16.7
6/26/2024
What changed
- feat(napi): implement ToNapiValue for Ref as required by TSFN by @richerfu #2122
- feat(napi): support External for compact mode by @richerfu #2125
- chore(napi): make Ser and De public by @Gentle #2131
- fix(napi): JsString should respect \0 character to align with String by @richerfu #2138
- feat(error): print anyhow error in debug mode to show trace by @ozgrakkurt #2140
- chore(napi): reduce monomorphization load of various functions by @seritools #2143
- chore(napi): remove stale tokio feature by @Brooooooklyn #2155
- chore(napi): exclude libuv api on wasm targets by @Brooooooklyn #2156
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.16.6…napi@2.16.7
napi@2.16.6
5/7/2024
What’s Changed
- fix(napi): panic when deserializing empty buffer with Rust 1.78 by @mischnic in https://github.com/napi-rs/napi-rs/pull/2094
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.16.5…napi@2.16.6
napi@2.16.5
5/6/2024
What’s Changed
- Fix panic in JsArrayBufferValue as_ref/as_mut with Rust 1.78 by @tronical in https://github.com/napi-rs/napi-rs/pull/2083
- fix(napi): make sure env without exception pending before throw error by @southorange0929 in https://github.com/napi-rs/napi-rs/pull/2092
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.16.4…napi@2.16.5
napi-derive@2.16.4
5/6/2024
What’s Changed
- style: fix clippy errors by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/2090
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@2.16.3…napi-derive@2.16.4
napi@2.16.4
4/18/2024
What changed
- feat(napi): allow user defined tokio runtime by @Brooooooklyn #2040
- fix(napi): handle panic in async block by @Brooooooklyn (https://github.com/napi-rs/napi-rs/pull/2050)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.16.2…napi@2.16.4
napi-derive@2.16.3
4/18/2024
What Changed
- fix(napi-derive): bail the unexpected factory directive by @Brooooooklyn #2051
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.16.4…napi-derive@2.16.3
napi@3.0.0-alpha.2
4/15/2024
What’s Changed
- feat(napi): allow
&External
to be created from napi value by @sapphi-red in https://github.com/napi-rs/napi-rs/pull/2037 - fix(napi): ensure CalleeHandled works as expected by @lbarthon in https://github.com/napi-rs/napi-rs/pull/2039
- feat(napi): allow user defined tokio runtime by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/2040
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@3.0.0-alpha.1…napi@3.0.0-alpha.2
napi@2.16.2
4/10/2024
What Changed
- fix(napi): create_bigint_from_*128 returned incorrect word_count by @sapphi-red in https://github.com/napi-rs/napi-rs/pull/2024
- fix(napi): napi_adjust_external_memory should be hidden with wasm target by @southorange0929 in https://github.com/napi-rs/napi-rs/pull/2031
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.16.1…napi@2.16.2
napi-sys@2.4.0
4/10/2024
What’s Changed
- feat(napi-sys): support load Node-API symbols dynamically by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/2014
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.16.1…napi-sys@2.4.0
napi-derive@2.16.2
4/10/2024
What’s Changed
- feat(napi-derive): enhance the error messages in object validator by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/2034
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@2.16.1…napi-derive@2.16.2
napi@3.0.0-alpha.1
4/10/2024
What’s Changed
- chore(wasm-runtime): upgrade emnapi by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/2008
- fix(napi): no panic when caller stops listening by @lbarthon in https://github.com/napi-rs/napi-rs/pull/2010
- style: clippy fix by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/2012
- fix(napi): External should impl FromNapiRef rather than FromNapiValue by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/2013
- feat(napi-sys): support load Node-API symbols dynamically by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/2014
- fix(cli): wasi Node.js worker template by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/2015
- fix(deps): update dependency emnapi to v1.1.1 by @renovate in https://github.com/napi-rs/napi-rs/pull/2017
- chore(deps-dev): bump vite from 5.1.4 to 5.1.7 by @dependabot in https://github.com/napi-rs/napi-rs/pull/2025
- fix:
create_bigint_from_*128
returned incorrect word_count by @sapphi-red in https://github.com/napi-rs/napi-rs/pull/2024 - feat(target): add support for armv7-unknown-linux-muslebihf by @sapphi-red in https://github.com/napi-rs/napi-rs/pull/2019
- feat(target): add support for powerpc64le-unknown-linux-gnu by @sapphi-red in https://github.com/napi-rs/napi-rs/pull/2023
- feat(target): add support for s390x-unknown-linux-gnu by @sapphi-red in https://github.com/napi-rs/napi-rs/pull/2028
- docs: update platform support in README by @sapphi-red in https://github.com/napi-rs/napi-rs/pull/2029
- chore(deps): lock file maintenance by @renovate in https://github.com/napi-rs/napi-rs/pull/2018
- feat(cli): support wasm32-wasipxx targets by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/2030
- chore: use oxlint by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/2032
- fix(napi): napi_adjust_external_memory should be hidden with wasm target by @southorange0929 in https://github.com/napi-rs/napi-rs/pull/2031
- ci: fix flaky tests by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/2033
- feat(napi-derive): enhance the error messages in object validator by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/2034
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@3.0.0-alpha.0…napi@3.0.0-alpha.1
napi@2.16.1
3/26/2024
What’s Changed
- fix(napi): remove useless FromNapiValue bound check for ValidateNapiValue by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1999
- feat(napi): support to use tuple with either by @h-a-n-a in https://github.com/napi-rs/napi-rs/pull/1993
- feat(napi): implement
From String
forBuffer
by @lbarthon in https://github.com/napi-rs/napi-rs/pull/2002
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.16.0…napi@2.16.1
napi-derive@2.16.1
3/26/2024
What’s Changed
- feat(napi-derive): add optional enum_string case conversion by @andrewtoth in https://github.com/napi-rs/napi-rs/pull/1995
New Contributors
- @andrewtoth made their first contribution in https://github.com/napi-rs/napi-rs/pull/1995
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@2.16.0…napi-derive@2.16.1
napi@3.0.0-alpha.0
3/20/2024
What’s Changed
- fix(napi): remove useless FromNapiValue bound check for ValidateNapiValue by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1999
- feat(napi-derive): add optional enum_string case conversion by @andrewtoth in https://github.com/napi-rs/napi-rs/pull/1995
- feat(napi): support to use tuple with either by @h-a-n-a in https://github.com/napi-rs/napi-rs/pull/1993
- feat(napi): implement
From String
forBuffer
by @lbarthon in https://github.com/napi-rs/napi-rs/pull/2002 - feat(napi): support
Return
generic of ThreadsafeFunction by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1997 - chore(napi): add Send and Sync to Reference by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/2007
New Contributors
- @andrewtoth made their first contribution in https://github.com/napi-rs/napi-rs/pull/1995
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.16.0…napi@3.0.0-alpha.0
napi@2.16.0
2/28/2024
What’s Changed
- feat(napi): allow Reference as a class method param by @lbarthon in https://github.com/napi-rs/napi-rs/pull/1966
- fix(napi): remove useless create_reference in slice => TypedArray impl by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1975
- feat(napi): impl chained Into for TypedArray types by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1978
- feat(napi): impl BufferSlice and Uint8ClampedSlice by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1979
- fix(napi): add back the typecheck logic that was accidentally removed in Object::get_named_property by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1982
New Contributors
- @sup39 made their first contribution in https://github.com/napi-rs/napi-rs/pull/1971
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.15.4…napi@2.16.0
napi-derive@2.16.0
2/28/2024
What’s Changed
- feat(napi-derive): add use_nullable attribute by @sup39 in https://github.com/napi-rs/napi-rs/pull/1971
- style(napi-derive): clippy fix by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1976
- fix(napi-derive): HashMap/IndexMap and slice generated types by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1977
- fix(napi-derive): wrong dependency condition by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1980
New Contributors
- @sup39 made their first contribution in https://github.com/napi-rs/napi-rs/pull/1971
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.15.4…napi-derive@2.16.0
napi@2.15.4
2/22/2024
What’s Changed
- fix(napi): no hard fail on ThreadsafeFunction::call_async by @lbarthon in https://github.com/napi-rs/napi-rs/pull/1970
- fix(napi): JsObject.add_finalizer callback being allowed to reference non-static things by @tomb-msft in https://github.com/napi-rs/napi-rs/pull/1968
New Contributors
- @tomb-msft made their first contribution in https://github.com/napi-rs/napi-rs/pull/1968
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.15.3…napi@2.15.4
napi@2.15.3
2/21/2024
What’s Changed
- fix: remove outdated rustdoc about tokio channels by @lbarthon in https://github.com/napi-rs/napi-rs/pull/1961
- fix(Buffer): prevent memory leak when Custom GC is used by @lbarthon in https://github.com/napi-rs/napi-rs/pull/1963
New Contributors
- @lbarthon made their first contribution in https://github.com/napi-rs/napi-rs/pull/1961
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-build@2.1.1…napi@2.15.3
napi-build@2.1.1
2/18/2024
What’s Changed
- feat(cli,build): support setjmp.h by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1958
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.15.2…napi-build@2.1.1
napi@2.15.2
2/17/2024
What’s Changed
- feat(napi): extends the Map types interoperability by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1950
- feat(napi): accept slice as TypedArray by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1951
- style: apply clippy fix by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1953
- fix(napi): memory leak while using Reference by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1954
Full Changelog: https://github.com/napi-rs/napi-rs/compare/@napi-rs/cli@3.0.0-alpha.38…napi@2.15.2
napi-derive@2.15.1
2/8/2024
What’s Changed
- fix(napi-derive): serde Number typing by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1941
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.15.1…napi-derive@2.15.1
napi@2.15.1
2/1/2024
What’s Changed
- fix(napi): Fix buffer corruption and soundness issues by @Janrupf in https://github.com/napi-rs/napi-rs/pull/1923
- fix(napi): in “Object::get”, return null values wrapped in a “Some” by @jkomyno in https://github.com/napi-rs/napi-rs/pull/1934
New Contributors
- @Janrupf made their first contribution in https://github.com/napi-rs/napi-rs/pull/1923
- @jkomyno made their first contribution in https://github.com/napi-rs/napi-rs/pull/1934
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.15.0…napi@2.15.1
napi@2.15.0
1/26/2024
What’s Changed
- fix(napi): callback in execute_tokio_future does not need to be Send by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1917
- feat(napi): new Function/FunctionRef API by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1913
- chore(napi): delete unwrap_from_ref API because it was never work by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1915
- fix(napi): memory issue while creating external buffer on electron by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1921
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.14.4…napi@2.15.0
napi-derive@2.15.0
1/26/2024
What’s Changed
- feat(napi): new Function/FunctionRef API by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1913
- fix(napi-derive): JsArrayBuffer generated type by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1922
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@2.14.6…napi-derive@2.15.0
napi@2.14.4
1/24/2024
What’s changed
- fix(napi): future in block_on do not need to be send @Brooooooklyn https://github.com/napi-rs/napi-rs/commit/e3322706981414dbdbde0a5021cab1d5f9144620
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.14.3…napi@2.14.4
napi@2.14.3
1/24/2024
What’s Changed
- fix(napi): block_on type by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1911
- chore(napi): expose spawn_blocking on tokio runtime by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1912
Full Changelog: https://github.com/napi-rs/napi-rs/compare/@napi-rs/cli@3.0.0-alpha.35…napi@2.14.3
napi@2.14.2
12/31/2023
What’s Changed
- test(napi): decrease the worker sizes on Linux x64 musl platform by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1823
- fix(napi): apply clippy suggestions by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1878
- chore(napi): add status to error messages in AsyncWork by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1880
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.14.1…napi@2.14.2
napi-derive@2.14.6
12/27/2023
What’s Changed
- fix(napi-derive): proc-macro crash on enum by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1870
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@2.14.5…napi-derive@2.14.6
napi-derive@2.14.5
12/27/2023
What’s Changed
- fix(napi-derive): catch_unwind on constructor by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1869
Full Changelog: https://github.com/napi-rs/napi-rs/compare/@napi-rs/cli@3.0.0-alpha.24…napi-derive@2.14.5
napi-derive@2.14.4
12/13/2023
What’s Changed
- fix(napi-derive): upgrade syn by @forehalo in https://github.com/napi-rs/napi-rs/pull/1849
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@2.14.3…napi-derive@2.14.4
napi-derive@2.14.3
12/11/2023
What’s Changed
- fix(napi-derive,cli): register function cross crates by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1848
Full Changelog: https://github.com/napi-rs/napi-rs/compare/@napi-rs/cli@3.0.0-alpha.15…napi-derive@2.14.3
napi@2.14.1
11/20/2023
What’s Changed
- style(napi): clippy fix by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1815
- fix(napi): cargo doc build by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1819
- fix(napi): compile error for wasm32-unknown-unknown target by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1822
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.14.0…napi@2.14.1
napi-derive@2.14.2
11/20/2023
What’s Changed
- fix(napi-derive): compile warning by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1820
- fix(napi): compile error for wasm32-unknown-unknown target by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1822
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@2.14.1…napi-derive@2.14.2
napi-derive@2.14.1
11/8/2023
What’s Changed
- fix(napi-derive): async task void output type by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1795
- fix(napi-derive): async task optional output type by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1796
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-sys@2.3.0…napi-derive@2.14.1
napi@2.14.0
11/7/2023
What’s Changed
- throw is not a valid identifier when generating getters and setters by @yoogoc in https://github.com/napi-rs/napi-rs/pull/1701
- style: clippy fix by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1711
- feat(napi,sys): implement Symbol.for by @tom-sherman in https://github.com/napi-rs/napi-rs/pull/1721
- build: Docker arm64 platform by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1731
- test: aginst bun by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1730
- chore(napi): make napi_register_module_v1 pub by @MarkusJx in https://github.com/napi-rs/napi-rs/pull/1747
- feat: bump msrv to 1.65 by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1755
- chore(cli): update ci template by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1771
- test: reduce memory usage while testing aginst worker thread by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1769
- Integrate with emnapi by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1669
- fix(napi): potential double free issue by @kuzeyardabulut in https://github.com/napi-rs/napi-rs/pull/1679
- feat(napi): impl Default for Buffer by @ozgrakkurt in https://github.com/napi-rs/napi-rs/pull/1734
- fix(napi-derive): import FromNapiValue and ToNapiValue from napi::bindgen_prelude when generating an enum by @jzeuzs in https://github.com/napi-rs/napi-rs/pull/1713
- fix(napi): asan caught memory safety issue by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1776
- feat(napi): support async class factory by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1779
- feat(napi,sys): sync to napi9 by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1781
- feat: add experimental Env::get_module_file_name method by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1783
- test(napi): add tests for napi9 features by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1784
- style(napi): fix compile warning by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1785
- style(napi): as ptr => ptr::cast by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1786
- fix(napi): add tokio cleanup hook for more platforms by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1790
- fix(build): rerun if cli version changed by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1789
- feat(napi): pass the rest of async tests by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1792
New Contributors
- @yoogoc made their first contribution in https://github.com/napi-rs/napi-rs/pull/1701
- @tom-sherman made their first contribution in https://github.com/napi-rs/napi-rs/pull/1721
- @kuzeyardabulut made their first contribution in https://github.com/napi-rs/napi-rs/pull/1679
- @RaphaelDarley made their first contribution in https://github.com/napi-rs/napi-rs/pull/1716
- @ozgrakkurt made their first contribution in https://github.com/napi-rs/napi-rs/pull/1734
- @jzeuzs made their first contribution in https://github.com/napi-rs/napi-rs/pull/1713
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.13.3…napi@2.14.0
napi-sys@2.3.0
11/7/2023
What’s Changed
- fix(napi-sys): missing napi9 load on Windows by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1780
- feat(napi,sys): sync to napi9 by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1781
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 in https://github.com/napi-rs/napi-rs/pull/1701
- feat: integrate with emnapi, support wasm32-wasi-preview1-threads target by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1669
napi@2.13.3
8/16/2023
What’s Changed
- Fix promise resolve error by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1664
- feat(napi): impl FromNapiValue for HashMap with custom hasher by @arucil in https://github.com/napi-rs/napi-rs/pull/1682
New Contributors
- @H4ad made their first contribution in https://github.com/napi-rs/napi-rs/pull/1660
- @arucil made their first contribution in https://github.com/napi-rs/napi-rs/pull/1682
Full Changelog: https://github.com/napi-rs/napi-rs/compare/@napi-rs/cli@3.0.0-alpha.5…napi@2.13.3
napi@2.13.2
6/14/2023
What’s Changed
- docs(README): update platform support status by @kxxt in https://github.com/napi-rs/napi-rs/pull/1607
- chore(deps): update dependency electron to v25 by @renovate in https://github.com/napi-rs/napi-rs/pull/1610
- chore(deps): lock file maintenance by @renovate in https://github.com/napi-rs/napi-rs/pull/1612
- chore(deps): update yarn to v3.6.0 by @renovate in https://github.com/napi-rs/napi-rs/pull/1614
- chore: remove extra #[cfg] attribute by @aqrln in https://github.com/napi-rs/napi-rs/pull/1616
- chore(deps): update dependency electron to v25.1.0 by @renovate in https://github.com/napi-rs/napi-rs/pull/1617
- fix(napi): impl send + sync for ThreadsafeFunction by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1622
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.13.1…napi@2.13.2
napi@2.13.1
5/27/2023
What’s Changed
- fix(napi): missing ValidateNapiValue for JsObject by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1606
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.13.0…napi@2.13.1
napi@2.13.0
5/27/2023
What’s Changed
- feat(target): add support for riscv64gc-unknown-linux-gnu by @kxxt in https://github.com/napi-rs/napi-rs/pull/1599
- feat(napi): support chrono::NaiveDateTime by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1601
- feat(cli): detect Cargo —profile argument by @lucasfernog in https://github.com/napi-rs/napi-rs/pull/1598
New Contributors
- @kxxt made their first contribution in https://github.com/napi-rs/napi-rs/pull/1599
- @lucasfernog made their first contribution in https://github.com/napi-rs/napi-rs/pull/1598
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.12.7…napi@2.13.0
napi@2.12.7
5/20/2023
What’s Changed
- chore(deps): update dependency electron to v24.1.3 by @renovate in https://github.com/napi-rs/napi-rs/pull/1578
- chore(deps): update yarn to v3.5.1 by @renovate in https://github.com/napi-rs/napi-rs/pull/1579
- chore(deps): update dependency electron to v24.2.0 by @renovate in https://github.com/napi-rs/napi-rs/pull/1580
- feat(cli): add —use-cross command for building with
cross
by @Boshen in https://github.com/napi-rs/napi-rs/pull/1584 - chore(deps): update dependency @rollup/plugin-commonjs to v25 by @renovate in https://github.com/napi-rs/napi-rs/pull/1588
- chore(deps): update dependency electron to v24.3.0 by @renovate in https://github.com/napi-rs/napi-rs/pull/1587
- chore(example): add callback return promise by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1590
- chore(deps): update dependency electron to v24.3.1 by @renovate in https://github.com/napi-rs/napi-rs/pull/1593
- feat(napi): Bigint deserialization by @JanisGailis in https://github.com/napi-rs/napi-rs/pull/1592
New Contributors
- @Boshen made their first contribution in https://github.com/napi-rs/napi-rs/pull/1584
- @JanisGailis made their first contribution in https://github.com/napi-rs/napi-rs/pull/1592
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@2.12.5…napi@2.12.7
napi-derive@2.12.5
4/26/2023
What’s Changed
- fix(napi-derive): increase initial ref count in async fn by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1577
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@2.12.4…napi-derive@2.12.5
napi@2.12.6
4/25/2023
What’s Changed
- chore(napi): adds support for
Rc / Arc / Mutex
by @arcanis in https://github.com/napi-rs/napi-rs/pull/1573
New Contributors
- @arcanis made their first contribution in https://github.com/napi-rs/napi-rs/pull/1573
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.12.5…napi@2.12.6
napi-derive@2.12.4
4/25/2023
What’s Changed
- feat: clean napi-derive noop feature code path by @forehalo in https://github.com/napi-rs/napi-rs/pull/1571
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.12.5…napi-derive@2.12.4
napi@2.12.5
4/16/2023
What’s Changed
- fix(deps): update rust crate libloading to 0.8 by @renovate in https://github.com/napi-rs/napi-rs/pull/1563
- fix(napi): thread safe issue while creating class instance by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1561
- chore(deps): update dependency electron to v24.1.2 by @renovate in https://github.com/napi-rs/napi-rs/pull/1562
- fix(napi): do nothing in deferred if thread is destroyed by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1568
- test(napi): skip worker tests in slow Docker env by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1569
New Contributors
- @renovate made their first contribution in https://github.com/napi-rs/napi-rs/pull/1563
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.12.4…napi@2.12.5
napi@2.12.4
4/11/2023
What’s Changed
- chore: fix js binding template style by @suyanhanx in https://github.com/napi-rs/napi-rs/pull/1550
- fix(napi): access violation in property getter/setter closure by @MarkusJx in https://github.com/napi-rs/napi-rs/pull/1552
- fix: prevent crashing when
napi_register_module_v1
is called twice by @aqrln in https://github.com/napi-rs/napi-rs/pull/1554 - ci: remove deprecated action by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1555
- fix(napi): re-throw error in
ThreadsafeFunction
callback if we could by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1556 - chore(napi): add
noop
feature in napi crate by @gaoquanzero in https://github.com/napi-rs/napi-rs/pull/1546 - chore: upgrade npm dependencies by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1557
- fix(napi):
noop
feature by @Brooooooklyn https://github.com/napi-rs/napi-rs/commit/070230079d75fd72b661208a45eaecaa0ce0a43f
New Contributors
- @aqrln made their first contribution in https://github.com/napi-rs/napi-rs/pull/1554
- @gaoquanzero made their first contribution in https://github.com/napi-rs/napi-rs/pull/1546
- @suyanhanx made their first contribution in https://github.com/napi-rs/napi-rs/pull/1550
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.12.2…napi@2.12.4
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 in https://github.com/napi-rs/napi-rs/pull/1551
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@2.12.2…napi-derive@2.12.3
napi@2.12.2
3/30/2023
What’s Changed
- Ensure
tokio
runtime exists when registering the module by @meowtec in https://github.com/napi-rs/napi-rs/pull/1542 - Ensure that
napi_call_threadsafe_function
cannot be called after abort by @meowtec in https://github.com/napi-rs/napi-rs/pull/1533 - test(napi): update test case for checking electron renderer crash by @meowtec in https://github.com/napi-rs/napi-rs/pull/1547
- fix(napi): use
ptr::copy
to createTypedArray
in electron fallback mode by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1548 - fix(napi): free buffer in the current thread if env is available by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1549
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.12.1…napi@2.12.2
napi@2.12.1
3/23/2023
What’s Changed
- fix(napi): big numbers losing precision on serde_json::Value by @ceifa in https://github.com/napi-rs/napi-rs/pull/1538
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@2.12.2…napi@2.12.1
napi-derive@2.12.2
3/22/2023
What’s Changed
- fix(cli,napi-derive): backward compatible with older cli with #1531 by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1536
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@2.12.1…napi-derive@2.12.2
napi@2.12.0
3/21/2023
What’s Changed
- chore(napi): upgrade bitflags to v2 by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1518
- fix(napi): use weak arc for passing
thread_finalize_data
by @meowtec in https://github.com/napi-rs/napi-rs/pull/1525 - fix(napi):
ThreadsafeFunctionHandle
never being dropped by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1530 - feat: export registers in wasm32 target by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1529
- feat(napi): property getter and setter with closure by @victorteokw in https://github.com/napi-rs/napi-rs/pull/1526
New Contributors
- @meowtec made their first contribution in https://github.com/napi-rs/napi-rs/pull/1525
- @nebarf made their first contribution in https://github.com/napi-rs/napi-rs/pull/1527
- @victorteokw made their first contribution in https://github.com/napi-rs/napi-rs/pull/1526
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.11.4…napi@2.12.0
napi-derive@2.12.1
3/21/2023
What’s Changed
- fix(cli,napi-derive): re-export types from shared crate by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1531
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@2.12.0…napi-derive@2.12.1
napi-derive@2.12.0
3/21/2023
What’s Changed
- feat: export registers in wasm32 target by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1529
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.11.4…napi-derive@2.12.0
napi@2.11.4
3/14/2023
What’s Changed
- fix(napi): prevent access to tsfn-raw after env’s destroyed(#1514) by @HotQ in https://github.com/napi-rs/napi-rs/pull/1515
New Contributors
- @HotQ made their first contribution in https://github.com/napi-rs/napi-rs/pull/1515
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.11.3…napi@2.11.4
napi@2.11.3
3/14/2023
What’s Changed
- fix(napi): display should be implemented on error generics with
Debug
by @h-a-n-a in https://github.com/napi-rs/napi-rs/pull/1497 - feat(napi): expose
uv_run
by @MarkusJx in https://github.com/napi-rs/napi-rs/pull/1499 - test(napi): tests for custom gc in worker_threads by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1505
- chore(napi): remove thread_local from dependenies by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1506
- build: add libc++ in aarch64-linux-gnu Docker by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1511
- chore: ci components upgrade by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1512
- fix(napi): panic when
Promise
callbacks trigger after Promise is dropped by @pose in https://github.com/napi-rs/napi-rs/pull/1516
New Contributors
- @MarkusJx made their first contribution in https://github.com/napi-rs/napi-rs/pull/1499
- @pose made their first contribution in https://github.com/napi-rs/napi-rs/pull/1516
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@2.11.1…napi@2.11.3
napi-derive@2.11.2
3/14/2023
What’s Changed
- chore(napi-derive): remove thread_local from dependenies by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1506
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@2.11.1…napi-derive@2.11.2
napi@2.11.2
2/18/2023
What’s Changed
- fix(napi): error should be
Send Sync
conditionally by @h-a-n-a in https://github.com/napi-rs/napi-rs/pull/1487
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.11.1…napi@2.11.2
napi-derive@2.11.1
2/18/2023
Changes
Full Changelog: https://github.com/napi-rs/napi-rs/compare/@napi-rs/cli@2.14.8…napi-derive@2.11.1
napi@2.11.1
2/9/2023
Error::new
API enhancement
Error::new
now support passing status: AsRef<str>
and message: ToString
pub enum CustomError {
NapiError(Error<Status>),
Panic,
}
impl AsRef<str> for CustomError {
fn as_ref(&self) -> &str {
match self {
CustomError::Panic => "Panic",
CustomError::NapiError(e) => e.status.as_ref(),
}
}
}
#[napi]
pub fn custom_status_code() -> Result<(), CustomError> {
Err(Error::new(CustomError::Panic, "don't panic"))
}
test('custom status code in Error', (t) => {
t.throws(() => customStatusCode(), {
code: 'Panic',
})
})
What’s Changed
- fix(napi): support custom status in Error by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1486
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.11.0…napi@2.11.1
napi@2.11.0
2/8/2023
Spread tuple arguments in ThreadsafeFunction
#[napi]
pub fn accept_threadsafe_function_tuple_args(func: ThreadsafeFunction<(u32, bool, String)>) {
thread::spawn(move || {
func.call(
Ok((1, false, "NAPI-RS".into())),
ThreadsafeFunctionCallMode::NonBlocking,
);
});
}
⬇️⬇️⬇️⬇️⬇️⬇️⬇️
export function acceptThreadsafeFunctionTupleArgs(func: (err: Error | null, arg0: number, arg1: boolean, arg2: string) => any): void
What’s Changed
- feat(napi): convert
ToNapiValue
tuple to variadic tsfn by @h-a-n-a #1475 - fix(napi): convert u64 to u32 in serialization by @m1212e in https://github.com/napi-rs/napi-rs/pull/1478
New Contributors
- @m1212e made their first contribution in https://github.com/napi-rs/napi-rs/pull/1478
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.10.17…napi@2.11.0
napi@2.10.17
2/8/2023
What’s Changed
- fix(napi): impl Send Sync to External by @Brooooooklyn
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.10.16…napi@2.10.17
napi@2.10.16
2/7/2023
What’s Changed
- fix(napi): dropping Error should not call sys if feature is set to noop by @h-a-n-a in https://github.com/napi-rs/napi-rs/pull/1477
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.10.15…napi@2.10.16
napi@2.10.15
2/5/2023
What’s Changed
- build(deps): bump http-cache-semantics from 4.1.0 to 4.1.1 by @dependabot in https://github.com/napi-rs/napi-rs/pull/1472
- chore(napi): enhance the error messages while converting types failed by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1473
Full Changelog: https://github.com/napi-rs/napi-rs/compare/@napi-rs/cli@2.14.6…napi@2.10.15
napi@2.10.14
1/31/2023
What’s Changed
- fix(napi): run_script return type by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1467
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.10.13…napi@2.10.14
napi-derive@2.10.1
1/31/2023
What’s Changed
- fix(napi-derive): incorrect Task output type in some cases by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1466
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@2.10.0…napi-derive@2.10.1
napi@2.10.13
1/28/2023
What’s Changed
- fix(napi): also apply electron external data fallback to lowlevel APIs by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1458
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.10.12…napi@2.10.13
napi@2.10.12
1/28/2023
What’s Changed
- fix(napi): add missing NoExternalBuffersAllowed by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1457
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.10.11…napi@2.10.12
napi@2.10.11
1/25/2023
What’s Changed
- fix(napi): fallback to copy arraybuffer if zero copy is not allowed by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1455
Background
Electron disallowed the create_external_xxx
API since electron@21
: https://www.electronjs.org/blog/v8-memory-cage
NAPI-RS will fallback to use create_buffer_copy
if napi_create_external_buffer
return the napi_no_external_buffers_allowed
status.
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.10.10…napi@2.10.11
napi@2.10.10
1/24/2023
What’s Changed
- chore(napi): implement FromNapiValue for ThreadsafeFunction by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1447
- fix(napi): throw fatal error if cast return value failed by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1450
- fix(napi): add UnknownReturnValue to use in call_async scenario by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1451
- fix(napi): unhandled promise rejection while using
EitherN<Promise<..>>
by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1452
Full Changelog: https://github.com/napi-rs/napi-rs/compare/@napi-rs/cli@2.14.4…napi@2.10.10
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 in https://github.com/napi-rs/napi-rs/pull/1449
- feat(napi-derive): allow partial implement From/To Napivalue for Object by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1448
- chore(napi-derive): allow unsafe async &mut self by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1453
Full Changelog: https://github.com/napi-rs/napi-rs/compare/@napi-rs/cli@2.14.4…napi-derive@2.10.0
napi@2.10.9
1/19/2023
What’s Changed
- fix(napi): fallback to copy buffer if zero-copy is not allowed by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1445
Background
Electron disallowed the create_external_xxx
API since electron@21
: https://www.electronjs.org/blog/v8-memory-cage
NAPI-RS will fallback to use create_buffer_copy
if napi_create_external_buffer
return the napi_no_external_buffers_allowed
status.
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.10.8…napi@2.10.9
napi-sys@2.2.3
1/19/2023
What’s Changed
- chore(sys): add
napi_no_external_buffers_allowed
toStatus
by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1445
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.10.8…napi-sys@2.2.3
napi@2.10.8
1/18/2023
What’s Changed
- fix(napi): remove useless aquire while creating ThreadsafeFunction by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1442
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.10.7…napi@2.10.8
napi@2.10.7
1/16/2023
What’s Changed
- fix(napi): missing From implementation for Bigint by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1440
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@2.9.5…napi@2.10.7
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 in https://github.com/napi-rs/napi-rs/pull/1439
Full Changelog: https://github.com/napi-rs/napi-rs/compare/@napi-rs/cli@2.14.3…napi-derive@2.9.5
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 in https://github.com/napi-rs/napi-rs/pull/1436
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.10.6…napi-derive@2.9.4
napi@2.10.6
1/11/2023
What’s Changed
- fix(napi): delete reference should be after global custom gc by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1433
- feat(napi): refactor ThreadsafeFunction to allow get return value of it by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1427
- fix(napi): should correctly return while dropping Buffer by @iheyunfei in https://github.com/napi-rs/napi-rs/pull/1434
New Contributors
- @iheyunfei made their first contribution in https://github.com/napi-rs/napi-rs/pull/1434
Full Changelog: https://github.com/napi-rs/napi-rs/compare/@napi-rs/cli@2.14.2…napi@2.10.6
napi@2.10.5
1/9/2023
What’s Changed
- build(deps): bump json5 from 1.0.1 to 1.0.2 by @dependabot in https://github.com/napi-rs/napi-rs/pull/1418
- Fix ArrayBuffer memory leak by @overlookmotel in https://github.com/napi-rs/napi-rs/pull/1420
- test(napi): remove outdated assersion by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1423
- fix(napi): array buffer drop notify never be called in cloned buffer by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1424
New Contributors
- @overlookmotel made their first contribution in https://github.com/napi-rs/napi-rs/pull/1420
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.10.4…napi@2.10.5
napi@2.10.4
12/29/2022
What’s Changed
- test: Memory leak reproduction for futures by @SevInf in https://github.com/napi-rs/napi-rs/pull/1413
- Fix promise leak by @xiaopengli89 in https://github.com/napi-rs/napi-rs/pull/1403
- Delete reference by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1414
New Contributors
- @SevInf made their first contribution in https://github.com/napi-rs/napi-rs/pull/1413
- @xiaopengli89 made their first contribution in https://github.com/napi-rs/napi-rs/pull/1403
Full Changelog: https://github.com/napi-rs/napi-rs/compare/@napi-rs/cli@2.14.0…napi@2.10.4
napi@2.10.3
12/19/2022
What’s Changed
- fix(napi): napi_create_async_work incorrect argument (napi-rs#1392) by @patrickpilch in https://github.com/napi-rs/napi-rs/pull/1396
- chore(napi): add “run_script” for “Env” by @F001 in https://github.com/napi-rs/napi-rs/pull/1393
- chore(napi): reduce Mutex usage while loading addon by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1395
- fix(napi): add back custom gc for Send Buffer by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1399
New Contributors
- @patrickpilch made their first contribution in https://github.com/napi-rs/napi-rs/pull/1396
- @F001 made their first contribution in https://github.com/napi-rs/napi-rs/pull/1393
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.10.2…napi@2.10.3
napi-derive@2.9.3
12/9/2022
What’s Changed
- Better error message for
#[napi(catch_unwind)]
by @simonvandel in https://github.com/napi-rs/napi-rs/pull/1383
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@2.9.2…napi-derive@2.9.3
napi@2.10.2
12/8/2022
What’s Changed
- build: focal->jammy, llvm-14->llvm-15 by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1369
- Fixes #1338 use after free with async, and fixes #1340 by @Xaeroxe in https://github.com/napi-rs/napi-rs/pull/1339
- chore(napi-derive): make_ref tweaks by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1371
- Bug fix: typed arrays ref shouldn’t use offset. by @nihohit in https://github.com/napi-rs/napi-rs/pull/1376
New Contributors
- @nihohit made their first contribution in https://github.com/napi-rs/napi-rs/pull/1376
Full Changelog: https://github.com/napi-rs/napi-rs/compare/@napi-rs/cli@2.13.0…napi@2.10.2
napi@2.10.1
11/12/2022
What’s Changed
- fix(napi): BigInt::get_u64 lossless check by @Wodann in https://github.com/napi-rs/napi-rs/pull/1348
- chore(napi): including type message in error message by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1350
- fix(cli): support help command by @ahaoboy in https://github.com/napi-rs/napi-rs/pull/1355
- ci: test for zig 0.10 by @Brooooooklyn in https://github.com/napi-rs/napi-rs/pull/1360
New Contributors
- @ahaoboy made their first contribution in https://github.com/napi-rs/napi-rs/pull/1355
- @SASUKE40 made their first contribution in https://github.com/napi-rs/napi-rs/pull/1364
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.10.0…napi@2.10.1