@emnapi/core
1.11.3 · 25 Jul 2026MIT92.4M / weekRepositoryHomepagenpmAtom feed
0.45.0 is the newest release of 0.43.x.
In short
2 breaking1 new3 fixed1 changed
- Breaking
If you are using
emnapi.h, it should be included after includingjs_native_api.hornode_api.h - Breaking
onCreateWorker(info: { type: 'pthread' | 'async-work' })has been changed toonCreateWorker(info: { type: 'thread' | 'async-work' })
Release note
What's Changed
Enable uncaught exceptions policy by default
Run finalizers directly from GC
Add missing
CHECK_ARG(env, cbinfo);tonapi_create_functionandnapi_get_new_targetWrap
napi_get_array_lengthandnapi_get_prototypewith PREAMBLEDo not include
js_native_api.hinemnapi.h
Breaking Changes
- Breaking
If you are using
emnapi.h, it should be included after includingjs_native_api.hornode_api.h+ #include <js_native_api.h> // or #include <node_api.h> #include <emnapi.h>
- Breaking
onCreateWorker(info: { type: 'pthread' | 'async-work' })has been changed toonCreateWorker(info: { type: 'thread' | 'async-work' })const { instantiateNapiModule } = require('@emnapi/core') instantiateNapiModule({ // ... onCreateWorker ({ type }) { - if (type === 'pthread') { + if (type === 'thread') { // ... } } })
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.