node-linux-arm64 17.9.1 → 18.2.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 (211) hide show
  1. package/CHANGELOG.md +418 -1554
  2. package/LICENSE +111 -9
  3. package/README.md +20 -11
  4. package/bin/node +0 -0
  5. package/include/node/common.gypi +2 -2
  6. package/include/node/config.gypi +15 -5
  7. package/include/node/js_native_api.h +367 -363
  8. package/include/node/js_native_api_types.h +13 -4
  9. package/include/node/libplatform/libplatform.h +0 -11
  10. package/include/node/libplatform/v8-tracing.h +0 -1
  11. package/include/node/node.h +17 -3
  12. package/include/node/node_api.h +110 -90
  13. package/include/node/node_api_types.h +8 -10
  14. package/include/node/node_version.h +4 -4
  15. package/include/node/openssl/archs/BSD-x86/asm/crypto/buildinf.h +1 -1
  16. package/include/node/openssl/archs/BSD-x86/asm_avx2/crypto/buildinf.h +1 -1
  17. package/include/node/openssl/archs/BSD-x86/no-asm/crypto/buildinf.h +1 -1
  18. package/include/node/openssl/archs/BSD-x86_64/asm/crypto/buildinf.h +1 -1
  19. package/include/node/openssl/archs/BSD-x86_64/asm_avx2/crypto/buildinf.h +1 -1
  20. package/include/node/openssl/archs/BSD-x86_64/no-asm/crypto/buildinf.h +1 -1
  21. package/include/node/openssl/archs/VC-WIN32/asm/crypto/buildinf.h +1 -1
  22. package/include/node/openssl/archs/VC-WIN32/asm_avx2/crypto/buildinf.h +1 -1
  23. package/include/node/openssl/archs/VC-WIN32/no-asm/crypto/buildinf.h +1 -1
  24. package/include/node/openssl/archs/VC-WIN64-ARM/no-asm/crypto/buildinf.h +1 -1
  25. package/include/node/openssl/archs/VC-WIN64A/asm/crypto/buildinf.h +1 -1
  26. package/include/node/openssl/archs/VC-WIN64A/asm_avx2/crypto/buildinf.h +1 -1
  27. package/include/node/openssl/archs/VC-WIN64A/no-asm/crypto/buildinf.h +1 -1
  28. package/include/node/openssl/archs/aix-gcc/asm/crypto/buildinf.h +1 -1
  29. package/include/node/openssl/archs/aix-gcc/asm/include/openssl/crypto.h +0 -2
  30. package/include/node/openssl/archs/aix-gcc/asm/include/openssl/opensslv.h +5 -5
  31. package/include/node/openssl/archs/aix-gcc/asm/include/openssl/ssl.h +0 -11
  32. package/include/node/openssl/archs/aix-gcc/asm/include/openssl/x509.h +4 -4
  33. package/include/node/openssl/archs/aix-gcc/asm_avx2/crypto/buildinf.h +1 -1
  34. package/include/node/openssl/archs/aix-gcc/asm_avx2/include/openssl/crypto.h +0 -2
  35. package/include/node/openssl/archs/aix-gcc/asm_avx2/include/openssl/opensslv.h +5 -5
  36. package/include/node/openssl/archs/aix-gcc/asm_avx2/include/openssl/ssl.h +0 -11
  37. package/include/node/openssl/archs/aix-gcc/asm_avx2/include/openssl/x509.h +4 -4
  38. package/include/node/openssl/archs/aix-gcc/no-asm/crypto/buildinf.h +1 -1
  39. package/include/node/openssl/archs/aix-gcc/no-asm/include/openssl/crypto.h +0 -2
  40. package/include/node/openssl/archs/aix-gcc/no-asm/include/openssl/opensslv.h +5 -5
  41. package/include/node/openssl/archs/aix-gcc/no-asm/include/openssl/ssl.h +0 -11
  42. package/include/node/openssl/archs/aix-gcc/no-asm/include/openssl/x509.h +4 -4
  43. package/include/node/openssl/archs/aix64-gcc-as/asm/crypto/buildinf.h +1 -1
  44. package/include/node/openssl/archs/aix64-gcc-as/asm_avx2/crypto/buildinf.h +1 -1
  45. package/include/node/openssl/archs/aix64-gcc-as/no-asm/crypto/buildinf.h +1 -1
  46. package/include/node/openssl/archs/darwin-i386-cc/asm/crypto/buildinf.h +1 -1
  47. package/include/node/openssl/archs/darwin-i386-cc/asm_avx2/crypto/buildinf.h +1 -1
  48. package/include/node/openssl/archs/darwin-i386-cc/no-asm/crypto/buildinf.h +1 -1
  49. package/include/node/openssl/archs/darwin64-arm64-cc/asm/crypto/buildinf.h +1 -1
  50. package/include/node/openssl/archs/darwin64-arm64-cc/asm_avx2/crypto/buildinf.h +1 -1
  51. package/include/node/openssl/archs/darwin64-arm64-cc/no-asm/crypto/buildinf.h +1 -1
  52. package/include/node/openssl/archs/darwin64-x86_64-cc/asm/crypto/buildinf.h +1 -1
  53. package/include/node/openssl/archs/darwin64-x86_64-cc/asm_avx2/crypto/buildinf.h +1 -1
  54. package/include/node/openssl/archs/darwin64-x86_64-cc/no-asm/crypto/buildinf.h +1 -1
  55. package/include/node/openssl/archs/linux-aarch64/asm/crypto/buildinf.h +1 -1
  56. package/include/node/openssl/archs/linux-aarch64/asm_avx2/crypto/buildinf.h +1 -1
  57. package/include/node/openssl/archs/linux-aarch64/no-asm/crypto/buildinf.h +1 -1
  58. package/include/node/openssl/archs/linux-armv4/asm/crypto/buildinf.h +1 -1
  59. package/include/node/openssl/archs/linux-armv4/asm_avx2/crypto/buildinf.h +1 -1
  60. package/include/node/openssl/archs/linux-armv4/no-asm/crypto/buildinf.h +1 -1
  61. package/include/node/openssl/archs/linux-elf/asm/crypto/buildinf.h +1 -1
  62. package/include/node/openssl/archs/linux-elf/asm_avx2/crypto/buildinf.h +1 -1
  63. package/include/node/openssl/archs/linux-elf/no-asm/crypto/buildinf.h +1 -1
  64. package/include/node/openssl/archs/linux-ppc/asm/crypto/buildinf.h +1 -1
  65. package/include/node/openssl/archs/linux-ppc/asm/include/openssl/crypto.h +0 -2
  66. package/include/node/openssl/archs/linux-ppc/asm/include/openssl/opensslv.h +5 -5
  67. package/include/node/openssl/archs/linux-ppc/asm/include/openssl/ssl.h +0 -11
  68. package/include/node/openssl/archs/linux-ppc/asm/include/openssl/x509.h +4 -4
  69. package/include/node/openssl/archs/linux-ppc/asm_avx2/crypto/buildinf.h +1 -1
  70. package/include/node/openssl/archs/linux-ppc/asm_avx2/include/openssl/crypto.h +0 -2
  71. package/include/node/openssl/archs/linux-ppc/asm_avx2/include/openssl/opensslv.h +5 -5
  72. package/include/node/openssl/archs/linux-ppc/asm_avx2/include/openssl/ssl.h +0 -11
  73. package/include/node/openssl/archs/linux-ppc/asm_avx2/include/openssl/x509.h +4 -4
  74. package/include/node/openssl/archs/linux-ppc/no-asm/crypto/buildinf.h +1 -1
  75. package/include/node/openssl/archs/linux-ppc/no-asm/include/openssl/crypto.h +0 -2
  76. package/include/node/openssl/archs/linux-ppc/no-asm/include/openssl/opensslv.h +5 -5
  77. package/include/node/openssl/archs/linux-ppc/no-asm/include/openssl/ssl.h +0 -11
  78. package/include/node/openssl/archs/linux-ppc/no-asm/include/openssl/x509.h +4 -4
  79. package/include/node/openssl/archs/linux-ppc64/asm/crypto/buildinf.h +1 -1
  80. package/include/node/openssl/archs/linux-ppc64/asm/include/openssl/crypto.h +0 -2
  81. package/include/node/openssl/archs/linux-ppc64/asm/include/openssl/opensslv.h +5 -5
  82. package/include/node/openssl/archs/linux-ppc64/asm/include/openssl/ssl.h +0 -11
  83. package/include/node/openssl/archs/linux-ppc64/asm/include/openssl/x509.h +4 -4
  84. package/include/node/openssl/archs/linux-ppc64/asm_avx2/crypto/buildinf.h +1 -1
  85. package/include/node/openssl/archs/linux-ppc64/asm_avx2/include/openssl/crypto.h +0 -2
  86. package/include/node/openssl/archs/linux-ppc64/asm_avx2/include/openssl/opensslv.h +5 -5
  87. package/include/node/openssl/archs/linux-ppc64/asm_avx2/include/openssl/ssl.h +0 -11
  88. package/include/node/openssl/archs/linux-ppc64/asm_avx2/include/openssl/x509.h +4 -4
  89. package/include/node/openssl/archs/linux-ppc64/no-asm/crypto/buildinf.h +1 -1
  90. package/include/node/openssl/archs/linux-ppc64/no-asm/include/openssl/crypto.h +0 -2
  91. package/include/node/openssl/archs/linux-ppc64/no-asm/include/openssl/opensslv.h +5 -5
  92. package/include/node/openssl/archs/linux-ppc64/no-asm/include/openssl/ssl.h +0 -11
  93. package/include/node/openssl/archs/linux-ppc64/no-asm/include/openssl/x509.h +4 -4
  94. package/include/node/openssl/archs/linux-ppc64le/asm/crypto/buildinf.h +1 -1
  95. package/include/node/openssl/archs/linux-ppc64le/asm_avx2/crypto/buildinf.h +1 -1
  96. package/include/node/openssl/archs/linux-ppc64le/no-asm/crypto/buildinf.h +1 -1
  97. package/include/node/openssl/archs/linux-x86_64/asm/crypto/buildinf.h +1 -1
  98. package/include/node/openssl/archs/linux-x86_64/asm_avx2/crypto/buildinf.h +1 -1
  99. package/include/node/openssl/archs/linux-x86_64/no-asm/crypto/buildinf.h +1 -1
  100. package/include/node/openssl/archs/linux32-s390x/asm/crypto/buildinf.h +1 -1
  101. package/include/node/openssl/archs/linux32-s390x/asm_avx2/crypto/buildinf.h +1 -1
  102. package/include/node/openssl/archs/linux32-s390x/no-asm/crypto/buildinf.h +1 -1
  103. package/include/node/openssl/archs/linux64-mips64/asm/crypto/buildinf.h +1 -1
  104. package/include/node/openssl/archs/linux64-mips64/asm_avx2/crypto/buildinf.h +1 -1
  105. package/include/node/openssl/archs/linux64-mips64/no-asm/crypto/buildinf.h +1 -1
  106. package/include/node/openssl/archs/linux64-riscv64/no-asm/crypto/buildinf.h +1 -1
  107. package/include/node/openssl/archs/linux64-s390x/asm/crypto/buildinf.h +1 -1
  108. package/include/node/openssl/archs/linux64-s390x/asm_avx2/crypto/buildinf.h +1 -1
  109. package/include/node/openssl/archs/linux64-s390x/no-asm/crypto/buildinf.h +1 -1
  110. package/include/node/openssl/archs/solaris-x86-gcc/asm/crypto/buildinf.h +1 -1
  111. package/include/node/openssl/archs/solaris-x86-gcc/asm_avx2/crypto/buildinf.h +1 -1
  112. package/include/node/openssl/archs/solaris-x86-gcc/no-asm/crypto/buildinf.h +1 -1
  113. package/include/node/openssl/archs/solaris64-x86_64-gcc/asm/crypto/buildinf.h +1 -1
  114. package/include/node/openssl/archs/solaris64-x86_64-gcc/asm_avx2/crypto/buildinf.h +1 -1
  115. package/include/node/openssl/archs/solaris64-x86_64-gcc/no-asm/crypto/buildinf.h +1 -1
  116. package/include/node/openssl/asn1_asm.h +0 -6
  117. package/include/node/openssl/asn1_no-asm.h +0 -6
  118. package/include/node/openssl/asn1t_asm.h +0 -6
  119. package/include/node/openssl/asn1t_no-asm.h +0 -6
  120. package/include/node/openssl/bio_asm.h +0 -6
  121. package/include/node/openssl/bio_no-asm.h +0 -6
  122. package/include/node/openssl/bn_conf_asm.h +0 -6
  123. package/include/node/openssl/bn_conf_no-asm.h +0 -6
  124. package/include/node/openssl/cmp_asm.h +0 -6
  125. package/include/node/openssl/cmp_no-asm.h +0 -6
  126. package/include/node/openssl/cms_asm.h +0 -6
  127. package/include/node/openssl/cms_no-asm.h +0 -6
  128. package/include/node/openssl/conf_asm.h +0 -6
  129. package/include/node/openssl/conf_no-asm.h +0 -6
  130. package/include/node/openssl/configuration_asm.h +0 -6
  131. package/include/node/openssl/configuration_no-asm.h +0 -6
  132. package/include/node/openssl/crmf_asm.h +0 -6
  133. package/include/node/openssl/crmf_no-asm.h +0 -6
  134. package/include/node/openssl/crypto_asm.h +0 -6
  135. package/include/node/openssl/crypto_no-asm.h +0 -6
  136. package/include/node/openssl/ct_asm.h +0 -6
  137. package/include/node/openssl/ct_no-asm.h +0 -6
  138. package/include/node/openssl/dso_conf_asm.h +0 -6
  139. package/include/node/openssl/dso_conf_no-asm.h +0 -6
  140. package/include/node/openssl/err_asm.h +0 -6
  141. package/include/node/openssl/err_no-asm.h +0 -6
  142. package/include/node/openssl/ess_asm.h +0 -6
  143. package/include/node/openssl/ess_no-asm.h +0 -6
  144. package/include/node/openssl/fipskey_asm.h +0 -6
  145. package/include/node/openssl/fipskey_no-asm.h +0 -6
  146. package/include/node/openssl/lhash_asm.h +0 -6
  147. package/include/node/openssl/lhash_no-asm.h +0 -6
  148. package/include/node/openssl/ocsp_asm.h +0 -6
  149. package/include/node/openssl/ocsp_no-asm.h +0 -6
  150. package/include/node/openssl/opensslconf.h +15 -21
  151. package/include/node/openssl/opensslv_asm.h +0 -6
  152. package/include/node/openssl/opensslv_no-asm.h +0 -6
  153. package/include/node/openssl/pkcs12_asm.h +0 -6
  154. package/include/node/openssl/pkcs12_no-asm.h +0 -6
  155. package/include/node/openssl/pkcs7_asm.h +0 -6
  156. package/include/node/openssl/pkcs7_no-asm.h +0 -6
  157. package/include/node/openssl/safestack_asm.h +0 -6
  158. package/include/node/openssl/safestack_no-asm.h +0 -6
  159. package/include/node/openssl/srp_asm.h +0 -6
  160. package/include/node/openssl/srp_no-asm.h +0 -6
  161. package/include/node/openssl/ssl_asm.h +0 -6
  162. package/include/node/openssl/ssl_no-asm.h +0 -6
  163. package/include/node/openssl/ui_asm.h +0 -6
  164. package/include/node/openssl/ui_no-asm.h +0 -6
  165. package/include/node/openssl/x509_asm.h +0 -6
  166. package/include/node/openssl/x509_no-asm.h +0 -6
  167. package/include/node/openssl/x509_vfy_asm.h +0 -6
  168. package/include/node/openssl/x509_vfy_no-asm.h +0 -6
  169. package/include/node/openssl/x509v3_asm.h +0 -6
  170. package/include/node/openssl/x509v3_no-asm.h +0 -6
  171. package/include/node/v8-array-buffer.h +2 -2
  172. package/include/node/v8-callbacks.h +26 -6
  173. package/include/node/v8-context.h +3 -14
  174. package/include/node/v8-data.h +15 -0
  175. package/include/node/v8-debug.h +21 -4
  176. package/include/node/v8-embedder-heap.h +10 -30
  177. package/include/node/v8-embedder-state-scope.h +51 -0
  178. package/include/node/v8-exception.h +0 -7
  179. package/include/node/v8-function.h +3 -0
  180. package/include/node/v8-initialization.h +64 -31
  181. package/include/node/v8-internal.h +189 -102
  182. package/include/node/v8-isolate.h +49 -2
  183. package/include/node/v8-local-handle.h +0 -4
  184. package/include/node/v8-locker.h +2 -1
  185. package/include/node/v8-message.h +19 -44
  186. package/include/node/v8-object.h +11 -6
  187. package/include/node/v8-platform.h +365 -6
  188. package/include/node/v8-primitive.h +14 -6
  189. package/include/node/v8-profiler.h +78 -2
  190. package/include/node/v8-script.h +27 -51
  191. package/include/node/v8-snapshot.h +0 -2
  192. package/include/node/v8-statistics.h +2 -0
  193. package/include/node/v8-template.h +31 -4
  194. package/include/node/v8-traced-handle.h +39 -224
  195. package/include/node/v8-unwinder.h +10 -7
  196. package/include/node/v8-value-serializer.h +32 -2
  197. package/include/node/v8-version.h +4 -4
  198. package/include/node/v8-wasm.h +13 -1
  199. package/include/node/v8-weak-callback-info.h +20 -6
  200. package/include/node/v8.h +0 -1
  201. package/include/node/v8config.h +56 -11
  202. package/package.json +1 -1
  203. package/share/doc/node/gdbinit +14 -6
  204. package/share/man/man1/node.1 +11 -4
  205. package/include/node/openssl/archs/aix64-gcc/asm/crypto/buildinf.h +0 -38
  206. package/include/node/openssl/archs/aix64-gcc/asm/include/progs.h +0 -507
  207. package/include/node/openssl/archs/aix64-gcc/asm_avx2/crypto/buildinf.h +0 -39
  208. package/include/node/openssl/archs/aix64-gcc/asm_avx2/include/progs.h +0 -507
  209. package/include/node/openssl/archs/aix64-gcc/no-asm/crypto/buildinf.h +0 -27
  210. package/include/node/openssl/archs/aix64-gcc/no-asm/include/progs.h +0 -507
  211. package/include/node/openssl/opensslconf_no-asm.h +0 -47
@@ -11,6 +11,14 @@
11
11
  typedef uint16_t char16_t;
12
12
  #endif
13
13
 
14
+ #ifndef NAPI_CDECL
15
+ #ifdef _WIN32
16
+ #define NAPI_CDECL __cdecl
17
+ #else
18
+ #define NAPI_CDECL
19
+ #endif
20
+ #endif
21
+
14
22
  // JSVM API types are all opaque pointers for ABI stability
15
23
  // typedef undefined structs instead of void* for compile time type safety
16
24
  typedef struct napi_env__* napi_env;
@@ -100,10 +108,11 @@ typedef enum {
100
108
  // * the definition of `napi_status` in doc/api/n-api.md to reflect the newly
101
109
  // added value(s).
102
110
 
103
- typedef napi_value (*napi_callback)(napi_env env, napi_callback_info info);
104
- typedef void (*napi_finalize)(napi_env env,
105
- void* finalize_data,
106
- void* finalize_hint);
111
+ typedef napi_value(NAPI_CDECL* napi_callback)(napi_env env,
112
+ napi_callback_info info);
113
+ typedef void(NAPI_CDECL* napi_finalize)(napi_env env,
114
+ void* finalize_data,
115
+ void* finalize_hint);
107
116
 
108
117
  typedef struct {
109
118
  // One of utf8name or name should be NULL.
@@ -89,17 +89,6 @@ V8_PLATFORM_EXPORT void RunIdleTasks(v8::Platform* platform,
89
89
  v8::Isolate* isolate,
90
90
  double idle_time_in_seconds);
91
91
 
92
- /**
93
- * Attempts to set the tracing controller for the given platform.
94
- *
95
- * The |platform| has to be created using |NewDefaultPlatform|.
96
- *
97
- */
98
- V8_DEPRECATE_SOON("Access the DefaultPlatform directly")
99
- V8_PLATFORM_EXPORT void SetTracingController(
100
- v8::Platform* platform,
101
- v8::platform::tracing::TracingController* tracing_controller);
102
-
103
92
  /**
104
93
  * Notifies the given platform about the Isolate getting deleted soon. Has to be
105
94
  * called for all Isolates which are deleted - unless we're shutting down the
@@ -37,7 +37,6 @@ const int kTraceMaxNumArgs = 2;
37
37
  class V8_PLATFORM_EXPORT TraceObject {
38
38
  public:
39
39
  union ArgValue {
40
- V8_DEPRECATED("use as_uint ? true : false") bool as_bool;
41
40
  uint64_t as_uint;
42
41
  int64_t as_int;
43
42
  double as_double;
@@ -32,6 +32,16 @@
32
32
  # define NODE_EXTERN __attribute__((visibility("default")))
33
33
  #endif
34
34
 
35
+ // Declarations annotated with NODE_EXTERN_PRIVATE do not form part of
36
+ // the public API. They are implementation details that can and will
37
+ // change between releases, even in semver patch releases. Do not use
38
+ // any such symbol in external code.
39
+ #ifdef NODE_SHARED_MODE
40
+ #define NODE_EXTERN_PRIVATE NODE_EXTERN
41
+ #else
42
+ #define NODE_EXTERN_PRIVATE
43
+ #endif
44
+
35
45
  #ifdef BUILDING_NODE_EXTENSION
36
46
  # undef BUILDING_V8_SHARED
37
47
  # undef BUILDING_UV_SHARED
@@ -440,6 +450,8 @@ enum Flags : uint64_t {
440
450
  // do not expect to have their behaviors changed because of globally
441
451
  // installed modules.
442
452
  kNoGlobalSearchPaths = 1 << 7,
453
+ // Do not export browser globals like setTimeout, console, etc.
454
+ kNoBrowserGlobals = 1 << 8,
443
455
  // Controls whether or not the Environment should call V8Inspector::create().
444
456
  // This control is needed by embedders who may not want to initialize the V8
445
457
  // inspector in situations where one has already been created,
@@ -825,11 +837,13 @@ extern "C" NODE_EXTERN void node_module_register(void* mod);
825
837
  #endif
826
838
 
827
839
  #if defined(_MSC_VER)
828
- #pragma section(".CRT$XCU", read)
829
840
  #define NODE_C_CTOR(fn) \
830
841
  NODE_CTOR_PREFIX void __cdecl fn(void); \
831
- __declspec(dllexport, allocate(".CRT$XCU")) \
832
- void (__cdecl*fn ## _)(void) = fn; \
842
+ namespace { \
843
+ struct fn##_ { \
844
+ fn##_() { fn(); }; \
845
+ } fn##_v_; \
846
+ } \
833
847
  NODE_CTOR_PREFIX void __cdecl fn(void)
834
848
  #else
835
849
  #define NODE_C_CTOR(fn) \
@@ -28,8 +28,8 @@ struct uv_loop_s; // Forward declaration.
28
28
  #define NAPI_NO_RETURN
29
29
  #endif
30
30
 
31
- typedef napi_value (*napi_addon_register_func)(napi_env env,
32
- napi_value exports);
31
+ typedef napi_value(NAPI_CDECL* napi_addon_register_func)(napi_env env,
32
+ napi_value exports);
33
33
 
34
34
  typedef struct napi_module {
35
35
  int nm_version;
@@ -44,12 +44,29 @@ typedef struct napi_module {
44
44
  #define NAPI_MODULE_VERSION 1
45
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)
47
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
48
64
  #define NAPI_C_CTOR(fn) \
49
- static void __cdecl fn(void); \
50
- __declspec(dllexport, allocate(".CRT$XCU")) void(__cdecl * fn##_)(void) = \
65
+ static void NAPI_CDECL fn(void); \
66
+ __declspec(dllexport, allocate(".CRT$XCU")) void(NAPI_CDECL * fn##_)(void) = \
51
67
  fn; \
52
- static void __cdecl fn(void)
68
+ static void NAPI_CDECL fn(void)
69
+ #endif // defined(__cplusplus)
53
70
  #else
54
71
  #define NAPI_C_CTOR(fn) \
55
72
  static void fn(void) __attribute__((constructor)); \
@@ -104,102 +121,105 @@ typedef struct napi_module {
104
121
 
105
122
  EXTERN_C_START
106
123
 
107
- NAPI_EXTERN void napi_module_register(napi_module* mod);
124
+ NAPI_EXTERN void NAPI_CDECL napi_module_register(napi_module* mod);
108
125
 
109
- NAPI_EXTERN NAPI_NO_RETURN void napi_fatal_error(const char* location,
110
- size_t location_len,
111
- const char* message,
112
- size_t message_len);
126
+ NAPI_EXTERN NAPI_NO_RETURN void NAPI_CDECL
127
+ napi_fatal_error(const char* location,
128
+ size_t location_len,
129
+ const char* message,
130
+ size_t message_len);
113
131
 
114
132
  // Methods for custom handling of async operations
115
- NAPI_EXTERN napi_status napi_async_init(napi_env env,
116
- napi_value async_resource,
117
- napi_value async_resource_name,
118
- napi_async_context* result);
119
-
120
- NAPI_EXTERN napi_status napi_async_destroy(napi_env env,
121
- napi_async_context async_context);
122
-
123
- NAPI_EXTERN napi_status napi_make_callback(napi_env env,
124
- napi_async_context async_context,
125
- napi_value recv,
126
- napi_value func,
127
- size_t argc,
128
- const napi_value* argv,
129
- napi_value* result);
133
+ NAPI_EXTERN napi_status NAPI_CDECL
134
+ napi_async_init(napi_env env,
135
+ napi_value async_resource,
136
+ napi_value async_resource_name,
137
+ napi_async_context* result);
138
+
139
+ NAPI_EXTERN napi_status NAPI_CDECL
140
+ napi_async_destroy(napi_env env, napi_async_context async_context);
141
+
142
+ NAPI_EXTERN napi_status NAPI_CDECL
143
+ napi_make_callback(napi_env env,
144
+ napi_async_context async_context,
145
+ napi_value recv,
146
+ napi_value func,
147
+ size_t argc,
148
+ const napi_value* argv,
149
+ napi_value* result);
130
150
 
131
151
  // Methods to provide node::Buffer functionality with napi types
132
- NAPI_EXTERN napi_status napi_create_buffer(napi_env env,
133
- size_t length,
134
- void** data,
135
- napi_value* result);
136
- NAPI_EXTERN napi_status napi_create_external_buffer(napi_env env,
137
- size_t length,
138
- void* data,
139
- napi_finalize finalize_cb,
140
- void* finalize_hint,
141
- napi_value* result);
142
- NAPI_EXTERN napi_status napi_create_buffer_copy(napi_env env,
143
- size_t length,
144
- const void* data,
145
- void** result_data,
146
- napi_value* result);
147
- NAPI_EXTERN napi_status napi_is_buffer(napi_env env,
148
- napi_value value,
149
- bool* result);
150
- NAPI_EXTERN napi_status napi_get_buffer_info(napi_env env,
151
- napi_value value,
152
- void** data,
153
- size_t* length);
152
+ NAPI_EXTERN napi_status NAPI_CDECL napi_create_buffer(napi_env env,
153
+ size_t length,
154
+ void** data,
155
+ napi_value* result);
156
+ NAPI_EXTERN napi_status NAPI_CDECL
157
+ napi_create_external_buffer(napi_env env,
158
+ size_t length,
159
+ void* data,
160
+ napi_finalize finalize_cb,
161
+ void* finalize_hint,
162
+ napi_value* result);
163
+ NAPI_EXTERN napi_status NAPI_CDECL napi_create_buffer_copy(napi_env env,
164
+ size_t length,
165
+ const void* data,
166
+ void** result_data,
167
+ napi_value* result);
168
+ NAPI_EXTERN napi_status NAPI_CDECL napi_is_buffer(napi_env env,
169
+ napi_value value,
170
+ bool* result);
171
+ NAPI_EXTERN napi_status NAPI_CDECL napi_get_buffer_info(napi_env env,
172
+ napi_value value,
173
+ void** data,
174
+ size_t* length);
154
175
 
155
176
  // Methods to manage simple async operations
156
- NAPI_EXTERN
157
- napi_status napi_create_async_work(napi_env env,
158
- napi_value async_resource,
159
- napi_value async_resource_name,
160
- napi_async_execute_callback execute,
161
- napi_async_complete_callback complete,
162
- void* data,
163
- napi_async_work* result);
164
- NAPI_EXTERN napi_status napi_delete_async_work(napi_env env,
165
- napi_async_work work);
166
- NAPI_EXTERN napi_status napi_queue_async_work(napi_env env,
167
- napi_async_work work);
168
- NAPI_EXTERN napi_status napi_cancel_async_work(napi_env env,
169
- napi_async_work work);
177
+ NAPI_EXTERN napi_status NAPI_CDECL
178
+ napi_create_async_work(napi_env env,
179
+ napi_value async_resource,
180
+ napi_value async_resource_name,
181
+ napi_async_execute_callback execute,
182
+ napi_async_complete_callback complete,
183
+ void* data,
184
+ napi_async_work* result);
185
+ NAPI_EXTERN napi_status NAPI_CDECL napi_delete_async_work(napi_env env,
186
+ napi_async_work work);
187
+ NAPI_EXTERN napi_status NAPI_CDECL napi_queue_async_work(napi_env env,
188
+ napi_async_work work);
189
+ NAPI_EXTERN napi_status NAPI_CDECL napi_cancel_async_work(napi_env env,
190
+ napi_async_work work);
170
191
 
171
192
  // version management
172
- NAPI_EXTERN
173
- napi_status napi_get_node_version(napi_env env,
174
- const napi_node_version** version);
193
+ NAPI_EXTERN napi_status NAPI_CDECL
194
+ napi_get_node_version(napi_env env, const napi_node_version** version);
175
195
 
176
196
  #if NAPI_VERSION >= 2
177
197
 
178
198
  // Return the current libuv event loop for a given environment
179
- NAPI_EXTERN napi_status napi_get_uv_event_loop(napi_env env,
180
- struct uv_loop_s** loop);
199
+ NAPI_EXTERN napi_status NAPI_CDECL
200
+ napi_get_uv_event_loop(napi_env env, struct uv_loop_s** loop);
181
201
 
182
202
  #endif // NAPI_VERSION >= 2
183
203
 
184
204
  #if NAPI_VERSION >= 3
185
205
 
186
- NAPI_EXTERN napi_status napi_fatal_exception(napi_env env, napi_value err);
206
+ NAPI_EXTERN napi_status NAPI_CDECL napi_fatal_exception(napi_env env,
207
+ napi_value err);
187
208
 
188
- NAPI_EXTERN napi_status napi_add_env_cleanup_hook(napi_env env,
189
- void (*fun)(void* arg),
190
- void* arg);
209
+ NAPI_EXTERN napi_status NAPI_CDECL napi_add_env_cleanup_hook(
210
+ napi_env env, void(NAPI_CDECL* fun)(void* arg), void* arg);
191
211
 
192
- NAPI_EXTERN napi_status napi_remove_env_cleanup_hook(napi_env env,
193
- void (*fun)(void* arg),
194
- void* arg);
212
+ NAPI_EXTERN napi_status NAPI_CDECL napi_remove_env_cleanup_hook(
213
+ napi_env env, void(NAPI_CDECL* fun)(void* arg), void* arg);
195
214
 
196
- NAPI_EXTERN napi_status napi_open_callback_scope(napi_env env,
197
- napi_value resource_object,
198
- napi_async_context context,
199
- napi_callback_scope* result);
215
+ NAPI_EXTERN napi_status NAPI_CDECL
216
+ napi_open_callback_scope(napi_env env,
217
+ napi_value resource_object,
218
+ napi_async_context context,
219
+ napi_callback_scope* result);
200
220
 
201
- NAPI_EXTERN napi_status napi_close_callback_scope(napi_env env,
202
- napi_callback_scope scope);
221
+ NAPI_EXTERN napi_status NAPI_CDECL
222
+ napi_close_callback_scope(napi_env env, napi_callback_scope scope);
203
223
 
204
224
  #endif // NAPI_VERSION >= 3
205
225
 
@@ -207,7 +227,7 @@ NAPI_EXTERN napi_status napi_close_callback_scope(napi_env env,
207
227
 
208
228
  #ifndef __wasm32__
209
229
  // Calling into JS from other threads
210
- NAPI_EXTERN napi_status
230
+ NAPI_EXTERN napi_status NAPI_CDECL
211
231
  napi_create_threadsafe_function(napi_env env,
212
232
  napi_value func,
213
233
  napi_value async_resource,
@@ -220,24 +240,24 @@ napi_create_threadsafe_function(napi_env env,
220
240
  napi_threadsafe_function_call_js call_js_cb,
221
241
  napi_threadsafe_function* result);
222
242
 
223
- NAPI_EXTERN napi_status napi_get_threadsafe_function_context(
243
+ NAPI_EXTERN napi_status NAPI_CDECL napi_get_threadsafe_function_context(
224
244
  napi_threadsafe_function func, void** result);
225
245
 
226
- NAPI_EXTERN napi_status
246
+ NAPI_EXTERN napi_status NAPI_CDECL
227
247
  napi_call_threadsafe_function(napi_threadsafe_function func,
228
248
  void* data,
229
249
  napi_threadsafe_function_call_mode is_blocking);
230
250
 
231
- NAPI_EXTERN napi_status
251
+ NAPI_EXTERN napi_status NAPI_CDECL
232
252
  napi_acquire_threadsafe_function(napi_threadsafe_function func);
233
253
 
234
- NAPI_EXTERN napi_status napi_release_threadsafe_function(
254
+ NAPI_EXTERN napi_status NAPI_CDECL napi_release_threadsafe_function(
235
255
  napi_threadsafe_function func, napi_threadsafe_function_release_mode mode);
236
256
 
237
- NAPI_EXTERN napi_status
257
+ NAPI_EXTERN napi_status NAPI_CDECL
238
258
  napi_unref_threadsafe_function(napi_env env, napi_threadsafe_function func);
239
259
 
240
- NAPI_EXTERN napi_status
260
+ NAPI_EXTERN napi_status NAPI_CDECL
241
261
  napi_ref_threadsafe_function(napi_env env, napi_threadsafe_function func);
242
262
  #endif // __wasm32__
243
263
 
@@ -245,21 +265,21 @@ napi_ref_threadsafe_function(napi_env env, napi_threadsafe_function func);
245
265
 
246
266
  #if NAPI_VERSION >= 8
247
267
 
248
- NAPI_EXTERN napi_status
268
+ NAPI_EXTERN napi_status NAPI_CDECL
249
269
  napi_add_async_cleanup_hook(napi_env env,
250
270
  napi_async_cleanup_hook hook,
251
271
  void* arg,
252
272
  napi_async_cleanup_hook_handle* remove_handle);
253
273
 
254
- NAPI_EXTERN napi_status
274
+ NAPI_EXTERN napi_status NAPI_CDECL
255
275
  napi_remove_async_cleanup_hook(napi_async_cleanup_hook_handle remove_handle);
256
276
 
257
277
  #endif // NAPI_VERSION >= 8
258
278
 
259
279
  #ifdef NAPI_EXPERIMENTAL
260
280
 
261
- NAPI_EXTERN napi_status node_api_get_module_file_name(napi_env env,
262
- const char** result);
281
+ NAPI_EXTERN napi_status NAPI_CDECL
282
+ node_api_get_module_file_name(napi_env env, const char** result);
263
283
 
264
284
  #endif // NAPI_EXPERIMENTAL
265
285
 
@@ -22,15 +22,13 @@ typedef enum {
22
22
  } napi_threadsafe_function_call_mode;
23
23
  #endif // NAPI_VERSION >= 4
24
24
 
25
- typedef void (*napi_async_execute_callback)(napi_env env, void* data);
26
- typedef void (*napi_async_complete_callback)(napi_env env,
27
- napi_status status,
28
- void* data);
25
+ typedef void(NAPI_CDECL* napi_async_execute_callback)(napi_env env, void* data);
26
+ typedef void(NAPI_CDECL* napi_async_complete_callback)(napi_env env,
27
+ napi_status status,
28
+ void* data);
29
29
  #if NAPI_VERSION >= 4
30
- typedef void (*napi_threadsafe_function_call_js)(napi_env env,
31
- napi_value js_callback,
32
- void* context,
33
- void* data);
30
+ typedef void(NAPI_CDECL* napi_threadsafe_function_call_js)(
31
+ napi_env env, napi_value js_callback, void* context, void* data);
34
32
  #endif // NAPI_VERSION >= 4
35
33
 
36
34
  typedef struct {
@@ -42,8 +40,8 @@ typedef struct {
42
40
 
43
41
  #if NAPI_VERSION >= 8
44
42
  typedef struct napi_async_cleanup_hook_handle__* napi_async_cleanup_hook_handle;
45
- typedef void (*napi_async_cleanup_hook)(napi_async_cleanup_hook_handle handle,
46
- void* data);
43
+ typedef void(NAPI_CDECL* napi_async_cleanup_hook)(
44
+ napi_async_cleanup_hook_handle handle, void* data);
47
45
  #endif // NAPI_VERSION >= 8
48
46
 
49
47
  #endif // SRC_NODE_API_TYPES_H_
@@ -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 17
26
- #define NODE_MINOR_VERSION 9
27
- #define NODE_PATCH_VERSION 1
25
+ #define NODE_MAJOR_VERSION 18
26
+ #define NODE_MINOR_VERSION 2
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 102
92
+ #define NODE_MODULE_VERSION 108
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: Mon May 9 19:43:59 2022 UTC"
14
+ #define DATE "built on: Mon May 9 17:35:57 2022 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: Mon May 9 19:44:08 2022 UTC"
14
+ #define DATE "built on: Mon May 9 17:36:06 2022 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: Mon May 9 19:44:17 2022 UTC"
14
+ #define DATE "built on: Mon May 9 17:36:16 2022 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: Mon May 9 19:44:25 2022 UTC"
14
+ #define DATE "built on: Mon May 9 17:36:24 2022 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: Mon May 9 19:44:37 2022 UTC"
14
+ #define DATE "built on: Mon May 9 17:36:36 2022 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: Mon May 9 19:44:49 2022 UTC"
14
+ #define DATE "built on: Mon May 9 17:36:48 2022 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: Mon May 9 19:52:12 2022 UTC"
14
+ #define DATE "built on: Mon May 9 17:43:21 2022 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: Mon May 9 19:52:20 2022 UTC"
14
+ #define DATE "built on: Mon May 9 17:43:29 2022 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: Mon May 9 19:52:28 2022 UTC"
14
+ #define DATE "built on: Mon May 9 17:43:37 2022 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: Mon May 9 19:52:36 2022 UTC"
14
+ #define DATE "built on: Mon May 9 17:43:44 2022 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: Mon May 9 19:51:43 2022 UTC"
14
+ #define DATE "built on: Mon May 9 17:42:51 2022 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: Mon May 9 19:51:54 2022 UTC"
14
+ #define DATE "built on: Mon May 9 17:43:02 2022 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: Mon May 9 19:52:05 2022 UTC"
14
+ #define DATE "built on: Mon May 9 17:43:13 2022 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: aix-gcc"
14
- #define DATE "built on: Mon May 9 19:43:08 2022 UTC"
14
+ #define DATE "built on: Wed Mar 16 04:50:23 2022 UTC"
15
15
 
16
16
  /*
17
17
  * Generate compiler_flags as an array of individual characters. This is a
@@ -132,8 +132,6 @@ int OPENSSL_hexstr2buf_ex(unsigned char *buf, size_t buf_n, size_t *buflen,
132
132
  const char *str, const char sep);
133
133
  unsigned char *OPENSSL_hexstr2buf(const char *str, long *buflen);
134
134
  int OPENSSL_hexchar2int(unsigned char c);
135
- int OPENSSL_strcasecmp(const char *s1, const char *s2);
136
- int OPENSSL_strncasecmp(const char *s1, const char *s2, size_t n);
137
135
 
138
136
  # define OPENSSL_MALLOC_MAX_NELEMS(type) (((1U<<(sizeof(int)*8-1))-1)/sizeof(type))
139
137
 
@@ -29,7 +29,7 @@ extern "C" {
29
29
  */
30
30
  # define OPENSSL_VERSION_MAJOR 3
31
31
  # define OPENSSL_VERSION_MINOR 0
32
- # define OPENSSL_VERSION_PATCH 3
32
+ # define OPENSSL_VERSION_PATCH 2
33
33
 
34
34
  /*
35
35
  * Additional version information
@@ -74,21 +74,21 @@ extern "C" {
74
74
  * longer variant with OPENSSL_VERSION_PRE_RELEASE_STR and
75
75
  * OPENSSL_VERSION_BUILD_METADATA_STR appended.
76
76
  */
77
- # define OPENSSL_VERSION_STR "3.0.3"
78
- # define OPENSSL_FULL_VERSION_STR "3.0.3+quic"
77
+ # define OPENSSL_VERSION_STR "3.0.2"
78
+ # define OPENSSL_FULL_VERSION_STR "3.0.2+quic"
79
79
 
80
80
  /*
81
81
  * SECTION 3: ADDITIONAL METADATA
82
82
  *
83
83
  * These strings are defined separately to allow them to be parsable.
84
84
  */
85
- # define OPENSSL_RELEASE_DATE "3 May 2022"
85
+ # define OPENSSL_RELEASE_DATE "15 Mar 2022"
86
86
 
87
87
  /*
88
88
  * SECTION 4: BACKWARD COMPATIBILITY
89
89
  */
90
90
 
91
- # define OPENSSL_VERSION_TEXT "OpenSSL 3.0.3+quic 3 May 2022"
91
+ # define OPENSSL_VERSION_TEXT "OpenSSL 3.0.2+quic 15 Mar 2022"
92
92
 
93
93
  /* Synthesize OPENSSL_VERSION_NUMBER with the layout 0xMNN00PPSL */
94
94
  # ifdef OPENSSL_VERSION_PRE_RELEASE