node-linux-arm64 18.9.1 → 18.11.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.
@@ -224,11 +224,14 @@ namespace node {
224
224
 
225
225
  class IsolateData;
226
226
  class Environment;
227
+ class MultiIsolatePlatform;
228
+ class InitializationResultImpl;
227
229
 
228
230
  namespace ProcessFlags {
229
231
  enum Flags : uint64_t {
230
232
  kNoFlags = 0,
231
233
  // Enable stdio inheritance, which is disabled by default.
234
+ // This flag is also implied by kNoStdioInitialization.
232
235
  kEnableStdioInheritance = 1 << 0,
233
236
  // Disable reading the NODE_OPTIONS environment variable.
234
237
  kDisableNodeOptionsEnv = 1 << 1,
@@ -236,8 +239,67 @@ enum Flags : uint64_t {
236
239
  kDisableCLIOptions = 1 << 2,
237
240
  // Do not initialize ICU.
238
241
  kNoICU = 1 << 3,
242
+ // Do not modify stdio file descriptor or TTY state.
243
+ kNoStdioInitialization = 1 << 4,
244
+ // Do not register Node.js-specific signal handlers
245
+ // and reset other signal handlers to default state.
246
+ kNoDefaultSignalHandling = 1 << 5,
247
+ // Do not perform V8 initialization.
248
+ kNoInitializeV8 = 1 << 6,
249
+ // Do not initialize a default Node.js-provided V8 platform instance.
250
+ kNoInitializeNodeV8Platform = 1 << 7,
251
+ // Do not initialize OpenSSL config.
252
+ kNoInitOpenSSL = 1 << 8,
253
+ // Do not initialize Node.js debugging based on environment variables.
254
+ kNoParseGlobalDebugVariables = 1 << 9,
255
+ // Do not adjust OS resource limits for this process.
256
+ kNoAdjustResourceLimits = 1 << 10,
257
+ // Do not map code segments into large pages for this process.
258
+ kNoUseLargePages = 1 << 11,
259
+ // Skip printing output for --help, --version, --v8-options.
260
+ kNoPrintHelpOrVersionOutput = 1 << 12,
261
+
262
+ // Emulate the behavior of InitializeNodeWithArgs() when passing
263
+ // a flags argument to the InitializeOncePerProcess() replacement
264
+ // function.
265
+ kLegacyInitializeNodeWithArgsBehavior =
266
+ kNoStdioInitialization | kNoDefaultSignalHandling | kNoInitializeV8 |
267
+ kNoInitializeNodeV8Platform | kNoInitOpenSSL |
268
+ kNoParseGlobalDebugVariables | kNoAdjustResourceLimits |
269
+ kNoUseLargePages | kNoPrintHelpOrVersionOutput,
239
270
  };
240
271
  } // namespace ProcessFlags
272
+ // TODO(addaleax): Make this the canonical name, as it is more descriptive.
273
+ namespace ProcessInitializationFlags = ProcessFlags;
274
+
275
+ class NODE_EXTERN InitializationResult {
276
+ public:
277
+ virtual ~InitializationResult();
278
+
279
+ // Returns a suggested process exit code.
280
+ virtual int exit_code() const = 0;
281
+
282
+ // Returns 'true' if initialization was aborted early due to errors.
283
+ virtual bool early_return() const = 0;
284
+
285
+ // Returns the parsed list of non-Node.js arguments.
286
+ virtual const std::vector<std::string>& args() const = 0;
287
+
288
+ // Returns the parsed list of Node.js arguments.
289
+ virtual const std::vector<std::string>& exec_args() const = 0;
290
+
291
+ // Returns an array of errors. Note that these may be warnings
292
+ // whose existence does not imply a non-zero exit code.
293
+ virtual const std::vector<std::string>& errors() const = 0;
294
+
295
+ // If kNoInitializeNodeV8Platform was not specified, the global Node.js
296
+ // platform instance.
297
+ virtual MultiIsolatePlatform* platform() const = 0;
298
+
299
+ private:
300
+ InitializationResult() = default;
301
+ friend class InitializationResultImpl;
302
+ };
241
303
 
242
304
  // TODO(addaleax): Officially deprecate this and replace it with something
243
305
  // better suited for a public embedder API.
@@ -247,20 +309,44 @@ NODE_EXTERN int Start(int argc, char* argv[]);
247
309
  // in the loop and / or actively executing JavaScript code).
248
310
  NODE_EXTERN int Stop(Environment* env);
249
311
 
312
+ // This runs a subset of the initialization performed by
313
+ // InitializeOncePerProcess(), which supersedes this function.
314
+ // The subset is roughly equivalent to the one given by
315
+ // `ProcessInitializationFlags::kLegacyInitializeNodeWithArgsBehavior`.
316
+ NODE_DEPRECATED("Use InitializeOncePerProcess() instead",
317
+ NODE_EXTERN int InitializeNodeWithArgs(
318
+ std::vector<std::string>* argv,
319
+ std::vector<std::string>* exec_argv,
320
+ std::vector<std::string>* errors,
321
+ ProcessInitializationFlags::Flags flags));
322
+ NODE_DEPRECATED("Use InitializeOncePerProcess() instead",
323
+ NODE_EXTERN int InitializeNodeWithArgs(
324
+ std::vector<std::string>* argv,
325
+ std::vector<std::string>* exec_argv,
326
+ std::vector<std::string>* errors));
327
+
250
328
  // Set up per-process state needed to run Node.js. This will consume arguments
251
- // from argv, fill exec_argv, and possibly add errors resulting from parsing
252
- // the arguments to `errors`. The return value is a suggested exit code for the
253
- // program; If it is 0, then initializing Node.js succeeded.
254
- NODE_EXTERN int InitializeNodeWithArgs(
255
- std::vector<std::string>* argv,
256
- std::vector<std::string>* exec_argv,
257
- std::vector<std::string>* errors);
258
- // TODO(zcbenz): Turn above overloaded version into below's default argument.
259
- NODE_EXTERN int InitializeNodeWithArgs(
260
- std::vector<std::string>* argv,
261
- std::vector<std::string>* exec_argv,
262
- std::vector<std::string>* errors,
263
- ProcessFlags::Flags flags);
329
+ // from args, and return information about the initialization success,
330
+ // including the arguments split into argv/exec_argv, a list of potential
331
+ // errors encountered during initialization, and a potential suggested
332
+ // exit code.
333
+ NODE_EXTERN std::unique_ptr<InitializationResult> InitializeOncePerProcess(
334
+ const std::vector<std::string>& args,
335
+ ProcessInitializationFlags::Flags flags =
336
+ ProcessInitializationFlags::kNoFlags);
337
+ // Undoes the initialization performed by InitializeOncePerProcess(),
338
+ // where cleanup is necessary.
339
+ NODE_EXTERN void TearDownOncePerProcess();
340
+ // Convenience overload for specifying multiple flags without having
341
+ // to worry about casts.
342
+ inline std::unique_ptr<InitializationResult> InitializeOncePerProcess(
343
+ const std::vector<std::string>& args,
344
+ std::initializer_list<ProcessInitializationFlags::Flags> list) {
345
+ uint64_t flags_accum = ProcessInitializationFlags::kNoFlags;
346
+ for (const auto flag : list) flags_accum |= static_cast<uint64_t>(flag);
347
+ return InitializeOncePerProcess(
348
+ args, static_cast<ProcessInitializationFlags::Flags>(flags_accum));
349
+ }
264
350
 
265
351
  enum OptionEnvvarSettings {
266
352
  kAllowedInEnvironment,
@@ -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 9
27
- #define NODE_PATCH_VERSION 1
26
+ #define NODE_MINOR_VERSION 11
27
+ #define NODE_PATCH_VERSION 0
28
28
 
29
29
  #define NODE_VERSION_IS_LTS 0
30
30
  #define NODE_VERSION_LTS_CODENAME ""
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-linux-arm64",
3
- "version": "v18.9.1",
3
+ "version": "v18.11.0",
4
4
  "description": "node",
5
5
  "bin": {
6
6
  "node": "bin/node"
@@ -387,6 +387,10 @@ Specify the minimum allocation from the OpenSSL secure heap. The default is 2. T
387
387
  .It Fl -test
388
388
  Starts the Node.js command line test runner.
389
389
  .
390
+ .It Fl -test-name-pattern
391
+ A regular expression that configures the test runner to only execute tests
392
+ whose name matches the provided pattern.
393
+ .
390
394
  .It Fl -test-only
391
395
  Configures the test runner to only execute top level tests that have the `only`
392
396
  option set.
@@ -0,0 +1,146 @@
1
+ // Copyright Joyent, Inc. and other Node contributors.
2
+ //
3
+ // Permission is hereby granted, free of charge, to any person obtaining a
4
+ // copy of this software and associated documentation files (the
5
+ // "Software"), to deal in the Software without restriction, including
6
+ // without limitation the rights to use, copy, modify, merge, publish,
7
+ // distribute, sublicense, and/or sell copies of the Software, and to permit
8
+ // persons to whom the Software is furnished to do so, subject to the
9
+ // following conditions:
10
+ //
11
+ // The above copyright notice and this permission notice shall be included
12
+ // in all copies or substantial portions of the Software.
13
+ //
14
+ // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
15
+ // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
17
+ // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18
+ // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
19
+ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
20
+ // USE OR OTHER DEALINGS IN THE SOFTWARE.
21
+
22
+ probe node_net_server_connection = process("node").mark("net__server__connection")
23
+ {
24
+ remote = user_string($arg2);
25
+ port = $arg3;
26
+ fd = $arg4;
27
+
28
+ probestr = sprintf("%s(remote=%s, port=%d, fd=%d)",
29
+ $$name,
30
+ remote,
31
+ port,
32
+ fd);
33
+ }
34
+
35
+ probe node_net_stream_end = process("node").mark("net__stream__end")
36
+ {
37
+ remote = user_string($arg2);
38
+ port = $arg3;
39
+ fd = $arg4;
40
+
41
+ probestr = sprintf("%s(remote=%s, port=%d, fd=%d)",
42
+ $$name,
43
+ remote,
44
+ port,
45
+ fd);
46
+ }
47
+
48
+ probe node_http_server_request = process("node").mark("http__server__request")
49
+ {
50
+ remote = user_string($arg3);
51
+ port = $arg4;
52
+ method = user_string($arg5);
53
+ url = user_string($arg6);
54
+ fd = $arg7;
55
+
56
+ probestr = sprintf("%s(remote=%s, port=%d, method=%s, url=%s, fd=%d)",
57
+ $$name,
58
+ remote,
59
+ port,
60
+ method,
61
+ url,
62
+ fd);
63
+ }
64
+
65
+ probe node_http_server_response = process("node").mark("http__server__response")
66
+ {
67
+ remote = user_string($arg2);
68
+ port = $arg3;
69
+ fd = $arg4;
70
+
71
+ probestr = sprintf("%s(remote=%s, port=%d, fd=%d)",
72
+ $$name,
73
+ remote,
74
+ port,
75
+ fd);
76
+ }
77
+
78
+ probe node_http_client_request = process("node").mark("http__client__request")
79
+ {
80
+ remote = user_string($arg3);
81
+ port = $arg4;
82
+ method = user_string($arg5);
83
+ url = user_string($arg6);
84
+ fd = $arg7;
85
+
86
+ probestr = sprintf("%s(remote=%s, port=%d, method=%s, url=%s, fd=%d)",
87
+ $$name,
88
+ remote,
89
+ port,
90
+ method,
91
+ url,
92
+ fd);
93
+ }
94
+
95
+ probe node_http_client_response = process("node").mark("http__client__response")
96
+ {
97
+ remote = user_string($arg2);
98
+ port = $arg3;
99
+ fd = $arg4;
100
+
101
+ probestr = sprintf("%s(remote=%s, port=%d, fd=%d)",
102
+ $$name,
103
+ remote,
104
+ port,
105
+ fd);
106
+ }
107
+
108
+ probe node_gc_start = process("node").mark("gc__start")
109
+ {
110
+ scavenge = 1 << 0;
111
+ compact = 1 << 1;
112
+
113
+ if ($arg1 == scavenge)
114
+ type = "kGCTypeScavenge";
115
+ else if ($arg1 == compact)
116
+ type = "kGCTypeMarkSweepCompact";
117
+ else
118
+ type = "kGCTypeAll";
119
+
120
+ flags = $arg2;
121
+
122
+ probestr = sprintf("%s(type=%s,flags=%d)",
123
+ $$name,
124
+ type,
125
+ flags);
126
+ }
127
+
128
+ probe node_gc_stop = process("node").mark("gc__done")
129
+ {
130
+ scavenge = 1 << 0;
131
+ compact = 1 << 1;
132
+
133
+ if ($arg1 == scavenge)
134
+ type = "kGCTypeScavenge";
135
+ else if ($arg1 == compact)
136
+ type = "kGCTypeMarkSweepCompact";
137
+ else
138
+ type = "kGCTypeAll";
139
+
140
+ flags = $arg2;
141
+
142
+ probestr = sprintf("%s(type=%s,flags=%d)",
143
+ $$name,
144
+ type,
145
+ flags);
146
+ }