node-aix-ppc64 21.4.0 → 21.6.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.
@@ -80,6 +80,7 @@
80
80
 
81
81
  #include <functional>
82
82
  #include <memory>
83
+ #include <optional>
83
84
  #include <ostream>
84
85
 
85
86
  // We cannot use __POSIX__ in this header because that's only defined when
@@ -659,6 +660,33 @@ enum Flags : uint64_t {
659
660
  };
660
661
  } // namespace EnvironmentFlags
661
662
 
663
+ enum class SnapshotFlags : uint32_t {
664
+ kDefault = 0,
665
+ // Whether code cache should be generated as part of the snapshot.
666
+ // Code cache reduces the time spent on compiling functions included
667
+ // in the snapshot at the expense of a bigger snapshot size and
668
+ // potentially breaking portability of the snapshot.
669
+ kWithoutCodeCache = 1 << 0,
670
+ };
671
+
672
+ struct SnapshotConfig {
673
+ SnapshotFlags flags = SnapshotFlags::kDefault;
674
+
675
+ // When builder_script_path is std::nullopt, the snapshot is generated as a
676
+ // built-in snapshot instead of a custom one, and it's expected that the
677
+ // built-in snapshot only contains states that reproduce in every run of the
678
+ // application. The event loop won't be run when generating a built-in
679
+ // snapshot, so asynchronous operations should be avoided.
680
+ //
681
+ // When builder_script_path is an std::string, it should match args[1]
682
+ // passed to CreateForSnapshotting(). The embedder is also expected to use
683
+ // LoadEnvironment() to run a script matching this path. In that case the
684
+ // snapshot is generated as a custom snapshot and the event loop is run, so
685
+ // the snapshot builder can execute asynchronous operations as long as they
686
+ // are run to completion when the snapshot is taken.
687
+ std::optional<std::string> builder_script_path;
688
+ };
689
+
662
690
  struct InspectorParentHandle {
663
691
  virtual ~InspectorParentHandle() = default;
664
692
  };
@@ -870,7 +898,8 @@ class NODE_EXTERN CommonEnvironmentSetup {
870
898
  MultiIsolatePlatform* platform,
871
899
  std::vector<std::string>* errors,
872
900
  const std::vector<std::string>& args = {},
873
- const std::vector<std::string>& exec_args = {});
901
+ const std::vector<std::string>& exec_args = {},
902
+ const SnapshotConfig& snapshot_config = {});
874
903
  EmbedderSnapshotData::Pointer CreateSnapshot();
875
904
 
876
905
  struct uv_loop_s* event_loop() const;
@@ -905,7 +934,8 @@ class NODE_EXTERN CommonEnvironmentSetup {
905
934
  std::vector<std::string>*,
906
935
  const EmbedderSnapshotData*,
907
936
  uint32_t flags,
908
- std::function<Environment*(const CommonEnvironmentSetup*)>);
937
+ std::function<Environment*(const CommonEnvironmentSetup*)>,
938
+ const SnapshotConfig* config = nullptr);
909
939
  };
910
940
 
911
941
  // Implementation for CommonEnvironmentSetup::Create
@@ -131,7 +131,7 @@ NAPI_EXTERN napi_status NAPI_CDECL
131
131
  napi_create_external_buffer(napi_env env,
132
132
  size_t length,
133
133
  void* data,
134
- napi_finalize finalize_cb,
134
+ node_api_nogc_finalize finalize_cb,
135
135
  void* finalize_hint,
136
136
  napi_value* result);
137
137
  #endif // NODE_API_NO_EXTERNAL_BUFFERS_ALLOWED
@@ -159,20 +159,20 @@ napi_create_async_work(napi_env env,
159
159
  napi_async_work* result);
160
160
  NAPI_EXTERN napi_status NAPI_CDECL napi_delete_async_work(napi_env env,
161
161
  napi_async_work work);
162
- NAPI_EXTERN napi_status NAPI_CDECL napi_queue_async_work(napi_env env,
162
+ NAPI_EXTERN napi_status NAPI_CDECL napi_queue_async_work(node_api_nogc_env env,
163
163
  napi_async_work work);
164
- NAPI_EXTERN napi_status NAPI_CDECL napi_cancel_async_work(napi_env env,
164
+ NAPI_EXTERN napi_status NAPI_CDECL napi_cancel_async_work(node_api_nogc_env env,
165
165
  napi_async_work work);
166
166
 
167
167
  // version management
168
168
  NAPI_EXTERN napi_status NAPI_CDECL
169
- napi_get_node_version(napi_env env, const napi_node_version** version);
169
+ napi_get_node_version(node_api_nogc_env env, const napi_node_version** version);
170
170
 
171
171
  #if NAPI_VERSION >= 2
172
172
 
173
173
  // Return the current libuv event loop for a given environment
174
174
  NAPI_EXTERN napi_status NAPI_CDECL
175
- napi_get_uv_event_loop(napi_env env, struct uv_loop_s** loop);
175
+ napi_get_uv_event_loop(node_api_nogc_env env, struct uv_loop_s** loop);
176
176
 
177
177
  #endif // NAPI_VERSION >= 2
178
178
 
@@ -181,11 +181,11 @@ napi_get_uv_event_loop(napi_env env, struct uv_loop_s** loop);
181
181
  NAPI_EXTERN napi_status NAPI_CDECL napi_fatal_exception(napi_env env,
182
182
  napi_value err);
183
183
 
184
- NAPI_EXTERN napi_status NAPI_CDECL
185
- napi_add_env_cleanup_hook(napi_env env, napi_cleanup_hook fun, void* arg);
184
+ NAPI_EXTERN napi_status NAPI_CDECL napi_add_env_cleanup_hook(
185
+ node_api_nogc_env env, napi_cleanup_hook fun, void* arg);
186
186
 
187
- NAPI_EXTERN napi_status NAPI_CDECL
188
- napi_remove_env_cleanup_hook(napi_env env, napi_cleanup_hook fun, void* arg);
187
+ NAPI_EXTERN napi_status NAPI_CDECL napi_remove_env_cleanup_hook(
188
+ node_api_nogc_env env, napi_cleanup_hook fun, void* arg);
189
189
 
190
190
  NAPI_EXTERN napi_status NAPI_CDECL
191
191
  napi_open_callback_scope(napi_env env,
@@ -209,7 +209,7 @@ napi_create_threadsafe_function(napi_env env,
209
209
  size_t max_queue_size,
210
210
  size_t initial_thread_count,
211
211
  void* thread_finalize_data,
212
- napi_finalize thread_finalize_cb,
212
+ node_api_nogc_finalize thread_finalize_cb,
213
213
  void* context,
214
214
  napi_threadsafe_function_call_js call_js_cb,
215
215
  napi_threadsafe_function* result);
@@ -228,18 +228,18 @@ napi_acquire_threadsafe_function(napi_threadsafe_function func);
228
228
  NAPI_EXTERN napi_status NAPI_CDECL napi_release_threadsafe_function(
229
229
  napi_threadsafe_function func, napi_threadsafe_function_release_mode mode);
230
230
 
231
- NAPI_EXTERN napi_status NAPI_CDECL
232
- napi_unref_threadsafe_function(napi_env env, napi_threadsafe_function func);
231
+ NAPI_EXTERN napi_status NAPI_CDECL napi_unref_threadsafe_function(
232
+ node_api_nogc_env env, napi_threadsafe_function func);
233
233
 
234
- NAPI_EXTERN napi_status NAPI_CDECL
235
- napi_ref_threadsafe_function(napi_env env, napi_threadsafe_function func);
234
+ NAPI_EXTERN napi_status NAPI_CDECL napi_ref_threadsafe_function(
235
+ node_api_nogc_env env, napi_threadsafe_function func);
236
236
 
237
237
  #endif // NAPI_VERSION >= 4
238
238
 
239
239
  #if NAPI_VERSION >= 8
240
240
 
241
241
  NAPI_EXTERN napi_status NAPI_CDECL
242
- napi_add_async_cleanup_hook(napi_env env,
242
+ napi_add_async_cleanup_hook(node_api_nogc_env env,
243
243
  napi_async_cleanup_hook hook,
244
244
  void* arg,
245
245
  napi_async_cleanup_hook_handle* remove_handle);
@@ -252,7 +252,7 @@ napi_remove_async_cleanup_hook(napi_async_cleanup_hook_handle remove_handle);
252
252
  #if NAPI_VERSION >= 9
253
253
 
254
254
  NAPI_EXTERN napi_status NAPI_CDECL
255
- node_api_get_module_file_name(napi_env env, const char** result);
255
+ node_api_get_module_file_name(node_api_nogc_env env, const char** result);
256
256
 
257
257
  #endif // NAPI_VERSION >= 9
258
258
 
@@ -23,7 +23,7 @@
23
23
  #define SRC_NODE_VERSION_H_
24
24
 
25
25
  #define NODE_MAJOR_VERSION 21
26
- #define NODE_MINOR_VERSION 4
26
+ #define NODE_MINOR_VERSION 6
27
27
  #define NODE_PATCH_VERSION 0
28
28
 
29
29
  #define NODE_VERSION_IS_LTS 0
@@ -31,7 +31,7 @@
31
31
  */
32
32
 
33
33
  #define UV_VERSION_MAJOR 1
34
- #define UV_VERSION_MINOR 46
34
+ #define UV_VERSION_MINOR 47
35
35
  #define UV_VERSION_PATCH 0
36
36
  #define UV_VERSION_IS_RELEASE 1
37
37
  #define UV_VERSION_SUFFIX ""
package/include/node/uv.h CHANGED
@@ -1885,6 +1885,18 @@ struct uv_loop_s {
1885
1885
  UV_EXTERN void* uv_loop_get_data(const uv_loop_t*);
1886
1886
  UV_EXTERN void uv_loop_set_data(uv_loop_t*, void* data);
1887
1887
 
1888
+ /* String utilities needed internally for dealing with Windows. */
1889
+ size_t uv_utf16_length_as_wtf8(const uint16_t* utf16,
1890
+ ssize_t utf16_len);
1891
+ int uv_utf16_to_wtf8(const uint16_t* utf16,
1892
+ ssize_t utf16_len,
1893
+ char** wtf8_ptr,
1894
+ size_t* wtf8_len_ptr);
1895
+ ssize_t uv_wtf8_length_as_utf16(const char* wtf8);
1896
+ void uv_wtf8_to_utf16(const char* wtf8,
1897
+ uint16_t* utf16,
1898
+ size_t utf16_len);
1899
+
1888
1900
  /* Don't export the private CPP symbols. */
1889
1901
  #undef UV_HANDLE_TYPE_PRIVATE
1890
1902
  #undef UV_REQ_TYPE_PRIVATE
@@ -921,12 +921,22 @@ class V8_EXPORT EmbedderGraph {
921
921
  virtual ~EmbedderGraph() = default;
922
922
  };
923
923
 
924
+ class QueryObjectPredicate {
925
+ public:
926
+ virtual ~QueryObjectPredicate() = default;
927
+ virtual bool Filter(v8::Local<v8::Object> object) = 0;
928
+ };
929
+
924
930
  /**
925
931
  * Interface for controlling heap profiling. Instance of the
926
932
  * profiler can be retrieved using v8::Isolate::GetHeapProfiler.
927
933
  */
928
934
  class V8_EXPORT HeapProfiler {
929
935
  public:
936
+ void QueryObjects(v8::Local<v8::Context> context,
937
+ QueryObjectPredicate* predicate,
938
+ std::vector<v8::Global<v8::Object>>* objects);
939
+
930
940
  enum SamplingFlags {
931
941
  kSamplingNoFlags = 0,
932
942
  kSamplingForceGC = 1 << 0,
@@ -1,7 +1,7 @@
1
1
  /* zlib.h -- interface of the 'zlib' general purpose compression library
2
- version 1.2.13.1, October xxth, 2022
2
+ version 1.3.0.1, August xxth, 2023
3
3
 
4
- Copyright (C) 1995-2022 Jean-loup Gailly and Mark Adler
4
+ Copyright (C) 1995-2023 Jean-loup Gailly and Mark Adler
5
5
 
6
6
  This software is provided 'as-is', without any express or implied
7
7
  warranty. In no event will the authors be held liable for any damages
@@ -37,11 +37,11 @@
37
37
  extern "C" {
38
38
  #endif
39
39
 
40
- #define ZLIB_VERSION "1.2.13.1-motley"
41
- #define ZLIB_VERNUM 0x12d1
40
+ #define ZLIB_VERSION "1.3.0.1-motley"
41
+ #define ZLIB_VERNUM 0x1301
42
42
  #define ZLIB_VER_MAJOR 1
43
- #define ZLIB_VER_MINOR 2
44
- #define ZLIB_VER_REVISION 13
43
+ #define ZLIB_VER_MINOR 3
44
+ #define ZLIB_VER_REVISION 0
45
45
  #define ZLIB_VER_SUBREVISION 1
46
46
 
47
47
  /*
@@ -320,8 +320,8 @@ ZEXTERN int ZEXPORT deflate(z_streamp strm, int flush);
320
320
  with the same value of the flush parameter and more output space (updated
321
321
  avail_out), until the flush is complete (deflate returns with non-zero
322
322
  avail_out). In the case of a Z_FULL_FLUSH or Z_SYNC_FLUSH, make sure that
323
- avail_out is greater than six to avoid repeated flush markers due to
324
- avail_out == 0 on return.
323
+ avail_out is greater than six when the flush marker begins, in order to avoid
324
+ repeated flush markers upon calling deflate() again when avail_out == 0.
325
325
 
326
326
  If the parameter flush is set to Z_FINISH, pending input is processed,
327
327
  pending output is flushed and deflate returns with Z_STREAM_END if there was
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-aix-ppc64",
3
- "version": "v21.4.0",
3
+ "version": "v21.6.0",
4
4
  "description": "node",
5
5
  "bin": {
6
6
  "node": "bin/node"
@@ -82,6 +82,9 @@ Allow file system read access when using the permission model.
82
82
  .It Fl -allow-fs-write
83
83
  Allow file system write access when using the permission model.
84
84
  .
85
+ .It Fl -allow-addons
86
+ Allow using native addons when using the permission model.
87
+ .
85
88
  .It Fl -allow-child-process
86
89
  Allow spawning process when using the permission model.
87
90
  .