Releases: toyobayashi/emnapi
v1.3.1
What's Changed
- fix:
napi_is_buffer(Uint8Array)
should returntrue
by @toyobayashi in #129 - add napi_create_buffer_from_arraybuffer by @toyobayashi in #126
Full Changelog: v1.3.0...v1.3.1
v1.3.0
What's Changed
- feat: add
suppressDestroy
to context by @toyobayashi in #124 - refactor: rename nogc to basic by @toyobayashi in #125
- update libuv source by @toyobayashi in #121
- refactor: remove RefBase by @toyobayashi in #122
- add support for UTF-8 and Latin-1 property keys by @toyobayashi in #127
Full Changelog: v1.2.0...v1.3.0
v1.2.0
What's Changed
- test: store external type tags by value by @toyobayashi in #114
- fix: pthread worker leak by @toyobayashi in #115
- feat: gyp add OS
wasm
alias by @toyobayashi in #113 - feat: add new option to allow waiting thread start before thread-spawn return by @toyobayashi in #116
- feat: separate
@emnapi/wasi-threads
package by @toyobayashi in #117 - fix: respect user specified Buffer by @toyobayashi in #118
- build: add
wasm32-wasip1[-threads]
targets and use LLVM 18 to build libraries by @toyobayashi in #119 - feat:
reuseWorker
strict mode by @toyobayashi in #120
Full Changelog: v1.1.1...v1.2.0
v1.1.1
v1.1.0
What's Changed
- test: make napi_get_buffer_info check if passed buffer is valid by @toyobayashi in #108
- feat: segregate nogc APIs from rest via type system by @toyobayashi in #110
- test: fix unreliable assumption in js-native-api/test_cannot_run_js by @toyobayashi in #111
- fix: missing sources in gyp wasi + threads target
Full Changelog: v1.0.0...v1.1.0
v1.0.0
What's Changed
- refactor: migrate
@emnapi/core
to typescript by @toyobayashi in #100 - fix: improve
getUnsharedTextDecoderView
by @toyobayashi in #101 - feat: add a prepare script by @mmomtchev in #104
- fix: truncate number in
napi_get_value_{int32,uint32,int64}
by @toyobayashi in #105 - feat: add basic gyp support by @toyobayashi in #106
- build: add
wasm64-emscripten
prebuilt libraries by @toyobayashi in #106
Breaking Changes
The headers location is changed from node_modules/emnapi/include
to node_modules/emnapi/include/node
# old
# emcc ... -Inode_modules/emnapi/include
# new
emcc ... -Inode_modules/emnapi/include/node
New Contributors
- @mmomtchev made their first contribution in #104
Full Changelog: v0.45.0...v1.0.0
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