Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
120 commits
Select commit Hold shift + click to select a range
3c40868
build: disable test-asan workflow
targos Jul 16, 2024
df5083e
src,lib: expose getCategoryEnabledBuffer to use on node.http
H4ad Jul 16, 2024
97da7ca
test_runner: consolidate option parsing
cjihrig Jul 16, 2024
bac3a48
src: fix potential segmentation fault in SQLite
tniessen Jul 16, 2024
698e44f
test_runner: add context.filePath
cjihrig Jul 15, 2024
6ad6e01
test_runner: refactor snapshots to get file from context
cjihrig Jul 15, 2024
c53cf44
src: fix env-file flag to ignore spaces before quotes
MOHIT51196 Jul 17, 2024
b377b93
fs: correctly pass dirent to exclude `withFileTypes`
avivkeller Jul 12, 2024
b47c230
doc: update release-post nodejs.org script
RafaelGSS Jul 17, 2024
dd2c0f3
doc: fix casing of GitHub handle for two collaborators
aduh95 Jul 17, 2024
5b8dd78
doc: fix release date for 22.5.0
aduh95 Jul 17, 2024
1688f00
meta: move anonrig to tsc voting members
anonrig Jul 17, 2024
8086337
fs: remove unnecessary option argument validation
JonasBa Jul 17, 2024
c114082
deps: fix include_dirs of nbytes
zcbenz Jul 18, 2024
63cf715
doc: add MattiasBuelens to collaborators
MattiasBuelens Jul 18, 2024
8e66a18
deps: start working on ncrypto dep
jasnell Jul 9, 2024
66f7c59
cli: document `--inspect` port `0` behavior
avivkeller Jul 18, 2024
d8375d6
lib: decorate async stack trace in source maps
legendecas Jul 18, 2024
dcca9ba
esm: refactor `get_format`
aduh95 Jul 18, 2024
55461be
src: refactor webstorage implementation
anonrig Jul 18, 2024
a94c3ae
src: replace ToLocalChecked uses with ToLocal in node-file
jasnell Jul 16, 2024
de1fbc2
inspector: add initial support for network inspection
cola119 Jul 19, 2024
d761500
doc: update `api_assets` README for new files
avivkeller Jul 19, 2024
87bab76
doc,tty: add documentation for ReadStream and WriteStream
jakecastelli Jul 19, 2024
9ffaf76
src: use Maybe<void> in SecureContext
tniessen Jul 19, 2024
9c7b009
build,tools: simplify upload of shasum signatures
targos Jul 19, 2024
8bf9960
doc: add `--experimental-sqlite` note
avivkeller Jul 19, 2024
03f3532
lib: improve error message when index not found on cjs
H4ad Jul 20, 2024
c247582
test: deflake test-blob-file-backed
lpinca Jul 20, 2024
e907236
doc: move --test-coverage-{ex,in}clude to proper location
cjihrig Jul 20, 2024
f45edb4
test_runner: refactor and simplify internals
cjihrig Jul 20, 2024
ad62b94
build: update codecov coverage build count
anonrig Jul 17, 2024
0f1fe63
build: trigger coverage ci when updating codecov
anonrig Jul 17, 2024
d252612
meta: store actions secrets in environment
avivkeller Jul 20, 2024
defdc3c
doc: remove `scroll-behavior: smooth;`
cloydlau Jul 21, 2024
44a08f7
doc,tools: enforce use of `node:` prefix
aduh95 Jul 21, 2024
58cb0dd
test: use `PYTHON` executable from env in `assertSnapshot`
aduh95 Jul 21, 2024
5cea7ed
test: reduce flakiness of `test-assert-esm-cjs-message-verify`
aduh95 Jul 21, 2024
86fa46d
doc: add info about prefix-only modules to `module.builtinModules`
SunsetTechuila Jul 21, 2024
43afcbf
tools: fix `SLACK_TITLE` in invalid commit workflow
aduh95 Jul 21, 2024
04bb677
src: move `ToNamespacedPath` call of webstorage
anonrig Jul 21, 2024
057bd44
child_process: fix incomplete prototype pollution hardening
lirantal Jul 21, 2024
fbf74bc
src: switch from ToLocalChecked to ToLocal in node_webstorage
jasnell Jul 21, 2024
b312ec0
meta: reword linter messages
avivkeller Jul 21, 2024
494df98
lib: improve cluster/primary code
ehsankhfr Jul 21, 2024
04d203a
doc: update boxstarter README
avivkeller Jul 21, 2024
fd0da6c
src: avoid strcmp in ImportJWKAsymmetricKey
tniessen Jul 21, 2024
c457f9e
src: cache invariant code motion
RafaelGSS Jul 21, 2024
876e7b3
test_runner: refactor coverage to pass in config options
cjihrig Jul 22, 2024
66f6a2a
deps: V8: cherry-pick 9812cb486e2b
targos Jul 22, 2024
30a94ca
test: skip --title check on IBM i
abmusse Jul 22, 2024
8664b9a
src,test: disallow unsafe integer coercion in SQLite
tniessen Jul 22, 2024
2fd4ac4
meta: make more bug-report information required
avivkeller Jul 22, 2024
2a62d6c
build, tools: drop leading `/` from `r2dir`
richardlau Jul 22, 2024
20a8c96
meta: remove license for hljs
avivkeller Jul 22, 2024
ca68544
src: fix slice of slice of file-backed Blob
jleedev Jul 22, 2024
6b35994
doc: fix documentation for `--run`
avivkeller Jul 22, 2024
7e8a609
test: skip sea tests in large debug builds
legendecas Jul 22, 2024
c4848c5
test_runner: cleanup global event listeners after run
EddieAbbondanzio Jul 23, 2024
bfbed0a
build: fix conflict gyp configs
legendecas Jul 23, 2024
4887213
test_runner: added colors to dot reporter
Jun 15, 2024
64812d5
doc: fix typo in recognizing-contributors
marco-ippolito Jul 23, 2024
2c44706
process: unify experimental warning messages
avivkeller Jul 23, 2024
e0054ee
fs: ensure consistency for mkdtemp in both fs and fs/promises
YieldRay Jul 23, 2024
52bc8ec
test: compare paths on Windows without considering case
injunchoi98 Jul 23, 2024
aa0ac3b
test: mark test-pipe-file-to-http as flaky
jakecastelli Jul 23, 2024
3fdcf7a
src: return `undefined` if no rows are returned in SQLite
deokjinkim Jul 23, 2024
bd4a9ff
src: start using ncrypto for CSPRNG calls
jasnell Jul 23, 2024
048d421
meta: add jake to collaborators
jakecastelli Jul 24, 2024
2d77bd2
src: fix -Wshadow warning
codebytere Jul 24, 2024
ee97c04
build: ensure v8_pointer_compression_sandbox is enabled on 64bit
codebytere Jul 24, 2024
893c864
test_runner: fix support watch with run(), add globPatterns option
mcollina Jul 24, 2024
7a1d5a4
deps: update c-ares to v1.32.2
nodejs-github-bot Jul 24, 2024
92439fc
module: add --experimental-strip-types
marco-ippolito Jul 24, 2024
8853952
doc, test: tracing channel hasSubscribers getter
tlhunter Jul 24, 2024
1176310
deps: add gn build files for ncrypto
zcbenz Jul 25, 2024
2109885
meta: move tsc member to emeritus
mhdawson Jul 25, 2024
f4a7ac5
deps: V8: cherry-pick 35888fee7bba
joyeecheung Jul 25, 2024
7c417c6
build: avoid compiling with VS v17.10
huseyinacacak-janea Jul 25, 2024
546dab2
lib: optimize copyError with ObjectAssign in primordials
rayark1 Jul 25, 2024
fc67abd
test: mark 'test/parallel/test-sqlite.js' as flaky
cjihrig Jul 25, 2024
ee82f22
src: remove redundant RsaPointer (use RSAPointer)
jasnell Jul 25, 2024
c1634c7
doc: correct typescript stdin support
marco-ippolito Jul 25, 2024
dd3c66b
src: simplify AESCipherTraits::AdditionalConfig
tniessen Jul 25, 2024
edd80e2
test_runner: do not throw on mocked clearTimeout()
Aksinya-Bykova Jul 25, 2024
da35734
test: add test for one arg timers to increase coverage
Ceres6 Jul 25, 2024
1344bd2
test: add comments and rename test for timer robustness
Trott Jul 25, 2024
58aebfd
doc: move GeoffreyBooth to TSC regular member
GeoffreyBooth Jul 25, 2024
15816bd
stream: expose DuplexPair API
awwright Jul 26, 2024
61971ec
test: remove unnecessary console log
Kay-Yuan Jul 26, 2024
1061898
deps: update c-ares to v1.32.3
nodejs-github-bot Jul 26, 2024
2d982d3
deps: V8: backport 7857eb34db42
Jul 26, 2024
7382eef
node-api: rename nogc to basic
gabrielschulhof Jul 13, 2024
e471e32
test: skip sea tests with more accurate available disk space estimation
legendecas Jul 27, 2024
3fb97a9
test_runner: remove redundant bootstrap boolean
cjihrig Jul 27, 2024
a6eedc4
meta: add `sqlite` to js subsystems
himself65 Jul 27, 2024
c6656c9
test: move shared module to `test/common`
Trott Jul 25, 2024
10bea42
build: update gcovr to 7.2 and codecov config
bcoe Jul 27, 2024
3999021
test_runner: switched to internal readline interface
Emiltayeb Jul 28, 2024
5e03c17
fs: optimize `fs.cpSync` js calls
anonrig Jul 22, 2024
68e444d
http: add diagnostics channel `http.client.request.error`
cola119 Jul 28, 2024
063f46d
assert: use isError instead of instanceof in innerOk
pmarchini Jul 28, 2024
15a94e6
lib,src: drop --experimental-network-imports
RafaelGSS Jul 28, 2024
744df0b
lib: support dynamic trace events on debugWithTimer
H4ad Jul 28, 2024
e8ea49b
typings: fix typo on quic onSessionDatagram
1ilsang Jul 29, 2024
30e18a0
doc: fix typo in diagnostic tooling support tiers document
kimtaejin3 Jul 29, 2024
52a4206
doc: fix typo in technical-priorities.md
MCprotein Jul 29, 2024
f755d31
node-api: add property keys benchmark
legendecas Jul 29, 2024
8e7c30c
doc: update security-release process to automated one
RafaelGSS Jul 29, 2024
98a7ad2
src: expose LookupAndCompile with parameters
codebytere Jul 29, 2024
ab1f0b4
module: fix extensionless typescript in cjs loader
marco-ippolito Jul 29, 2024
718f6bc
test: do not swallow uncaughtException errors in exit code tests
nektro Jul 25, 2024
eed0963
typings: apply lint
1ilsang Jul 29, 2024
fad3e74
console: fix issues with frozen intrinsics
H4ad Jul 30, 2024
b731528
doc: move numCPUs require to top of file in cluster CJS example
mfdebian Jul 30, 2024
c20e841
module: fix strip-types interaction with detect-module
marco-ippolito Aug 3, 2024
2c1e908
deps: update amaro to 0.0.5
nodejs-github-bot Jul 29, 2024
e5f7250
deps: update amaro to 0.0.6
nodejs-github-bot Aug 4, 2024
e685ecd
deps: update corepack to 0.29.3
nodejs-github-bot Jul 30, 2024
b096e41
2024-08-06, Version 22.6.0 (Current)
RafaelGSS Jul 30, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
node-api: rename nogc to basic
Signed-off-by: Gabriel Schulhof <gabrielschulhof@gmail.com>
PR-URL: #53830
Reviewed-By: Vladimir Morozov <vmorozov@microsoft.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
  • Loading branch information
gabrielschulhof authored and RafaelGSS committed Aug 5, 2024
commit 7382eefae549921e2ad0d7f31a66abcab1d7220e
2 changes: 1 addition & 1 deletion benchmark/napi/ref/addon.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ SetCount(napi_env env, napi_callback_info info) {
return NULL;
}

static void IncrementCounter(node_api_nogc_env env, void* data, void* hint) {
static void IncrementCounter(node_api_basic_env env, void* data, void* hint) {
size_t* count = data;
(*count) = (*count) + 1;
}
Expand Down
62 changes: 31 additions & 31 deletions doc/api/n-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ napiVersion: 6
-->

```c
napi_status napi_set_instance_data(node_api_nogc_env env,
napi_status napi_set_instance_data(node_api_basic_env env,
void* data,
napi_finalize finalize_cb,
void* finalize_hint);
Expand Down Expand Up @@ -509,7 +509,7 @@ napiVersion: 6
-->

```c
napi_status napi_get_instance_data(node_api_nogc_env env,
napi_status napi_get_instance_data(node_api_basic_env env,
void** data);
```

Expand Down Expand Up @@ -611,16 +611,16 @@ when an instance of a native addon is unloaded. Notification of this event is
delivered through the callbacks given to [`napi_add_env_cleanup_hook`][] and
[`napi_set_instance_data`][].

### `node_api_nogc_env`
### `node_api_basic_env`

> Stability: 1 - Experimental

This variant of `napi_env` is passed to synchronous finalizers
([`node_api_nogc_finalize`][]). There is a subset of Node-APIs which accept
a parameter of type `node_api_nogc_env` as their first argument. These APIs do
([`node_api_basic_finalize`][]). There is a subset of Node-APIs which accept
a parameter of type `node_api_basic_env` as their first argument. These APIs do
not access the state of the JavaScript engine and are thus safe to call from
synchronous finalizers. Passing a parameter of type `napi_env` to these APIs is
allowed, however, passing a parameter of type `node_api_nogc_env` to APIs that
allowed, however, passing a parameter of type `node_api_basic_env` to APIs that
access the JavaScript engine state is not allowed. Attempting to do so without
a cast will produce a compiler warning or an error when add-ons are compiled
with flags which cause them to emit warnings and/or errors when incorrect
Expand Down Expand Up @@ -791,7 +791,7 @@ typedef napi_value (*napi_callback)(napi_env, napi_callback_info);
Unless for reasons discussed in [Object Lifetime Management][], creating a
handle and/or callback scope inside a `napi_callback` is not necessary.

#### `node_api_nogc_finalize`
#### `node_api_basic_finalize`

<!-- YAML
added:
Expand All @@ -806,11 +806,11 @@ Function pointer type for add-on provided functions that allow the user to be
notified when externally-owned data is ready to be cleaned up because the
object it was associated with has been garbage-collected. The user must provide
a function satisfying the following signature which would get called upon the
object's collection. Currently, `node_api_nogc_finalize` can be used for
object's collection. Currently, `node_api_basic_finalize` can be used for
finding out when objects that have external data are collected.

```c
typedef void (*node_api_nogc_finalize)(node_api_nogc_env env,
typedef void (*node_api_basic_finalize)(node_api_basic_env env,
void* finalize_data,
void* finalize_hint);
```
Expand All @@ -820,7 +820,7 @@ handle and/or callback scope inside the function body is not necessary.

Since these functions may be called while the JavaScript engine is in a state
where it cannot execute JavaScript code, only Node-APIs which accept a
`node_api_nogc_env` as their first parameter may be called.
`node_api_basic_env` as their first parameter may be called.
[`node_api_post_finalizer`][] can be used to schedule Node-API calls that
require access to the JavaScript engine's state to run after the current
garbage collection cycle has completed.
Expand All @@ -834,10 +834,10 @@ Change History:

* experimental (`NAPI_EXPERIMENTAL`):

Only Node-API calls that accept a `node_api_nogc_env` as their first
Only Node-API calls that accept a `node_api_basic_env` as their first
parameter may be called, otherwise the application will be terminated with an
appropriate error message. This feature can be turned off by defining
`NODE_API_EXPERIMENTAL_NOGC_ENV_OPT_OUT`.
`NODE_API_EXPERIMENTAL_BASIC_ENV_OPT_OUT`.

#### `napi_finalize`

Expand All @@ -862,9 +862,9 @@ Change History:
* experimental (`NAPI_EXPERIMENTAL` is defined):

A function of this type may no longer be used as a finalizer, except with
[`node_api_post_finalizer`][]. [`node_api_nogc_finalize`][] must be used
[`node_api_post_finalizer`][]. [`node_api_basic_finalize`][] must be used
instead. This feature can be turned off by defining
`NODE_API_EXPERIMENTAL_NOGC_ENV_OPT_OUT`.
`NODE_API_EXPERIMENTAL_BASIC_ENV_OPT_OUT`.

#### `napi_async_execute_callback`

Expand Down Expand Up @@ -1066,7 +1066,7 @@ napiVersion: 1

```c
napi_status
napi_get_last_error_info(node_api_nogc_env env,
napi_get_last_error_info(node_api_basic_env env,
const napi_extended_error_info** result);
```

Expand Down Expand Up @@ -1885,7 +1885,7 @@ napiVersion: 3
-->

```c
NODE_EXTERN napi_status napi_add_env_cleanup_hook(node_api_nogc_env env,
NODE_EXTERN napi_status napi_add_env_cleanup_hook(node_api_basic_env env,
napi_cleanup_hook fun,
void* arg);
```
Expand Down Expand Up @@ -1915,7 +1915,7 @@ napiVersion: 3
-->

```c
NAPI_EXTERN napi_status napi_remove_env_cleanup_hook(node_api_nogc_env env,
NAPI_EXTERN napi_status napi_remove_env_cleanup_hook(node_api_basic_env env,
void (*fun)(void* arg),
void* arg);
```
Expand Down Expand Up @@ -1944,7 +1944,7 @@ changes:

```c
NAPI_EXTERN napi_status napi_add_async_cleanup_hook(
node_api_nogc_env env,
node_api_basic_env env,
napi_async_cleanup_hook hook,
void* arg,
napi_async_cleanup_hook_handle* remove_handle);
Expand Down Expand Up @@ -5533,7 +5533,7 @@ napiVersion: 5
napi_status napi_add_finalizer(napi_env env,
napi_value js_object,
void* finalize_data,
node_api_nogc_finalize finalize_cb,
node_api_basic_finalize finalize_cb,
void* finalize_hint,
napi_ref* result);
```
Expand Down Expand Up @@ -5574,7 +5574,7 @@ added:
> Stability: 1 - Experimental

```c
napi_status node_api_post_finalizer(node_api_nogc_env env,
napi_status node_api_post_finalizer(node_api_basic_env env,
napi_finalize finalize_cb,
void* finalize_data,
void* finalize_hint);
Expand Down Expand Up @@ -5644,7 +5644,7 @@ Once created the async worker can be queued
for execution using the [`napi_queue_async_work`][] function:

```c
napi_status napi_queue_async_work(node_api_nogc_env env,
napi_status napi_queue_async_work(node_api_basic_env env,
napi_async_work work);
```

Expand Down Expand Up @@ -5736,7 +5736,7 @@ napiVersion: 1
-->

```c
napi_status napi_queue_async_work(node_api_nogc_env env,
napi_status napi_queue_async_work(node_api_basic_env env,
napi_async_work work);
```

Expand All @@ -5757,7 +5757,7 @@ napiVersion: 1
-->

```c
napi_status napi_cancel_async_work(node_api_nogc_env env,
napi_status napi_cancel_async_work(node_api_basic_env env,
napi_async_work work);
```

Expand Down Expand Up @@ -5961,7 +5961,7 @@ typedef struct {
const char* release;
} napi_node_version;

napi_status napi_get_node_version(node_api_nogc_env env,
napi_status napi_get_node_version(node_api_basic_env env,
const napi_node_version** version);
```

Expand All @@ -5984,7 +5984,7 @@ napiVersion: 1
-->

```c
napi_status napi_get_version(node_api_nogc_env env,
napi_status napi_get_version(node_api_basic_env env,
uint32_t* result);
```

Expand Down Expand Up @@ -6017,7 +6017,7 @@ napiVersion: 1
-->

```c
NAPI_EXTERN napi_status napi_adjust_external_memory(node_api_nogc_env env,
NAPI_EXTERN napi_status napi_adjust_external_memory(node_api_basic_env env,
int64_t change_in_bytes,
int64_t* result);
```
Expand Down Expand Up @@ -6234,7 +6234,7 @@ napiVersion: 2
-->

```c
NAPI_EXTERN napi_status napi_get_uv_event_loop(node_api_nogc_env env,
NAPI_EXTERN napi_status napi_get_uv_event_loop(node_api_basic_env env,
struct uv_loop_s** loop);
```

Expand Down Expand Up @@ -6554,7 +6554,7 @@ napiVersion: 4

```c
NAPI_EXTERN napi_status
napi_ref_threadsafe_function(node_api_nogc_env env, napi_threadsafe_function func);
napi_ref_threadsafe_function(node_api_basic_env env, napi_threadsafe_function func);
```

* `[in] env`: The environment that the API is invoked under.
Expand All @@ -6580,7 +6580,7 @@ napiVersion: 4

```c
NAPI_EXTERN napi_status
napi_unref_threadsafe_function(node_api_nogc_env env, napi_threadsafe_function func);
napi_unref_threadsafe_function(node_api_basic_env env, napi_threadsafe_function func);
```

* `[in] env`: The environment that the API is invoked under.
Expand All @@ -6606,7 +6606,7 @@ napiVersion: 9

```c
NAPI_EXTERN napi_status
node_api_get_module_file_name(node_api_nogc_env env, const char** result);
node_api_get_module_file_name(node_api_basic_env env, const char** result);

```

Expand Down Expand Up @@ -6731,10 +6731,10 @@ the add-on's file name during loading.
[`napi_wrap`]: #napi_wrap
[`node-addon-api`]: https://github.com/nodejs/node-addon-api
[`node_api.h`]: https://github.com/nodejs/node/blob/HEAD/src/node_api.h
[`node_api_basic_finalize`]: #node_api_basic_finalize
[`node_api_create_external_string_latin1`]: #node_api_create_external_string_latin1
[`node_api_create_external_string_utf16`]: #node_api_create_external_string_utf16
[`node_api_create_syntax_error`]: #node_api_create_syntax_error
[`node_api_nogc_finalize`]: #node_api_nogc_finalize
[`node_api_post_finalizer`]: #node_api_post_finalizer
[`node_api_throw_syntax_error`]: #node_api_throw_syntax_error
[`process.release`]: process.md#processrelease
Expand Down
51 changes: 26 additions & 25 deletions src/js_native_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
EXTERN_C_START

NAPI_EXTERN napi_status NAPI_CDECL napi_get_last_error_info(
node_api_nogc_env env, const napi_extended_error_info** result);
node_api_basic_env env, const napi_extended_error_info** result);

// Getters for defined singletons
NAPI_EXTERN napi_status NAPI_CDECL napi_get_undefined(napi_env env,
Expand Down Expand Up @@ -94,19 +94,19 @@ NAPI_EXTERN napi_status NAPI_CDECL napi_create_string_utf16(napi_env env,
napi_value* result);
#ifdef NAPI_EXPERIMENTAL
#define NODE_API_EXPERIMENTAL_HAS_EXTERNAL_STRINGS
NAPI_EXTERN napi_status NAPI_CDECL
node_api_create_external_string_latin1(napi_env env,
char* str,
size_t length,
node_api_nogc_finalize finalize_callback,
void* finalize_hint,
napi_value* result,
bool* copied);
NAPI_EXTERN napi_status NAPI_CDECL node_api_create_external_string_latin1(
napi_env env,
char* str,
size_t length,
node_api_basic_finalize finalize_callback,
void* finalize_hint,
napi_value* result,
bool* copied);
NAPI_EXTERN napi_status NAPI_CDECL
node_api_create_external_string_utf16(napi_env env,
char16_t* str,
size_t length,
node_api_nogc_finalize finalize_callback,
node_api_basic_finalize finalize_callback,
void* finalize_hint,
napi_value* result,
bool* copied);
Expand Down Expand Up @@ -318,12 +318,13 @@ napi_define_class(napi_env env,
napi_value* result);

// Methods to work with external data objects
NAPI_EXTERN napi_status NAPI_CDECL napi_wrap(napi_env env,
napi_value js_object,
void* native_object,
node_api_nogc_finalize finalize_cb,
void* finalize_hint,
napi_ref* result);
NAPI_EXTERN napi_status NAPI_CDECL
napi_wrap(napi_env env,
napi_value js_object,
void* native_object,
node_api_basic_finalize finalize_cb,
void* finalize_hint,
napi_ref* result);
NAPI_EXTERN napi_status NAPI_CDECL napi_unwrap(napi_env env,
napi_value js_object,
void** result);
Expand All @@ -333,7 +334,7 @@ NAPI_EXTERN napi_status NAPI_CDECL napi_remove_wrap(napi_env env,
NAPI_EXTERN napi_status NAPI_CDECL
napi_create_external(napi_env env,
void* data,
node_api_nogc_finalize finalize_cb,
node_api_basic_finalize finalize_cb,
void* finalize_hint,
napi_value* result);
NAPI_EXTERN napi_status NAPI_CDECL napi_get_value_external(napi_env env,
Expand Down Expand Up @@ -432,7 +433,7 @@ NAPI_EXTERN napi_status NAPI_CDECL
napi_create_external_arraybuffer(napi_env env,
void* external_data,
size_t byte_length,
node_api_nogc_finalize finalize_cb,
node_api_basic_finalize finalize_cb,
void* finalize_hint,
napi_value* result);
#endif // NODE_API_NO_EXTERNAL_BUFFERS_ALLOWED
Expand Down Expand Up @@ -474,7 +475,7 @@ napi_get_dataview_info(napi_env env,
size_t* byte_offset);

// version management
NAPI_EXTERN napi_status NAPI_CDECL napi_get_version(node_api_nogc_env env,
NAPI_EXTERN napi_status NAPI_CDECL napi_get_version(node_api_basic_env env,
uint32_t* result);

// Promises
Expand All @@ -498,7 +499,7 @@ NAPI_EXTERN napi_status NAPI_CDECL napi_run_script(napi_env env,

// Memory management
NAPI_EXTERN napi_status NAPI_CDECL napi_adjust_external_memory(
node_api_nogc_env env, int64_t change_in_bytes, int64_t* adjusted_value);
node_api_basic_env env, int64_t change_in_bytes, int64_t* adjusted_value);

#if NAPI_VERSION >= 5

Expand All @@ -520,7 +521,7 @@ NAPI_EXTERN napi_status NAPI_CDECL
napi_add_finalizer(napi_env env,
napi_value js_object,
void* finalize_data,
node_api_nogc_finalize finalize_cb,
node_api_basic_finalize finalize_cb,
void* finalize_hint,
napi_ref* result);

Expand All @@ -530,7 +531,7 @@ napi_add_finalizer(napi_env env,
#define NODE_API_EXPERIMENTAL_HAS_POST_FINALIZER

NAPI_EXTERN napi_status NAPI_CDECL
node_api_post_finalizer(node_api_nogc_env env,
node_api_post_finalizer(node_api_basic_env env,
napi_finalize finalize_cb,
void* finalize_data,
void* finalize_hint);
Expand Down Expand Up @@ -575,13 +576,13 @@ napi_get_all_property_names(napi_env env,

// Instance data
NAPI_EXTERN napi_status NAPI_CDECL
napi_set_instance_data(node_api_nogc_env env,
napi_set_instance_data(node_api_basic_env env,
void* data,
napi_finalize finalize_cb,
void* finalize_hint);

NAPI_EXTERN napi_status NAPI_CDECL napi_get_instance_data(node_api_nogc_env env,
void** data);
NAPI_EXTERN napi_status NAPI_CDECL
napi_get_instance_data(node_api_basic_env env, void** data);
#endif // NAPI_VERSION >= 6

#if NAPI_VERSION >= 7
Expand Down
Loading