node-aix-ppc64 18.16.1 → 18.17.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.
@@ -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 {
@@ -361,10 +362,25 @@ inline std::unique_ptr<InitializationResult> InitializeOncePerProcess(
361
362
  }
362
363
 
363
364
  enum OptionEnvvarSettings {
364
- kAllowedInEnvironment,
365
- kDisallowedInEnvironment
365
+ // Allow the options to be set via the environment variable, like
366
+ // `NODE_OPTIONS`.
367
+ kAllowedInEnvvar = 0,
368
+ // Disallow the options to be set via the environment variable, like
369
+ // `NODE_OPTIONS`.
370
+ kDisallowedInEnvvar = 1,
371
+ // Deprecated, use kAllowedInEnvvar instead.
372
+ kAllowedInEnvironment = kAllowedInEnvvar,
373
+ // Deprecated, use kDisallowedInEnvvar instead.
374
+ kDisallowedInEnvironment = kDisallowedInEnvvar,
366
375
  };
367
376
 
377
+ // Process the arguments and set up the per-process options.
378
+ // If the `settings` is set as OptionEnvvarSettings::kAllowedInEnvvar, the
379
+ // options that are allowed in the environment variable are processed. Options
380
+ // that are disallowed to be set via environment variable are processed as
381
+ // errors.
382
+ // Otherwise all the options that are disallowed (and those are allowed) to be
383
+ // set via environment variable are processed.
368
384
  NODE_EXTERN int ProcessGlobalArgs(std::vector<std::string>* args,
369
385
  std::vector<std::string>* exec_args,
370
386
  std::vector<std::string>* errors,
@@ -629,7 +645,8 @@ NODE_EXTERN Environment* GetCurrentEnvironment(v8::Local<v8::Context> context);
629
645
  NODE_EXTERN IsolateData* GetEnvironmentIsolateData(Environment* env);
630
646
  NODE_EXTERN ArrayBufferAllocator* GetArrayBufferAllocator(IsolateData* data);
631
647
 
632
- NODE_EXTERN void OnFatalError(const char* location, const char* message);
648
+ [[noreturn]] NODE_EXTERN void OnFatalError(const char* location,
649
+ const char* message);
633
650
  NODE_EXTERN void PromiseRejectCallback(v8::PromiseRejectMessage message);
634
651
  NODE_EXTERN bool AllowWasmCodeGenerationCallback(v8::Local<v8::Context> context,
635
652
  v8::Local<v8::String>);
@@ -1081,6 +1098,11 @@ NODE_EXTERN void AddLinkedBinding(Environment* env,
1081
1098
  const char* name,
1082
1099
  addon_context_register_func fn,
1083
1100
  void* priv);
1101
+ NODE_EXTERN void AddLinkedBinding(
1102
+ Environment* env,
1103
+ const char* name,
1104
+ napi_addon_register_func fn,
1105
+ int32_t module_api_version = NODE_API_DEFAULT_MODULE_API_VERSION);
1084
1106
 
1085
1107
  /* Registers a callback with the passed-in Environment instance. The callback
1086
1108
  * is called after the event loop exits, but before the VM is disposed.
@@ -30,7 +30,9 @@ struct uv_loop_s; // Forward declaration.
30
30
 
31
31
  typedef napi_value(NAPI_CDECL* napi_addon_register_func)(napi_env env,
32
32
  napi_value exports);
33
+ typedef int32_t(NAPI_CDECL* node_api_addon_get_api_version_func)();
33
34
 
35
+ // Used by deprecated registration method napi_module_register.
34
36
  typedef struct napi_module {
35
37
  int nm_version;
36
38
  unsigned int nm_flags;
@@ -43,85 +45,51 @@ typedef struct napi_module {
43
45
 
44
46
  #define NAPI_MODULE_VERSION 1
45
47
 
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
48
  #define NAPI_MODULE_INITIALIZER_X(base, version) \
91
49
  NAPI_MODULE_INITIALIZER_X_HELPER(base, version)
92
50
  #define NAPI_MODULE_INITIALIZER_X_HELPER(base, version) base##version
93
51
 
94
52
  #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
53
+ #define NAPI_MODULE_INITIALIZER_BASE napi_register_wasm_v
104
54
  #else
105
- #define NAPI_MODULE(modname, regfunc) \
106
- NAPI_MODULE_X(modname, regfunc, NULL, 0) // NOLINT (readability/null_usage)
55
+ #define NAPI_MODULE_INITIALIZER_BASE napi_register_module_v
107
56
  #endif
108
57
 
109
- #define NAPI_MODULE_INITIALIZER_BASE napi_register_module_v
58
+ #define NODE_API_MODULE_GET_API_VERSION_BASE node_api_module_get_api_version_v
110
59
 
111
60
  #define NAPI_MODULE_INITIALIZER \
112
61
  NAPI_MODULE_INITIALIZER_X(NAPI_MODULE_INITIALIZER_BASE, NAPI_MODULE_VERSION)
113
62
 
63
+ #define NODE_API_MODULE_GET_API_VERSION \
64
+ NAPI_MODULE_INITIALIZER_X(NODE_API_MODULE_GET_API_VERSION_BASE, \
65
+ NAPI_MODULE_VERSION)
66
+
114
67
  #define NAPI_MODULE_INIT() \
115
68
  EXTERN_C_START \
69
+ NAPI_MODULE_EXPORT int32_t NODE_API_MODULE_GET_API_VERSION() { \
70
+ return NAPI_VERSION; \
71
+ } \
116
72
  NAPI_MODULE_EXPORT napi_value NAPI_MODULE_INITIALIZER(napi_env env, \
117
73
  napi_value exports); \
118
74
  EXTERN_C_END \
119
- NAPI_MODULE(NODE_GYP_MODULE_NAME, NAPI_MODULE_INITIALIZER) \
120
75
  napi_value NAPI_MODULE_INITIALIZER(napi_env env, napi_value exports)
121
76
 
77
+ #define NAPI_MODULE(modname, regfunc) \
78
+ NAPI_MODULE_INIT() { return regfunc(env, exports); }
79
+
80
+ // Deprecated. Use NAPI_MODULE.
81
+ #define NAPI_MODULE_X(modname, regfunc, priv, flags) \
82
+ NAPI_MODULE(modname, regfunc)
83
+
122
84
  EXTERN_C_START
123
85
 
124
- NAPI_EXTERN void NAPI_CDECL napi_module_register(napi_module* mod);
86
+ // Deprecated. Replaced by symbol-based registration defined by NAPI_MODULE
87
+ // and NAPI_MODULE_INIT macros.
88
+ #if defined(__cplusplus) && __cplusplus >= 201402L
89
+ [[deprecated]]
90
+ #endif
91
+ NAPI_EXTERN void NAPI_CDECL
92
+ napi_module_register(napi_module* mod);
125
93
 
126
94
  NAPI_EXTERN NAPI_NO_RETURN void NAPI_CDECL
127
95
  napi_fatal_error(const char* location,
@@ -280,12 +248,12 @@ napi_remove_async_cleanup_hook(napi_async_cleanup_hook_handle remove_handle);
280
248
 
281
249
  #endif // NAPI_VERSION >= 8
282
250
 
283
- #ifdef NAPI_EXPERIMENTAL
251
+ #if NAPI_VERSION >= 9
284
252
 
285
253
  NAPI_EXTERN napi_status NAPI_CDECL
286
254
  node_api_get_module_file_name(napi_env env, const char** result);
287
255
 
288
- #endif // NAPI_EXPERIMENTAL
256
+ #endif // NAPI_VERSION >= 9
289
257
 
290
258
  EXTERN_C_END
291
259
 
@@ -23,8 +23,8 @@
23
23
  #define SRC_NODE_VERSION_H_
24
24
 
25
25
  #define NODE_MAJOR_VERSION 18
26
- #define NODE_MINOR_VERSION 16
27
- #define NODE_PATCH_VERSION 1
26
+ #define NODE_MINOR_VERSION 17
27
+ #define NODE_PATCH_VERSION 0
28
28
 
29
29
  #define NODE_VERSION_IS_LTS 1
30
30
  #define NODE_VERSION_LTS_CODENAME "Hydrogen"
@@ -93,6 +93,10 @@
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.
96
- #define NAPI_VERSION 8
96
+ #define NAPI_VERSION 9
97
+
98
+ // Node API modules use NAPI_VERSION 8 by default if it is not explicitly
99
+ // specified. It must be always 8.
100
+ #define NODE_API_DEFAULT_MODULE_API_VERSION 8
97
101
 
98
102
  #endif // SRC_NODE_VERSION_H_
@@ -253,7 +253,11 @@
253
253
  #endif
254
254
 
255
255
  #ifdef Z_SOLO
256
- typedef unsigned long z_size_t;
256
+ # ifdef _WIN64
257
+ typedef unsigned long long z_size_t;
258
+ # else
259
+ typedef unsigned long z_size_t;
260
+ # endif
257
261
  #else
258
262
  # define z_longlong long long
259
263
  # if defined(NO_SIZE_T)
@@ -1,5 +1,5 @@
1
1
  /* zlib.h -- interface of the 'zlib' general purpose compression library
2
- version 1.2.13, October 13th, 2022
2
+ version 1.2.13.1, October xxth, 2022
3
3
 
4
4
  Copyright (C) 1995-2022 Jean-loup Gailly and Mark Adler
5
5
 
@@ -37,12 +37,12 @@
37
37
  extern "C" {
38
38
  #endif
39
39
 
40
- #define ZLIB_VERSION "1.2.13"
41
- #define ZLIB_VERNUM 0x12d0
40
+ #define ZLIB_VERSION "1.2.13.1-motley"
41
+ #define ZLIB_VERNUM 0x12d1
42
42
  #define ZLIB_VER_MAJOR 1
43
43
  #define ZLIB_VER_MINOR 2
44
44
  #define ZLIB_VER_REVISION 13
45
- #define ZLIB_VER_SUBREVISION 0
45
+ #define ZLIB_VER_SUBREVISION 1
46
46
 
47
47
  /*
48
48
  The 'zlib' compression library provides in-memory compression and
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-aix-ppc64",
3
- "version": "v18.16.1",
3
+ "version": "v18.17.0",
4
4
  "description": "node",
5
5
  "bin": {
6
6
  "node": "bin/node"
@@ -179,7 +179,8 @@ Select extension resolution algorithm for ES Modules; either 'explicit' (default
179
179
  Enable experimental ES module support in VM module.
180
180
  .
181
181
  .It Fl -experimental-wasi-unstable-preview1
182
- Enable experimental WebAssembly System Interface support.
182
+ Enable experimental WebAssembly System Interface support. This
183
+ flag is no longer required as WASI is enabled by default.
183
184
  .
184
185
  .It Fl -experimental-wasm-modules
185
186
  Enable experimental WebAssembly module support.