node-aix-ppc64 22.5.1 → 22.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -43,7 +43,7 @@ Looking for help? Check out the
43
43
 
44
44
  * **Current**: Under active development. Code for the Current release is in the
45
45
  branch for its major version number (for example,
46
- [v19.x](https://github.com/nodejs/node/tree/v19.x)). Node.js releases a new
46
+ [v22.x](https://github.com/nodejs/node/tree/v22.x)). Node.js releases a new
47
47
  major version every 6 months, allowing for breaking changes. This happens in
48
48
  April and October every year. Releases appearing each October have a support
49
49
  life of 8 months. Releases appearing each April convert to LTS (see below)
@@ -112,14 +112,9 @@ grep node-vx.y.z.tar.gz SHASUMS256.txt | sha256sum -c -
112
112
  For Current and LTS, the GPG detached signature of `SHASUMS256.txt` is in
113
113
  `SHASUMS256.txt.sig`. You can use it with `gpg` to verify the integrity of
114
114
  `SHASUMS256.txt`. You will first need to import
115
- [the GPG keys of individuals authorized to create releases](#release-keys). To
116
- import the keys:
115
+ [the GPG keys of individuals authorized to create releases](#release-keys).
117
116
 
118
- ```bash
119
- gpg --keyserver hkps://keys.openpgp.org --recv-keys 4ED778F539E3634C779C87C6D7062848A1AB005C
120
- ```
121
-
122
- See [Release keys](#release-keys) for a script to import active release keys.
117
+ See [Release keys](#release-keys) for commands to import active release keys.
123
118
 
124
119
  Next, download the `SHASUMS256.txt.sig` for the release:
125
120
 
@@ -164,14 +159,12 @@ For information about the governance of the Node.js project, see
164
159
 
165
160
  * [aduh95](https://github.com/aduh95) -
166
161
  **Antoine du Hamel** <<duhamelantoine1995@gmail.com>> (he/him)
167
- * [apapirovski](https://github.com/apapirovski) -
168
- **Anatoli Papirovski** <<apapirovski@mac.com>> (he/him)
162
+ * [anonrig](https://github.com/anonrig) -
163
+ **Yagiz Nizipli** <<yagiz@nizipli.com>> (he/him)
169
164
  * [benjamingr](https://github.com/benjamingr) -
170
165
  **Benjamin Gruenbaum** <<benjamingr@gmail.com>>
171
166
  * [BridgeAR](https://github.com/BridgeAR) -
172
167
  **Ruben Bridgewater** <<ruben@bridgewater.de>> (he/him)
173
- * [GeoffreyBooth](https://github.com/geoffreybooth) -
174
- **Geoffrey Booth** <<webadmin@geoffreybooth.com>> (he/him)
175
168
  * [gireeshpunathil](https://github.com/gireeshpunathil) -
176
169
  **Gireesh Punathil** <<gpunathi@in.ibm.com>> (he/him)
177
170
  * [jasnell](https://github.com/jasnell) -
@@ -205,8 +198,8 @@ For information about the governance of the Node.js project, see
205
198
 
206
199
  #### TSC regular members
207
200
 
208
- * [anonrig](https://github.com/anonrig) -
209
- **Yagiz Nizipli** <<yagiz@nizipli.com>> (he/him)
201
+ * [apapirovski](https://github.com/apapirovski) -
202
+ **Anatoli Papirovski** <<apapirovski@mac.com>> (he/him)
210
203
  * [BethGriggs](https://github.com/BethGriggs) -
211
204
  **Beth Griggs** <<bethanyngriggs@gmail.com>> (she/her)
212
205
  * [bnoordhuis](https://github.com/bnoordhuis) -
@@ -215,6 +208,8 @@ For information about the governance of the Node.js project, see
215
208
  **Colin Ihrig** <<cjihrig@gmail.com>> (he/him)
216
209
  * [codebytere](https://github.com/codebytere) -
217
210
  **Shelley Vohr** <<shelley.vohr@gmail.com>> (she/her)
211
+ * [GeoffreyBooth](https://github.com/GeoffreyBooth) -
212
+ **Geoffrey Booth** <<webadmin@geoffreybooth.com>> (he/him)
218
213
  * [Trott](https://github.com/Trott) -
219
214
  **Rich Trott** <<rtrott@gmail.com>> (he/him)
220
215
 
@@ -329,7 +324,7 @@ For information about the governance of the Node.js project, see
329
324
  **Deokjin Kim** <<deokjin81.kim@gmail.com>> (he/him)
330
325
  * [edsadr](https://github.com/edsadr) -
331
326
  **Adrian Estrada** <<edsadr@gmail.com>> (he/him)
332
- * [erickwendel](https://github.com/erickwendel) -
327
+ * [ErickWendel](https://github.com/ErickWendel) -
333
328
  **Erick Wendel** <<erick.workspace@gmail.com>> (he/him)
334
329
  * [Ethan-Arrowood](https://github.com/Ethan-Arrowood) -
335
330
  **Ethan Arrowood** <<ethan@arrowood.dev>> (he/him)
@@ -343,7 +338,7 @@ For information about the governance of the Node.js project, see
343
338
  **Gabriel Schulhof** <<gabrielschulhof@gmail.com>>
344
339
  * [gengjiawen](https://github.com/gengjiawen) -
345
340
  **Jiawen Geng** <<technicalcute@gmail.com>>
346
- * [GeoffreyBooth](https://github.com/geoffreybooth) -
341
+ * [GeoffreyBooth](https://github.com/GeoffreyBooth) -
347
342
  **Geoffrey Booth** <<webadmin@geoffreybooth.com>> (he/him)
348
343
  * [gireeshpunathil](https://github.com/gireeshpunathil) -
349
344
  **Gireesh Punathil** <<gpunathi@in.ibm.com>> (he/him)
@@ -355,6 +350,8 @@ For information about the governance of the Node.js project, see
355
350
  **Harshitha K P** <<harshitha014@gmail.com>> (she/her)
356
351
  * [himself65](https://github.com/himself65) -
357
352
  **Zeyu "Alex" Yang** <<himself65@outlook.com>> (he/him)
353
+ * [jakecastelli](https://github.com/jakecastelli) -
354
+ **Jake Yuesong Li** <<jake.yuesong@gmail.com>> (he/him)
358
355
  * [JakobJingleheimer](https://github.com/JakobJingleheimer) -
359
356
  **Jacob Smith** <<jacob@frende.me>> (he/him)
360
357
  * [jasnell](https://github.com/jasnell) -
@@ -371,15 +368,13 @@ For information about the governance of the Node.js project, see
371
368
  **Minwoo Jung** <<nodecorelab@gmail.com>> (he/him)
372
369
  * [KhafraDev](https://github.com/KhafraDev) -
373
370
  **Matthew Aitken** <<maitken033380023@gmail.com>> (he/him)
374
- * [kuriyosh](https://github.com/kuriyosh) -
375
- **Yoshiki Kurihara** <<yosyos0306@gmail.com>> (he/him)
376
371
  * [kvakil](https://github.com/kvakil) -
377
372
  **Keyhan Vakil** <<kvakil@sylph.kvakil.me>>
378
373
  * [legendecas](https://github.com/legendecas) -
379
374
  **Chengzhong Wu** <<legendecas@gmail.com>> (he/him)
380
375
  * [lemire](https://github.com/lemire) -
381
376
  **Daniel Lemire** <<daniel@lemire.me>>
382
- * [linkgoron](https://github.com/linkgoron) -
377
+ * [Linkgoron](https://github.com/Linkgoron) -
383
378
  **Nitzan Uziely** <<linkgoron@gmail.com>>
384
379
  * [LiviaMedeiros](https://github.com/LiviaMedeiros) -
385
380
  **LiviaMedeiros** <<livia@cirno.name>>
@@ -393,6 +388,8 @@ For information about the governance of the Node.js project, see
393
388
  **Marco Ippolito** <<marcoippolito54@gmail.com>> (he/him)
394
389
  * [marsonya](https://github.com/marsonya) -
395
390
  **Akhil Marsonya** <<akhil.marsonya27@gmail.com>> (he/him)
391
+ * [MattiasBuelens](https://github.com/MattiasBuelens) -
392
+ **Mattias Buelens** <<mattias@buelens.com>> (he/him)
396
393
  * [mcollina](https://github.com/mcollina) -
397
394
  **Matteo Collina** <<matteo.collina@gmail.com>> (he/him)
398
395
  * [meixg](https://github.com/meixg) -
@@ -443,7 +440,7 @@ For information about the governance of the Node.js project, see
443
440
  **Trivikram Kamat** <<trivikr.dev@gmail.com>>
444
441
  * [Trott](https://github.com/Trott) -
445
442
  **Rich Trott** <<rtrott@gmail.com>> (he/him)
446
- * [UlisesGascon](https://github.com/ulisesgascon) -
443
+ * [UlisesGascon](https://github.com/UlisesGascon) -
447
444
  **Ulises Gascón** <<ulisesgascongonzalez@gmail.com>> (he/him)
448
445
  * [vmoroz](https://github.com/vmoroz) -
449
446
  **Vladimir Morozov** <<vmorozov@microsoft.com>> (he/him)
@@ -573,6 +570,8 @@ For information about the governance of the Node.js project, see
573
570
  **Kyle Farnung** <<kfarnung@microsoft.com>> (he/him)
574
571
  * [kunalspathak](https://github.com/kunalspathak) -
575
572
  **Kunal Pathak** <<kunal.pathak@microsoft.com>>
573
+ * [kuriyosh](https://github.com/kuriyosh) -
574
+ **Yoshiki Kurihara** <<yosyos0306@gmail.com>> (he/him)
576
575
  * [lance](https://github.com/lance) -
577
576
  **Lance Ball** <<lball@redhat.com>> (he/him)
578
577
  * [Leko](https://github.com/Leko) -
@@ -735,20 +734,20 @@ maintaining the Node.js project.
735
734
  **Daeyeon Jeong** <<daeyeon.dev@gmail.com>> (he/him)
736
735
  * [F3n67u](https://github.com/F3n67u) -
737
736
  **Feng Yu** <<F3n67u@outlook.com>> (he/him)
738
- * [himadriganguly](https://github.com/himadriganguly) -
739
- **Himadri Ganguly** <<himadri.tech@gmail.com>> (he/him)
737
+ * [gireeshpunathil](https://github.com/gireeshpunathil) -
738
+ **Gireesh Punathil** <<gpunathi@in.ibm.com>> (he/him)
740
739
  * [iam-frankqiu](https://github.com/iam-frankqiu) -
741
740
  **Frank Qiu** <<iam.frankqiu@gmail.com>> (he/him)
741
+ * [KevinEady](https://github.com/KevinEady) -
742
+ **Kevin Eady** <<kevin.c.eady@gmail.com>> (he/him)
743
+ * [kvakil](https://github.com/kvakil) -
744
+ **Keyhan Vakil** <<kvakil@sylph.kvakil.me>>
742
745
  * [marsonya](https://github.com/marsonya) -
743
746
  **Akhil Marsonya** <<akhil.marsonya27@gmail.com>> (he/him)
744
747
  * [meixg](https://github.com/meixg) -
745
748
  **Xuguang Mei** <<meixuguang@gmail.com>> (he/him)
746
749
  * [mertcanaltin](https://github.com/mertcanaltin) -
747
750
  **Mert Can Altin** <<mertgold60@gmail.com>>
748
- * [Mesteery](https://github.com/Mesteery) -
749
- **Mestery** <<mestery@protonmail.com>> (he/him)
750
- * [PoojaDurgad](https://github.com/PoojaDurgad) -
751
- **Pooja Durgad** <<Pooja.D.P@ibm.com>>
752
751
  * [preveen-stack](https://github.com/preveen-stack) -
753
752
  **Preveen Padmanabhan** <<wide4head@gmail.com>> (he/him)
754
753
  * [RedYetiDev](https://github.com/redyetidev) -
@@ -775,8 +774,6 @@ Primary GPG keys for Node.js Releasers (some Releasers sign with subkeys):
775
774
  `CC68F5A3106FF448322E48ED27F5E38D5B0A215F`
776
775
  * **Michaël Zasso** <<targos@protonmail.com>>
777
776
  `8FCCA13FEF1D0C2E91008E09770F7A9A5AE15600`
778
- * **Myles Borins** <<myles.borins@gmail.com>>
779
- `C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8`
780
777
  * **Rafael Gonzaga** <<rafael.nunu@hotmail.com>>
781
778
  `890C08DB8579162FEE0DF9DB8BEAB4DFCF555EF4`
782
779
  * **Richard Lau** <<rlau@redhat.com>>
@@ -796,7 +793,6 @@ gpg --keyserver hkps://keys.openpgp.org --recv-keys 74F12602B6F1C4E913FAA37AD3A8
796
793
  gpg --keyserver hkps://keys.openpgp.org --recv-keys DD792F5973C6DE52C432CBDAC77ABFA00DDBF2B7 # Juan José Arboleda
797
794
  gpg --keyserver hkps://keys.openpgp.org --recv-keys CC68F5A3106FF448322E48ED27F5E38D5B0A215F # Marco Ippolito
798
795
  gpg --keyserver hkps://keys.openpgp.org --recv-keys 8FCCA13FEF1D0C2E91008E09770F7A9A5AE15600 # Michaël Zasso
799
- gpg --keyserver hkps://keys.openpgp.org --recv-keys C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8 # Myles Borins
800
796
  gpg --keyserver hkps://keys.openpgp.org --recv-keys 890C08DB8579162FEE0DF9DB8BEAB4DFCF555EF4 # Rafael Gonzaga
801
797
  gpg --keyserver hkps://keys.openpgp.org --recv-keys C82FA3AE1CBEDC6BE46B9360C43CEC45C17AB93C # Richard Lau
802
798
  gpg --keyserver hkps://keys.openpgp.org --recv-keys 108F52B48DB57BB0CC439B2997B01419BD92F80A # Ruy Adorno
@@ -832,6 +828,8 @@ verify a downloaded file.
832
828
  `61FC681DFB92A079F1685E77973F295594EC4689`
833
829
  * **Julien Gilli** <<jgilli@fastmail.fm>>
834
830
  `114F43EE0176B71C7BC219DD50A3051F888C628D`
831
+ * **Myles Borins** <<myles.borins@gmail.com>>
832
+ `C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8`
835
833
  * **Rod Vagg** <<rod@vagg.org>>
836
834
  `DD8F2338BAE7501E3DD5AC78C273792F7D83545D`
837
835
  * **Ruben Bridgewater** <<ruben@bridgewater.de>>
@@ -853,18 +851,18 @@ prioritize security releases. Security release stewards manage security
853
851
  releases on a rotation basis as outlined in the
854
852
  [security release process](./doc/contributing/security-release-process.md).
855
853
 
856
- * Datadog
854
+ * [Datadog](https://www.datadoghq.com/)
857
855
  * [bengl](https://github.com/bengl) -
858
856
  **Bryan English** <<bryan@bryanenglish.com>> (he/him)
859
- * NodeSource
857
+ * [NodeSource](https://nodesource.com/)
860
858
  * [juanarbol](https://github.com/juanarbol) -
861
859
  **Juan José Arboleda** <<soyjuanarbol@gmail.com>> (he/him)
862
860
  * [RafaelGSS](https://github.com/RafaelGSS) -
863
861
  **Rafael Gonzaga** <<rafael.nunu@hotmail.com>> (he/him)
864
- * Platformatic
862
+ * [Platformatic](https://platformatic.dev/)
865
863
  * [mcollina](https://github.com/mcollina) -
866
864
  **Matteo Collina** <<matteo.collina@gmail.com>> (he/him)
867
- * Red Hat and IBM
865
+ * [Red Hat](https://redhat.com) / [IBM](https://ibm.com)
868
866
  * [joesepi](https://github.com/joesepi) -
869
867
  **Joe Sepi** <<joesepi@ibm.com>> (he/him)
870
868
  * [mhdawson](https://github.com/mhdawson) -
package/bin/node CHANGED
Binary file
@@ -36,7 +36,7 @@
36
36
 
37
37
  # Reset this number to 0 on major V8 upgrades.
38
38
  # Increment by one for each non-official patch applied to deps/v8.
39
- 'v8_embedder_string': '-node.16',
39
+ 'v8_embedder_string': '-node.18',
40
40
 
41
41
  ##### V8 defaults for Node.js #####
42
42
 
@@ -113,6 +113,7 @@
113
113
  ['target_arch in "arm ia32 mips mipsel ppc"', {
114
114
  'v8_enable_pointer_compression': 0,
115
115
  'v8_enable_31bit_smis_on_64bit_arch': 0,
116
+ 'v8_enable_sandbox': 0
116
117
  }],
117
118
  ['target_arch in "ppc64 s390x"', {
118
119
  'v8_enable_backtrace': 1,
@@ -488,7 +489,12 @@
488
489
  }],
489
490
  [ 'OS in "linux freebsd openbsd solaris android aix os400 cloudabi"', {
490
491
  'cflags': [ '-Wall', '-Wextra', '-Wno-unused-parameter', ],
491
- 'cflags_cc': [ '-fno-rtti', '-fno-exceptions', '-std=gnu++17' ],
492
+ 'cflags_cc': [
493
+ '-fno-rtti',
494
+ '-fno-exceptions',
495
+ '-fno-strict-aliasing',
496
+ '-std=gnu++17',
497
+ ],
492
498
  'defines': [ '__STDC_FORMAT_MACROS' ],
493
499
  'ldflags': [ '-rdynamic' ],
494
500
  'target_conditions': [
@@ -619,12 +625,10 @@
619
625
  'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions
620
626
  'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
621
627
  'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
628
+ 'GCC_STRICT_ALIASING': 'NO', # -fno-strict-aliasing
622
629
  'PREBINDING': 'NO', # No -Wl,-prebind
623
630
  'MACOSX_DEPLOYMENT_TARGET': '11.0', # -mmacosx-version-min=11.0
624
631
  'USE_HEADERMAP': 'NO',
625
- 'OTHER_CFLAGS': [
626
- '-fno-strict-aliasing',
627
- ],
628
632
  'WARNING_CFLAGS': [
629
633
  '-Wall',
630
634
  '-Wendif-labels',
@@ -1,5 +1,11 @@
1
1
  # Do not edit. Generated by the configure script.
2
- { 'target_defaults': {'cflags': [], 'default_configuration': 'Release', 'defines': ['NODE_OPENSSL_CONF_NAME=nodejs_conf', 'NODE_OPENSSL_HAS_QUIC', 'ICU_NO_USER_DATA_OVERRIDE'], 'include_dirs': [], 'libraries': []},
2
+ { 'target_defaults': { 'cflags': [],
3
+ 'configurations': { 'Debug': {'v8_enable_v8_checks': 0, 'variables': {}},
4
+ 'Release': {'v8_enable_v8_checks': 1, 'variables': {}}},
5
+ 'default_configuration': 'Release',
6
+ 'defines': ['NODE_OPENSSL_CONF_NAME=nodejs_conf', 'NODE_OPENSSL_HAS_QUIC', 'ICU_NO_USER_DATA_OVERRIDE'],
7
+ 'include_dirs': [],
8
+ 'libraries': []},
3
9
  'variables': { 'asan': 0,
4
10
  'clang': 0,
5
11
  'coverage': 'false',
@@ -19,11 +25,12 @@
19
25
  'icu_path': 'deps/icu-small',
20
26
  'icu_small': 'false',
21
27
  'icu_ver_major': '75',
22
- 'is_debug': 0,
23
28
  'libdir': 'lib',
24
29
  'llvm_version': '0.0',
25
30
  'napi_build_version': '9',
26
- 'node_builtin_shareable_builtins': ['deps/cjs-module-lexer/lexer.js', 'deps/cjs-module-lexer/dist/lexer.js', 'deps/undici/undici.js'],
31
+ 'node_builtin_shareable_builtins': [ 'deps/cjs-module-lexer/lexer.js',
32
+ 'deps/cjs-module-lexer/dist/lexer.js',
33
+ 'deps/undici/undici.js'],
27
34
  'node_byteorder': 'big',
28
35
  'node_debug_lib': 'false',
29
36
  'node_enable_d8': 'false',
@@ -71,7 +78,10 @@
71
78
  'lib/internal/assert.js',
72
79
  'lib/internal/assert/assertion_error.js',
73
80
  'lib/internal/assert/calltracker.js',
81
+ 'lib/internal/async_context_frame.js',
74
82
  'lib/internal/async_hooks.js',
83
+ 'lib/internal/async_local_storage/async_context_frame.js',
84
+ 'lib/internal/async_local_storage/async_hooks.js',
75
85
  'lib/internal/blob.js',
76
86
  'lib/internal/blocklist.js',
77
87
  'lib/internal/bootstrap/node.js',
@@ -154,6 +164,7 @@
154
164
  'lib/internal/http2/util.js',
155
165
  'lib/internal/idna.js',
156
166
  'lib/internal/inspector_async_hook.js',
167
+ 'lib/internal/inspector_network_tracking.js',
157
168
  'lib/internal/js_stream_socket.js',
158
169
  'lib/internal/legacy/processbinding.js',
159
170
  'lib/internal/linkedlist.js',
@@ -242,6 +253,7 @@
242
253
  'lib/internal/streams/destroy.js',
243
254
  'lib/internal/streams/duplex.js',
244
255
  'lib/internal/streams/duplexify.js',
256
+ 'lib/internal/streams/duplexpair.js',
245
257
  'lib/internal/streams/end-of-stream.js',
246
258
  'lib/internal/streams/from.js',
247
259
  'lib/internal/streams/lazy_transform.js',
@@ -258,6 +270,7 @@
258
270
  'lib/internal/test/transfer.js',
259
271
  'lib/internal/test_runner/coverage.js',
260
272
  'lib/internal/test_runner/harness.js',
273
+ 'lib/internal/test_runner/mock/loader.js',
261
274
  'lib/internal/test_runner/mock/mock.js',
262
275
  'lib/internal/test_runner/mock/mock_timers.js',
263
276
  'lib/internal/test_runner/reporter/dot.js',
@@ -333,7 +346,6 @@
333
346
  'lib/string_decoder.js',
334
347
  'lib/sys.js',
335
348
  'lib/test.js',
336
- 'lib/test/mock_loader.js',
337
349
  'lib/test/reporters.js',
338
350
  'lib/timers.js',
339
351
  'lib/timers/promises.js',
@@ -369,6 +381,7 @@
369
381
  'node_shared_zlib': 'false',
370
382
  'node_tag': '',
371
383
  'node_target_type': 'executable',
384
+ 'node_use_amaro': 'true',
372
385
  'node_use_bundled_v8': 'true',
373
386
  'node_use_node_code_cache': 'true',
374
387
  'node_use_node_snapshot': 'true',
@@ -396,10 +409,9 @@
396
409
  'v8_enable_maglev': 0,
397
410
  'v8_enable_object_print': 1,
398
411
  'v8_enable_pointer_compression': 0,
412
+ 'v8_enable_sandbox': 0,
399
413
  'v8_enable_shared_ro_heap': 1,
400
- 'v8_enable_v8_checks': 0,
401
414
  'v8_enable_webassembly': 1,
402
- 'v8_no_strict_aliasing': 1,
403
415
  'v8_optimized_debug': 1,
404
416
  'v8_promise_internal_field_count': 1,
405
417
  'v8_random_seed': 0,
@@ -50,7 +50,7 @@
50
50
  EXTERN_C_START
51
51
 
52
52
  NAPI_EXTERN napi_status NAPI_CDECL napi_get_last_error_info(
53
- node_api_nogc_env env, const napi_extended_error_info** result);
53
+ node_api_basic_env env, const napi_extended_error_info** result);
54
54
 
55
55
  // Getters for defined singletons
56
56
  NAPI_EXTERN napi_status NAPI_CDECL napi_get_undefined(napi_env env,
@@ -94,19 +94,19 @@ NAPI_EXTERN napi_status NAPI_CDECL napi_create_string_utf16(napi_env env,
94
94
  napi_value* result);
95
95
  #ifdef NAPI_EXPERIMENTAL
96
96
  #define NODE_API_EXPERIMENTAL_HAS_EXTERNAL_STRINGS
97
- NAPI_EXTERN napi_status NAPI_CDECL
98
- node_api_create_external_string_latin1(napi_env env,
99
- char* str,
100
- size_t length,
101
- node_api_nogc_finalize finalize_callback,
102
- void* finalize_hint,
103
- napi_value* result,
104
- bool* copied);
97
+ NAPI_EXTERN napi_status NAPI_CDECL node_api_create_external_string_latin1(
98
+ napi_env env,
99
+ char* str,
100
+ size_t length,
101
+ node_api_basic_finalize finalize_callback,
102
+ void* finalize_hint,
103
+ napi_value* result,
104
+ bool* copied);
105
105
  NAPI_EXTERN napi_status NAPI_CDECL
106
106
  node_api_create_external_string_utf16(napi_env env,
107
107
  char16_t* str,
108
108
  size_t length,
109
- node_api_nogc_finalize finalize_callback,
109
+ node_api_basic_finalize finalize_callback,
110
110
  void* finalize_hint,
111
111
  napi_value* result,
112
112
  bool* copied);
@@ -318,12 +318,13 @@ napi_define_class(napi_env env,
318
318
  napi_value* result);
319
319
 
320
320
  // Methods to work with external data objects
321
- NAPI_EXTERN napi_status NAPI_CDECL napi_wrap(napi_env env,
322
- napi_value js_object,
323
- void* native_object,
324
- node_api_nogc_finalize finalize_cb,
325
- void* finalize_hint,
326
- napi_ref* result);
321
+ NAPI_EXTERN napi_status NAPI_CDECL
322
+ napi_wrap(napi_env env,
323
+ napi_value js_object,
324
+ void* native_object,
325
+ node_api_basic_finalize finalize_cb,
326
+ void* finalize_hint,
327
+ napi_ref* result);
327
328
  NAPI_EXTERN napi_status NAPI_CDECL napi_unwrap(napi_env env,
328
329
  napi_value js_object,
329
330
  void** result);
@@ -333,7 +334,7 @@ NAPI_EXTERN napi_status NAPI_CDECL napi_remove_wrap(napi_env env,
333
334
  NAPI_EXTERN napi_status NAPI_CDECL
334
335
  napi_create_external(napi_env env,
335
336
  void* data,
336
- node_api_nogc_finalize finalize_cb,
337
+ node_api_basic_finalize finalize_cb,
337
338
  void* finalize_hint,
338
339
  napi_value* result);
339
340
  NAPI_EXTERN napi_status NAPI_CDECL napi_get_value_external(napi_env env,
@@ -432,7 +433,7 @@ NAPI_EXTERN napi_status NAPI_CDECL
432
433
  napi_create_external_arraybuffer(napi_env env,
433
434
  void* external_data,
434
435
  size_t byte_length,
435
- node_api_nogc_finalize finalize_cb,
436
+ node_api_basic_finalize finalize_cb,
436
437
  void* finalize_hint,
437
438
  napi_value* result);
438
439
  #endif // NODE_API_NO_EXTERNAL_BUFFERS_ALLOWED
@@ -474,7 +475,7 @@ napi_get_dataview_info(napi_env env,
474
475
  size_t* byte_offset);
475
476
 
476
477
  // version management
477
- NAPI_EXTERN napi_status NAPI_CDECL napi_get_version(node_api_nogc_env env,
478
+ NAPI_EXTERN napi_status NAPI_CDECL napi_get_version(node_api_basic_env env,
478
479
  uint32_t* result);
479
480
 
480
481
  // Promises
@@ -498,7 +499,7 @@ NAPI_EXTERN napi_status NAPI_CDECL napi_run_script(napi_env env,
498
499
 
499
500
  // Memory management
500
501
  NAPI_EXTERN napi_status NAPI_CDECL napi_adjust_external_memory(
501
- node_api_nogc_env env, int64_t change_in_bytes, int64_t* adjusted_value);
502
+ node_api_basic_env env, int64_t change_in_bytes, int64_t* adjusted_value);
502
503
 
503
504
  #if NAPI_VERSION >= 5
504
505
 
@@ -520,7 +521,7 @@ NAPI_EXTERN napi_status NAPI_CDECL
520
521
  napi_add_finalizer(napi_env env,
521
522
  napi_value js_object,
522
523
  void* finalize_data,
523
- node_api_nogc_finalize finalize_cb,
524
+ node_api_basic_finalize finalize_cb,
524
525
  void* finalize_hint,
525
526
  napi_ref* result);
526
527
 
@@ -530,7 +531,7 @@ napi_add_finalizer(napi_env env,
530
531
  #define NODE_API_EXPERIMENTAL_HAS_POST_FINALIZER
531
532
 
532
533
  NAPI_EXTERN napi_status NAPI_CDECL
533
- node_api_post_finalizer(node_api_nogc_env env,
534
+ node_api_post_finalizer(node_api_basic_env env,
534
535
  napi_finalize finalize_cb,
535
536
  void* finalize_data,
536
537
  void* finalize_hint);
@@ -575,13 +576,13 @@ napi_get_all_property_names(napi_env env,
575
576
 
576
577
  // Instance data
577
578
  NAPI_EXTERN napi_status NAPI_CDECL
578
- napi_set_instance_data(node_api_nogc_env env,
579
+ napi_set_instance_data(node_api_basic_env env,
579
580
  void* data,
580
581
  napi_finalize finalize_cb,
581
582
  void* finalize_hint);
582
583
 
583
- NAPI_EXTERN napi_status NAPI_CDECL napi_get_instance_data(node_api_nogc_env env,
584
- void** data);
584
+ NAPI_EXTERN napi_status NAPI_CDECL
585
+ napi_get_instance_data(node_api_basic_env env, void** data);
585
586
  #endif // NAPI_VERSION >= 6
586
587
 
587
588
  #if NAPI_VERSION >= 7
@@ -27,7 +27,7 @@ typedef struct napi_env__* napi_env;
27
27
  // meaning that they do not affect the state of the JS engine, and can
28
28
  // therefore be called synchronously from a finalizer that itself runs
29
29
  // synchronously during GC. Such APIs can receive either a `napi_env` or a
30
- // `node_api_nogc_env` as their first parameter, because we should be able to
30
+ // `node_api_basic_env` as their first parameter, because we should be able to
31
31
  // also call them during normal, non-garbage-collecting operations, whereas
32
32
  // APIs that affect the state of the JS engine can only receive a `napi_env` as
33
33
  // their first parameter, because we must not call them during GC. In lieu of
@@ -37,19 +37,21 @@ typedef struct napi_env__* napi_env;
37
37
  // expecting a non-const value.
38
38
  //
39
39
  // In conjunction with appropriate CFLAGS to warn us if we're passing a const
40
- // (nogc) environment into an API that expects a non-const environment, and the
41
- // definition of nogc finalizer function pointer types below, which receive a
42
- // nogc environment as their first parameter, and can thus only call nogc APIs
43
- // (unless the user explicitly casts the environment), we achieve the ability
44
- // to ensure at compile time that we do not call APIs that affect the state of
45
- // the JS engine from a synchronous (nogc) finalizer.
40
+ // (basic) environment into an API that expects a non-const environment, and
41
+ // the definition of basic finalizer function pointer types below, which
42
+ // receive a basic environment as their first parameter, and can thus only call
43
+ // basic APIs (unless the user explicitly casts the environment), we achieve
44
+ // the ability to ensure at compile time that we do not call APIs that affect
45
+ // the state of the JS engine from a synchronous (basic) finalizer.
46
46
  #if !defined(NAPI_EXPERIMENTAL) || \
47
47
  (defined(NAPI_EXPERIMENTAL) && \
48
- defined(NODE_API_EXPERIMENTAL_NOGC_ENV_OPT_OUT))
48
+ (defined(NODE_API_EXPERIMENTAL_NOGC_ENV_OPT_OUT) || \
49
+ defined(NODE_API_EXPERIMENTAL_BASIC_ENV_OPT_OUT)))
49
50
  typedef struct napi_env__* node_api_nogc_env;
50
51
  #else
51
52
  typedef const struct napi_env__* node_api_nogc_env;
52
53
  #endif
54
+ typedef node_api_nogc_env node_api_basic_env;
53
55
 
54
56
  typedef struct napi_value__* napi_value;
55
57
  typedef struct napi_ref__* napi_ref;
@@ -147,13 +149,15 @@ typedef void(NAPI_CDECL* napi_finalize)(napi_env env,
147
149
 
148
150
  #if !defined(NAPI_EXPERIMENTAL) || \
149
151
  (defined(NAPI_EXPERIMENTAL) && \
150
- defined(NODE_API_EXPERIMENTAL_NOGC_ENV_OPT_OUT))
152
+ (defined(NODE_API_EXPERIMENTAL_NOGC_ENV_OPT_OUT) || \
153
+ defined(NODE_API_EXPERIMENTAL_BASIC_ENV_OPT_OUT)))
151
154
  typedef napi_finalize node_api_nogc_finalize;
152
155
  #else
153
156
  typedef void(NAPI_CDECL* node_api_nogc_finalize)(node_api_nogc_env env,
154
157
  void* finalize_data,
155
158
  void* finalize_hint);
156
159
  #endif
160
+ typedef node_api_nogc_finalize node_api_basic_finalize;
157
161
 
158
162
  typedef struct {
159
163
  // One of utf8name or name should be NULL.