Releases: toyobayashi/emnapi
v0.45.0
What's Changed
-
feat: separate transformer packages by @toyobayashi in #94
-
fix: incorrect result of
napi_create_bigint_uint64
when the input is greater than0x7fffffffffffffff
by @toyobayashi in #98 -
feat: add
node_api_create_property_key_utf16
as a alias ofnapi_create_string_utf16
by @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_memory
to JS by @toyobayashi in #87 - sync latest headers by @toyobayashi in #84
- add
EMNAPI_{MAJOR,MINOR,PATCH}_VERSION
andemnapi_get_runtime_version
by @toyobayashi in #89
Breaking Changes
emnapi_get_emscripten_version
has 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 sincenapi
is 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_function
andnapi_get_new_target
by @toyobayashi in #82 - fix: wrap
napi_get_array_length
andnapi_get_prototype
with PREAMBLE by @toyobayashi in #83 - do not include
js_native_api.h
inemnapi.h
by @toyobayashi in #86
Breaking Changes
-
If you are using
emnapi.h
, it should be included after includingjs_native_api.h
ornode_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_VERSION
definition by @toyobayashi in #71 - fix package types exports thanks to attw (ceb5e8d)
- use
-fno-strict-aliasing
for emmalloc by @toyobayashi in #74 - return
napi_generic_failure
instead of throwing if runtime has noBigInt
by @toyobayashi in #76 - test: add test for effect of
UV_THREADPOOL_SIZE
by @toyobayashi in #77 - represent
napi_callback_info
with 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-macros
to 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
callIntoModule
force 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_VERSION
after#include "node_api.h"
by @toyobayashi in 9b41404
Full Changelog: v0.38.1...v0.38.2