node-linux-s390x 19.8.1 → 20.0.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.
Files changed (92) hide show
  1. package/CHANGELOG.md +211 -1516
  2. package/README.md +28 -23
  3. package/bin/node +0 -0
  4. package/include/node/common.gypi +1 -1
  5. package/include/node/config.gypi +14 -7
  6. package/include/node/libplatform/v8-tracing.h +2 -2
  7. package/include/node/node.h +22 -35
  8. package/include/node/node_api.h +17 -59
  9. package/include/node/node_version.h +4 -4
  10. package/include/node/openssl/archs/BSD-x86/asm/crypto/buildinf.h +1 -1
  11. package/include/node/openssl/archs/BSD-x86/asm_avx2/crypto/buildinf.h +1 -1
  12. package/include/node/openssl/archs/BSD-x86/no-asm/crypto/buildinf.h +1 -1
  13. package/include/node/openssl/archs/BSD-x86_64/asm/crypto/buildinf.h +1 -1
  14. package/include/node/openssl/archs/BSD-x86_64/asm_avx2/crypto/buildinf.h +1 -1
  15. package/include/node/openssl/archs/BSD-x86_64/no-asm/crypto/buildinf.h +1 -1
  16. package/include/node/openssl/archs/VC-WIN32/asm/crypto/buildinf.h +1 -1
  17. package/include/node/openssl/archs/VC-WIN32/asm_avx2/crypto/buildinf.h +1 -1
  18. package/include/node/openssl/archs/VC-WIN32/no-asm/crypto/buildinf.h +1 -1
  19. package/include/node/openssl/archs/VC-WIN64-ARM/no-asm/crypto/buildinf.h +1 -1
  20. package/include/node/openssl/archs/VC-WIN64A/asm/crypto/buildinf.h +1 -1
  21. package/include/node/openssl/archs/VC-WIN64A/asm_avx2/crypto/buildinf.h +1 -1
  22. package/include/node/openssl/archs/VC-WIN64A/no-asm/crypto/buildinf.h +1 -1
  23. package/include/node/openssl/archs/aix64-gcc-as/asm/crypto/buildinf.h +1 -1
  24. package/include/node/openssl/archs/aix64-gcc-as/asm_avx2/crypto/buildinf.h +1 -1
  25. package/include/node/openssl/archs/aix64-gcc-as/no-asm/crypto/buildinf.h +1 -1
  26. package/include/node/openssl/archs/darwin-i386-cc/asm/crypto/buildinf.h +1 -1
  27. package/include/node/openssl/archs/darwin-i386-cc/asm_avx2/crypto/buildinf.h +1 -1
  28. package/include/node/openssl/archs/darwin-i386-cc/no-asm/crypto/buildinf.h +1 -1
  29. package/include/node/openssl/archs/darwin64-arm64-cc/asm/crypto/buildinf.h +1 -1
  30. package/include/node/openssl/archs/darwin64-arm64-cc/asm_avx2/crypto/buildinf.h +1 -1
  31. package/include/node/openssl/archs/darwin64-arm64-cc/no-asm/crypto/buildinf.h +1 -1
  32. package/include/node/openssl/archs/darwin64-x86_64-cc/asm/crypto/buildinf.h +1 -1
  33. package/include/node/openssl/archs/darwin64-x86_64-cc/asm_avx2/crypto/buildinf.h +1 -1
  34. package/include/node/openssl/archs/darwin64-x86_64-cc/no-asm/crypto/buildinf.h +1 -1
  35. package/include/node/openssl/archs/linux-aarch64/asm/crypto/buildinf.h +1 -1
  36. package/include/node/openssl/archs/linux-aarch64/asm_avx2/crypto/buildinf.h +1 -1
  37. package/include/node/openssl/archs/linux-aarch64/no-asm/crypto/buildinf.h +1 -1
  38. package/include/node/openssl/archs/linux-armv4/asm/crypto/buildinf.h +1 -1
  39. package/include/node/openssl/archs/linux-armv4/asm_avx2/crypto/buildinf.h +1 -1
  40. package/include/node/openssl/archs/linux-armv4/no-asm/crypto/buildinf.h +1 -1
  41. package/include/node/openssl/archs/linux-elf/asm/crypto/buildinf.h +1 -1
  42. package/include/node/openssl/archs/linux-elf/asm_avx2/crypto/buildinf.h +1 -1
  43. package/include/node/openssl/archs/linux-elf/no-asm/crypto/buildinf.h +1 -1
  44. package/include/node/openssl/archs/linux-ppc64le/asm/crypto/buildinf.h +1 -1
  45. package/include/node/openssl/archs/linux-ppc64le/asm_avx2/crypto/buildinf.h +1 -1
  46. package/include/node/openssl/archs/linux-ppc64le/no-asm/crypto/buildinf.h +1 -1
  47. package/include/node/openssl/archs/linux-x86_64/asm/crypto/buildinf.h +1 -1
  48. package/include/node/openssl/archs/linux-x86_64/asm_avx2/crypto/buildinf.h +1 -1
  49. package/include/node/openssl/archs/linux-x86_64/no-asm/crypto/buildinf.h +1 -1
  50. package/include/node/openssl/archs/linux32-s390x/asm/crypto/buildinf.h +1 -1
  51. package/include/node/openssl/archs/linux32-s390x/asm_avx2/crypto/buildinf.h +1 -1
  52. package/include/node/openssl/archs/linux32-s390x/no-asm/crypto/buildinf.h +1 -1
  53. package/include/node/openssl/archs/linux64-mips64/asm/crypto/buildinf.h +1 -1
  54. package/include/node/openssl/archs/linux64-mips64/asm_avx2/crypto/buildinf.h +1 -1
  55. package/include/node/openssl/archs/linux64-mips64/no-asm/crypto/buildinf.h +1 -1
  56. package/include/node/openssl/archs/linux64-riscv64/no-asm/crypto/buildinf.h +1 -1
  57. package/include/node/openssl/archs/linux64-s390x/asm/crypto/buildinf.h +1 -1
  58. package/include/node/openssl/archs/linux64-s390x/asm_avx2/crypto/buildinf.h +1 -1
  59. package/include/node/openssl/archs/linux64-s390x/no-asm/crypto/buildinf.h +1 -1
  60. package/include/node/openssl/archs/solaris-x86-gcc/asm/crypto/buildinf.h +1 -1
  61. package/include/node/openssl/archs/solaris-x86-gcc/asm_avx2/crypto/buildinf.h +1 -1
  62. package/include/node/openssl/archs/solaris-x86-gcc/no-asm/crypto/buildinf.h +1 -1
  63. package/include/node/openssl/archs/solaris64-x86_64-gcc/asm/crypto/buildinf.h +1 -1
  64. package/include/node/openssl/archs/solaris64-x86_64-gcc/asm_avx2/crypto/buildinf.h +1 -1
  65. package/include/node/openssl/archs/solaris64-x86_64-gcc/no-asm/crypto/buildinf.h +1 -1
  66. package/include/node/v8-array-buffer.h +59 -0
  67. package/include/node/v8-callbacks.h +14 -1
  68. package/include/node/v8-context.h +50 -3
  69. package/include/node/v8-data.h +1 -1
  70. package/include/node/v8-embedder-heap.h +0 -169
  71. package/include/node/v8-function-callback.h +69 -42
  72. package/include/node/v8-function.h +1 -0
  73. package/include/node/v8-internal.h +242 -150
  74. package/include/node/v8-isolate.h +30 -40
  75. package/include/node/v8-local-handle.h +81 -48
  76. package/include/node/v8-microtask-queue.h +5 -0
  77. package/include/node/v8-object.h +21 -3
  78. package/include/node/v8-persistent-handle.h +25 -16
  79. package/include/node/v8-platform.h +79 -10
  80. package/include/node/v8-primitive.h +19 -12
  81. package/include/node/v8-profiler.h +49 -31
  82. package/include/node/v8-script.h +29 -1
  83. package/include/node/v8-snapshot.h +4 -8
  84. package/include/node/v8-template.h +3 -1
  85. package/include/node/v8-traced-handle.h +22 -28
  86. package/include/node/v8-value.h +31 -4
  87. package/include/node/v8-version.h +4 -4
  88. package/include/node/v8-wasm.h +2 -1
  89. package/include/node/v8config.h +73 -2
  90. package/package.json +1 -1
  91. package/share/doc/node/gdbinit +4 -3
  92. package/share/man/man1/node.1 +17 -1
package/README.md CHANGED
@@ -158,6 +158,8 @@ For information about the governance of the Node.js project, see
158
158
 
159
159
  ### TSC (Technical Steering Committee)
160
160
 
161
+ #### TSC voting members
162
+
161
163
  <!--lint disable prohibited-strings-->
162
164
 
163
165
  * [aduh95](https://github.com/aduh95) -
@@ -168,14 +170,10 @@ For information about the governance of the Node.js project, see
168
170
  **Beth Griggs** <<bethanyngriggs@gmail.com>> (she/her)
169
171
  * [BridgeAR](https://github.com/BridgeAR) -
170
172
  **Ruben Bridgewater** <<ruben@bridgewater.de>> (he/him)
171
- * [ChALkeR](https://github.com/ChALkeR) -
172
- **Сковорода Никита Андреевич** <<chalkerx@gmail.com>> (he/him)
173
173
  * [cjihrig](https://github.com/cjihrig) -
174
174
  **Colin Ihrig** <<cjihrig@gmail.com>> (he/him)
175
175
  * [danielleadams](https://github.com/danielleadams) -
176
176
  **Danielle Adams** <<adamzdanielle@gmail.com>> (she/her)
177
- * [fhinkel](https://github.com/fhinkel) -
178
- **Franziska Hinkelmann** <<franziska.hinkelmann@gmail.com>> (she/her)
179
177
  * [GeoffreyBooth](https://github.com/geoffreybooth) -
180
178
  **Geoffrey Booth** <<webadmin@geoffreybooth.com>> (he/him)
181
179
  * [gireeshpunathil](https://github.com/gireeshpunathil) -
@@ -190,6 +188,8 @@ For information about the governance of the Node.js project, see
190
188
  **Matteo Collina** <<matteo.collina@gmail.com>> (he/him)
191
189
  * [mhdawson](https://github.com/mhdawson) -
192
190
  **Michael Dawson** <<midawson@redhat.com>> (he/him)
191
+ * [MoLow](https://github.com/MoLow) -
192
+ **Moshe Atlow** <<moshe@atlow.co.il>> (he/him)
193
193
  * [RafaelGSS](https://github.com/RafaelGSS) -
194
194
  **Rafael Gonzaga** <<rafael.nunu@hotmail.com>> (he/him)
195
195
  * [RaisinTen](https://github.com/RaisinTen) -
@@ -205,28 +205,43 @@ For information about the governance of the Node.js project, see
205
205
  * [Trott](https://github.com/Trott) -
206
206
  **Rich Trott** <<rtrott@gmail.com>> (he/him)
207
207
 
208
- <details>
209
-
210
- <summary>Emeriti</summary>
211
-
212
- ### TSC emeriti
208
+ #### TSC regular members
213
209
 
214
210
  * [addaleax](https://github.com/addaleax) -
215
211
  **Anna Henningsen** <<anna@addaleax.net>> (she/her)
216
212
  * [bnoordhuis](https://github.com/bnoordhuis) -
217
213
  **Ben Noordhuis** <<info@bnoordhuis.nl>>
218
- * [chrisdickinson](https://github.com/chrisdickinson) -
219
- **Chris Dickinson** <<christopher.s.dickinson@gmail.com>>
214
+ * [ChALkeR](https://github.com/ChALkeR) -
215
+ **Сковорода Никита Андреевич** <<chalkerx@gmail.com>> (he/him)
220
216
  * [codebytere](https://github.com/codebytere) -
221
217
  **Shelley Vohr** <<shelley.vohr@gmail.com>> (she/her)
222
218
  * [danbev](https://github.com/danbev) -
223
219
  **Daniel Bevenius** <<daniel.bevenius@gmail.com>> (he/him)
220
+ * [fhinkel](https://github.com/fhinkel) -
221
+ **Franziska Hinkelmann** <<franziska.hinkelmann@gmail.com>> (she/her)
222
+ * [gabrielschulhof](https://github.com/gabrielschulhof) -
223
+ **Gabriel Schulhof** <<gabrielschulhof@gmail.com>>
224
+ * [mscdex](https://github.com/mscdex) -
225
+ **Brian White** <<mscdex@mscdex.net>>
226
+ * [MylesBorins](https://github.com/MylesBorins) -
227
+ **Myles Borins** <<myles.borins@gmail.com>> (he/him)
228
+ * [rvagg](https://github.com/rvagg) -
229
+ **Rod Vagg** <<r@va.gg>>
230
+ * [TimothyGu](https://github.com/TimothyGu) -
231
+ **Tiancheng "Timothy" Gu** <<timothygu99@gmail.com>> (he/him)
232
+
233
+ <details>
234
+
235
+ <summary>TSC emeriti members</summary>
236
+
237
+ #### TSC emeriti members
238
+
239
+ * [chrisdickinson](https://github.com/chrisdickinson) -
240
+ **Chris Dickinson** <<christopher.s.dickinson@gmail.com>>
224
241
  * [evanlucas](https://github.com/evanlucas) -
225
242
  **Evan Lucas** <<evanlucas@me.com>> (he/him)
226
243
  * [Fishrock123](https://github.com/Fishrock123) -
227
244
  **Jeremiah Senkpiel** <<fishrock123@rocketmail.com>> (he/they)
228
- * [gabrielschulhof](https://github.com/gabrielschulhof) -
229
- **Gabriel Schulhof** <<gabrielschulhof@gmail.com>>
230
245
  * [gibfahn](https://github.com/gibfahn) -
231
246
  **Gibson Fahnestock** <<gibfahn@gmail.com>> (he/him)
232
247
  * [indutny](https://github.com/indutny) -
@@ -237,10 +252,6 @@ For information about the governance of the Node.js project, see
237
252
  **Josh Gavant** <<josh.gavant@outlook.com>>
238
253
  * [mmarchini](https://github.com/mmarchini) -
239
254
  **Mary Marchini** <<oss@mmarchini.me>> (she/her)
240
- * [mscdex](https://github.com/mscdex) -
241
- **Brian White** <<mscdex@mscdex.net>>
242
- * [MylesBorins](https://github.com/MylesBorins) -
243
- **Myles Borins** <<myles.borins@gmail.com>> (he/him)
244
255
  * [nebrius](https://github.com/nebrius) -
245
256
  **Bryan Hughes** <<bryan@nebri.us>>
246
257
  * [ofrobots](https://github.com/ofrobots) -
@@ -249,16 +260,12 @@ For information about the governance of the Node.js project, see
249
260
  **Alexis Campailla** <<orangemocha@nodejs.org>>
250
261
  * [piscisaureus](https://github.com/piscisaureus) -
251
262
  **Bert Belder** <<bertbelder@gmail.com>>
252
- * [rvagg](https://github.com/rvagg) -
253
- **Rod Vagg** <<r@va.gg>>
254
263
  * [sam-github](https://github.com/sam-github) -
255
264
  **Sam Roberts** <<vieuxtech@gmail.com>>
256
265
  * [shigeki](https://github.com/shigeki) -
257
266
  **Shigeki Ohtsu** <<ohtsu@ohtsu.org>> (he/him)
258
267
  * [thefourtheye](https://github.com/thefourtheye) -
259
268
  **Sakthipriyan Vairamani** <<thechargingvolcano@gmail.com>> (he/him)
260
- * [TimothyGu](https://github.com/TimothyGu) -
261
- **Tiancheng "Timothy" Gu** <<timothygu99@gmail.com>> (he/him)
262
269
  * [trevnorris](https://github.com/trevnorris) -
263
270
  **Trevor Norris** <<trev.norris@gmail.com>>
264
271
 
@@ -801,8 +808,6 @@ releases on a rotation basis as outlined in the
801
808
  * Datadog
802
809
  * [bengl](https://github.com/bengl) -
803
810
  **Bryan English** <<bryan@bryanenglish.com>> (he/him)
804
- * [vdeturckheim](https://github.com/vdeturckheim) -
805
- **Vladimir de Turckheim** <<vlad2t@hotmail.com>> (he/him)
806
811
  * NearForm
807
812
  * [RafaelGSS](https://github.com/RafaelGSS) -
808
813
  **Rafael Gonzaga** <<rafael.nunu@hotmail.com>> (he/him)
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.12',
39
+ 'v8_embedder_string': '-node.3',
40
40
 
41
41
  ##### V8 defaults for Node.js #####
42
42
 
@@ -10,7 +10,7 @@
10
10
  'enable_pgo_use': 'false',
11
11
  'error_on_warn': 'false',
12
12
  'force_dynamic_crt': 0,
13
- 'gas_version': '2.30',
13
+ 'gas_version': '2.35',
14
14
  'host_arch': 's390x',
15
15
  'icu_data_in': '../../deps/icu-tmp/icudt72l.dat',
16
16
  'icu_endianness': 'b',
@@ -73,13 +73,14 @@
73
73
  'lib/internal/async_hooks.js',
74
74
  'lib/internal/blob.js',
75
75
  'lib/internal/blocklist.js',
76
- 'lib/internal/bootstrap/browser.js',
77
- 'lib/internal/bootstrap/loaders.js',
78
76
  'lib/internal/bootstrap/node.js',
77
+ 'lib/internal/bootstrap/realm.js',
79
78
  'lib/internal/bootstrap/switches/does_not_own_process_state.js',
80
79
  'lib/internal/bootstrap/switches/does_own_process_state.js',
81
80
  'lib/internal/bootstrap/switches/is_main_thread.js',
82
81
  'lib/internal/bootstrap/switches/is_not_main_thread.js',
82
+ 'lib/internal/bootstrap/web/exposed-wildcard.js',
83
+ 'lib/internal/bootstrap/web/exposed-window-or-worker.js',
83
84
  'lib/internal/buffer.js',
84
85
  'lib/internal/child_process.js',
85
86
  'lib/internal/child_process/serialization.js',
@@ -112,6 +113,7 @@
112
113
  'lib/internal/crypto/sig.js',
113
114
  'lib/internal/crypto/util.js',
114
115
  'lib/internal/crypto/webcrypto.js',
116
+ 'lib/internal/crypto/webidl.js',
115
117
  'lib/internal/crypto/x509.js',
116
118
  'lib/internal/debugger/inspect.js',
117
119
  'lib/internal/debugger/inspect_client.js',
@@ -124,6 +126,7 @@
124
126
  'lib/internal/error_serdes.js',
125
127
  'lib/internal/errors.js',
126
128
  'lib/internal/event_target.js',
129
+ 'lib/internal/events/symbols.js',
127
130
  'lib/internal/file.js',
128
131
  'lib/internal/fixed_queue.js',
129
132
  'lib/internal/freelist.js',
@@ -151,7 +154,7 @@
151
154
  'lib/internal/legacy/processbinding.js',
152
155
  'lib/internal/linkedlist.js',
153
156
  'lib/internal/main/check_syntax.js',
154
- 'lib/internal/main/environment.js',
157
+ 'lib/internal/main/embedding.js',
155
158
  'lib/internal/main/eval_stdin.js',
156
159
  'lib/internal/main/eval_string.js',
157
160
  'lib/internal/main/inspect.js',
@@ -160,7 +163,6 @@
160
163
  'lib/internal/main/prof_process.js',
161
164
  'lib/internal/main/repl.js',
162
165
  'lib/internal/main/run_main_module.js',
163
- 'lib/internal/main/single_executable_application.js',
164
166
  'lib/internal/main/test_runner.js',
165
167
  'lib/internal/main/watch_mode.js',
166
168
  'lib/internal/main/worker_thread.js',
@@ -180,8 +182,10 @@
180
182
  'lib/internal/modules/esm/module_map.js',
181
183
  'lib/internal/modules/esm/package_config.js',
182
184
  'lib/internal/modules/esm/resolve.js',
185
+ 'lib/internal/modules/esm/shared_constants.js',
183
186
  'lib/internal/modules/esm/translators.js',
184
187
  'lib/internal/modules/esm/utils.js',
188
+ 'lib/internal/modules/esm/worker.js',
185
189
  'lib/internal/modules/helpers.js',
186
190
  'lib/internal/modules/package_json_reader.js',
187
191
  'lib/internal/modules/run_main.js',
@@ -206,6 +210,7 @@
206
210
  'lib/internal/process/esm_loader.js',
207
211
  'lib/internal/process/execution.js',
208
212
  'lib/internal/process/per_thread.js',
213
+ 'lib/internal/process/permission.js',
209
214
  'lib/internal/process/policy.js',
210
215
  'lib/internal/process/pre_execution.js',
211
216
  'lib/internal/process/promises.js',
@@ -276,6 +281,7 @@
276
281
  'lib/internal/util/colors.js',
277
282
  'lib/internal/util/comparisons.js',
278
283
  'lib/internal/util/debuglog.js',
284
+ 'lib/internal/util/embedding.js',
279
285
  'lib/internal/util/inspect.js',
280
286
  'lib/internal/util/inspector.js',
281
287
  'lib/internal/util/iterable_weak_map.js',
@@ -324,6 +330,7 @@
324
330
  'lib/string_decoder.js',
325
331
  'lib/sys.js',
326
332
  'lib/test.js',
333
+ 'lib/test/reporters.js',
327
334
  'lib/timers.js',
328
335
  'lib/timers/promises.js',
329
336
  'lib/tls.js',
@@ -337,7 +344,7 @@
337
344
  'lib/wasi.js',
338
345
  'lib/worker_threads.js',
339
346
  'lib/zlib.js'],
340
- 'node_module_version': 111,
347
+ 'node_module_version': 115,
341
348
  'node_no_browser_globals': 'false',
342
349
  'node_prefix': '/',
343
350
  'node_release_urlbase': 'https://nodejs.org/download/release/',
@@ -364,7 +371,7 @@
364
371
  'openssl_is_fips': 'false',
365
372
  'openssl_quic': 'true',
366
373
  'ossfuzz': 'false',
367
- 'shlib_suffix': 'so.111',
374
+ 'shlib_suffix': 'so.115',
368
375
  'single_executable_application': 'true',
369
376
  'target_arch': 's390x',
370
377
  'v8_enable_31bit_smis_on_64bit_arch': 0,
@@ -282,12 +282,12 @@ class V8_PLATFORM_EXPORT TracingController
282
282
  const char* name, uint64_t handle) override;
283
283
 
284
284
  static const char* GetCategoryGroupName(const uint8_t* category_enabled_flag);
285
- #endif // !defined(V8_USE_PERFETTO)
286
285
 
287
286
  void AddTraceStateObserver(
288
287
  v8::TracingController::TraceStateObserver* observer) override;
289
288
  void RemoveTraceStateObserver(
290
289
  v8::TracingController::TraceStateObserver* observer) override;
290
+ #endif // !defined(V8_USE_PERFETTO)
291
291
 
292
292
  void StartTracing(TraceConfig* trace_config);
293
293
  void StopTracing();
@@ -307,7 +307,6 @@ class V8_PLATFORM_EXPORT TracingController
307
307
  std::unique_ptr<base::Mutex> mutex_;
308
308
  std::unique_ptr<TraceConfig> trace_config_;
309
309
  std::atomic_bool recording_{false};
310
- std::unordered_set<v8::TracingController::TraceStateObserver*> observers_;
311
310
 
312
311
  #if defined(V8_USE_PERFETTO)
313
312
  std::ostream* output_stream_ = nullptr;
@@ -316,6 +315,7 @@ class V8_PLATFORM_EXPORT TracingController
316
315
  TraceEventListener* listener_for_testing_ = nullptr;
317
316
  std::unique_ptr<perfetto::TracingSession> tracing_session_;
318
317
  #else // !defined(V8_USE_PERFETTO)
318
+ std::unordered_set<v8::TracingController::TraceStateObserver*> observers_;
319
319
  std::unique_ptr<TraceBuffer> trace_buffer_;
320
320
  #endif // !defined(V8_USE_PERFETTO)
321
321
 
@@ -75,6 +75,9 @@
75
75
  #include "v8-platform.h" // NOLINT(build/include_order)
76
76
  #include "node_version.h" // NODE_MODULE_VERSION
77
77
 
78
+ #define NAPI_EXPERIMENTAL
79
+ #include "node_api.h"
80
+
78
81
  #include <functional>
79
82
  #include <memory>
80
83
  #include <ostream>
@@ -121,8 +124,6 @@
121
124
  // Forward-declare libuv loop
122
125
  struct uv_loop_s;
123
126
 
124
- struct napi_module;
125
-
126
127
  // Forward-declare these functions now to stop MSVS from becoming
127
128
  // terminally confused when it's done in node_internals.h
128
129
  namespace node {
@@ -229,10 +230,8 @@ class Environment;
229
230
  class MultiIsolatePlatform;
230
231
  class InitializationResultImpl;
231
232
 
232
- namespace ProcessFlags {
233
- // TODO(addaleax): Switch to uint32_t to match std::atomic<uint32_t>
234
- // init_process_flags in node.cc
235
- enum Flags : uint64_t {
233
+ namespace ProcessInitializationFlags {
234
+ enum Flags : uint32_t {
236
235
  kNoFlags = 0,
237
236
  // Enable stdio inheritance, which is disabled by default.
238
237
  // This flag is also implied by kNoStdioInitialization.
@@ -272,9 +271,8 @@ enum Flags : uint64_t {
272
271
  kNoParseGlobalDebugVariables | kNoAdjustResourceLimits |
273
272
  kNoUseLargePages | kNoPrintHelpOrVersionOutput,
274
273
  };
275
- } // namespace ProcessFlags
276
- // TODO(addaleax): Make this the canonical name, as it is more descriptive.
277
- namespace ProcessInitializationFlags = ProcessFlags;
274
+ } // namespace ProcessInitializationFlags
275
+ namespace ProcessFlags = ProcessInitializationFlags; // Legacy alias.
278
276
 
279
277
  namespace StopFlags {
280
278
  enum Flags : uint32_t {
@@ -320,8 +318,8 @@ NODE_EXTERN int Start(int argc, char* argv[]);
320
318
 
321
319
  // Tear down Node.js while it is running (there are active handles
322
320
  // in the loop and / or actively executing JavaScript code).
323
- NODE_EXTERN int Stop(Environment* env);
324
- NODE_EXTERN int Stop(Environment* env, StopFlags::Flags flags);
321
+ NODE_EXTERN int Stop(Environment* env,
322
+ StopFlags::Flags flags = StopFlags::kNoFlags);
325
323
 
326
324
  // Set up per-process state needed to run Node.js. This will consume arguments
327
325
  // from argv, fill exec_argv, and possibly add errors resulting from parsing
@@ -466,7 +464,7 @@ enum IsolateSettingsFlags {
466
464
  DETAILED_SOURCE_POSITIONS_FOR_PROFILING = 1 << 1,
467
465
  SHOULD_NOT_SET_PROMISE_REJECTION_CALLBACK = 1 << 2,
468
466
  SHOULD_NOT_SET_PREPARE_STACK_TRACE_CALLBACK = 1 << 3,
469
- ALLOW_MODIFY_CODE_GENERATION_FROM_STRINGS_CALLBACK = 1 << 4,
467
+ ALLOW_MODIFY_CODE_GENERATION_FROM_STRINGS_CALLBACK = 0, /* legacy no-op */
470
468
  };
471
469
 
472
470
  struct IsolateSettings {
@@ -568,25 +566,17 @@ NODE_EXTERN void SetIsolateUpForNode(v8::Isolate* isolate);
568
566
  // This is a convenience method equivalent to using SetIsolateCreateParams(),
569
567
  // Isolate::Allocate(), MultiIsolatePlatform::RegisterIsolate(),
570
568
  // Isolate::Initialize(), and SetIsolateUpForNode().
571
- NODE_EXTERN v8::Isolate* NewIsolate(ArrayBufferAllocator* allocator,
572
- struct uv_loop_s* event_loop,
573
- MultiIsolatePlatform* platform = nullptr);
574
- // TODO(addaleax): Merge with the function definition above.
575
- NODE_EXTERN v8::Isolate* NewIsolate(ArrayBufferAllocator* allocator,
576
- struct uv_loop_s* event_loop,
577
- MultiIsolatePlatform* platform,
578
- const EmbedderSnapshotData* snapshot_data,
579
- const IsolateSettings& settings = {});
580
569
  NODE_EXTERN v8::Isolate* NewIsolate(
581
- std::shared_ptr<ArrayBufferAllocator> allocator,
570
+ ArrayBufferAllocator* allocator,
582
571
  struct uv_loop_s* event_loop,
583
- MultiIsolatePlatform* platform);
584
- // TODO(addaleax): Merge with the function definition above.
572
+ MultiIsolatePlatform* platform,
573
+ const EmbedderSnapshotData* snapshot_data = nullptr,
574
+ const IsolateSettings& settings = {});
585
575
  NODE_EXTERN v8::Isolate* NewIsolate(
586
576
  std::shared_ptr<ArrayBufferAllocator> allocator,
587
577
  struct uv_loop_s* event_loop,
588
578
  MultiIsolatePlatform* platform,
589
- const EmbedderSnapshotData* snapshot_data,
579
+ const EmbedderSnapshotData* snapshot_data = nullptr,
590
580
  const IsolateSettings& settings = {});
591
581
 
592
582
  // Creates a new context with Node.js-specific tweaks.
@@ -606,14 +596,8 @@ NODE_EXTERN IsolateData* CreateIsolateData(
606
596
  v8::Isolate* isolate,
607
597
  struct uv_loop_s* loop,
608
598
  MultiIsolatePlatform* platform = nullptr,
609
- ArrayBufferAllocator* allocator = nullptr);
610
- // TODO(addaleax): Merge with the function definition above.
611
- NODE_EXTERN IsolateData* CreateIsolateData(
612
- v8::Isolate* isolate,
613
- struct uv_loop_s* loop,
614
- MultiIsolatePlatform* platform,
615
- ArrayBufferAllocator* allocator,
616
- const EmbedderSnapshotData* snapshot_data);
599
+ ArrayBufferAllocator* allocator = nullptr,
600
+ const EmbedderSnapshotData* snapshot_data = nullptr);
617
601
  NODE_EXTERN void FreeIsolateData(IsolateData* isolate_data);
618
602
 
619
603
  struct ThreadId {
@@ -705,6 +689,7 @@ NODE_EXTERN std::unique_ptr<InspectorParentHandle> GetInspectorParentHandle(
705
689
  struct StartExecutionCallbackInfo {
706
690
  v8::Local<v8::Object> process_object;
707
691
  v8::Local<v8::Function> native_require;
692
+ v8::Local<v8::Function> run_cjs;
708
693
  };
709
694
 
710
695
  using StartExecutionCallback =
@@ -714,8 +699,7 @@ NODE_EXTERN v8::MaybeLocal<v8::Value> LoadEnvironment(
714
699
  Environment* env,
715
700
  StartExecutionCallback cb);
716
701
  NODE_EXTERN v8::MaybeLocal<v8::Value> LoadEnvironment(
717
- Environment* env,
718
- const char* main_script_source_utf8);
702
+ Environment* env, std::string_view main_script_source_utf8);
719
703
  NODE_EXTERN void FreeEnvironment(Environment* env);
720
704
 
721
705
  // Set a callback that is called when process.exit() is called from JS,
@@ -1252,6 +1236,9 @@ NODE_EXTERN void AddLinkedBinding(Environment* env,
1252
1236
  const char* name,
1253
1237
  addon_context_register_func fn,
1254
1238
  void* priv);
1239
+ NODE_EXTERN void AddLinkedBinding(Environment* env,
1240
+ const char* name,
1241
+ napi_addon_register_func fn);
1255
1242
 
1256
1243
  /* Registers a callback with the passed-in Environment instance. The callback
1257
1244
  * is called after the event loop exits, but before the VM is disposed.
@@ -31,6 +31,7 @@ struct uv_loop_s; // Forward declaration.
31
31
  typedef napi_value(NAPI_CDECL* napi_addon_register_func)(napi_env env,
32
32
  napi_value exports);
33
33
 
34
+ // Used by deprecated registration method napi_module_register.
34
35
  typedef struct napi_module {
35
36
  int nm_version;
36
37
  unsigned int nm_flags;
@@ -43,70 +44,15 @@ typedef struct napi_module {
43
44
 
44
45
  #define NAPI_MODULE_VERSION 1
45
46
 
46
- #if defined(_MSC_VER)
47
- #if defined(__cplusplus)
48
- #define NAPI_C_CTOR(fn) \
49
- static void NAPI_CDECL fn(void); \
50
- namespace { \
51
- struct fn##_ { \
52
- fn##_() { fn(); } \
53
- } fn##_v_; \
54
- } \
55
- static void NAPI_CDECL fn(void)
56
- #else // !defined(__cplusplus)
57
- #pragma section(".CRT$XCU", read)
58
- // The NAPI_C_CTOR macro defines a function fn that is called during CRT
59
- // initialization.
60
- // C does not support dynamic initialization of static variables and this code
61
- // simulates C++ behavior. Exporting the function pointer prevents it from being
62
- // optimized. See for details:
63
- // https://docs.microsoft.com/en-us/cpp/c-runtime-library/crt-initialization?view=msvc-170
64
- #define NAPI_C_CTOR(fn) \
65
- static void NAPI_CDECL fn(void); \
66
- __declspec(dllexport, allocate(".CRT$XCU")) void(NAPI_CDECL * fn##_)(void) = \
67
- fn; \
68
- static void NAPI_CDECL fn(void)
69
- #endif // defined(__cplusplus)
70
- #else
71
- #define NAPI_C_CTOR(fn) \
72
- static void fn(void) __attribute__((constructor)); \
73
- static void fn(void)
74
- #endif
75
-
76
- #define NAPI_MODULE_X(modname, regfunc, priv, flags) \
77
- EXTERN_C_START \
78
- static napi_module _module = { \
79
- NAPI_MODULE_VERSION, \
80
- flags, \
81
- __FILE__, \
82
- regfunc, \
83
- #modname, \
84
- priv, \
85
- {0}, \
86
- }; \
87
- NAPI_C_CTOR(_register_##modname) { napi_module_register(&_module); } \
88
- EXTERN_C_END
89
-
90
47
  #define NAPI_MODULE_INITIALIZER_X(base, version) \
91
48
  NAPI_MODULE_INITIALIZER_X_HELPER(base, version)
92
49
  #define NAPI_MODULE_INITIALIZER_X_HELPER(base, version) base##version
93
50
 
94
51
  #ifdef __wasm32__
95
- #define NAPI_WASM_INITIALIZER \
96
- NAPI_MODULE_INITIALIZER_X(napi_register_wasm_v, NAPI_MODULE_VERSION)
97
- #define NAPI_MODULE(modname, regfunc) \
98
- EXTERN_C_START \
99
- NAPI_MODULE_EXPORT napi_value NAPI_WASM_INITIALIZER(napi_env env, \
100
- napi_value exports) { \
101
- return regfunc(env, exports); \
102
- } \
103
- EXTERN_C_END
52
+ #define NAPI_MODULE_INITIALIZER_BASE napi_register_wasm_v
104
53
  #else
105
- #define NAPI_MODULE(modname, regfunc) \
106
- NAPI_MODULE_X(modname, regfunc, NULL, 0) // NOLINT (readability/null_usage)
107
- #endif
108
-
109
54
  #define NAPI_MODULE_INITIALIZER_BASE napi_register_module_v
55
+ #endif
110
56
 
111
57
  #define NAPI_MODULE_INITIALIZER \
112
58
  NAPI_MODULE_INITIALIZER_X(NAPI_MODULE_INITIALIZER_BASE, NAPI_MODULE_VERSION)
@@ -116,12 +62,24 @@ typedef struct napi_module {
116
62
  NAPI_MODULE_EXPORT napi_value NAPI_MODULE_INITIALIZER(napi_env env, \
117
63
  napi_value exports); \
118
64
  EXTERN_C_END \
119
- NAPI_MODULE(NODE_GYP_MODULE_NAME, NAPI_MODULE_INITIALIZER) \
120
65
  napi_value NAPI_MODULE_INITIALIZER(napi_env env, napi_value exports)
121
66
 
67
+ #define NAPI_MODULE(modname, regfunc) \
68
+ NAPI_MODULE_INIT() { return regfunc(env, exports); }
69
+
70
+ // Deprecated. Use NAPI_MODULE.
71
+ #define NAPI_MODULE_X(modname, regfunc, priv, flags) \
72
+ NAPI_MODULE(modname, regfunc)
73
+
122
74
  EXTERN_C_START
123
75
 
124
- NAPI_EXTERN void NAPI_CDECL napi_module_register(napi_module* mod);
76
+ // Deprecated. Replaced by symbol-based registration defined by NAPI_MODULE
77
+ // and NAPI_MODULE_INIT macros.
78
+ #if defined(__cplusplus) && __cplusplus >= 201402L
79
+ [[deprecated]]
80
+ #endif
81
+ NAPI_EXTERN void NAPI_CDECL
82
+ napi_module_register(napi_module* mod);
125
83
 
126
84
  NAPI_EXTERN NAPI_NO_RETURN void NAPI_CDECL
127
85
  napi_fatal_error(const char* location,
@@ -22,9 +22,9 @@
22
22
  #ifndef SRC_NODE_VERSION_H_
23
23
  #define SRC_NODE_VERSION_H_
24
24
 
25
- #define NODE_MAJOR_VERSION 19
26
- #define NODE_MINOR_VERSION 8
27
- #define NODE_PATCH_VERSION 1
25
+ #define NODE_MAJOR_VERSION 20
26
+ #define NODE_MINOR_VERSION 0
27
+ #define NODE_PATCH_VERSION 0
28
28
 
29
29
  #define NODE_VERSION_IS_LTS 0
30
30
  #define NODE_VERSION_LTS_CODENAME ""
@@ -89,7 +89,7 @@
89
89
  * version matching should open a pull request to reserve a number in this
90
90
  * registry.
91
91
  */
92
- #define NODE_MODULE_VERSION 111
92
+ #define NODE_MODULE_VERSION 115
93
93
 
94
94
  // The NAPI_VERSION provided by this version of the runtime. This is the version
95
95
  // which the Node binary being built supports.
@@ -11,7 +11,7 @@
11
11
  */
12
12
 
13
13
  #define PLATFORM "platform: BSD-x86"
14
- #define DATE "built on: Sun Feb 12 18:13:28 2023 UTC"
14
+ #define DATE "built on: Mon Feb 13 14:04:08 2023 UTC"
15
15
 
16
16
  /*
17
17
  * Generate compiler_flags as an array of individual characters. This is a
@@ -11,7 +11,7 @@
11
11
  */
12
12
 
13
13
  #define PLATFORM "platform: BSD-x86"
14
- #define DATE "built on: Sun Feb 12 18:13:40 2023 UTC"
14
+ #define DATE "built on: Mon Feb 13 14:04:20 2023 UTC"
15
15
 
16
16
  /*
17
17
  * Generate compiler_flags as an array of individual characters. This is a
@@ -11,7 +11,7 @@
11
11
  */
12
12
 
13
13
  #define PLATFORM "platform: BSD-x86"
14
- #define DATE "built on: Sun Feb 12 18:13:52 2023 UTC"
14
+ #define DATE "built on: Mon Feb 13 14:04:32 2023 UTC"
15
15
 
16
16
  /*
17
17
  * Generate compiler_flags as an array of individual characters. This is a
@@ -11,7 +11,7 @@
11
11
  */
12
12
 
13
13
  #define PLATFORM "platform: BSD-x86_64"
14
- #define DATE "built on: Sun Feb 12 18:14:03 2023 UTC"
14
+ #define DATE "built on: Mon Feb 13 14:04:42 2023 UTC"
15
15
 
16
16
  /*
17
17
  * Generate compiler_flags as an array of individual characters. This is a
@@ -11,7 +11,7 @@
11
11
  */
12
12
 
13
13
  #define PLATFORM "platform: BSD-x86_64"
14
- #define DATE "built on: Sun Feb 12 18:14:17 2023 UTC"
14
+ #define DATE "built on: Mon Feb 13 14:04:56 2023 UTC"
15
15
 
16
16
  /*
17
17
  * Generate compiler_flags as an array of individual characters. This is a
@@ -11,7 +11,7 @@
11
11
  */
12
12
 
13
13
  #define PLATFORM "platform: BSD-x86_64"
14
- #define DATE "built on: Sun Feb 12 18:14:31 2023 UTC"
14
+ #define DATE "built on: Mon Feb 13 14:05:10 2023 UTC"
15
15
 
16
16
  /*
17
17
  * Generate compiler_flags as an array of individual characters. This is a
@@ -11,7 +11,7 @@
11
11
  */
12
12
 
13
13
  #define PLATFORM "platform: "
14
- #define DATE "built on: Sun Feb 12 18:22:49 2023 UTC"
14
+ #define DATE "built on: Mon Feb 13 14:13:24 2023 UTC"
15
15
 
16
16
  /*
17
17
  * Generate compiler_flags as an array of individual characters. This is a
@@ -11,7 +11,7 @@
11
11
  */
12
12
 
13
13
  #define PLATFORM "platform: "
14
- #define DATE "built on: Sun Feb 12 18:23:00 2023 UTC"
14
+ #define DATE "built on: Mon Feb 13 14:13:35 2023 UTC"
15
15
 
16
16
  /*
17
17
  * Generate compiler_flags as an array of individual characters. This is a
@@ -11,7 +11,7 @@
11
11
  */
12
12
 
13
13
  #define PLATFORM "platform: "
14
- #define DATE "built on: Sun Feb 12 18:23:11 2023 UTC"
14
+ #define DATE "built on: Mon Feb 13 14:13:46 2023 UTC"
15
15
 
16
16
  /*
17
17
  * Generate compiler_flags as an array of individual characters. This is a
@@ -11,7 +11,7 @@
11
11
  */
12
12
 
13
13
  #define PLATFORM "platform: VC-WIN64-ARM"
14
- #define DATE "built on: Sun Feb 12 18:23:21 2023 UTC"
14
+ #define DATE "built on: Mon Feb 13 14:13:56 2023 UTC"
15
15
 
16
16
  /*
17
17
  * Generate compiler_flags as an array of individual characters. This is a
@@ -11,7 +11,7 @@
11
11
  */
12
12
 
13
13
  #define PLATFORM "platform: "
14
- #define DATE "built on: Sun Feb 12 18:22:11 2023 UTC"
14
+ #define DATE "built on: Mon Feb 13 14:12:47 2023 UTC"
15
15
 
16
16
  /*
17
17
  * Generate compiler_flags as an array of individual characters. This is a