cargo / napi-derive-backend
napi-derive-backend
What changed in napi-derive-backend 3 to 7, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-23.
1 security7 new APIs and options1 performance1 tooling23 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initnapi-derive-backend 76 changes
New APIs and options 2
Class members can use symbol_for keys.
Class members can use well-known symbol keys.
Fixes and other changes 4
Fixes per-environment teardown for multi-load addons and prevents AsyncTask promises from leaking.
Avoids TS1016 errors in constructors.
Closures defined with define_class are freed.
Static flags are now honoured.
napi-derive-backend 613 changes
Security 1
Classes marked with #[napi] have unforgeable identity via Node object type tags.
Tooling 1
The CLI now supports non-threaded WASI targets.
Fixes and other changes 11
Borrowed class arguments remain alive across AsyncTask and AsyncBlock.
Unadopted class values are dropped and the factory flag is reset when conversion fails.
Enum variants are exported as writable, enumerable, configurable properties.
Guards AsyncTask completion against environment teardown.
Aligns generated file formats.
The macro now recognizes fully qualified napi::Env as the special Env parameter.
Addons with live native code are no longer unloaded.
Non-Error rejections are preserved.
Add a teardown barrier for wasm.
Preserves the namespace when resolving cross-namespace type references.
Validation looks up constructors by js_name.
napi-derive-backend 59 changes
New APIs and options 3
To/FromNapiValueimplementations are added forOsString,OsStr,PathandPathBuf, enabling these types to be converted through napi.Outlines field-error decoration for #[napi(object)].
Adds the async_iterator macro attribute for napi.
Performance 1
Object field raw property access was optimized.
Fixes and other changes 5
The derive implementation defers borrowing the receiver until after argument conversion.
Only FnArgs unpacks a tuple to variadic parameters.
Preserves generator class methods.
Asterisks in comments are now escaped.
Fixed a memory leak in async functions.
napi-derive-backend 43 changes
New APIs and options 1
A tracing feature was added for debug logging NAPI function calls.
Fixes and other changes 2
Fixes the inability to use an optional parameter for a class setter.
Parentheses are added for function types.
napi-derive-backend 32 changes
New APIs and options 1
Adds
discriminant_caseto allow changing the case of discriminants.
Fixes and other changes 1
Fixed TypedArray type generation.