@yao-pkg/pkg-fetch 3.6.0 → 3.6.2

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.
@@ -1,5 +1,5 @@
1
1
  diff --git node/common.gypi node/common.gypi
2
- index 94fae06518..e4116f3c82 100644
2
+ index 1b45f13453..a5ad9e716c 100644
3
3
  --- node/common.gypi
4
4
  +++ node/common.gypi
5
5
  @@ -174,7 +174,7 @@
@@ -12,10 +12,10 @@ index 94fae06518..e4116f3c82 100644
12
12
  'lto': ' -flto ', # Clang
13
13
  }],
14
14
  diff --git node/configure.py node/configure.py
15
- index 7006ee6581..12fb2ac8d1 100755
15
+ index 4a1359d79c..ce04b2912f 100755
16
16
  --- node/configure.py
17
17
  +++ node/configure.py
18
- @@ -1289,9 +1289,7 @@ def configure_node(o):
18
+ @@ -1288,9 +1288,7 @@ def configure_node(o):
19
19
 
20
20
  o['variables']['want_separate_host_toolset'] = int(cross_compiling)
21
21
 
@@ -25,6 +25,50 @@ index 7006ee6581..12fb2ac8d1 100755
25
25
  o['variables']['arm_fpu'] = options.arm_fpu or 'neon'
26
26
 
27
27
  if options.node_snapshot_main is not None:
28
+ diff --git node/deps/ngtcp2/nghttp3/lib/nghttp3_ringbuf.c node/deps/ngtcp2/nghttp3/lib/nghttp3_ringbuf.c
29
+ index 61a7d06cad..eeebf67796 100644
30
+ --- node/deps/ngtcp2/nghttp3/lib/nghttp3_ringbuf.c
31
+ +++ node/deps/ngtcp2/nghttp3/lib/nghttp3_ringbuf.c
32
+ @@ -33,17 +33,6 @@
33
+
34
+ #include "nghttp3_macro.h"
35
+
36
+ -#if defined(_MSC_VER) && !defined(__clang__) && \
37
+ - (defined(_M_ARM) || defined(_M_ARM64))
38
+ -unsigned int __popcnt(unsigned int x) {
39
+ - unsigned int c = 0;
40
+ - for (; x; ++c) {
41
+ - x &= x - 1;
42
+ - }
43
+ - return c;
44
+ -}
45
+ -#endif
46
+ -
47
+ int nghttp3_ringbuf_init(nghttp3_ringbuf *rb, size_t nmemb, size_t size,
48
+ const nghttp3_mem *mem) {
49
+ if (nmemb) {
50
+ diff --git node/deps/ngtcp2/ngtcp2/lib/ngtcp2_ringbuf.c node/deps/ngtcp2/ngtcp2/lib/ngtcp2_ringbuf.c
51
+ index c381c23127..6894bc2308 100644
52
+ --- node/deps/ngtcp2/ngtcp2/lib/ngtcp2_ringbuf.c
53
+ +++ node/deps/ngtcp2/ngtcp2/lib/ngtcp2_ringbuf.c
54
+ @@ -31,17 +31,6 @@
55
+
56
+ #include "ngtcp2_macro.h"
57
+
58
+ -#if defined(_MSC_VER) && !defined(__clang__) && \
59
+ - (defined(_M_ARM) || defined(_M_ARM64))
60
+ -static unsigned int __popcnt(unsigned int x) {
61
+ - unsigned int c = 0;
62
+ - for (; x; ++c) {
63
+ - x &= x - 1;
64
+ - }
65
+ - return c;
66
+ -}
67
+ -#endif
68
+ -
69
+ int ngtcp2_ringbuf_init(ngtcp2_ringbuf *rb, size_t nmemb, size_t size,
70
+ const ngtcp2_mem *mem) {
71
+ uint8_t *buf = ngtcp2_mem_malloc(mem, nmemb * size);
28
72
  diff --git node/deps/v8/include/v8-initialization.h node/deps/v8/include/v8-initialization.h
29
73
  index 3d59c73f7c..00b2de4524 100644
30
74
  --- node/deps/v8/include/v8-initialization.h
@@ -41,7 +85,7 @@ index 3d59c73f7c..00b2de4524 100644
41
85
  static const char* GetVersion();
42
86
 
43
87
  diff --git node/deps/v8/src/api/api.cc node/deps/v8/src/api/api.cc
44
- index 8d224bea2e..8402afc0fb 100644
88
+ index 3b1a81680b..f49f824cfd 100644
45
89
  --- node/deps/v8/src/api/api.cc
46
90
  +++ node/deps/v8/src/api/api.cc
47
91
  @@ -709,6 +709,29 @@ void V8::SetFlagsFromCommandLine(int* argc, char** argv, bool remove_flags) {
@@ -169,7 +213,7 @@ index 618cf9e975..64a57e8afe 100644
169
213
  uint32_t max_payload_length = this->size_ - kHeaderSize;
170
214
  if (payload_length > max_payload_length) {
171
215
  diff --git node/lib/child_process.js node/lib/child_process.js
172
- index 5bdc474c80..196778e7db 100644
216
+ index 449013906e..3a85e4a541 100644
173
217
  --- node/lib/child_process.js
174
218
  +++ node/lib/child_process.js
175
219
  @@ -169,7 +169,7 @@ function fork(modulePath, args = [], options) {
@@ -237,59 +281,144 @@ index 0000000000..a697294fdf
237
281
  + }());
238
282
  +}());
239
283
  diff --git node/lib/internal/modules/cjs/loader.js node/lib/internal/modules/cjs/loader.js
240
- index 88bb870a8f..22bbdd9058 100644
284
+ index 69473df97e..efbd05066d 100644
241
285
  --- node/lib/internal/modules/cjs/loader.js
242
286
  +++ node/lib/internal/modules/cjs/loader.js
243
- @@ -94,7 +94,7 @@ const fs = require('fs');
244
- const internalFS = require('internal/fs/utils');
287
+ @@ -95,7 +95,7 @@ const {
288
+ const assert = require('internal/assert');
289
+ const fs = require('fs');
245
290
  const path = require('path');
246
- const { sep } = path;
247
291
  -const { internalModuleStat } = internalBinding('fs');
248
292
  +const internalModuleStat = function (f) { return require('fs').internalModuleStat(f); };
249
- const packageJsonReader = require('internal/modules/package_json_reader');
250
293
  const { safeGetenv } = internalBinding('credentials');
251
294
  const {
295
+ privateSymbols: {
252
296
  diff --git node/lib/internal/modules/package_json_reader.js node/lib/internal/modules/package_json_reader.js
253
- index bb175d0df5..07f4834c07 100644
297
+ index 1968960576..d73016f3fe 100644
254
298
  --- node/lib/internal/modules/package_json_reader.js
255
299
  +++ node/lib/internal/modules/package_json_reader.js
256
- @@ -1,7 +1,7 @@
257
- 'use strict';
258
-
259
- const { SafeMap } = primordials;
300
+ @@ -12,7 +12,7 @@ const {
301
+ const {
302
+ ERR_INVALID_PACKAGE_CONFIG,
303
+ } = require('internal/errors').codes;
260
304
  -const { internalModuleReadJSON } = internalBinding('fs');
261
305
  +const internalModuleReadJSON = function (f) { return require('fs').internalModuleReadJSON(f); };
262
- const { pathToFileURL } = require('url');
263
- const { toNamespacedPath } = require('path');
306
+ const { resolve, sep, toNamespacedPath } = require('path');
307
+ const { kEmptyObject } = require('internal/util');
264
308
 
265
309
  diff --git node/lib/internal/process/pre_execution.js node/lib/internal/process/pre_execution.js
266
- index b4a24bbffb..041ee4c715 100644
310
+ index 4795be82e7..977124a014 100644
267
311
  --- node/lib/internal/process/pre_execution.js
268
312
  +++ node/lib/internal/process/pre_execution.js
269
- @@ -36,7 +36,12 @@ const {
270
- isBuildingSnapshot,
271
- } = require('v8').startupSnapshot;
313
+ @@ -36,7 +36,11 @@ const {
314
+ },
315
+ } = require('internal/v8/startup_snapshot');
272
316
 
273
317
  +let _alreadyPrepared = false;
274
318
  +
275
319
  function prepareMainThreadExecution(expandArgv1 = false, initializeModules = true) {
276
320
  + if (_alreadyPrepared === true) return;
277
321
  + _alreadyPrepared = true;
278
- +
279
- prepareExecution({
322
+ return prepareExecution({
280
323
  expandArgv1,
281
324
  initializeModules,
282
- @@ -155,7 +160,8 @@ function patchProcessObject(expandArgv1) {
283
- process.argv[0] = process.execPath;
284
-
325
+ @@ -191,7 +195,8 @@ function patchProcessObject(expandArgv1) {
326
+ // If requested, update process.argv[1] to replace whatever the user provided with the resolved absolute file path of
327
+ // the entry point.
285
328
  if (expandArgv1 && process.argv[1] &&
286
329
  - !StringPrototypeStartsWith(process.argv[1], '-')) {
287
- + !StringPrototypeStartsWith(process.argv[1], '-') &&
288
- + process.argv[1] !== 'PKG_DUMMY_ENTRYPOINT') {
330
+ + !StringPrototypeStartsWith(process.argv[1], '-') &&
331
+ + process.argv[1] !== 'PKG_DUMMY_ENTRYPOINT') {
289
332
  // Expand process.argv[1] into a full path.
290
333
  const path = require('path');
291
334
  try {
292
- @@ -603,6 +609,7 @@ function loadPreloadModules() {
335
+ @@ -263,7 +268,7 @@ function setupWarningHandler() {
336
+ // https://fetch.spec.whatwg.org/
337
+ function setupFetch() {
338
+ if (process.config.variables.node_no_browser_globals ||
339
+ - getOptionValue('--no-experimental-fetch')) {
340
+ + getOptionValue('--no-experimental-fetch')) {
341
+ return;
342
+ }
343
+
344
+ @@ -313,7 +318,7 @@ function setupFetch() {
345
+ // removed.
346
+ function setupWebCrypto() {
347
+ if (process.config.variables.node_no_browser_globals ||
348
+ - !getOptionValue('--experimental-global-webcrypto')) {
349
+ + !getOptionValue('--experimental-global-webcrypto')) {
350
+ return;
351
+ }
352
+
353
+ @@ -335,7 +340,7 @@ function setupCodeCoverage() {
354
+ // --experimental-test-coverage flag is present, as the test runner will
355
+ // handle coverage.
356
+ if (process.env.NODE_V8_COVERAGE &&
357
+ - !getOptionValue('--experimental-test-coverage')) {
358
+ + !getOptionValue('--experimental-test-coverage')) {
359
+ process.env.NODE_V8_COVERAGE =
360
+ setupCoverageHooks(process.env.NODE_V8_COVERAGE);
361
+ }
362
+ @@ -345,7 +350,7 @@ function setupCodeCoverage() {
363
+ // removed.
364
+ function setupCustomEvent() {
365
+ if (process.config.variables.node_no_browser_globals ||
366
+ - !getOptionValue('--experimental-global-customevent')) {
367
+ + !getOptionValue('--experimental-global-customevent')) {
368
+ return;
369
+ }
370
+ const { CustomEvent } = require('internal/event_target');
371
+ @@ -468,10 +473,10 @@ function initializeDeprecations() {
372
+ ]) {
373
+ utilBinding[name] = pendingDeprecation ?
374
+ deprecate(types[name],
375
+ - 'Accessing native typechecking bindings of Node ' +
376
+ - 'directly is deprecated. ' +
377
+ - `Please use \`util.types.${name}\` instead.`,
378
+ - 'DEP0103') :
379
+ + 'Accessing native typechecking bindings of Node ' +
380
+ + 'directly is deprecated. ' +
381
+ + `Please use \`util.types.${name}\` instead.`,
382
+ + 'DEP0103') :
383
+ types[name];
384
+ }
385
+
386
+ @@ -492,12 +497,12 @@ function initializeDeprecations() {
387
+
388
+ if (pendingDeprecation) {
389
+ process.binding = deprecate(process.binding,
390
+ - 'process.binding() is deprecated. ' +
391
+ - 'Please use public APIs instead.', 'DEP0111');
392
+ + 'process.binding() is deprecated. ' +
393
+ + 'Please use public APIs instead.', 'DEP0111');
394
+
395
+ process._tickCallback = deprecate(process._tickCallback,
396
+ - 'process._tickCallback() is deprecated',
397
+ - 'DEP0134');
398
+ + 'process._tickCallback() is deprecated',
399
+ + 'DEP0134');
400
+ }
401
+ }
402
+
403
+ @@ -533,7 +538,7 @@ function readPolicyFromDisk() {
404
+ const experimentalPolicy = getOptionValue('--experimental-policy');
405
+ if (experimentalPolicy) {
406
+ process.emitWarning('Policies are experimental.',
407
+ - 'ExperimentalWarning');
408
+ + 'ExperimentalWarning');
409
+ const { pathToFileURL, URL } = require('internal/url');
410
+ // URL here as it is slightly different parsing
411
+ // no bare specifiers for now
412
+ @@ -611,7 +616,7 @@ function initializeSourceMapsHandlers() {
413
+ function initializeFrozenIntrinsics() {
414
+ if (getOptionValue('--frozen-intrinsics')) {
415
+ process.emitWarning('The --frozen-intrinsics flag is experimental',
416
+ - 'ExperimentalWarning');
417
+ + 'ExperimentalWarning');
418
+ require('internal/freeze_intrinsics')();
419
+ }
420
+ }
421
+ @@ -620,6 +625,7 @@ function loadPreloadModules() {
293
422
  // For user code, we preload modules if `-r` is passed
294
423
  const preloadModules = getOptionValue('--require');
295
424
  if (preloadModules && preloadModules.length > 0) {
@@ -297,11 +426,25 @@ index b4a24bbffb..041ee4c715 100644
297
426
  const {
298
427
  Module: {
299
428
  _preloadModules,
429
+ diff --git node/lib/internal/vm.js node/lib/internal/vm.js
430
+ index 624e6825b8..fee9d341f2 100644
431
+ --- node/lib/internal/vm.js
432
+ +++ node/lib/internal/vm.js
433
+ @@ -126,7 +126,8 @@ function makeContextifyScript(code,
434
+ cachedData,
435
+ produceCachedData,
436
+ parsingContext,
437
+ - hostDefinedOptionId);
438
+ + hostDefinedOptionId,
439
+ + false);
440
+ } catch (e) {
441
+ throw e; /* node-do-not-add-exception-line */
442
+ }
300
443
  diff --git node/lib/vm.js node/lib/vm.js
301
- index 21acc55e2e..8a128bcb5c 100644
444
+ index 6bea7e5e74..575a5527d9 100644
302
445
  --- node/lib/vm.js
303
446
  +++ node/lib/vm.js
304
- @@ -77,6 +77,7 @@ class Script extends ContextifyScript {
447
+ @@ -80,6 +80,7 @@ class Script extends ContextifyScript {
305
448
  produceCachedData = false,
306
449
  importModuleDynamically,
307
450
  [kParsingContext]: parsingContext,
@@ -309,21 +452,21 @@ index 21acc55e2e..8a128bcb5c 100644
309
452
  } = options;
310
453
 
311
454
  validateString(filename, 'options.filename');
312
- @@ -97,7 +98,8 @@ class Script extends ContextifyScript {
313
- columnOffset,
455
+ @@ -103,7 +104,8 @@ class Script extends ContextifyScript {
314
456
  cachedData,
315
457
  produceCachedData,
316
- - parsingContext);
317
- + parsingContext,
458
+ parsingContext,
459
+ - hostDefinedOptionId);
460
+ + hostDefinedOptionId,
318
461
  + sourceless);
319
462
  } catch (e) {
320
463
  throw e; /* node-do-not-add-exception-line */
321
464
  }
322
465
  diff --git node/node.gyp node/node.gyp
323
- index 6b554d75d8..fce4eb4bd5 100644
466
+ index 08cb3f38e8..0f64039ff5 100644
324
467
  --- node/node.gyp
325
468
  +++ node/node.gyp
326
- @@ -113,6 +113,9 @@
469
+ @@ -116,6 +116,9 @@
327
470
  },
328
471
 
329
472
  'conditions': [
@@ -347,10 +490,10 @@ index b1ba86b7b0..e2478e537c 100644
347
490
  parent_env_->AddCleanupHook([](void* data) {
348
491
  Environment* env = static_cast<Environment*>(data);
349
492
  diff --git node/src/node.cc node/src/node.cc
350
- index 96cdcd3064..cef0838d53 100644
493
+ index 367d47325b..5e3cd94124 100644
351
494
  --- node/src/node.cc
352
495
  +++ node/src/node.cc
353
- @@ -314,6 +314,8 @@ MaybeLocal<Value> StartExecution(Environment* env, StartExecutionCallback cb) {
496
+ @@ -304,6 +304,8 @@ MaybeLocal<Value> StartExecution(Environment* env, StartExecutionCallback cb) {
354
497
  return env->RunSnapshotDeserializeMain();
355
498
  }
356
499
 
@@ -359,7 +502,7 @@ index 96cdcd3064..cef0838d53 100644
359
502
  if (env->worker_context() != nullptr) {
360
503
  return StartExecution(env, "internal/main/worker_thread");
361
504
  }
362
- @@ -546,14 +548,6 @@ static void PlatformInit(ProcessInitializationFlags::Flags flags) {
505
+ @@ -536,14 +538,6 @@ static void PlatformInit(ProcessInitializationFlags::Flags flags) {
363
506
  }
364
507
 
365
508
  if (!(flags & ProcessInitializationFlags::kNoDefaultSignalHandling)) {
@@ -375,40 +518,45 @@ index 96cdcd3064..cef0838d53 100644
375
518
  }
376
519
 
377
520
  diff --git node/src/node_contextify.cc node/src/node_contextify.cc
378
- index 3da8746e2c..ff60588e77 100644
521
+ index 65a7acbcfb..160784d64c 100644
379
522
  --- node/src/node_contextify.cc
380
523
  +++ node/src/node_contextify.cc
381
- @@ -75,6 +75,7 @@ using v8::ScriptOrigin;
382
- using v8::String;
524
+ @@ -75,6 +75,7 @@ using v8::String;
525
+ using v8::Symbol;
383
526
  using v8::Uint32;
384
527
  using v8::UnboundScript;
385
528
  +using v8::V8;
386
529
  using v8::Value;
387
530
  using v8::WeakCallbackInfo;
388
- using v8::WeakCallbackType;
389
- @@ -787,11 +788,12 @@ void ContextifyScript::New(const FunctionCallbackInfo<Value>& args) {
531
+
532
+ @@ -786,13 +787,14 @@ void ContextifyScript::New(const FunctionCallbackInfo<Value>& args) {
390
533
  Local<ArrayBufferView> cached_data_buf;
391
534
  bool produce_cached_data = false;
392
535
  Local<Context> parsing_context = context;
393
536
  + bool sourceless = false;
394
537
 
538
+ Local<Symbol> id_symbol;
395
539
  if (argc > 2) {
396
540
  // new ContextifyScript(code, filename, lineOffset, columnOffset,
397
- // cachedData, produceCachedData, parsingContext)
398
- - CHECK_EQ(argc, 7);
399
- + CHECK_EQ(argc, 8);
541
+ // cachedData, produceCachedData, parsingContext,
542
+ // hostDefinedOptionId)
543
+ - CHECK_EQ(argc, 8);
544
+ + CHECK_EQ(argc, 9);
400
545
  CHECK(args[2]->IsNumber());
401
546
  line_offset = args[2].As<Int32>()->Value();
402
547
  CHECK(args[3]->IsNumber());
403
- @@ -810,6 +812,7 @@ void ContextifyScript::New(const FunctionCallbackInfo<Value>& args) {
548
+ @@ -811,8 +813,9 @@ void ContextifyScript::New(const FunctionCallbackInfo<Value>& args) {
404
549
  CHECK_NOT_NULL(sandbox);
405
550
  parsing_context = sandbox->context();
406
551
  }
407
- + sourceless = args[7]->IsTrue();
552
+ - CHECK(args[7]->IsSymbol());
553
+ + CHECK(args[7]->IsSymbol());
554
+ id_symbol = args[7].As<Symbol>();
555
+ + sourceless = args[8]->IsTrue();
408
556
  }
409
557
 
410
558
  ContextifyScript* contextify_script =
411
- @@ -860,6 +863,10 @@ void ContextifyScript::New(const FunctionCallbackInfo<Value>& args) {
559
+ @@ -861,6 +864,10 @@ void ContextifyScript::New(const FunctionCallbackInfo<Value>& args) {
412
560
  ShouldNotAbortOnUncaughtScope no_abort_scope(env);
413
561
  Context::Scope scope(parsing_context);
414
562
 
@@ -419,21 +567,20 @@ index 3da8746e2c..ff60588e77 100644
419
567
  MaybeLocal<UnboundScript> maybe_v8_script =
420
568
  ScriptCompiler::CompileUnboundScript(isolate, &source, compile_options);
421
569
 
422
- @@ -873,6 +880,13 @@ void ContextifyScript::New(const FunctionCallbackInfo<Value>& args) {
570
+ @@ -874,7 +881,11 @@ void ContextifyScript::New(const FunctionCallbackInfo<Value>& args) {
423
571
  "ContextifyScript::New");
424
572
  return;
425
573
  }
426
- +
427
- + if (sourceless && compile_options == ScriptCompiler::kConsumeCodeCache) {
574
+ -
575
+ + if (sourceless && compile_options == ScriptCompiler::kConsumeCodeCache) {
428
576
  + if (!source.GetCachedData()->rejected) {
429
577
  + V8::FixSourcelessScript(env->isolate(), v8_script);
430
578
  + }
431
579
  + }
432
- +
433
580
  contextify_script->script_.Reset(isolate, v8_script);
434
-
435
- std::unique_ptr<ScriptCompiler::CachedData> new_cached_data;
436
- @@ -897,6 +911,10 @@ void ContextifyScript::New(const FunctionCallbackInfo<Value>& args) {
581
+ contextify_script->script_.SetWeak();
582
+ contextify_script->object()->SetInternalFieldForNodeCore(kUnboundScriptSlot,
583
+ @@ -908,6 +919,10 @@ void ContextifyScript::New(const FunctionCallbackInfo<Value>& args) {
437
584
  .IsNothing())
438
585
  return;
439
586
 
@@ -555,10 +702,10 @@ index 8099b2a3a1..9cc8a07a55 100644
555
702
  + return adjacent(c, nargv);
556
703
  +}
557
704
  diff --git node/src/node_options.cc node/src/node_options.cc
558
- index 26f205bc3b..e52a31f487 100644
705
+ index 6ee79f7df8..cfc3e8d785 100644
559
706
  --- node/src/node_options.cc
560
707
  +++ node/src/node_options.cc
561
- @@ -307,7 +307,7 @@ DebugOptionsParser::DebugOptionsParser() {
708
+ @@ -314,7 +314,7 @@ DebugOptionsParser::DebugOptionsParser() {
562
709
  #ifndef DISABLE_SINGLE_EXECUTABLE_APPLICATION
563
710
  if (sea::IsSingleExecutable()) return;
564
711
  #endif