@yao-pkg/pkg-fetch 3.6.2 → 3.6.4

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.
@@ -43,35 +43,35 @@
43
43
  "node-v20.20.2-macos-x64": "2276efd46dc3a30d5524ea60b8cb63afa5c8e45e0f17ad49065bcea7b59b7eeb",
44
44
  "node-v20.20.2-win-arm64": "aebc71a3ebf4774adaac0cd891bfba54f9e5e4340c39b44492127de551a9b5a8",
45
45
  "node-v20.20.2-win-x64": "f9b870a1b20c3bcf729a53112b6a72db65b050e4e6494d33ceab3413c507f01c",
46
- "node-v22.22.3-alpine-arm64": "29f747d6c56bcd5ccbd0dfd033df31f226ac30deedb67186ec72cdbbe96d15cc",
47
- "node-v22.22.3-alpine-x64": "a5b8a56c4ddbf5b3bdeb46706f7fe71d53d8ebbb3d19a6eb55177dffbc69323d",
48
- "node-v22.22.3-linux-arm64": "c5ef71c46aeae4859f5e2338aa35a73261cc319f7f1f11893b4fe13494d040d6",
49
- "node-v22.22.3-linux-x64": "8ac32aa38e6ed30372c20e7cac2d92f5d7e12c9053deebe5db94cca4228b3755",
50
- "node-v22.22.3-linuxstatic-arm64": "ecda1a1ed432c753560cb1496ed6cb4e70863fc825c6ba1fa1cace34c15374cf",
51
- "node-v22.22.3-linuxstatic-armv7": "6a00d7ddef6ad117389725b13255da63467dee2515b9ff56584cd9c4eb0cc3bd",
52
- "node-v22.22.3-linuxstatic-x64": "53308c1386f92e15ffc6b0ab78f28b9490bc497f35346bbe8773b05acfc9911e",
53
- "node-v22.22.3-macos-arm64": "d6a4a2d3fcb353bfd1d91a34751d1fff83bd3a8b987b7c891d959bca70d24237",
54
- "node-v22.22.3-macos-x64": "112619345641eb70d895fa8ef99365a6819a8c6b96aaf8b6273d2ebeae5427cf",
55
- "node-v22.22.3-win-arm64": "f2ef0a30dc796d40fb5c00afdeed1e6363c00e7d694dbb7119ae1b392a5e31fc",
56
- "node-v22.22.3-win-x64": "3abbf32d427ea9ffcce92f8c9727daa02ab7e967c5e475ed22854a1bea8cdebb",
57
- "node-v24.15.0-alpine-arm64": "43203ae081353c43cd5db4fc1ec240c90a7daa28edf3716c35a39057334f0330",
58
- "node-v24.15.0-alpine-x64": "b80d375c2df76eb1c3b8046540a8c356556b18706178a05056764f34a0c1e8fd",
59
- "node-v24.15.0-linux-arm64": "5099a5c5527f35f68538054386b495d747d01a6e05bf3d3a22f16edaac9a7bcb",
60
- "node-v24.15.0-linux-x64": "b081411ee7a4e351368e687d95d8beeea8e8c09b27f28114592d4efcda1d6e3d",
61
- "node-v24.15.0-linuxstatic-arm64": "7add1c3195a602e6bd0376df91c09b2db941ab5dda44ca662cf961eb6b27bf63",
62
- "node-v24.15.0-linuxstatic-x64": "b09eab65ac2ee0bfdb1a5a9cbdfd4e6b55a851fc42fa9ae92272dfcf0b6eb7d7",
63
- "node-v24.15.0-macos-arm64": "11bd187bac035582dc9a93995d434da5b953ee97be273ea90744158b9117e32a",
64
- "node-v24.15.0-macos-x64": "5efe094a0444c88c165191948ee7a4866e56c79cd87a970cfafd5b93ca5d8eb7",
65
- "node-v24.15.0-win-arm64": "b10c37ff4c4dc587913e49c2bc5d89e15b2ec3a23d759419dd6e69984f589f04",
66
- "node-v24.15.0-win-x64": "1181784028a3319206ff5a6c2af17f78009432f0bd69325f0d0bfc128de770a8",
67
- "node-v26.2.0-alpine-arm64": "8e92f5dcbedfc1300ac6d7b0b552237252d47fb9943f785e33da3f635df002aa",
68
- "node-v26.2.0-alpine-x64": "fb5783ab21827ec1068b49c208d74f8b6f4b82d6f3d85f93924144688b9ac705",
69
- "node-v26.2.0-linux-arm64": "462785abfbcd498deb74945e6f9d0575db610dc279d193d02a13b9c9ee1c31bb",
70
- "node-v26.2.0-linux-x64": "bfa38eb20a8fc14d62fb4a3cef942de9e4e4490049771b227373d300b137e5cc",
71
- "node-v26.2.0-linuxstatic-arm64": "a379ab3777825e58aee2e7e16bcf3d020e5029084d99145c00f3b129dadcc7ac",
72
- "node-v26.2.0-linuxstatic-x64": "84d4f7ddcf6c9e7342e9a83b35237149570c14c9dc6f4f269bcdbd5d1606ac32",
73
- "node-v26.2.0-macos-arm64": "251c29beb47324ece17d7f48090ad086a0e5cc47865335ea944d665f40dae6f3",
74
- "node-v26.2.0-macos-x64": "5533c4247ebf44dff1e1e4934f907e6f9a423091334c4fc457e4325cd6129402",
75
- "node-v26.2.0-win-arm64": "7ce4055e72df18d61df8bafc19f4d40d81199ff1b6281bd5363e069690799445",
76
- "node-v26.2.0-win-x64": "5d6f5055b1531c26884ffce4663e4ffac4468ee0e07a079c233887b63e975943"
46
+ "node-v22.23.1-alpine-arm64": "c5951634a1d6b6e6c2fa87179db10773acbe0b560998adace3161cb5b4e12a22",
47
+ "node-v22.23.1-alpine-x64": "0f096bba5173f4fe6b55ef544dc30130769e4f3971de70ab0ab9e2eafd6fa59c",
48
+ "node-v22.23.1-linux-arm64": "f4ca488c2fe1b507184b1bce03d9b7bb024d5d1a0cdab887bab8825e70131ea8",
49
+ "node-v22.23.1-linux-x64": "d3bf7b0740f9f9c9cc9b9a1728f45d0d016ddbda05a7dd8aa068adf92d18300e",
50
+ "node-v22.23.1-linuxstatic-arm64": "0fdf0b30ebe4dfde0187a3cffa09865083478afadbedfb128771661bec192152",
51
+ "node-v22.23.1-linuxstatic-armv7": "ef93fd61a830ae73001c970746d2b22c709b647530997b60caa82984748dfa37",
52
+ "node-v22.23.1-linuxstatic-x64": "2e32bc6cca8afccaf960237c465125f8c0b5a5e79c6cd0b287c399127852e87d",
53
+ "node-v22.23.1-macos-arm64": "feb9e31a0a35b38d7124dafdfcfbfd9c1a68d3cbb6310be797ea48aee2174674",
54
+ "node-v22.23.1-macos-x64": "4238d4bd6889928f8660b381f96931b9252b1d77dbbb69ed966f4b46f5e61dec",
55
+ "node-v22.23.1-win-arm64": "52f61584f696ffa4d6b4a51c7956c6f6901d068e7b61cfd776716565788917c6",
56
+ "node-v22.23.1-win-x64": "588055f6dd40513c16ecf705f9db5e4744eb8b9074e4979246a306b2d7315d1d",
57
+ "node-v24.18.0-alpine-arm64": "d4a4302a0a127c3d4949f86c00242e9b42cc57d8b94913d0813daa6f979b2c71",
58
+ "node-v24.18.0-alpine-x64": "f497cb461d1b9cccf4bfae71b6311754843d4048fb73345f514d845c9fe91f21",
59
+ "node-v24.18.0-linux-arm64": "84b746637c2a0e51f746cd937c2f78cbfd8cbdf7df035ad5e2c80c892e95a7c4",
60
+ "node-v24.18.0-linux-x64": "e55f89d2769702117fd42a5f83a3132b39c24229bf80748ad73372dd1a7d0fd8",
61
+ "node-v24.18.0-linuxstatic-arm64": "71eebc90e28e4d5bce3d6cf8f386be1cde14665c094b501302ad1b87a7957cf3",
62
+ "node-v24.18.0-linuxstatic-x64": "3876f1638d5b9cbc2a368c39343de2c0ad64458f5f5a49b361ee066ed55736aa",
63
+ "node-v24.18.0-macos-arm64": "f7cb0dba323eb7918b507d6cc8970e42ffa3e0a2252515fb8fc78f5e15fd6096",
64
+ "node-v24.18.0-macos-x64": "b9d1fc6bf8c813e286be429571801fa06a385997c4c9686a536a8e611d4bdbca",
65
+ "node-v24.18.0-win-arm64": "58daa4bfde8ca5d0c7140bc3fd3977bbc424e5c30ec8bdce8498edc41bccff17",
66
+ "node-v24.18.0-win-x64": "430b93420ce5c670698c90a935274a754ac655a97924b486ea2d7d3371a02e0c",
67
+ "node-v26.4.0-alpine-arm64": "7b635aff08790ba4c60d68346c7a7f3a50329023a00d4f9d25ce10bf14085adb",
68
+ "node-v26.4.0-alpine-x64": "7c1bbbb546d8f746c2c599507840a43455dec205d9d03b89c08ba2af8fd6cee0",
69
+ "node-v26.4.0-linux-arm64": "2fd73822d428cc95632b65d0153c02380eb042ebc316c39927b23226f457ef16",
70
+ "node-v26.4.0-linux-x64": "c3776d29b40a23a7661725300c09b5a66ed3e202b97f5ff5d456a93580be8d11",
71
+ "node-v26.4.0-linuxstatic-arm64": "4798f9d509bf60606b54f41e6cf3e95f2d0666b2eb699b923875a746df442a9c",
72
+ "node-v26.4.0-linuxstatic-x64": "477a172f9f5d58410dc5e695c21884e5b621736d2779fc335d28d5726348b575",
73
+ "node-v26.4.0-macos-arm64": "e31defd411e115a35550f3849716ddcf2b70eac39b62c13df7924fc943a396e2",
74
+ "node-v26.4.0-macos-x64": "1b2a678c032a2aae63225c5419752aef16c1c215dc5607622ba0918f1dc33591",
75
+ "node-v26.4.0-win-arm64": "fcec61e3fa77297935318605160b6ef6cdd2aa8ac544b722936fe921f1059915",
76
+ "node-v26.4.0-win-x64": "4019eb6266f935ed96e6ca7d2a1f21943a80d3c6b02301bd0c15213ba36d7c47"
77
77
  }
package/lib-es5/utils.js CHANGED
@@ -4,14 +4,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.nodeBinarySortFunction = exports.spawn = exports.plusx = exports.hash = exports.downloadUrl = void 0;
7
- const node_fetch_1 = __importDefault(require("node-fetch"));
7
+ const undici_1 = require("undici");
8
8
  const crypto_1 = __importDefault(require("crypto"));
9
9
  const fs_1 = require("fs");
10
10
  const promises_1 = require("fs/promises");
11
- const https_proxy_agent_1 = __importDefault(require("https-proxy-agent"));
12
11
  const path_1 = __importDefault(require("path"));
12
+ const stream_1 = require("stream");
13
+ const promises_2 = require("stream/promises");
13
14
  const child_process_1 = require("child_process");
14
- const stream_1 = __importDefault(require("stream"));
15
15
  const semver_1 = require("semver");
16
16
  const log_1 = require("./log");
17
17
  async function downloadUrl(url, file) {
@@ -21,45 +21,59 @@ async function downloadUrl(url, file) {
21
21
  process.env.https_proxy ??
22
22
  process.env.HTTP_PROXY ??
23
23
  process.env.http_proxy;
24
- let res;
24
+ // Created once and closed in `finally` so its connection pool never leaks,
25
+ // even across the multiple throw paths below.
26
+ const dispatcher = proxy ? new undici_1.ProxyAgent(proxy) : undefined;
25
27
  try {
26
- res = await (0, node_fetch_1.default)(url, proxy ? { agent: (0, https_proxy_agent_1.default)(proxy) } : undefined);
27
- }
28
- catch (err) {
29
- log_1.log.disableProgress();
30
- throw (0, log_1.wasReported)(`Network error during fetch: ${err.message}`);
31
- }
32
- if (!res.ok) {
33
- log_1.log.disableProgress();
34
- throw (0, log_1.wasReported)(`${res.status}: ${res.statusText}`);
35
- }
36
- const tempFile = `${file}.downloading`;
37
- (0, fs_1.mkdirSync)(path_1.default.dirname(tempFile), { recursive: true });
38
- const ws = (0, fs_1.createWriteStream)(tempFile);
39
- const totalSize = Number(res.headers.get('content-length'));
40
- let currentSize = 0;
41
- res.body.on('data', (chunk) => {
42
- if (totalSize != null && totalSize !== 0) {
43
- currentSize += chunk.length;
44
- log_1.log.showProgress((currentSize / totalSize) * 100);
28
+ let res;
29
+ try {
30
+ res = await (0, undici_1.fetch)(url, dispatcher ? { dispatcher } : undefined);
45
31
  }
46
- });
47
- res.body.pipe(ws);
48
- return new Promise((resolve, reject) => {
49
- stream_1.default.finished(ws, (err) => {
50
- if (err) {
51
- log_1.log.disableProgress();
52
- (0, fs_1.rmSync)(tempFile);
53
- reject((0, log_1.wasReported)(`${err.name}: ${err.message}`));
54
- }
55
- else {
56
- log_1.log.showProgress(100);
57
- log_1.log.disableProgress();
58
- (0, fs_1.renameSync)(tempFile, file);
59
- resolve();
32
+ catch (err) {
33
+ log_1.log.disableProgress();
34
+ throw (0, log_1.wasReported)(`Network error during fetch: ${err.message}`);
35
+ }
36
+ if (!res.ok) {
37
+ log_1.log.disableProgress();
38
+ throw (0, log_1.wasReported)(`${res.status}: ${res.statusText}`);
39
+ }
40
+ if (!res.body) {
41
+ log_1.log.disableProgress();
42
+ throw (0, log_1.wasReported)(`Empty response body for ${url}`);
43
+ }
44
+ const tempFile = `${file}.downloading`;
45
+ (0, fs_1.mkdirSync)(path_1.default.dirname(tempFile), { recursive: true });
46
+ const ws = (0, fs_1.createWriteStream)(tempFile);
47
+ const totalSize = Number(res.headers.get('content-length'));
48
+ let currentSize = 0;
49
+ const body = stream_1.Readable.fromWeb(res.body);
50
+ body.on('data', (chunk) => {
51
+ // Falsy for both a missing header (`NaN`) and a zero length, avoiding a
52
+ // `NaN%` progress reading.
53
+ if (totalSize) {
54
+ currentSize += chunk.length;
55
+ log_1.log.showProgress((currentSize / totalSize) * 100);
60
56
  }
61
57
  });
62
- });
58
+ // `pipeline` propagates errors from the source (`body`) as well as the
59
+ // destination (`ws`), so a truncated/aborted download rejects loudly
60
+ // instead of leaving the promise unsettled and the process exiting
61
+ // silently.
62
+ try {
63
+ await (0, promises_2.pipeline)(body, ws);
64
+ }
65
+ catch (err) {
66
+ log_1.log.disableProgress();
67
+ (0, fs_1.rmSync)(tempFile, { force: true });
68
+ throw (0, log_1.wasReported)(`${err.name}: ${err.message}`);
69
+ }
70
+ log_1.log.showProgress(100);
71
+ log_1.log.disableProgress();
72
+ (0, fs_1.renameSync)(tempFile, file);
73
+ }
74
+ finally {
75
+ await dispatcher?.close();
76
+ }
63
77
  }
64
78
  exports.downloadUrl = downloadUrl;
65
79
  async function hash(filePath) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yao-pkg/pkg-fetch",
3
- "version": "3.6.2",
3
+ "version": "3.6.4",
4
4
  "description": "Compiles and stores base binaries for pkg",
5
5
  "main": "lib-es5/index.js",
6
6
  "license": "MIT",
@@ -18,18 +18,16 @@
18
18
  "patches/*"
19
19
  ],
20
20
  "dependencies": {
21
- "https-proxy-agent": "^5.0.0",
22
- "node-fetch": "^2.6.6",
23
21
  "picocolors": "^1.1.0",
24
22
  "progress": "^2.0.3",
25
23
  "semver": "^7.3.5",
26
24
  "tar-fs": "^3.1.1",
25
+ "undici": "^7.28.0",
27
26
  "yargs": "^16.2.0"
28
27
  },
29
28
  "devDependencies": {
30
29
  "@release-it/conventional-changelog": "^7.0.2",
31
- "@types/node": "^16.18.113",
32
- "@types/node-fetch": "^2.5.12",
30
+ "@types/node": "^20.19.43",
33
31
  "@types/progress": "^2.0.5",
34
32
  "@types/semver": "^7.3.9",
35
33
  "@types/tar-fs": "^2.0.1",
@@ -1,32 +1,29 @@
1
- diff --git node/common.gypi node/common.gypi
2
- index 576d5057d9..34e85ee423 100644
3
- --- node/common.gypi
4
- +++ node/common.gypi
5
- @@ -192,7 +192,7 @@
6
- ['clang==1', {
7
- 'lto': ' -flto ', # Clang
8
- }, {
9
- - 'lto': ' -flto=4 -fuse-linker-plugin -ffat-lto-objects ', # GCC
10
- + 'lto': ' -flto=4 -ffat-lto-objects ', # GCC
11
- }],
12
- ],
13
- },
14
1
  diff --git node/deps/ngtcp2/nghttp3/lib/nghttp3_ringbuf.c node/deps/ngtcp2/nghttp3/lib/nghttp3_ringbuf.c
15
- index 7d3ab39bf8..67a48dee53 100644
2
+ index dac89ef12e..e5cf338ff4 100644
16
3
  --- node/deps/ngtcp2/nghttp3/lib/nghttp3_ringbuf.c
17
4
  +++ node/deps/ngtcp2/nghttp3/lib/nghttp3_ringbuf.c
18
- @@ -34,10 +34,7 @@
5
+ @@ -33,10 +33,17 @@
6
+
19
7
  #include "nghttp3_macro.h"
20
8
 
21
- static int ispow2(size_t n) {
22
- -#if defined(_MSC_VER) && !defined(__clang__) && \
23
- - (defined(_M_ARM) || (defined(_M_ARM64) && _MSC_VER < 1941))
24
- - return n && !(n & (n - 1));
25
- -#elif defined(WIN32)
26
- +#if defined(WIN32)
27
- return 1 == __popcnt((unsigned int)n);
28
- #else /* !((defined(_MSC_VER) && !defined(__clang__) && (defined(_M_ARM) || \
29
- (defined(_M_ARM64) && _MSC_VER < 1941))) || defined(WIN32)) */
9
+ -#ifndef NDEBUG
10
+ -/* Power-of-two test; simple portable bit trick. */
11
+ -static int ispow2(size_t n) { return n && !(n & (n - 1)); }
12
+ -#endif /* !defined(NDEBUG) */
13
+ +static int ispow2(size_t n) {
14
+ +#if defined(_MSC_VER) && !defined(__clang__) && \
15
+ + (defined(_M_ARM) || (defined(_M_ARM64) && _MSC_VER < 1941))
16
+ + return n && !(n & (n - 1));
17
+ +#elif defined(WIN32)
18
+ + return 1 == __popcnt((unsigned int)n);
19
+ +#else /* !((defined(_MSC_VER) && !defined(__clang__) && (defined(_M_ARM) || \
20
+ + (defined(_M_ARM64) && _MSC_VER < 1941))) || defined(WIN32)) */
21
+ + return n && !(n & (n - 1));
22
+ +#endif
23
+ +}
24
+
25
+ int nghttp3_ringbuf_init(nghttp3_ringbuf *rb, size_t nmemb, size_t size,
26
+ const nghttp3_mem *mem) {
30
27
  diff --git node/deps/ngtcp2/ngtcp2/lib/ngtcp2_ringbuf.c node/deps/ngtcp2/ngtcp2/lib/ngtcp2_ringbuf.c
31
28
  index 353afca4d4..dea944aed5 100644
32
29
  --- node/deps/ngtcp2/ngtcp2/lib/ngtcp2_ringbuf.c
@@ -486,7 +483,7 @@ index 0000000000..a697294fdf
486
483
  + }());
487
484
  +}());
488
485
  diff --git node/lib/internal/modules/cjs/loader.js node/lib/internal/modules/cjs/loader.js
489
- index df656b8601..a49a1025a4 100644
486
+ index 11a7196698..de729b660b 100644
490
487
  --- node/lib/internal/modules/cjs/loader.js
491
488
  +++ node/lib/internal/modules/cjs/loader.js
492
489
  @@ -267,12 +267,15 @@ function stat(filename) {
@@ -599,10 +596,10 @@ index ae71080620..b05638de75 100644
599
596
  throw e; /* node-do-not-add-exception-line */
600
597
  }
601
598
  diff --git node/src/inspector_agent.cc node/src/inspector_agent.cc
602
- index f62eb36b57..8ccc42dbd4 100644
599
+ index 5e1d9149dc..1426160ac0 100644
603
600
  --- node/src/inspector_agent.cc
604
601
  +++ node/src/inspector_agent.cc
605
- @@ -833,11 +833,6 @@ bool Agent::Start(const std::string& path,
602
+ @@ -858,11 +858,6 @@ bool Agent::Start(const std::string& path,
606
603
  StartIoThreadAsyncCallback));
607
604
  uv_unref(reinterpret_cast<uv_handle_t*>(&start_io_thread_async));
608
605
  start_io_thread_async.data = this;
@@ -615,7 +612,7 @@ index f62eb36b57..8ccc42dbd4 100644
615
612
  parent_env_->AddCleanupHook([](void* data) {
616
613
  Environment* env = static_cast<Environment*>(data);
617
614
  diff --git node/src/node.cc node/src/node.cc
618
- index 0bc086ccd1..9a76ce03cc 100644
615
+ index 6f899ec062..1777a36383 100644
619
616
  --- node/src/node.cc
620
617
  +++ node/src/node.cc
621
618
  @@ -351,6 +351,8 @@ MaybeLocal<Value> StartExecution(Environment* env,
@@ -643,10 +640,10 @@ index 0bc086ccd1..9a76ce03cc 100644
643
640
  }
644
641
 
645
642
  diff --git node/src/node_contextify.cc node/src/node_contextify.cc
646
- index d3568da72a..e01d00067a 100644
643
+ index 211bc07416..a8f4eeb126 100644
647
644
  --- node/src/node_contextify.cc
648
645
  +++ node/src/node_contextify.cc
649
- @@ -87,6 +87,7 @@ using v8::String;
646
+ @@ -88,6 +88,7 @@ using v8::String;
650
647
  using v8::Symbol;
651
648
  using v8::UnboundScript;
652
649
  using v8::Value;
@@ -654,7 +651,7 @@ index d3568da72a..e01d00067a 100644
654
651
 
655
652
  // The vm module executes code in a sandboxed environment with a different
656
653
  // global object than the rest of the code. This is achieved by applying
657
- @@ -970,13 +971,13 @@ void ContextifyScript::New(const FunctionCallbackInfo<Value>& args) {
654
+ @@ -997,13 +998,13 @@ void ContextifyScript::New(const FunctionCallbackInfo<Value>& args) {
658
655
  Local<ArrayBufferView> cached_data_buf;
659
656
  bool produce_cached_data = false;
660
657
  Local<Context> parsing_context = context;
@@ -671,7 +668,7 @@ index d3568da72a..e01d00067a 100644
671
668
  CHECK(args[2]->IsNumber());
672
669
  line_offset = args[2].As<Int32>()->Value();
673
670
  CHECK(args[3]->IsNumber());
674
- @@ -997,6 +998,11 @@ void ContextifyScript::New(const FunctionCallbackInfo<Value>& args) {
671
+ @@ -1024,6 +1025,11 @@ void ContextifyScript::New(const FunctionCallbackInfo<Value>& args) {
675
672
  }
676
673
  CHECK(args[7]->IsSymbol());
677
674
  id_symbol = args[7].As<Symbol>();
@@ -683,7 +680,7 @@ index d3568da72a..e01d00067a 100644
683
680
  }
684
681
 
685
682
  ContextifyScript* contextify_script = New(env, args.This());
686
- @@ -1043,6 +1049,10 @@ void ContextifyScript::New(const FunctionCallbackInfo<Value>& args) {
683
+ @@ -1070,6 +1076,10 @@ void ContextifyScript::New(const FunctionCallbackInfo<Value>& args) {
687
684
  ShouldNotAbortOnUncaughtScope no_abort_scope(env);
688
685
  Context::Scope scope(parsing_context);
689
686
 
@@ -694,7 +691,7 @@ index d3568da72a..e01d00067a 100644
694
691
  MaybeLocal<UnboundScript> maybe_v8_script =
695
692
  ScriptCompiler::CompileUnboundScript(isolate, &source, compile_options);
696
693
 
697
- @@ -1057,6 +1067,12 @@ void ContextifyScript::New(const FunctionCallbackInfo<Value>& args) {
694
+ @@ -1084,6 +1094,12 @@ void ContextifyScript::New(const FunctionCallbackInfo<Value>& args) {
698
695
  return;
699
696
  }
700
697
 
@@ -707,7 +704,7 @@ index d3568da72a..e01d00067a 100644
707
704
  contextify_script->set_unbound_script(v8_script);
708
705
 
709
706
  std::unique_ptr<ScriptCompiler::CachedData> new_cached_data;
710
- @@ -1069,7 +1085,7 @@ void ContextifyScript::New(const FunctionCallbackInfo<Value>& args) {
707
+ @@ -1096,7 +1112,7 @@ void ContextifyScript::New(const FunctionCallbackInfo<Value>& args) {
711
708
  if (contextify_script->object()
712
709
  ->SetPrivate(context, env->host_defined_option_symbol(), id_symbol)
713
710
  .IsNothing()) {
@@ -716,7 +713,7 @@ index d3568da72a..e01d00067a 100644
716
713
  }
717
714
  if (StoreCodeCacheResult(env,
718
715
  self,
719
- @@ -1080,6 +1096,9 @@ void ContextifyScript::New(const FunctionCallbackInfo<Value>& args) {
716
+ @@ -1107,6 +1123,9 @@ void ContextifyScript::New(const FunctionCallbackInfo<Value>& args) {
720
717
  .IsNothing()) {
721
718
  return;
722
719
  }
@@ -837,10 +834,10 @@ index 3295121b87..bfe838b8c1 100644
837
834
  + return adjacent(c, nargv);
838
835
  +}
839
836
  diff --git node/src/node_options.cc node/src/node_options.cc
840
- index 79d7c8cac0..11e2a8a746 100644
837
+ index b7062241d5..6098847b2a 100644
841
838
  --- node/src/node_options.cc
842
839
  +++ node/src/node_options.cc
843
- @@ -430,6 +430,7 @@ void Parse(
840
+ @@ -450,6 +450,7 @@ void Parse(
844
841
  // TODO(addaleax): Make that unnecessary.
845
842
 
846
843
  DebugOptionsParser::DebugOptionsParser() {
@@ -849,7 +846,7 @@ index 79d7c8cac0..11e2a8a746 100644
849
846
  "set host:port for inspector",
850
847
  &DebugOptions::host_port,
851
848
  diff --git node/tools/icu/icu-generic.gyp node/tools/icu/icu-generic.gyp
852
- index f007c65232..002a00a6ae 100644
849
+ index f49b4ddba7..eb1e4c0f9b 100644
853
850
  --- node/tools/icu/icu-generic.gyp
854
851
  +++ node/tools/icu/icu-generic.gyp
855
852
  @@ -52,7 +52,7 @@
@@ -14,7 +14,7 @@ index 406f1d0ba5..fb8eea420d 100644
14
14
  static const char* GetVersion();
15
15
 
16
16
  diff --git node/deps/v8/src/api/api.cc node/deps/v8/src/api/api.cc
17
- index 9ef4e3b4a6..34cabe171c 100644
17
+ index bdb9f715de..bed9acd14b 100644
18
18
  --- node/deps/v8/src/api/api.cc
19
19
  +++ node/deps/v8/src/api/api.cc
20
20
  @@ -469,6 +469,28 @@ void V8::SetFlagsFromCommandLine(int* argc, char** argv, bool remove_flags) {
@@ -432,10 +432,10 @@ index 0000000000..a697294fdf
432
432
  + }());
433
433
  +}());
434
434
  diff --git node/lib/internal/modules/cjs/loader.js node/lib/internal/modules/cjs/loader.js
435
- index 65a35299eb..025eb1c92f 100644
435
+ index a97a5f27a2..cf6c9d1a29 100644
436
436
  --- node/lib/internal/modules/cjs/loader.js
437
437
  +++ node/lib/internal/modules/cjs/loader.js
438
- @@ -267,12 +267,15 @@ function stat(filename) {
438
+ @@ -272,12 +272,15 @@ function stat(filename) {
439
439
  // Guard against internal bugs where a non-string filename is passed in by mistake.
440
440
  assert(typeof filename === 'string');
441
441
 
@@ -489,7 +489,7 @@ index 6c6bf0383b..25db3d9f43 100644
489
489
  __proto__: null,
490
490
  ...result.data,
491
491
  diff --git node/lib/internal/process/pre_execution.js node/lib/internal/process/pre_execution.js
492
- index 16a80c2d4f..4f6232e8b8 100644
492
+ index a9724f1e6b..943d6998d2 100644
493
493
  --- node/lib/internal/process/pre_execution.js
494
494
  +++ node/lib/internal/process/pre_execution.js
495
495
  @@ -42,7 +42,11 @@ const {
@@ -504,7 +504,7 @@ index 16a80c2d4f..4f6232e8b8 100644
504
504
  return prepareExecution({
505
505
  expandArgv1,
506
506
  initializeModules,
507
- @@ -281,7 +285,8 @@ function patchProcessObject(expandArgv1) {
507
+ @@ -282,7 +286,8 @@ function patchProcessObject(expandArgv1) {
508
508
  let mainEntry;
509
509
  // If requested, update process.argv[1] to replace whatever the user provided with the resolved absolute file path of
510
510
  // the entry point.
@@ -514,7 +514,7 @@ index 16a80c2d4f..4f6232e8b8 100644
514
514
  // Expand process.argv[1] into a full path.
515
515
  const path = require('path');
516
516
  try {
517
- @@ -755,6 +760,7 @@ function loadPreloadModules() {
517
+ @@ -766,6 +771,7 @@ function loadPreloadModules() {
518
518
  // For user code, we preload modules if `-r` is passed
519
519
  const preloadModules = getOptionValue('--require');
520
520
  if (preloadModules && preloadModules.length > 0) {
@@ -523,10 +523,10 @@ index 16a80c2d4f..4f6232e8b8 100644
523
523
  Module: {
524
524
  _preloadModules,
525
525
  diff --git node/lib/vm.js node/lib/vm.js
526
- index ae71080620..b05638de75 100644
526
+ index 2c7446af60..95daf7caa1 100644
527
527
  --- node/lib/vm.js
528
528
  +++ node/lib/vm.js
529
- @@ -98,6 +98,7 @@ class Script extends ContextifyScript {
529
+ @@ -99,6 +99,7 @@ class Script extends ContextifyScript {
530
530
  produceCachedData = false,
531
531
  importModuleDynamically,
532
532
  [kParsingContext]: parsingContext,
@@ -534,7 +534,7 @@ index ae71080620..b05638de75 100644
534
534
  } = options;
535
535
 
536
536
  validateString(filename, 'options.filename');
537
- @@ -121,7 +122,8 @@ class Script extends ContextifyScript {
537
+ @@ -122,7 +123,8 @@ class Script extends ContextifyScript {
538
538
  cachedData,
539
539
  produceCachedData,
540
540
  parsingContext,
@@ -589,7 +589,7 @@ index 4ba019ddca..b30d716a41 100644
589
589
  }
590
590
 
591
591
  diff --git node/src/node_contextify.cc node/src/node_contextify.cc
592
- index 14534ab896..dad27d634e 100644
592
+ index 40ed019a73..3b74ea28d5 100644
593
593
  --- node/src/node_contextify.cc
594
594
  +++ node/src/node_contextify.cc
595
595
  @@ -88,6 +88,7 @@ using v8::String;
@@ -600,7 +600,7 @@ index 14534ab896..dad27d634e 100644
600
600
 
601
601
  // The vm module executes code in a sandboxed environment with a different
602
602
  // global object than the rest of the code. This is achieved by applying
603
- @@ -982,13 +983,13 @@ void ContextifyScript::New(const FunctionCallbackInfo<Value>& args) {
603
+ @@ -981,13 +982,13 @@ void ContextifyScript::New(const FunctionCallbackInfo<Value>& args) {
604
604
  Local<ArrayBufferView> cached_data_buf;
605
605
  bool produce_cached_data = false;
606
606
  Local<Context> parsing_context = context;
@@ -617,7 +617,7 @@ index 14534ab896..dad27d634e 100644
617
617
  CHECK(args[2]->IsNumber());
618
618
  line_offset = args[2].As<Int32>()->Value();
619
619
  CHECK(args[3]->IsNumber());
620
- @@ -1009,6 +1010,11 @@ void ContextifyScript::New(const FunctionCallbackInfo<Value>& args) {
620
+ @@ -1008,6 +1009,11 @@ void ContextifyScript::New(const FunctionCallbackInfo<Value>& args) {
621
621
  }
622
622
  CHECK(args[7]->IsSymbol());
623
623
  id_symbol = args[7].As<Symbol>();
@@ -629,7 +629,7 @@ index 14534ab896..dad27d634e 100644
629
629
  }
630
630
 
631
631
  ContextifyScript* contextify_script = New(env, args.This());
632
- @@ -1055,6 +1061,10 @@ void ContextifyScript::New(const FunctionCallbackInfo<Value>& args) {
632
+ @@ -1054,6 +1060,10 @@ void ContextifyScript::New(const FunctionCallbackInfo<Value>& args) {
633
633
  ShouldNotAbortOnUncaughtScope no_abort_scope(env);
634
634
  Context::Scope scope(parsing_context);
635
635
 
@@ -640,7 +640,7 @@ index 14534ab896..dad27d634e 100644
640
640
  MaybeLocal<UnboundScript> maybe_v8_script =
641
641
  ScriptCompiler::CompileUnboundScript(isolate, &source, compile_options);
642
642
 
643
- @@ -1069,6 +1079,12 @@ void ContextifyScript::New(const FunctionCallbackInfo<Value>& args) {
643
+ @@ -1068,6 +1078,12 @@ void ContextifyScript::New(const FunctionCallbackInfo<Value>& args) {
644
644
  return;
645
645
  }
646
646
 
@@ -653,7 +653,7 @@ index 14534ab896..dad27d634e 100644
653
653
  contextify_script->set_unbound_script(v8_script);
654
654
 
655
655
  std::unique_ptr<ScriptCompiler::CachedData> new_cached_data;
656
- @@ -1081,7 +1097,7 @@ void ContextifyScript::New(const FunctionCallbackInfo<Value>& args) {
656
+ @@ -1080,7 +1096,7 @@ void ContextifyScript::New(const FunctionCallbackInfo<Value>& args) {
657
657
  if (contextify_script->object()
658
658
  ->SetPrivate(context, env->host_defined_option_symbol(), id_symbol)
659
659
  .IsNothing()) {
@@ -662,7 +662,7 @@ index 14534ab896..dad27d634e 100644
662
662
  }
663
663
  if (StoreCodeCacheResult(env,
664
664
  self,
665
- @@ -1092,6 +1108,9 @@ void ContextifyScript::New(const FunctionCallbackInfo<Value>& args) {
665
+ @@ -1091,6 +1107,9 @@ void ContextifyScript::New(const FunctionCallbackInfo<Value>& args) {
666
666
  .IsNothing()) {
667
667
  return;
668
668
  }
@@ -783,7 +783,7 @@ index 3295121b87..bfe838b8c1 100644
783
783
  + return adjacent(c, nargv);
784
784
  +}
785
785
  diff --git node/src/node_options.cc node/src/node_options.cc
786
- index 99c5a7dbe4..b0ae409120 100644
786
+ index 769fabbfe8..8007dd3cdd 100644
787
787
  --- node/src/node_options.cc
788
788
  +++ node/src/node_options.cc
789
789
  @@ -466,6 +466,7 @@ void Parse(
@@ -1,7 +1,7 @@
1
1
  {
2
- "v26.2.0": ["node.v26.2.0.cpp.patch"],
3
- "v24.15.0": ["node.v24.15.0.cpp.patch"],
4
- "v22.22.3": ["node.v22.22.3.cpp.patch"],
2
+ "v26.4.0": ["node.v26.4.0.cpp.patch"],
3
+ "v24.18.0": ["node.v24.18.0.cpp.patch"],
4
+ "v22.23.1": ["node.v22.23.1.cpp.patch"],
5
5
  "v20.20.2": ["node.v20.20.2.cpp.patch"],
6
6
  "v18.20.8": ["node.v18.20.8.cpp.patch"],
7
7
  "v16.20.2": ["node.v16.20.2.cpp.patch"],