@yao-pkg/pkg-fetch 3.6.3 → 3.6.5
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.
- package/lib-es5/expected-shas.json +31 -31
- package/lib-es5/utils.js +52 -38
- package/package.json +3 -5
- package/patches/{node.v24.15.0.cpp.patch → node.v24.18.1.cpp.patch} +36 -39
- package/patches/{node.v26.2.0.cpp.patch → node.v26.5.1.cpp.patch} +20 -20
- package/patches/patches.json +3 -3
- /package/patches/{node.v22.22.3.cpp.patch → node.v22.23.2.cpp.patch} +0 -0
|
@@ -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.
|
|
47
|
-
"node-v22.
|
|
48
|
-
"node-v22.
|
|
49
|
-
"node-v22.
|
|
50
|
-
"node-v22.
|
|
51
|
-
"node-v22.
|
|
52
|
-
"node-v22.
|
|
53
|
-
"node-v22.
|
|
54
|
-
"node-v22.
|
|
55
|
-
"node-v22.
|
|
56
|
-
"node-v22.
|
|
57
|
-
"node-v24.
|
|
58
|
-
"node-v24.
|
|
59
|
-
"node-v24.
|
|
60
|
-
"node-v24.
|
|
61
|
-
"node-v24.
|
|
62
|
-
"node-v24.
|
|
63
|
-
"node-v24.
|
|
64
|
-
"node-v24.
|
|
65
|
-
"node-v24.
|
|
66
|
-
"node-v24.
|
|
67
|
-
"node-v26.
|
|
68
|
-
"node-v26.
|
|
69
|
-
"node-v26.
|
|
70
|
-
"node-v26.
|
|
71
|
-
"node-v26.
|
|
72
|
-
"node-v26.
|
|
73
|
-
"node-v26.
|
|
74
|
-
"node-v26.
|
|
75
|
-
"node-v26.
|
|
76
|
-
"node-v26.
|
|
46
|
+
"node-v22.23.2-alpine-arm64": "c5bd55fd1567068eaa9ce56b56cce0d506dec72038929c385b0ead868478f143",
|
|
47
|
+
"node-v22.23.2-alpine-x64": "f9bdcd970365584232e6db70eaffd4785ad96f1bded297b31c2fa8be65ea4aad",
|
|
48
|
+
"node-v22.23.2-linux-arm64": "389df3e8fbb35e34a6b255fb9846dd7d6bf445d95709c6fd235e6926b10f9d51",
|
|
49
|
+
"node-v22.23.2-linux-x64": "6e3f32d02f548cc87d462441666b28fec9beac4278b0831a0929a7b49bac3886",
|
|
50
|
+
"node-v22.23.2-linuxstatic-arm64": "d587135cc24c6453c6fb97509c0468209887c0aaf56574f4ffb5e2ddb2c6f0f8",
|
|
51
|
+
"node-v22.23.2-linuxstatic-armv7": "bd392f93ae55d0480ee8e66678b16a00eddffeeb0a814e3de02f472c9c875656",
|
|
52
|
+
"node-v22.23.2-linuxstatic-x64": "2e60ac3f81558e52f437f831afb0128f5e0e6e63d6608094748cce3043e42378",
|
|
53
|
+
"node-v22.23.2-macos-arm64": "31b0f3a7705e2f10a496dbeba1a78f2590b4bfcbe8d026c4ec90cf693c6f02af",
|
|
54
|
+
"node-v22.23.2-macos-x64": "aa7517861bab8d3dd0c54a3d1d41becb0b1925a017e662018372dbf875dbfce0",
|
|
55
|
+
"node-v22.23.2-win-arm64": "d625fdb98c359a0b234566ff66d50e802c9f48abad732b46d54014e41d9389db",
|
|
56
|
+
"node-v22.23.2-win-x64": "555d3dceaaf1c5628ac8fa23d1ebde46a424d2ad6782cc2412be8eed4a7a6b69",
|
|
57
|
+
"node-v24.18.1-alpine-arm64": "2754a618f939399a9c21930ed30442adb0d90471bae925fd84118e70c27e7a6f",
|
|
58
|
+
"node-v24.18.1-alpine-x64": "21fccbe61f5e94aff761bc80fff204583c4d01255b76cc99dfa7b60dbab8580d",
|
|
59
|
+
"node-v24.18.1-linux-arm64": "55674b6978988d24cac7d56e0149a9d52596587e47c8e5f910df9aa9a39389ed",
|
|
60
|
+
"node-v24.18.1-linux-x64": "7db3cb2390125d632929fd3ef3925be35cd7c949d55961c4be3f74b374736945",
|
|
61
|
+
"node-v24.18.1-linuxstatic-arm64": "07458292bbb60f90d04cbd45459e921a865d4325b43fcc6913ab02a88a1b86e5",
|
|
62
|
+
"node-v24.18.1-linuxstatic-x64": "1ec3e0bf407c22ddbe189b7003912de02a2fcab2c97bae88ce0786c34d8f072b",
|
|
63
|
+
"node-v24.18.1-macos-arm64": "9e0d0f0c0c1c448c91a77e58cd6ccaab5dd37034cf2f578741fc0f08be4e8dbe",
|
|
64
|
+
"node-v24.18.1-macos-x64": "e712a8d6fe64864b2e727debebe5e84db4d0e6e5a10280d9b39aa374e1c3bace",
|
|
65
|
+
"node-v24.18.1-win-arm64": "bd714ca63f9eae648bd7f2152c28948bc1bb572bd8d4a3d61502280025aefec8",
|
|
66
|
+
"node-v24.18.1-win-x64": "33c93330b42518bf44f23146c6f8f0f74544068ce0f81c6b5e4b0234fd00bd02",
|
|
67
|
+
"node-v26.5.1-alpine-arm64": "31d61f13bf9b2425091e434ed84fbe6bfd7a5f1e35732c58bf3c141797fdfce6",
|
|
68
|
+
"node-v26.5.1-alpine-x64": "c6d51a2e4b6133852b453ae2b1903068b7e365db44869ea0c022bb3d57da9725",
|
|
69
|
+
"node-v26.5.1-linux-arm64": "32b39fa44ac0ca9eb3cd1a8ff6aa5383e2bf2f28c596807fedd949952fdbcb45",
|
|
70
|
+
"node-v26.5.1-linux-x64": "02b77b99449f9781b88698a94bdb7dd5e396c75eacc977639591d69a72c9e436",
|
|
71
|
+
"node-v26.5.1-linuxstatic-arm64": "c4c22d9be2c16b8b39ad3055271455f978ccfcb26e63ba11713b61adddf876c9",
|
|
72
|
+
"node-v26.5.1-linuxstatic-x64": "ba5404a8f9ce8e89ffa1e5690ecd720aaf15ea056289b1ad5db3c20e7b8c323b",
|
|
73
|
+
"node-v26.5.1-macos-arm64": "762617a553d10c7a4a9b07f85906a2784a1b16d1bd3c41994c4936390474d0d5",
|
|
74
|
+
"node-v26.5.1-macos-x64": "4c2b3c7c41273838c318179253d12aad87253165ba8a2fd590a9a5349a5a2bf7",
|
|
75
|
+
"node-v26.5.1-win-arm64": "25355769b98f3105e8c499a954169244737124c516b2efd750030f245abf6ec7",
|
|
76
|
+
"node-v26.5.1-win-x64": "c4778a1bb261597113d142c46c13f708b1cb9f24a0f50cf6ef48a00dd3b0dd94"
|
|
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
|
|
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
|
-
|
|
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
|
|
27
|
-
|
|
28
|
-
|
|
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
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
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.
|
|
3
|
+
"version": "3.6.5",
|
|
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": "^
|
|
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
|
|
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
|
-
@@ -
|
|
5
|
+
@@ -33,10 +33,17 @@
|
|
6
|
+
|
|
19
7
|
#include "nghttp3_macro.h"
|
|
20
8
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
+#if defined(
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
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
|
|
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
|
|
599
|
+
index 5e1d9149dc..1426160ac0 100644
|
|
603
600
|
--- node/src/inspector_agent.cc
|
|
604
601
|
+++ node/src/inspector_agent.cc
|
|
605
|
-
@@ -
|
|
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
|
|
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
|
|
643
|
+
index 211bc07416..a8f4eeb126 100644
|
|
647
644
|
--- node/src/node_contextify.cc
|
|
648
645
|
+++ node/src/node_contextify.cc
|
|
649
|
-
@@ -
|
|
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
|
-
@@ -
|
|
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
|
-
@@ -
|
|
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
|
-
@@ -
|
|
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
|
-
@@ -
|
|
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
|
-
@@ -
|
|
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
|
-
@@ -
|
|
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
|
|
837
|
+
index b7062241d5..6098847b2a 100644
|
|
841
838
|
--- node/src/node_options.cc
|
|
842
839
|
+++ node/src/node_options.cc
|
|
843
|
-
@@ -
|
|
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
|
|
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
|
|
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) {
|
|
@@ -364,7 +364,7 @@ index 6732808e85..ebb7938f64 100644
|
|
|
364
364
|
}
|
|
365
365
|
}
|
|
366
366
|
diff --git node/lib/child_process.js node/lib/child_process.js
|
|
367
|
-
index
|
|
367
|
+
index 0e3e04af0d..6efe7cfe78 100644
|
|
368
368
|
--- node/lib/child_process.js
|
|
369
369
|
+++ node/lib/child_process.js
|
|
370
370
|
@@ -171,7 +171,7 @@ function fork(modulePath, args = [], options) {
|
|
@@ -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
|
|
435
|
+
index e1f8a0eed3..9f6dae2d3b 100644
|
|
436
436
|
--- node/lib/internal/modules/cjs/loader.js
|
|
437
437
|
+++ node/lib/internal/modules/cjs/loader.js
|
|
438
|
-
@@ -
|
|
438
|
+
@@ -273,12 +273,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
|
|
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
|
-
@@ -
|
|
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
|
-
@@ -
|
|
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
|
|
526
|
+
index 2c7446af60..95daf7caa1 100644
|
|
527
527
|
--- node/lib/vm.js
|
|
528
528
|
+++ node/lib/vm.js
|
|
529
|
-
@@ -
|
|
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
|
-
@@ -
|
|
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
|
|
592
|
+
index dcfaf02c7e..5d1f63a4a8 100644
|
|
593
593
|
--- node/src/node_contextify.cc
|
|
594
594
|
+++ node/src/node_contextify.cc
|
|
595
595
|
@@ -88,6 +88,7 @@ using v8::String;
|
|
@@ -598,9 +598,9 @@ index 14534ab896..dad27d634e 100644
|
|
|
598
598
|
using v8::Value;
|
|
599
599
|
+using v8::V8;
|
|
600
600
|
|
|
601
|
-
//
|
|
602
|
-
//
|
|
603
|
-
@@ -
|
|
601
|
+
// This is a helper function mediates deleted v8::PropertyDescriptor copy/move.
|
|
602
|
+
// The `Fn` receives a mutable reference of a stack allocated
|
|
603
|
+
@@ -983,13 +984,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
|
-
@@ -
|
|
620
|
+
@@ -1010,6 +1011,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
|
-
@@ -
|
|
632
|
+
@@ -1056,6 +1062,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
|
-
@@ -
|
|
643
|
+
@@ -1070,6 +1080,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
|
-
@@ -
|
|
656
|
+
@@ -1082,7 +1098,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
|
-
@@ -
|
|
665
|
+
@@ -1093,6 +1109,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
|
|
786
|
+
index b0ddfb9eb9..9c83f88bf8 100644
|
|
787
787
|
--- node/src/node_options.cc
|
|
788
788
|
+++ node/src/node_options.cc
|
|
789
789
|
@@ -466,6 +466,7 @@ void Parse(
|
package/patches/patches.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"v26.
|
|
3
|
-
"v24.
|
|
4
|
-
"v22.
|
|
2
|
+
"v26.5.1": ["node.v26.5.1.cpp.patch"],
|
|
3
|
+
"v24.18.1": ["node.v24.18.1.cpp.patch"],
|
|
4
|
+
"v22.23.2": ["node.v22.23.2.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"],
|
|
File without changes
|