Releases: toyobayashi/emnapi
v0.45.0
What's Changed
-
feat: separate transformer packages by @toyobayashi in #94
-
fix: incorrect result of
napi_create_bigint_uint64when the input is greater than0x7fffffffffffffffby @toyobayashi in #98 -
feat: add
node_api_create_property_key_utf16as a alias ofnapi_create_string_utf16by @toyobayashi in #95 -
build: prebuilt library is built by LLVM 17 (wasi-sdk-21 & emscripten 3.1.44) by @toyobayashi in 2da3e2b
Engineering
- refactor: allow macros defined in source code by @toyobayashi in #90
- refactor: factor out common code into macros by @toyobayashi in #91
- refactor: migrate to ESM by @toyobayashi in #93
- refactor: improve TypeScript custom transformers by @toyobayashi in #97
Full Changelog: v0.44.0...v0.45.0
v0.44.0
What's Changed
- test: return napi_exception_pending on throwing proxy handlers by @toyobayashi in #75
- delay injecting HEAP_DATA_VIEW declaration by @toyobayashi in #88
- move
napi_adjust_external_memoryto JS by @toyobayashi in #87 - sync latest headers by @toyobayashi in #84
- add
EMNAPI_{MAJOR,MINOR,PATCH}_VERSIONandemnapi_get_runtime_versionby @toyobayashi in #89
Breaking Changes
emnapi_get_emscripten_versionhas been removed, use__EMSCRIPTEN_{major,minor,tiny}__instead.
Possible upcoming breaking changes in the future
- Require node-api-headers as a dependency
- Users should always define
-DBUILDING_NODE_EXTENSION - Emscripten users should define
-DNAPI_EXTERN=__attribute__((__import_module__("env")))manually sincenapiis the default module where Node.js wants to import symbols from. See emscripten-core/emscripten#20035
Full Changelog: v0.43.1...v0.44.0
v0.43.1
What's Changed
- fix duplicated symbol __copy_tls in LLVM 17 by @toyobayashi (b98c581)
- fix: wasi threads max tid should be 0x1FFFFFFF by @toyobayashi (0de0e5c)
- throw error with friendly message if symbols are not exported by @toyobayashi (820eeaa)
Full Changelog: v0.43.0...v0.43.1
v0.43.0
What's Changed
- enable uncaught exceptions policy by default by @toyobayashi in #81
- run finalizers directly from GC by @toyobayashi in #72
- fix: add missing
CHECK_ARG(env, cbinfo);tonapi_create_functionandnapi_get_new_targetby @toyobayashi in #82 - fix: wrap
napi_get_array_lengthandnapi_get_prototypewith PREAMBLE by @toyobayashi in #83 - do not include
js_native_api.hinemnapi.hby @toyobayashi in #86
Breaking Changes
-
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> -
[non-emscripten]
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') { // ... } } })
Full Changelog: v0.42.0...v0.43.0
v0.42.0
What's Changed
- rename internal
NAPI_VERSIONdefinition by @toyobayashi in #71 - fix package types exports thanks to attw (ceb5e8d)
- use
-fno-strict-aliasingfor emmalloc by @toyobayashi in #74 - return
napi_generic_failureinstead of throwing if runtime has noBigIntby @toyobayashi in #76 - test: add test for effect of
UV_THREADPOOL_SIZEby @toyobayashi in #77 - represent
napi_callback_infowith non-zero number by @toyobayashi in #78 - fix import namespace of
_emnapi_async_work_pool_size(8d4e9e3) - test: rename n-api to node-api by @toyobayashi in #79
- test: inline helper functions by @toyobayashi in #80
- fix uncaught exceptions policy (cba668c)
Full Changelog: v0.41.0...v0.42.0
v0.41.0
v0.40.0
What's Changed
- implement experimental
node_api_create_external_string_*by @toyobayashi in #68 - drop
ts-macrosto fix broken output code by @toyobayashi in #69
Full Changelog: v0.39.0...v0.40.0
v0.39.0
What's Changed
- get Node API version used by addon by @toyobayashi in #64
callIntoModuleforce uncaught exception by @toyobayashi in #65- add status napi_cannot_run_js by @toyobayashi in #66
- define version 9 by @toyobayashi in #67
Full Changelog: v0.38.3...v0.39.0
v0.38.3
What's Changed
- test: passing NULL to napi_define_class by @toyobayashi in #62
- fix MessageChannel undefined by @toyobayashi in #63
Full Changelog: v0.38.2...v0.38.3
v0.38.2
What's Changed
- check
NAPI_VERSIONafter#include "node_api.h"by @toyobayashi in 9b41404
Full Changelog: v0.38.1...v0.38.2