napi
napi@2.16.9
8/10/2024
What Changed
- chore: implement
serde::Serialize
forEither
by @lbarthon (opens in a new tab) #2209
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.16.8...napi@2.16.9 (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@3.0.0-alpha.6
7/7/2024
What's Changed
- refactor(napi): simplify Promise implementation by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2171 (opens in a new tab)
- fix(napi): Promise callbacks should require static lifetime by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2172 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@3.0.0-alpha.5...napi@3.0.0-alpha.6 (opens in a new tab)
napi@3.0.0-alpha.5
7/6/2024
What's Changed
- feat(napi): impl from_string for Uint8Array by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2167 (opens in a new tab)
- feat(napi): provide PromiseRaw for non-await scenario by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2168 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/@napi-rs/cli@3.0.0-alpha.56...napi@3.0.0-alpha.5 (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@2.16.8
6/27/2024
What Changed
- feat(napi): support chrono datetime with timezones by @naskya (opens in a new tab) (https://github.com/napi-rs/napi-rs/pull/2074 (opens in a new tab))
- chore(napi): let docs.rs generate all documentation by @Gentle (opens in a new tab) #2160
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.16.7...napi@2.16.8 (opens in a new tab)
napi@3.0.0-alpha.3
7/1/2024
What's Changed
- docs(cli): fix typo by @naskya (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2108 (opens in a new tab)
- chore(deps): update dependency sinon to v18 by @renovate (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2112 (opens in a new tab)
- chore(napi): allow value attribute on enum variants by @lbarthon (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2115 (opens in a new tab)
- feat(napi): Function build_thfn support calledhandled mode by @richerfu (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2114 (opens in a new tab)
- fix(typegen): add missing
declare
keyword by @magic-akari (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2117 (opens in a new tab) - fix(deps): update dependency emnapi to v1.2.0 by @renovate (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2118 (opens in a new tab)
- chore(deps): update dependency vite-plugin-node-polyfills to ^0.22.0 by @renovate (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2119 (opens in a new tab)
- feat(napi): implement ToNapiValue for Ref as required by TSFN by @richerfu (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2122 (opens in a new tab)
- feat(napi): support External for compact mode by @richerfu (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2125 (opens in a new tab)
- chore(example): remove JsFunction from example by @richerfu (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2123 (opens in a new tab)
- chore(napi): make Ser and De public by @Gentle (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2131 (opens in a new tab)
- chore(deps): update dependency @rollup/plugin-commonjs to v26 by @renovate (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2132 (opens in a new tab)
- Add windows gnu target by @Kreijstal (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2026 (opens in a new tab)
- chore(deps): lock file maintenance by @renovate (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2129 (opens in a new tab)
- chore(deps): update dependency oxlint to ^0.4.0 by @renovate (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2126 (opens in a new tab)
- chore(deps): update yarn to v4.3.0 by @renovate (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2135 (opens in a new tab)
- fix(cli): rename env CC to TARGET_CC avoid proc-macro build failed by @richerfu (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2137 (opens in a new tab)
- chore(deps): update dependency electron to v31 by @renovate (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2136 (opens in a new tab)
- chore(deps): update dependency c8 to v10 by @renovate (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2134 (opens in a new tab)
- fix(napi): JsString should respect \0 character to align with String by @richerfu (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2138 (opens in a new tab)
- feat(error): print anyhow error in debug mode to show trace by @ozgrakkurt (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2140 (opens in a new tab)
- chore: clippy fix by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2144 (opens in a new tab)
- chore(deps): update docker/build-push-action action to v6 by @renovate (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2142 (opens in a new tab)
- Reduce monomorphization load of various functions by @seritools (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2143 (opens in a new tab)
- fix(deps): update dependency @octokit/rest to v21 by @renovate (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2149 (opens in a new tab)
- chore(deps): update yarn to v4.3.1 by @renovate (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2150 (opens in a new tab)
- chore(deps): update oven-sh/setup-bun action to v2 by @renovate (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2153 (opens in a new tab)
- test(napi): spwan thread in thread by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2139 (opens in a new tab)
- chore(napi): remove stale tokio feature by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2155 (opens in a new tab)
- chore(napi): exclude libuv api on wasm targets by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2156 (opens in a new tab)
- let docs.rs generate all documentation by @Gentle (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2160 (opens in a new tab)
- chore(deps): update dependency oxlint to ^0.5.0 by @renovate (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2159 (opens in a new tab)
New Contributors
- @magic-akari (opens in a new tab) made their first contribution in https://github.com/napi-rs/napi-rs/pull/2117 (opens in a new tab)
- @Gentle (opens in a new tab) made their first contribution in https://github.com/napi-rs/napi-rs/pull/2131 (opens in a new tab)
- @Kreijstal (opens in a new tab) made their first contribution in https://github.com/napi-rs/napi-rs/pull/2026 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/@napi-rs/cli@3.0.0-alpha.55...napi@3.0.0-alpha.3 (opens in a new tab)
napi@2.16.7
6/26/2024
What changed
- feat(napi): implement ToNapiValue for Ref as required by TSFN by @richerfu (opens in a new tab) #2122
- feat(napi): support External for compact mode by @richerfu (opens in a new tab) #2125
- chore(napi): make Ser and De public by @Gentle (opens in a new tab) #2131
- fix(napi): JsString should respect \0 character to align with String by @richerfu (opens in a new tab) #2138
- feat(error): print anyhow error in debug mode to show trace by @ozgrakkurt (opens in a new tab) #2140
- chore(napi): reduce monomorphization load of various functions by @seritools (opens in a new tab) #2143
- chore(napi): remove stale tokio feature by @Brooooooklyn (opens in a new tab) #2155
- chore(napi): exclude libuv api on wasm targets by @Brooooooklyn (opens in a new tab) #2156
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.16.6...napi@2.16.7 (opens in a new tab)
napi@2.16.6
5/7/2024
What's Changed
- fix(napi): panic when deserializing empty buffer with Rust 1.78 by @mischnic (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2094 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.16.5...napi@2.16.6 (opens in a new tab)
napi@2.16.5
5/6/2024
What's Changed
- Fix panic in JsArrayBufferValue as_ref/as_mut with Rust 1.78 by @tronical (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2083 (opens in a new tab)
- fix(napi): make sure env without exception pending before throw error by @southorange0929 (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2092 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.16.4...napi@2.16.5 (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@2.16.4
4/18/2024
What changed
- feat(napi): allow user defined tokio runtime by @Brooooooklyn (opens in a new tab) #2040
- fix(napi): handle panic in async block by @Brooooooklyn (opens in a new tab) (https://github.com/napi-rs/napi-rs/pull/2050 (opens in a new tab))
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.16.2...napi@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@3.0.0-alpha.2
4/15/2024
What's Changed
- feat(napi): allow
&External
to be created from napi value by @sapphi-red (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2037 (opens in a new tab) - fix(napi): ensure CalleeHandled works as expected by @lbarthon (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2039 (opens in a new tab)
- feat(napi): allow user defined tokio runtime by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2040 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@3.0.0-alpha.1...napi@3.0.0-alpha.2 (opens in a new tab)
napi@2.16.2
4/10/2024
What Changed
- fix(napi): create_bigint_from_*128 returned incorrect word_count by @sapphi-red (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2024 (opens in a new tab)
- fix(napi): napi_adjust_external_memory should be hidden with wasm target by @southorange0929 (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2031 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.16.1...napi@2.16.2 (opens in a new tab)
napi-sys@2.4.0
4/10/2024
What's Changed
- feat(napi-sys): support load Node-API symbols dynamically by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2014 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.16.1...napi-sys@2.4.0 (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@3.0.0-alpha.1
4/10/2024
What's Changed
- chore(wasm-runtime): upgrade emnapi by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2008 (opens in a new tab)
- fix(napi): no panic when caller stops listening by @lbarthon (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2010 (opens in a new tab)
- style: clippy fix by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2012 (opens in a new tab)
- fix(napi): External should impl FromNapiRef rather than FromNapiValue by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2013 (opens in a new tab)
- feat(napi-sys): support load Node-API symbols dynamically by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2014 (opens in a new tab)
- fix(cli): wasi Node.js worker template by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2015 (opens in a new tab)
- fix(deps): update dependency emnapi to v1.1.1 by @renovate (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2017 (opens in a new tab)
- chore(deps-dev): bump vite from 5.1.4 to 5.1.7 by @dependabot (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2025 (opens in a new tab)
- fix:
create_bigint_from_*128
returned incorrect word_count by @sapphi-red (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2024 (opens in a new tab) - feat(target): add support for armv7-unknown-linux-muslebihf by @sapphi-red (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2019 (opens in a new tab)
- feat(target): add support for powerpc64le-unknown-linux-gnu by @sapphi-red (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2023 (opens in a new tab)
- feat(target): add support for s390x-unknown-linux-gnu by @sapphi-red (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2028 (opens in a new tab)
- docs: update platform support in README by @sapphi-red (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2029 (opens in a new tab)
- chore(deps): lock file maintenance by @renovate (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2018 (opens in a new tab)
- feat(cli): support wasm32-wasipxx targets by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2030 (opens in a new tab)
- chore: use oxlint by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2032 (opens in a new tab)
- fix(napi): napi_adjust_external_memory should be hidden with wasm target by @southorange0929 (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2031 (opens in a new tab)
- ci: fix flaky tests by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2033 (opens in a new tab)
- 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@3.0.0-alpha.0...napi@3.0.0-alpha.1 (opens in a new tab)
napi@2.16.1
3/26/2024
What's Changed
- fix(napi): remove useless FromNapiValue bound check for ValidateNapiValue by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1999 (opens in a new tab)
- feat(napi): support to use tuple with either by @h-a-n-a (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1993 (opens in a new tab)
- feat(napi): implement
From String
forBuffer
by @lbarthon (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2002 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.16.0...napi@2.16.1 (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@3.0.0-alpha.0
3/20/2024
What's Changed
- fix(napi): remove useless FromNapiValue bound check for ValidateNapiValue by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1999 (opens in a new tab)
- 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)
- feat(napi): support to use tuple with either by @h-a-n-a (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1993 (opens in a new tab)
- feat(napi): implement
From String
forBuffer
by @lbarthon (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2002 (opens in a new tab) - feat(napi): support
Return
generic of ThreadsafeFunction by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1997 (opens in a new tab) - chore(napi): add Send and Sync to Reference by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/2007 (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@2.16.0...napi@3.0.0-alpha.0 (opens in a new tab)
napi@2.16.0
2/28/2024
What's Changed
- feat(napi): allow Reference as a class method param by @lbarthon (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1966 (opens in a new tab)
- fix(napi): remove useless create_reference in slice => TypedArray impl by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1975 (opens in a new tab)
- feat(napi): impl chained Into for TypedArray types by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1978 (opens in a new tab)
- feat(napi): impl BufferSlice and Uint8ClampedSlice by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1979 (opens in a new tab)
- fix(napi): add back the typecheck logic that was accidentally removed in Object::get_named_property by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1982 (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@2.16.0 (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@2.15.4
2/22/2024
What's Changed
- fix(napi): no hard fail on ThreadsafeFunction::call_async by @lbarthon (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1970 (opens in a new tab)
- fix(napi): JsObject.add_finalizer callback being allowed to reference non-static things by @tomb-msft (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1968 (opens in a new tab)
New Contributors
- @tomb-msft (opens in a new tab) made their first contribution in https://github.com/napi-rs/napi-rs/pull/1968 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.15.3...napi@2.15.4 (opens in a new tab)
napi@2.15.3
2/21/2024
What's Changed
- fix: remove outdated rustdoc about tokio channels by @lbarthon (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1961 (opens in a new tab)
- fix(Buffer): prevent memory leak when Custom GC is used by @lbarthon (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1963 (opens in a new tab)
New Contributors
- @lbarthon (opens in a new tab) made their first contribution in https://github.com/napi-rs/napi-rs/pull/1961 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-build@2.1.1...napi@2.15.3 (opens in a new tab)
napi-build@2.1.1
2/18/2024
What's Changed
- feat(cli,build): support setjmp.h by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1958 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.15.2...napi-build@2.1.1 (opens in a new tab)
napi@2.15.2
2/17/2024
What's Changed
- feat(napi): extends the Map types interoperability by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1950 (opens in a new tab)
- feat(napi): accept slice as TypedArray by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1951 (opens in a new tab)
- style: apply clippy fix by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1953 (opens in a new tab)
- fix(napi): memory leak while using Reference by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1954 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/@napi-rs/cli@3.0.0-alpha.38...napi@2.15.2 (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@2.15.1
2/1/2024
What's Changed
- fix(napi): Fix buffer corruption and soundness issues by @Janrupf (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1923 (opens in a new tab)
- fix(napi): in "Object::get", return null values wrapped in a "Some" by @jkomyno (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1934 (opens in a new tab)
New Contributors
- @Janrupf (opens in a new tab) made their first contribution in https://github.com/napi-rs/napi-rs/pull/1923 (opens in a new tab)
- @jkomyno (opens in a new tab) made their first contribution in https://github.com/napi-rs/napi-rs/pull/1934 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.15.0...napi@2.15.1 (opens in a new tab)
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 (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1917 (opens in a new tab)
- 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)
- chore(napi): delete unwrap_from_ref API because it was never work by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1915 (opens in a new tab)
- fix(napi): memory issue while creating external buffer on electron by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1921 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.14.4...napi@2.15.0 (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@2.14.4
1/24/2024
What's changed
- fix(napi): future in block_on do not need to be send @Brooooooklyn (opens in a new tab) https://github.com/napi-rs/napi-rs/commit/e3322706981414dbdbde0a5021cab1d5f9144620 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.14.3...napi@2.14.4 (opens in a new tab)
napi@2.14.3
1/24/2024
What's Changed
- fix(napi): block_on type by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1911 (opens in a new tab)
- chore(napi): expose spawn_blocking on tokio runtime by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1912 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/@napi-rs/cli@3.0.0-alpha.35...napi@2.14.3 (opens in a new tab)
napi@2.14.2
12/31/2023
What's Changed
- test(napi): decrease the worker sizes on Linux x64 musl platform by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1823 (opens in a new tab)
- fix(napi): apply clippy suggestions by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1878 (opens in a new tab)
- chore(napi): add status to error messages in AsyncWork by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1880 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.14.1...napi@2.14.2 (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@2.14.1
11/20/2023
What's Changed
- style(napi): clippy fix by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1815 (opens in a new tab)
- fix(napi): cargo doc build by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1819 (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@2.14.0...napi@2.14.1 (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@2.14.0
11/7/2023
What's Changed
- 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)
- style: clippy fix by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1711 (opens in a new tab)
- feat(napi,sys): implement Symbol.for by @tom-sherman (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1721 (opens in a new tab)
- build: Docker arm64 platform by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1731 (opens in a new tab)
- test: aginst bun by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1730 (opens in a new tab)
- chore(napi): make napi_register_module_v1 pub by @MarkusJx (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1747 (opens in a new tab)
- feat: bump msrv to 1.65 by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1755 (opens in a new tab)
- chore(cli): update ci template by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1771 (opens in a new tab)
- test: reduce memory usage while testing aginst worker thread by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1769 (opens in a new tab)
- Integrate with emnapi by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1669 (opens in a new tab)
- fix(napi): potential double free issue by @kuzeyardabulut (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1679 (opens in a new tab)
- feat(napi): impl Default for Buffer by @ozgrakkurt (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1734 (opens in a new tab)
- fix(napi-derive): import FromNapiValue and ToNapiValue from napi::bindgen_prelude when generating an enum by @jzeuzs (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1713 (opens in a new tab)
- fix(napi): asan caught memory safety issue by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1776 (opens in a new tab)
- feat(napi): support async class factory by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1779 (opens in a new tab)
- feat(napi,sys): sync to napi9 by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1781 (opens in a new tab)
- feat: add experimental Env::get_module_file_name method by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1783 (opens in a new tab)
- test(napi): add tests for napi9 features by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1784 (opens in a new tab)
- style(napi): fix compile warning by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1785 (opens in a new tab)
- style(napi): as ptr => ptr::cast by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1786 (opens in a new tab)
- fix(napi): add tokio cleanup hook for more platforms by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1790 (opens in a new tab)
- fix(build): rerun if cli version changed by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1789 (opens in a new tab)
- feat(napi): pass the rest of async tests by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1792 (opens in a new tab)
New Contributors
- @yoogoc (opens in a new tab) made their first contribution in https://github.com/napi-rs/napi-rs/pull/1701 (opens in a new tab)
- @tom-sherman (opens in a new tab) made their first contribution in https://github.com/napi-rs/napi-rs/pull/1721 (opens in a new tab)
- @kuzeyardabulut (opens in a new tab) made their first contribution in https://github.com/napi-rs/napi-rs/pull/1679 (opens in a new tab)
- @RaphaelDarley (opens in a new tab) made their first contribution in https://github.com/napi-rs/napi-rs/pull/1716 (opens in a new tab)
- @ozgrakkurt (opens in a new tab) made their first contribution in https://github.com/napi-rs/napi-rs/pull/1734 (opens in a new tab)
- @jzeuzs (opens in a new tab) made their first contribution in https://github.com/napi-rs/napi-rs/pull/1713 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.13.3...napi@2.14.0 (opens in a new tab)
napi-sys@2.3.0
11/7/2023
What's Changed
- fix(napi-sys): missing napi9 load on Windows by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1780 (opens in a new tab)
- feat(napi,sys): sync to napi9 by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1781 (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@2.13.3
8/16/2023
What's Changed
- Fix promise resolve error by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1664 (opens in a new tab)
- feat(napi): impl FromNapiValue for HashMap with custom hasher by @arucil (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1682 (opens in a new tab)
New Contributors
- @H4ad (opens in a new tab) made their first contribution in https://github.com/napi-rs/napi-rs/pull/1660 (opens in a new tab)
- @arucil (opens in a new tab) made their first contribution in https://github.com/napi-rs/napi-rs/pull/1682 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/@napi-rs/cli@3.0.0-alpha.5...napi@2.13.3 (opens in a new tab)
napi@2.13.2
6/14/2023
What's Changed
- docs(README): update platform support status by @kxxt (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1607 (opens in a new tab)
- chore(deps): update dependency electron to v25 by @renovate (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1610 (opens in a new tab)
- chore(deps): lock file maintenance by @renovate (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1612 (opens in a new tab)
- chore(deps): update yarn to v3.6.0 by @renovate (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1614 (opens in a new tab)
- chore: remove extra #[cfg] attribute by @aqrln (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1616 (opens in a new tab)
- chore(deps): update dependency electron to v25.1.0 by @renovate (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1617 (opens in a new tab)
- fix(napi): impl send + sync for ThreadsafeFunction by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1622 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.13.1...napi@2.13.2 (opens in a new tab)
napi@2.13.1
5/27/2023
What's Changed
- fix(napi): missing ValidateNapiValue for JsObject by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1606 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.13.0...napi@2.13.1 (opens in a new tab)
napi@2.13.0
5/27/2023
What's Changed
- feat(target): add support for riscv64gc-unknown-linux-gnu by @kxxt (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1599 (opens in a new tab)
- feat(napi): support chrono::NaiveDateTime by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1601 (opens in a new tab)
- feat(cli): detect Cargo --profile argument by @lucasfernog (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1598 (opens in a new tab)
New Contributors
- @kxxt (opens in a new tab) made their first contribution in https://github.com/napi-rs/napi-rs/pull/1599 (opens in a new tab)
- @lucasfernog (opens in a new tab) made their first contribution in https://github.com/napi-rs/napi-rs/pull/1598 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.12.7...napi@2.13.0 (opens in a new tab)
napi@2.12.7
5/20/2023
What's Changed
- chore(deps): update dependency electron to v24.1.3 by @renovate (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1578 (opens in a new tab)
- chore(deps): update yarn to v3.5.1 by @renovate (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1579 (opens in a new tab)
- chore(deps): update dependency electron to v24.2.0 by @renovate (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1580 (opens in a new tab)
- feat(cli): add --use-cross command for building with
cross
by @Boshen (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1584 (opens in a new tab) - chore(deps): update dependency @rollup/plugin-commonjs to v25 by @renovate (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1588 (opens in a new tab)
- chore(deps): update dependency electron to v24.3.0 by @renovate (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1587 (opens in a new tab)
- chore(example): add callback return promise by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1590 (opens in a new tab)
- chore(deps): update dependency electron to v24.3.1 by @renovate (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1593 (opens in a new tab)
- feat(napi): Bigint deserialization by @JanisGailis (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1592 (opens in a new tab)
New Contributors
- @Boshen (opens in a new tab) made their first contribution in https://github.com/napi-rs/napi-rs/pull/1584 (opens in a new tab)
- @JanisGailis (opens in a new tab) made their first contribution in https://github.com/napi-rs/napi-rs/pull/1592 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@2.12.5...napi@2.12.7 (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@2.12.6
4/25/2023
What's Changed
- chore(napi): adds support for
Rc / Arc / Mutex
by @arcanis (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1573 (opens in a new tab)
New Contributors
- @arcanis (opens in a new tab) made their first contribution in https://github.com/napi-rs/napi-rs/pull/1573 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.12.5...napi@2.12.6 (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@2.12.5
4/16/2023
What's Changed
- fix(deps): update rust crate libloading to 0.8 by @renovate (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1563 (opens in a new tab)
- fix(napi): thread safe issue while creating class instance by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1561 (opens in a new tab)
- chore(deps): update dependency electron to v24.1.2 by @renovate (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1562 (opens in a new tab)
- fix(napi): do nothing in deferred if thread is destroyed by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1568 (opens in a new tab)
- test(napi): skip worker tests in slow Docker env by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1569 (opens in a new tab)
New Contributors
- @renovate (opens in a new tab) made their first contribution in https://github.com/napi-rs/napi-rs/pull/1563 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.12.4...napi@2.12.5 (opens in a new tab)
napi@2.12.4
4/11/2023
What's Changed
- chore: fix js binding template style by @suyanhanx (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1550 (opens in a new tab)
- fix(napi): access violation in property getter/setter closure by @MarkusJx (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1552 (opens in a new tab)
- fix: prevent crashing when
napi_register_module_v1
is called twice by @aqrln (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1554 (opens in a new tab) - ci: remove deprecated action by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1555 (opens in a new tab)
- fix(napi): re-throw error in
ThreadsafeFunction
callback if we could by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1556 (opens in a new tab) - chore(napi): add
noop
feature in napi crate by @gaoquanzero (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1546 (opens in a new tab) - chore: upgrade npm dependencies by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1557 (opens in a new tab)
- fix(napi):
noop
feature by @Brooooooklyn (opens in a new tab) https://github.com/napi-rs/napi-rs/commit/070230079d75fd72b661208a45eaecaa0ce0a43f (opens in a new tab)
New Contributors
- @aqrln (opens in a new tab) made their first contribution in https://github.com/napi-rs/napi-rs/pull/1554 (opens in a new tab)
- @gaoquanzero (opens in a new tab) made their first contribution in https://github.com/napi-rs/napi-rs/pull/1546 (opens in a new tab)
- @suyanhanx (opens in a new tab) made their first contribution in https://github.com/napi-rs/napi-rs/pull/1550 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.12.2...napi@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@2.12.2
3/30/2023
What's Changed
- Ensure
tokio
runtime exists when registering the module by @meowtec (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1542 (opens in a new tab) - Ensure that
napi_call_threadsafe_function
cannot be called after abort by @meowtec (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1533 (opens in a new tab) - test(napi): update test case for checking electron renderer crash by @meowtec (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1547 (opens in a new tab)
- fix(napi): use
ptr::copy
to createTypedArray
in electron fallback mode by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1548 (opens in a new tab) - fix(napi): free buffer in the current thread if env is available by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1549 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.12.1...napi@2.12.2 (opens in a new tab)
napi@2.12.1
3/23/2023
What's Changed
- fix(napi): big numbers losing precision on serde_json::Value by @ceifa (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1538 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@2.12.2...napi@2.12.1 (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@2.12.0
3/21/2023
What's Changed
- chore(napi): upgrade bitflags to v2 by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1518 (opens in a new tab)
- fix(napi): use weak arc for passing
thread_finalize_data
by @meowtec (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1525 (opens in a new tab) - fix(napi):
ThreadsafeFunctionHandle
never being dropped by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1530 (opens in a new tab) - 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)
- feat(napi): property getter and setter with closure by @victorteokw (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1526 (opens in a new tab)
New Contributors
- @meowtec (opens in a new tab) made their first contribution in https://github.com/napi-rs/napi-rs/pull/1525 (opens in a new tab)
- @nebarf (opens in a new tab) made their first contribution in https://github.com/napi-rs/napi-rs/pull/1527 (opens in a new tab)
- @victorteokw (opens in a new tab) made their first contribution in https://github.com/napi-rs/napi-rs/pull/1526 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.11.4...napi@2.12.0 (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@2.11.4
3/14/2023
What's Changed
- fix(napi): prevent access to tsfn-raw after env's destroyed(#1514) by @HotQ (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1515 (opens in a new tab)
New Contributors
- @HotQ (opens in a new tab) made their first contribution in https://github.com/napi-rs/napi-rs/pull/1515 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.11.3...napi@2.11.4 (opens in a new tab)
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 (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1497 (opens in a new tab) - feat(napi): expose
uv_run
by @MarkusJx (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1499 (opens in a new tab) - test(napi): tests for custom gc in worker_threads by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1505 (opens in a new tab)
- chore(napi): 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)
- build: add libc++ in aarch64-linux-gnu Docker by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1511 (opens in a new tab)
- chore: ci components upgrade by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1512 (opens in a new tab)
- fix(napi): panic when
Promise
callbacks trigger after Promise is dropped by @pose (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1516 (opens in a new tab)
New Contributors
- @MarkusJx (opens in a new tab) made their first contribution in https://github.com/napi-rs/napi-rs/pull/1499 (opens in a new tab)
- @pose (opens in a new tab) made their first contribution in https://github.com/napi-rs/napi-rs/pull/1516 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@2.11.1...napi@2.11.3 (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@2.11.2
2/18/2023
What's Changed
- fix(napi): error should be
Send Sync
conditionally by @h-a-n-a (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1487 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.11.1...napi@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@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 (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1486 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.11.0...napi@2.11.1 (opens in a new tab)
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 (opens in a new tab) #1475 - fix(napi): convert u64 to u32 in serialization by @m1212e (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1478 (opens in a new tab)
New Contributors
- @m1212e (opens in a new tab) made their first contribution in https://github.com/napi-rs/napi-rs/pull/1478 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.10.17...napi@2.11.0 (opens in a new tab)
napi@2.10.17
2/8/2023
What's Changed
- fix(napi): impl Send Sync to External (opens in a new tab) by @Brooooooklyn
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.10.16...napi@2.10.17 (opens in a new tab)
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 (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1477 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.10.15...napi@2.10.16 (opens in a new tab)
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 (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1472 (opens in a new tab)
- chore(napi): enhance the error messages while converting types failed by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1473 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/@napi-rs/cli@2.14.6...napi@2.10.15 (opens in a new tab)
napi@2.10.14
1/31/2023
What's Changed
- fix(napi): run_script return type by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1467 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.10.13...napi@2.10.14 (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@2.10.13
1/28/2023
What's Changed
- fix(napi): also apply electron external data fallback to lowlevel APIs by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1458 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.10.12...napi@2.10.13 (opens in a new tab)
napi@2.10.12
1/28/2023
What's Changed
- fix(napi): add missing NoExternalBuffersAllowed by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1457 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.10.11...napi@2.10.12 (opens in a new tab)
napi@2.10.11
1/25/2023
What's Changed
- fix(napi): fallback to copy arraybuffer if zero copy is not allowed by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1455 (opens in a new tab)
Background
Electron disallowed the create_external_xxx
API since electron@21
: https://www.electronjs.org/blog/v8-memory-cage (opens in a new tab)
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 (opens in a new tab)
napi@2.10.10
1/24/2023
What's Changed
- chore(napi): implement FromNapiValue for ThreadsafeFunction by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1447 (opens in a new tab)
- fix(napi): throw fatal error if cast return value failed by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1450 (opens in a new tab)
- fix(napi): add UnknownReturnValue to use in call_async scenario by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1451 (opens in a new tab)
- fix(napi): unhandled promise rejection while using
EitherN<Promise<..>>
by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1452 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/@napi-rs/cli@2.14.4...napi@2.10.10 (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@2.10.9
1/19/2023
What's Changed
- fix(napi): fallback to copy buffer if zero-copy is not allowed by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1445 (opens in a new tab)
Background
Electron disallowed the create_external_xxx
API since electron@21
: https://www.electronjs.org/blog/v8-memory-cage (opens in a new tab)
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 (opens in a new tab)
napi-sys@2.2.3
1/19/2023
What's Changed
- chore(sys): add
napi_no_external_buffers_allowed
toStatus
by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1445 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.10.8...napi-sys@2.2.3 (opens in a new tab)
napi@2.10.8
1/18/2023
What's Changed
- fix(napi): remove useless aquire while creating ThreadsafeFunction by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1442 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.10.7...napi@2.10.8 (opens in a new tab)
napi@2.10.7
1/16/2023
What's Changed
- fix(napi): missing From implementation for Bigint by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1440 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@2.9.5...napi@2.10.7 (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)
napi@2.10.6
1/11/2023
What's Changed
- fix(napi): delete reference should be after global custom gc by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1433 (opens in a new tab)
- feat(napi): refactor ThreadsafeFunction to allow get return value of it by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1427 (opens in a new tab)
- fix(napi): should correctly return while dropping Buffer by @iheyunfei (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1434 (opens in a new tab)
New Contributors
- @iheyunfei (opens in a new tab) made their first contribution in https://github.com/napi-rs/napi-rs/pull/1434 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/@napi-rs/cli@2.14.2...napi@2.10.6 (opens in a new tab)
napi@2.10.5
1/9/2023
What's Changed
- build(deps): bump json5 from 1.0.1 to 1.0.2 by @dependabot (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1418 (opens in a new tab)
- Fix ArrayBuffer memory leak by @overlookmotel (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1420 (opens in a new tab)
- test(napi): remove outdated assersion by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1423 (opens in a new tab)
- fix(napi): array buffer drop notify never be called in cloned buffer by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1424 (opens in a new tab)
New Contributors
- @overlookmotel (opens in a new tab) made their first contribution in https://github.com/napi-rs/napi-rs/pull/1420 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.10.4...napi@2.10.5 (opens in a new tab)
napi@2.10.4
12/29/2022
What's Changed
- test: Memory leak reproduction for futures by @SevInf (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1413 (opens in a new tab)
- Fix promise leak by @xiaopengli89 (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1403 (opens in a new tab)
- Delete reference by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1414 (opens in a new tab)
New Contributors
- @SevInf (opens in a new tab) made their first contribution in https://github.com/napi-rs/napi-rs/pull/1413 (opens in a new tab)
- @xiaopengli89 (opens in a new tab) made their first contribution in https://github.com/napi-rs/napi-rs/pull/1403 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/@napi-rs/cli@2.14.0...napi@2.10.4 (opens in a new tab)
napi@2.10.3
12/19/2022
What's Changed
- fix(napi): napi_create_async_work incorrect argument (napi-rs#1392) by @patrickpilch (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1396 (opens in a new tab)
- chore(napi): add "run_script" for "Env" by @F001 (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1393 (opens in a new tab)
- chore(napi): reduce Mutex usage while loading addon by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1395 (opens in a new tab)
- fix(napi): add back custom gc for Send Buffer by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1399 (opens in a new tab)
New Contributors
- @patrickpilch (opens in a new tab) made their first contribution in https://github.com/napi-rs/napi-rs/pull/1396 (opens in a new tab)
- @F001 (opens in a new tab) made their first contribution in https://github.com/napi-rs/napi-rs/pull/1393 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.10.2...napi@2.10.3 (opens in a new tab)
napi-derive@2.9.3
12/9/2022
What's Changed
- Better error message for
#[napi(catch_unwind)]
by @simonvandel (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1383 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@2.9.2...napi-derive@2.9.3 (opens in a new tab)
napi@2.10.2
12/8/2022
What's Changed
- build: focal->jammy, llvm-14->llvm-15 by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1369 (opens in a new tab)
- Fixes #1338 use after free with async, and fixes #1340 by @Xaeroxe (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1339 (opens in a new tab)
- chore(napi-derive): make_ref tweaks by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1371 (opens in a new tab)
- Bug fix: typed arrays ref shouldn't use offset. by @nihohit (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1376 (opens in a new tab)
New Contributors
- @nihohit (opens in a new tab) made their first contribution in https://github.com/napi-rs/napi-rs/pull/1376 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/@napi-rs/cli@2.13.0...napi@2.10.2 (opens in a new tab)
napi@2.10.1
11/12/2022
What's Changed
- fix(napi): BigInt::get_u64 lossless check by @Wodann (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1348 (opens in a new tab)
- chore(napi): including type message in error message by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1350 (opens in a new tab)
- fix(cli): support help command by @ahaoboy (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1355 (opens in a new tab)
- ci: test for zig 0.10 by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1360 (opens in a new tab)
New Contributors
- @ahaoboy (opens in a new tab) made their first contribution in https://github.com/napi-rs/napi-rs/pull/1355 (opens in a new tab)
- @SASUKE40 (opens in a new tab) made their first contribution in https://github.com/napi-rs/napi-rs/pull/1364 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.10.0...napi@2.10.1 (opens in a new tab)
napi@2.10.0
10/4/2022
What's Changed
- chore: fix ci for forked repo by @h-a-n-a (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1302 (opens in a new tab)
- ci: add arm64 macOS CI by @messense (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1313 (opens in a new tab)
- fix(napi): improve error propagation by @devongovett (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1303 (opens in a new tab)
- fix(napi): propagation error in function call by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1315 (opens in a new tab)
- fix(napi): should also delete the reference while dropping the Buffer by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1331 (opens in a new tab)
- fix(napi): make Buffer/ArrayBuffer truely Send/Sync safe by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1332 (opens in a new tab)
- feat(napi): add threadsafe deferred values by @devongovett (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1306 (opens in a new tab)
New Contributors
- @Wodann (opens in a new tab) made their first contribution in https://github.com/napi-rs/napi-rs/pull/1300 (opens in a new tab)
- @usrtax (opens in a new tab) made their first contribution in https://github.com/napi-rs/napi-rs/pull/1317 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.9.1...napi@2.10.0 (opens in a new tab)
napi@2.9.1
9/8/2022
What's Changed
- fix(napi): remove previous reference if value_ref existed by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1290 (opens in a new tab)
- fix(napi): some of the unsoundness in
Buffer
by @seritools (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1294 (opens in a new tab)
New Contributors
- @mat-if (opens in a new tab) made their first contribution in https://github.com/napi-rs/napi-rs/pull/1293 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.9.0...napi@2.9.1 (opens in a new tab)
napi-derive@2.9.1
9/8/2022
What's Changed
- fix(napi-derive): should not generate this types for Constructor/Getter/Setter by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1291 (opens in a new tab)
- pin minimum usable version of dependency syn by @mat-if (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1293 (opens in a new tab)
New Contributors
- @mat-if (opens in a new tab) made their first contribution in https://github.com/napi-rs/napi-rs/pull/1293 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.9.0...napi-derive@2.9.1 (opens in a new tab)
napi@2.9.0
8/23/2022
Core changes
as_object
for ClassInstance
You can use the ClassInstance
as Object
on the Rust side and manipulate it.
#[napi]
impl CanvasElement {
#[napi(constructor)]
pub fn new(mut env: Env, mut this: This, width: u32, height: u32) -> Result<Self> {
let ctx = CanvasRenderingContext2D::into_instance(
CanvasRenderingContext2D {
context: Context::new(width, height, ColorSpace::default())?,
},
env,
)?;
ctx.as_object(env).define_properties(&[
Property::new(FILL_STYLE_HIDDEN_NAME)?
.with_value(&env.create_string("#000")?)
.with_property_attributes(PropertyAttributes::Writable | PropertyAttributes::Configurable),
Property::new(STROKE_STYLE_HIDDEN_NAME)?
.with_value(&env.create_string("#000")?)
.with_property_attributes(PropertyAttributes::Writable | PropertyAttributes::Configurable),
])?;
env.adjust_external_memory((width * height * 4) as i64)?;
this.define_properties(&[Property::new("ctx")?
.with_value(&ctx)
.with_property_attributes(PropertyAttributes::Default)])?;
Ok(Self { width, height, ctx })
}
}
as_unknown
for Either
types
For the scenario that preserves original JavaScript values in Either
types and sets them into object property, and retrieves it back in the other place.
#[napi(getter)]
pub fn get_fill_style(&self, this: This) -> Result<Unknown> {
this.get_named_property_unchecked(FILL_STYLE_HIDDEN_NAME)
}
#[napi(setter, return_if_invalid)]
pub fn set_fill_style(
&mut self,
env: Env,
mut this: This,
fill_style: Either3<JsString, ClassInstance<CanvasGradient>, ClassInstance<CanvasPattern>>,
) -> Result<()> {
// ... some logic
let raw_fill_style = fill_style.as_unknown(env);
this.set(FILL_STYLE_HIDDEN_NAME, &raw_fill_style)?;
Ok(())
}
ToNapiValue
for f32
You can use f32
as the return type:
#[napi]
pub fn return_f32() -> f32 {
3.14
}
What's Changed
- fix(napi): segfault when
ThreadsafeFunction
's callback closure captures data by @messense (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1281 (opens in a new tab) - feat(napi): implement as_object and validate for ClassInstance by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1284 (opens in a new tab)
- feat(napi): implement as_unknown and validate for Either types by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1285 (opens in a new tab)
- feat(napi): implement ToNapiValue for f32 by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1286 (opens in a new tab)
New Contributors
- @JSerFeng (opens in a new tab) made their first contribution in https://github.com/napi-rs/napi-rs/pull/1278 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@2.8.0...napi@2.9.0 (opens in a new tab)
napi-derive@2.9.0
8/23/2022
What's Changed
- fix(napi-derive): fix macro expansion naming shadow by @JSerFeng (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1278 (opens in a new tab)
- feat(napi-derive): catch_unwind attribute by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1280 (opens in a new tab)
New Contributors
- @JSerFeng (opens in a new tab) made their first contribution in https://github.com/napi-rs/napi-rs/pull/1278 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@2.8.0...napi-derive@2.9.0 (opens in a new tab)
napi@2.8.0
8/17/2022
Core changes
Custom finalize trait
https://napi.rs/docs/concepts/class#custom-finalize-logic (opens in a new tab)
use napi::bindgen_prelude::*;
use napi_derive::napi;
#[napi(custom_finalize)]
pub struct CustomFinalize {
width: u32,
height: u32,
inner: Vec<u8>,
}
#[napi]
impl CustomFinalize {
#[napi(constructor)]
pub fn new(mut env: Env, width: u32, height: u32) -> Result<Self> {
let inner = vec![0; (width * height * 4) as usize];
let inner_size = inner.len();
env.adjust_external_memory(inner_size as i64)?;
Ok(Self {
width,
height,
inner,
})
}
}
impl ObjectFinalize for CustomFinalize {
fn finalize(self, mut env: Env) -> Result<()> {
env.adjust_external_memory(-(self.inner.len() as i64))?;
Ok(())
}
}
Inject This
in functions
https://napi.rs/docs/concepts/inject-this (opens in a new tab)
use napi::bindgen_prelude::*;
use napi_derive::napi;
#[napi(constructor)]
pub struct Width {
pub value: i32,
}
#[napi]
pub fn plus_one(this: This<&Width>) -> i32 {
this.value + 1
}
instance of
https://napi.rs/docs/concepts/class#instance-of (opens in a new tab)
use napi::bindgen_prelude::*;
use napi_derive::napi;
#[napi]
pub struct NativeClass {}
#[napi]
pub fn is_native_class_instance(env: Env, value: Unknown) -> Result<bool> {
NativeClass::instance_of(env, value)
}
import { NativeClass, isNativeClassInstance } from './index.js'
const nc = new NativeClass()
console.log(isNativeClassInstance(nc)) // true
console.log(isNativeClassInstance(1)) // false
What's Changed
- feat(napi): allow implement custom finalize logic for Class by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1270 (opens in a new tab)
- feat(napi): add get and get_mut method on
WeakReference
by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1274 (opens in a new tab) - feat(napi):
error_anyhow
feature by @i-user-link (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1275 (opens in a new tab)
New Contributors
- @i-user-link (opens in a new tab) made their first contribution in https://github.com/napi-rs/napi-rs/pull/1275 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.7.0...napi@2.8.0 (opens in a new tab)
napi-derive@2.8.0
8/17/2022
What's Changed
- feat(napi-derive): implement instance_of for Class by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1272 (opens in a new tab)
- feat(napi-derive): support inject
This<Value>
into raw function by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1273 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@2.7.0...napi-derive@2.8.0 (opens in a new tab)
napi@2.7.0
8/7/2022
Core features
Set property attribute in napi macro
The Object property attribute in objects and Class created by NAPI-RS is Writable
& Configurable
& Enumerable
by default now.
For NativeClass
:
#[napi]
pub struct NativeClass {}
#[napi]
impl NativeClass {
#[napi]
pub fn hello(&self) {
println!("hello");
}
}
Before:
const instance = new NativeClass()
instance.hello = function() {} // Cannot assign to read only property \'hello\' of object \'#<NativeClass>\'
After:
const instance = new NativeClass()
instance.hello = function() {} // Just fine
You can also configure the Property attribute via #[napi]
:
#[napi]
pub struct NativeClass {}
#[napi]
impl NativeClass {
#[napi(configurable = false, writable = false, enumerable = false)]
pub fn hello(&self) {
println!("hello");
}
}
What's Changed
- feat(napi): add some useful derived traits for the Null type by @Xaeroxe (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1241 (opens in a new tab)
- ci: fix self testing for Android platforms by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1248 (opens in a new tab)
- feat(napi): add derived traits to
ThreadsafeFunctionCallMode
by @seritools (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1243 (opens in a new tab) - feat(napi): Call sync functions within tokio runtime by @Xaeroxe (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1242 (opens in a new tab)
- fix(napi): either for #[napi(object)] types by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1258 (opens in a new tab)
New Contributors
- @amrbashir (opens in a new tab) made their first contribution in https://github.com/napi-rs/napi-rs/pull/1251 (opens in a new tab)
- @seritools (opens in a new tab) made their first contribution in https://github.com/napi-rs/napi-rs/pull/1243 (opens in a new tab)
napi-derive@2.7.0
8/7/2022
What's Changed
- feat(napi-derive): support set property attribute in napi macro by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1257 (opens in a new tab)
- feat(napi-derive): Support
#[napi(strict)]
on&T
and&mut T
by @Hywan (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1238 (opens in a new tab)
napi@2.6.3
7/11/2022
What's Changed
- fix(napi): use Mutex instead of Atomic in ThreadsafeFunction by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1234 (opens in a new tab)
- fix(napi): memory leak in Buffer/ArrayBuffer by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1235 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.6.2...napi@2.6.3 (opens in a new tab)
napi@2.6.2
7/8/2022
What's Changed
- fix(napi)
undefined
is recognized as a validNone
forOption<T>
by @Hywan (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1228 (opens in a new tab) - fix(napi): memory leak in ThreadsafeFunction by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1230 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi@2.6.1...napi@2.6.2 (opens in a new tab)
napi@2.6.1
7/6/2022
What's Changed
- fix(napi): drop buffer inner data only when Reference count is 0 by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1227 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/napi-derive@2.6.0...napi@2.6.1 (opens in a new tab)
napi@2.6.0
7/6/2022
What's Changed
- chore(napi): replace lazy_static with once_cell by @jplatte (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1213 (opens in a new tab)
- feat(napi) Implement
Either3
toEither26
. by @Hywan (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1200 (opens in a new tab) - fix(napi): validate fn for
Option<T>
by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1223 (opens in a new tab) - feat(napi): clone reference for TypedArray/Buffer by @Brooooooklyn (opens in a new tab) in https://github.com/napi-rs/napi-rs/pull/1224 (opens in a new tab)
New Contributors
- @jplatte (opens in a new tab) made their first contribution in https://github.com/napi-rs/napi-rs/pull/1213 (opens in a new tab)
Full Changelog: https://github.com/napi-rs/napi-rs/compare/@napi-rs/cli@2.10.0...@napi-rs/cli@2.10.1 (opens in a new tab)