@yao-pkg/pkg-fetch 3.5.24 → 3.5.26
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/build.js +37 -14
- package/lib-es5/expected-shas.json +32 -22
- package/package.json +2 -2
- package/patches/{node.v20.19.4.cpp.patch → node.v20.19.5.cpp.patch} +6 -6
- package/patches/{node.v22.17.1.cpp.patch → node.v22.19.0.cpp.patch} +75 -38
- package/patches/node.v24.9.0.cpp.patch +855 -0
- package/patches/patches.json +3 -2
package/lib-es5/build.js
CHANGED
|
@@ -84,7 +84,7 @@ function getMajor(nodeVersion) {
|
|
|
84
84
|
var _a = nodeVersion.match(/^v?(\d+)/) || ['', 0], version = _a[1];
|
|
85
85
|
return Number(version) | 0;
|
|
86
86
|
}
|
|
87
|
-
function getConfigureArgs(major, targetPlatform) {
|
|
87
|
+
function getConfigureArgs(major, targetPlatform, targetArch) {
|
|
88
88
|
var args = [];
|
|
89
89
|
// first of all v8_inspector introduces the use
|
|
90
90
|
// of `prime_rehash_policy` symbol that requires
|
|
@@ -116,12 +116,19 @@ function getConfigureArgs(major, targetPlatform) {
|
|
|
116
116
|
// bundled npm package manager
|
|
117
117
|
args.push('--without-npm');
|
|
118
118
|
// Small ICU
|
|
119
|
-
|
|
119
|
+
if (system_1.hostPlatform !== 'win' || major < 24) {
|
|
120
|
+
args.push('--with-intl=small-icu');
|
|
121
|
+
}
|
|
120
122
|
// Workaround for nodejs/node#39313
|
|
121
123
|
// All supported macOS versions have zlib as a system library
|
|
122
124
|
if (targetPlatform === 'macos') {
|
|
123
125
|
args.push('--shared-zlib');
|
|
124
126
|
}
|
|
127
|
+
// macos cross-build from arm64 to x64
|
|
128
|
+
if (targetPlatform === 'macos' && system_1.hostArch === 'arm64' && targetArch === 'x64') {
|
|
129
|
+
args.push('--dest-os=mac');
|
|
130
|
+
args.push('--dest-cpu=x64');
|
|
131
|
+
}
|
|
125
132
|
return args;
|
|
126
133
|
}
|
|
127
134
|
function tarFetch(nodeVersion) {
|
|
@@ -199,7 +206,8 @@ function tarExtract(nodeVersion, suppressTarOutput) {
|
|
|
199
206
|
strip: 1,
|
|
200
207
|
map: function (header) {
|
|
201
208
|
if (!suppressTarOutput) {
|
|
202
|
-
|
|
209
|
+
// disabled for now - can't get cmdline flag to work with all builds
|
|
210
|
+
// log.info(header.name);
|
|
203
211
|
}
|
|
204
212
|
return header;
|
|
205
213
|
},
|
|
@@ -270,7 +278,7 @@ function compileOnWindows(nodeVersion, targetArch, targetPlatform) {
|
|
|
270
278
|
case 0:
|
|
271
279
|
args = ['/c', 'vcbuild.bat', targetArch];
|
|
272
280
|
major = getMajor(nodeVersion);
|
|
273
|
-
config_flags = getConfigureArgs(major, targetPlatform);
|
|
281
|
+
config_flags = getConfigureArgs(major, targetPlatform, targetArch);
|
|
274
282
|
// The dtrace and etw support was removed in https://github.com/nodejs/node/commit/aa3a572e6bee116cde69508dc29478b40f40551a
|
|
275
283
|
if (major <= 18) {
|
|
276
284
|
// Event Tracing for Windows
|
|
@@ -284,8 +292,15 @@ function compileOnWindows(nodeVersion, targetArch, targetPlatform) {
|
|
|
284
292
|
if (major >= 12) {
|
|
285
293
|
args.push('ltcg');
|
|
286
294
|
}
|
|
295
|
+
// Node24 builds on Windows crash with small-icu at icudat codegen
|
|
296
|
+
// workaround for now is to enable full-icu
|
|
297
|
+
// TODO check with newer node/tooling/gh-image versions
|
|
298
|
+
if (major >= 24) {
|
|
299
|
+
args.push('full-icu');
|
|
300
|
+
}
|
|
287
301
|
// Can't cross compile for arm64 with small-icu
|
|
288
|
-
if (
|
|
302
|
+
if (major < 24 &&
|
|
303
|
+
system_1.hostArch !== targetArch &&
|
|
289
304
|
!config_flags.includes('--with-intl=full-icu')) {
|
|
290
305
|
config_flags.push('--without-intl');
|
|
291
306
|
}
|
|
@@ -307,9 +322,9 @@ function compileOnWindows(nodeVersion, targetArch, targetPlatform) {
|
|
|
307
322
|
var _a = process.env.MAKE_JOB_COUNT, MAKE_JOB_COUNT = _a === void 0 ? os_1.default.cpus().length : _a;
|
|
308
323
|
function compileOnUnix(nodeVersion, targetArch, targetPlatform) {
|
|
309
324
|
return __awaiter(this, void 0, void 0, function () {
|
|
310
|
-
var args, cpu, _a, _b, CFLAGS, _c, CXXFLAGS, output;
|
|
311
|
-
return __generator(this, function (
|
|
312
|
-
switch (
|
|
325
|
+
var args, cpu, _a, _b, CFLAGS, _c, CXXFLAGS, _d, _e, CFLAGS, _f, CXXFLAGS, _g, LDFLAGS, output;
|
|
326
|
+
return __generator(this, function (_h) {
|
|
327
|
+
switch (_h.label) {
|
|
313
328
|
case 0:
|
|
314
329
|
args = [];
|
|
315
330
|
cpu = {
|
|
@@ -331,12 +346,20 @@ function compileOnUnix(nodeVersion, targetArch, targetPlatform) {
|
|
|
331
346
|
args.push('--with-arm-float-abi=hard');
|
|
332
347
|
args.push('--with-arm-fpu=vfpv3');
|
|
333
348
|
}
|
|
349
|
+
// macos cross-build from arm64 to x64
|
|
350
|
+
if (targetPlatform === "macos" && system_1.hostArch === 'arm64' && targetArch === 'x64') {
|
|
351
|
+
_d = process.env, _e = _d.CFLAGS, CFLAGS = _e === void 0 ? '' : _e, _f = _d.CXXFLAGS, CXXFLAGS = _f === void 0 ? '' : _f, _g = _d.LDFLAGS, LDFLAGS = _g === void 0 ? '' : _g;
|
|
352
|
+
process.env.CFLAGS = "".concat(CFLAGS, " -arch x86_64");
|
|
353
|
+
process.env.CXXFLAGS = "".concat(CXXFLAGS, " -arch x86_64");
|
|
354
|
+
process.env.LDFLAGS = "".concat(LDFLAGS, " -arch x86_64");
|
|
355
|
+
}
|
|
334
356
|
if (system_1.hostArch !== targetArch) {
|
|
335
357
|
log_1.log.warn('Cross compiling!');
|
|
336
358
|
log_1.log.warn('You are responsible for appropriate env like CC, CC_host, etc.');
|
|
337
359
|
args.push('--cross-compiling');
|
|
338
360
|
}
|
|
339
|
-
args.push.apply(args, getConfigureArgs(getMajor(nodeVersion), targetPlatform));
|
|
361
|
+
args.push.apply(args, getConfigureArgs(getMajor(nodeVersion), targetPlatform, targetArch));
|
|
362
|
+
log_1.log.info("Running configure with: ", args.join(" "));
|
|
340
363
|
// TODO same for windows?
|
|
341
364
|
return [4 /*yield*/, (0, utils_1.spawn)('/bin/sh', __spreadArray(['./configure'], args, true), {
|
|
342
365
|
cwd: nodePath,
|
|
@@ -344,19 +367,19 @@ function compileOnUnix(nodeVersion, targetArch, targetPlatform) {
|
|
|
344
367
|
})];
|
|
345
368
|
case 1:
|
|
346
369
|
// TODO same for windows?
|
|
347
|
-
|
|
370
|
+
_h.sent();
|
|
348
371
|
return [4 /*yield*/, (0, utils_1.spawn)(system_1.hostPlatform === 'freebsd' ? 'gmake' : 'make', ['-j', String(MAKE_JOB_COUNT)], {
|
|
349
372
|
cwd: nodePath,
|
|
350
373
|
stdio: 'inherit',
|
|
351
374
|
})];
|
|
352
375
|
case 2:
|
|
353
|
-
|
|
376
|
+
_h.sent();
|
|
354
377
|
output = path_1.default.join(nodePath, 'out/Release/node');
|
|
355
378
|
return [4 /*yield*/, (0, utils_1.spawn)(process.env.STRIP || 'strip', __spreadArray(__spreadArray([], (targetPlatform === 'macos' ? ['-x'] : []), true), [output], false), {
|
|
356
379
|
stdio: 'inherit',
|
|
357
380
|
})];
|
|
358
381
|
case 3:
|
|
359
|
-
|
|
382
|
+
_h.sent();
|
|
360
383
|
if (!(targetPlatform === 'macos')) return [3 /*break*/, 5];
|
|
361
384
|
// Newer versions of Apple Clang automatically ad-hoc sign the compiled executable.
|
|
362
385
|
// However, for final executable to be signable, base binary MUST NOT have an existing signature.
|
|
@@ -366,8 +389,8 @@ function compileOnUnix(nodeVersion, targetArch, targetPlatform) {
|
|
|
366
389
|
case 4:
|
|
367
390
|
// Newer versions of Apple Clang automatically ad-hoc sign the compiled executable.
|
|
368
391
|
// However, for final executable to be signable, base binary MUST NOT have an existing signature.
|
|
369
|
-
|
|
370
|
-
|
|
392
|
+
_h.sent();
|
|
393
|
+
_h.label = 5;
|
|
371
394
|
case 5: return [2 /*return*/, output];
|
|
372
395
|
}
|
|
373
396
|
});
|
|
@@ -32,26 +32,36 @@
|
|
|
32
32
|
"node-v18.20.8-macos-x64": "f2cf139bfe3501d39d22b48a069f9ceb24942b0cdc001a0bc30ea3a68fbcc6b3",
|
|
33
33
|
"node-v18.20.8-win-arm64": "dd56454cfc9292f047413657c8b997006f27ecda8cd7f7dd38acf8d22317e743",
|
|
34
34
|
"node-v18.20.8-win-x64": "4d45cdfbcba3de3f6c0ddcd78251179b9d04dd2fcb2dba2fb052940a2821eb39",
|
|
35
|
-
"node-v20.19.
|
|
36
|
-
"node-v20.19.
|
|
37
|
-
"node-v20.19.
|
|
38
|
-
"node-v20.19.
|
|
39
|
-
"node-v20.19.
|
|
40
|
-
"node-v20.19.
|
|
41
|
-
"node-v20.19.
|
|
42
|
-
"node-v20.19.
|
|
43
|
-
"node-v20.19.
|
|
44
|
-
"node-v20.19.
|
|
45
|
-
"node-v20.19.
|
|
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.
|
|
35
|
+
"node-v20.19.5-alpine-arm64": "f2023b3a16be96ccb71367b83ae353dd096b842a05c83d11e0081f4184bc6cf3",
|
|
36
|
+
"node-v20.19.5-alpine-x64": "d0f2fbb3a05a34242b059b575cd30847efa2a8260d733b674753b0c16ca95cbd",
|
|
37
|
+
"node-v20.19.5-linux-arm64": "d6968f394da2ab55be2eaef486e3e04c984e02360e44210c1c69f980f4fe853d",
|
|
38
|
+
"node-v20.19.5-linux-x64": "2d20d84ccd4d39ef0adf0b3a381c0388290e1ce6784fcf22269881bb471842b0",
|
|
39
|
+
"node-v20.19.5-linuxstatic-arm64": "cd61bef96f43fb48c8a7c25caa4900ecb4b1881d8c690f9d6bc4f9c28091b9a6",
|
|
40
|
+
"node-v20.19.5-linuxstatic-armv7": "f237a057650ebbfae6d9dfc82d2ee29885f60e2dedcd983f17910215eb23613f",
|
|
41
|
+
"node-v20.19.5-linuxstatic-x64": "33b2856138af5992fad38e0d72448e5c708ee77e31e8bce77ec03f1a6e7a2d5b",
|
|
42
|
+
"node-v20.19.5-macos-arm64": "bebb13bf501a03fd9bdfdc08ce597e3b082f569effa64ee310252460555ae54b",
|
|
43
|
+
"node-v20.19.5-macos-x64": "592f50151da65550e5a6125aea0aa5b4fa0214389bb4ff0516e9ae14b439d8f5",
|
|
44
|
+
"node-v20.19.5-win-arm64": "0f94e2049deab1c6591626b1d16f1c03a9cd300d857b8030535978c45d8492ca",
|
|
45
|
+
"node-v20.19.5-win-x64": "1dce94ce8d6f625b9129d5e21d795e11c366da77c9c4d400b4561563c5a970cc",
|
|
46
|
+
"node-v22.19.0-alpine-arm64": "64db52d7a1b5e829b5984420968936fc4812d55ccf20885ae7e8602059275d7c",
|
|
47
|
+
"node-v22.19.0-alpine-x64": "ca81f11119eb89e2135024ca294bb25707f2d49bea068d74cc828ff2604c1923",
|
|
48
|
+
"node-v22.19.0-linux-arm64": "cace9e7d7953770be693fe1dba9bdfb3f6f269dd8102c2b3d08b4873531452f6",
|
|
49
|
+
"node-v22.19.0-linux-x64": "7952983e6c637c6cb118143b440936f1038f94547c35901e890bc034be6ced0f",
|
|
50
|
+
"node-v22.19.0-linuxstatic-arm64": "62fcec80e861328d77455173b7815b0cdf3b0c6f0506d9dee79a7231dec31a4b",
|
|
51
|
+
"node-v22.19.0-linuxstatic-armv7": "5d142dc0970b76955b15383a5fc9a9f9f1c7f37fe419ff1d4dd6932ee86dc026",
|
|
52
|
+
"node-v22.19.0-linuxstatic-x64": "fbb16a3b7cb59b05bde92e82af422edcc4c1f43decead6cb452542fc80c2b888",
|
|
53
|
+
"node-v22.19.0-macos-arm64": "99fe232c87f29ec05754f61643a79f85e574dab1632ea1c47a4174cbc72e0501",
|
|
54
|
+
"node-v22.19.0-macos-x64": "53331111f0e3c895ac4a92a03eb9eb1d246e62f594ce8b46b19af6fbf4340dd3",
|
|
55
|
+
"node-v22.19.0-win-arm64": "046d67caaa35b635cd76ebb0089b65a8dcd4395e0c0854e15fb6fe421f02818a",
|
|
56
|
+
"node-v22.19.0-win-x64": "245248067a44ed6ff081bff54d47eb6376fbb64d87de05f8a24a55c179a10ace",
|
|
57
|
+
"node-v24.8.0-alpine-arm64": "7ae38237759d79694c9cee5a1681d6fbf233ed824166cfff0d29184f1fbd3597",
|
|
58
|
+
"node-v24.8.0-alpine-x64": "d38ef253ee541817fc560b80341517cc978752c04218724779f619ba48aedbfa",
|
|
59
|
+
"node-v24.8.0-linux-arm64": "a63f5e287c0771e31c47b7f99f366bbb93b6c7bd4c475d8c538cc551a06cebb5",
|
|
60
|
+
"node-v24.8.0-linux-x64": "681907eb837fe0ad2040fb4c3b1af52382deb469a1e9754cb90b200bf6b01c6f",
|
|
61
|
+
"node-v24.8.0-linuxstatic-arm64": "5e40c9e2533e6a1128372f7207d837b5a835a6d8621f3e9aea3e707aa08a257e",
|
|
62
|
+
"node-v24.8.0-linuxstatic-x64": "81470985de5f268e510e5ed19456663308007c2f0b201907d63b9e2a8e748eee",
|
|
63
|
+
"node-v24.8.0-macos-arm64": "5972af60eef941eaf6d05c42daf221ece63a6b3d94d237625254aa27ddf1017f",
|
|
64
|
+
"node-v24.8.0-macos-x64": "772d2cf0dc68bb3e9e1df59e17ca0e381cff7793bd0dc19edb5acf4e39553c0a",
|
|
65
|
+
"node-v24.8.0-win-arm64": "b9979ee1462e49a50d17e3a05b43caf00cb41043f794aaf6a3af06f5251f6964",
|
|
66
|
+
"node-v24.8.0-win-x64": "386681759a5c115544465cddaa4a9e2346497d51bced084b718e6cac561e688d"
|
|
57
67
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yao-pkg/pkg-fetch",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.26",
|
|
4
4
|
"description": "Compiles and stores base binaries for pkg",
|
|
5
5
|
"main": "lib-es5/index.js",
|
|
6
6
|
"license": "MIT",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"picocolors": "^1.1.0",
|
|
24
24
|
"progress": "^2.0.3",
|
|
25
25
|
"semver": "^7.3.5",
|
|
26
|
-
"tar-fs": "^
|
|
26
|
+
"tar-fs": "^3.1.1",
|
|
27
27
|
"yargs": "^16.2.0"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
diff --git node/common.gypi node/common.gypi
|
|
2
|
-
index
|
|
2
|
+
index 20e81dea95..3580f7f2e4 100644
|
|
3
3
|
--- node/common.gypi
|
|
4
4
|
+++ node/common.gypi
|
|
5
|
-
@@ -
|
|
5
|
+
@@ -187,7 +187,7 @@
|
|
6
6
|
['clang==1', {
|
|
7
7
|
'lto': ' -flto ', # Clang
|
|
8
8
|
}, {
|
|
@@ -262,10 +262,10 @@ index 0000000000..a697294fdf
|
|
|
262
262
|
+ }());
|
|
263
263
|
+}());
|
|
264
264
|
diff --git node/lib/internal/modules/cjs/loader.js node/lib/internal/modules/cjs/loader.js
|
|
265
|
-
index
|
|
265
|
+
index b12594cc36..bc0361d8aa 100644
|
|
266
266
|
--- node/lib/internal/modules/cjs/loader.js
|
|
267
267
|
+++ node/lib/internal/modules/cjs/loader.js
|
|
268
|
-
@@ -
|
|
268
|
+
@@ -144,7 +144,7 @@ const {
|
|
269
269
|
const assert = require('internal/assert');
|
|
270
270
|
const fs = require('fs');
|
|
271
271
|
const path = require('path');
|
|
@@ -364,7 +364,7 @@ index bb39a0cb42..5fa6cb65cc 100644
|
|
|
364
364
|
parent_env_->AddCleanupHook([](void* data) {
|
|
365
365
|
Environment* env = static_cast<Environment*>(data);
|
|
366
366
|
diff --git node/src/node.cc node/src/node.cc
|
|
367
|
-
index
|
|
367
|
+
index 1137dcafcd..482feb65b5 100644
|
|
368
368
|
--- node/src/node.cc
|
|
369
369
|
+++ node/src/node.cc
|
|
370
370
|
@@ -389,6 +389,8 @@ MaybeLocal<Value> StartExecution(Environment* env, StartExecutionCallback cb) {
|
|
@@ -392,7 +392,7 @@ index 4ad2c8b804..ab6174fab6 100644
|
|
|
392
392
|
}
|
|
393
393
|
|
|
394
394
|
diff --git node/src/node_contextify.cc node/src/node_contextify.cc
|
|
395
|
-
index
|
|
395
|
+
index 2b93926a73..9f68232bd4 100644
|
|
396
396
|
--- node/src/node_contextify.cc
|
|
397
397
|
+++ node/src/node_contextify.cc
|
|
398
398
|
@@ -79,6 +79,7 @@ using v8::String;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
diff --git node/common.gypi node/common.gypi
|
|
2
|
-
index
|
|
2
|
+
index 7780ae106b4..584d3756ee5 100644
|
|
3
3
|
--- node/common.gypi
|
|
4
4
|
+++ node/common.gypi
|
|
5
|
-
@@ -
|
|
5
|
+
@@ -192,7 +192,7 @@
|
|
6
6
|
['clang==1', {
|
|
7
7
|
'lto': ' -flto ', # Clang
|
|
8
8
|
}, {
|
|
@@ -12,7 +12,7 @@ index b88371ec13..343352b5c4 100644
|
|
|
12
12
|
],
|
|
13
13
|
},
|
|
14
14
|
diff --git node/deps/ngtcp2/nghttp3/lib/nghttp3_ringbuf.c node/deps/ngtcp2/nghttp3/lib/nghttp3_ringbuf.c
|
|
15
|
-
index
|
|
15
|
+
index 7d3ab39bf82..67a48dee53a 100644
|
|
16
16
|
--- node/deps/ngtcp2/nghttp3/lib/nghttp3_ringbuf.c
|
|
17
17
|
+++ node/deps/ngtcp2/nghttp3/lib/nghttp3_ringbuf.c
|
|
18
18
|
@@ -34,10 +34,7 @@
|
|
@@ -28,7 +28,7 @@ index 7d3ab39bf8..67a48dee53 100644
|
|
|
28
28
|
#else /* !((defined(_MSC_VER) && !defined(__clang__) && (defined(_M_ARM) || \
|
|
29
29
|
(defined(_M_ARM64) && _MSC_VER < 1941))) || defined(WIN32)) */
|
|
30
30
|
diff --git node/deps/ngtcp2/ngtcp2/lib/ngtcp2_ringbuf.c node/deps/ngtcp2/ngtcp2/lib/ngtcp2_ringbuf.c
|
|
31
|
-
index
|
|
31
|
+
index 353afca4d48..dea944aed5a 100644
|
|
32
32
|
--- node/deps/ngtcp2/ngtcp2/lib/ngtcp2_ringbuf.c
|
|
33
33
|
+++ node/deps/ngtcp2/ngtcp2/lib/ngtcp2_ringbuf.c
|
|
34
34
|
@@ -33,10 +33,7 @@
|
|
@@ -44,7 +44,7 @@ index 353afca4d4..dea944aed5 100644
|
|
|
44
44
|
# else /* !((defined(_MSC_VER) && !defined(__clang__) && (defined(_M_ARM) || \
|
|
45
45
|
(defined(_M_ARM64) && _MSC_VER < 1941))) || defined(WIN32)) */
|
|
46
46
|
diff --git node/deps/v8/include/v8-initialization.h node/deps/v8/include/v8-initialization.h
|
|
47
|
-
index
|
|
47
|
+
index d3e35d6ec5f..6e9bbe38491 100644
|
|
48
48
|
--- node/deps/v8/include/v8-initialization.h
|
|
49
49
|
+++ node/deps/v8/include/v8-initialization.h
|
|
50
50
|
@@ -89,6 +89,10 @@ class V8_EXPORT V8 {
|
|
@@ -59,7 +59,7 @@ index d3e35d6ec5..6e9bbe3849 100644
|
|
|
59
59
|
static const char* GetVersion();
|
|
60
60
|
|
|
61
61
|
diff --git node/deps/v8/src/api/api.cc node/deps/v8/src/api/api.cc
|
|
62
|
-
index
|
|
62
|
+
index 2dd476dda34..8a51f25b572 100644
|
|
63
63
|
--- node/deps/v8/src/api/api.cc
|
|
64
64
|
+++ node/deps/v8/src/api/api.cc
|
|
65
65
|
@@ -624,6 +624,28 @@ void V8::SetFlagsFromCommandLine(int* argc, char** argv, bool remove_flags) {
|
|
@@ -91,8 +91,22 @@ index 2dd476dda3..8a51f25b57 100644
|
|
|
91
91
|
RegisteredExtension* RegisteredExtension::first_extension_ = nullptr;
|
|
92
92
|
|
|
93
93
|
RegisteredExtension::RegisteredExtension(std::unique_ptr<Extension> extension)
|
|
94
|
+
diff --git node/deps/v8/src/codegen/code-stub-assembler.h node/deps/v8/src/codegen/code-stub-assembler.h
|
|
95
|
+
index b082bb8dc7b..285683ecdc8 100644
|
|
96
|
+
--- node/deps/v8/src/codegen/code-stub-assembler.h
|
|
97
|
+
+++ node/deps/v8/src/codegen/code-stub-assembler.h
|
|
98
|
+
@@ -286,7 +286,8 @@ enum class PrimitiveType { kBoolean, kNumber, kString, kSymbol };
|
|
99
|
+
|
|
100
|
+
// This is a check that always calls into the runtime if it aborts.
|
|
101
|
+
// This also exits silently when --hole-fuzzing is enabled.
|
|
102
|
+
-#define CSA_HOLE_SECURITY_CHECK(csa, x) CSA_CHECK_WITH_ABORT(csa, x)
|
|
103
|
+
+#define CSA_HOLE_SECURITY_CHECK(csa, x) \
|
|
104
|
+
+ (csa)->Check([&]() -> TNode<BoolT> { return x; }, #x, "placeholder", 1)
|
|
105
|
+
|
|
106
|
+
#ifdef DEBUG
|
|
107
|
+
// CSA_DCHECK_ARGS generates an
|
|
94
108
|
diff --git node/deps/v8/src/codegen/compiler.cc node/deps/v8/src/codegen/compiler.cc
|
|
95
|
-
index
|
|
109
|
+
index 9048655363c..ab81c326fc4 100644
|
|
96
110
|
--- node/deps/v8/src/codegen/compiler.cc
|
|
97
111
|
+++ node/deps/v8/src/codegen/compiler.cc
|
|
98
112
|
@@ -3634,7 +3634,7 @@ MaybeHandle<SharedFunctionInfo> GetSharedFunctionInfoForScriptImpl(
|
|
@@ -105,7 +119,7 @@ index 9048655363..ab81c326fc 100644
|
|
|
105
119
|
} else if (can_consume_code_cache) {
|
|
106
120
|
compile_timer.set_consuming_code_cache();
|
|
107
121
|
diff --git node/deps/v8/src/compiler/wasm-compiler.cc node/deps/v8/src/compiler/wasm-compiler.cc
|
|
108
|
-
index
|
|
122
|
+
index 16f1f1470b7..4bfeca49e64 100644
|
|
109
123
|
--- node/deps/v8/src/compiler/wasm-compiler.cc
|
|
110
124
|
+++ node/deps/v8/src/compiler/wasm-compiler.cc
|
|
111
125
|
@@ -8613,12 +8613,13 @@ wasm::WasmCompilationResult CompileWasmImportCallWrapper(
|
|
@@ -149,7 +163,7 @@ index 16f1f1470b..4bfeca49e6 100644
|
|
|
149
163
|
// Compile the wrapper
|
|
150
164
|
if (job->ExecuteJob(isolate->counters()->runtime_call_stats()) ==
|
|
151
165
|
diff --git node/deps/v8/src/heap/marking-visitor-inl.h node/deps/v8/src/heap/marking-visitor-inl.h
|
|
152
|
-
index
|
|
166
|
+
index 39a5bbd22c2..4b860f55d5e 100644
|
|
153
167
|
--- node/deps/v8/src/heap/marking-visitor-inl.h
|
|
154
168
|
+++ node/deps/v8/src/heap/marking-visitor-inl.h
|
|
155
169
|
@@ -329,6 +329,13 @@ bool MarkingVisitorBase<ConcreteVisitor>::HasBytecodeArrayForFlushing(
|
|
@@ -167,7 +181,7 @@ index 39a5bbd22c..4b860f55d5 100644
|
|
|
167
181
|
}
|
|
168
182
|
|
|
169
183
|
diff --git node/deps/v8/src/objects/js-function.cc node/deps/v8/src/objects/js-function.cc
|
|
170
|
-
index
|
|
184
|
+
index 529e283bbf0..c997c53a18c 100644
|
|
171
185
|
--- node/deps/v8/src/objects/js-function.cc
|
|
172
186
|
+++ node/deps/v8/src/objects/js-function.cc
|
|
173
187
|
@@ -1308,6 +1308,10 @@ Handle<String> JSFunction::ToString(Handle<JSFunction> function) {
|
|
@@ -182,7 +196,7 @@ index 529e283bbf..c997c53a18 100644
|
|
|
182
196
|
ClassPositions::cast(*maybe_class_positions);
|
|
183
197
|
int start_position = class_positions->start();
|
|
184
198
|
diff --git node/deps/v8/src/objects/objects.cc node/deps/v8/src/objects/objects.cc
|
|
185
|
-
index
|
|
199
|
+
index 8e013c2544e..7ac03149d86 100644
|
|
186
200
|
--- node/deps/v8/src/objects/objects.cc
|
|
187
201
|
+++ node/deps/v8/src/objects/objects.cc
|
|
188
202
|
@@ -4263,7 +4263,12 @@ void Script::InitLineEndsInternal(IsolateT* isolate, Handle<Script> script) {
|
|
@@ -200,7 +214,7 @@ index 8e013c2544..7ac03149d8 100644
|
|
|
200
214
|
}
|
|
201
215
|
|
|
202
216
|
diff --git node/deps/v8/src/parsing/parsing.cc node/deps/v8/src/parsing/parsing.cc
|
|
203
|
-
index
|
|
217
|
+
index f160b27ea4d..748452ba451 100644
|
|
204
218
|
--- node/deps/v8/src/parsing/parsing.cc
|
|
205
219
|
+++ node/deps/v8/src/parsing/parsing.cc
|
|
206
220
|
@@ -42,6 +42,7 @@ bool ParseProgram(ParseInfo* info, Handle<Script> script,
|
|
@@ -221,7 +235,7 @@ index f160b27ea4..748452ba45 100644
|
|
|
221
235
|
std::unique_ptr<Utf16CharacterStream> stream(
|
|
222
236
|
ScannerStream::For(isolate, source, shared_info->StartPosition(),
|
|
223
237
|
diff --git node/deps/v8/src/snapshot/code-serializer.cc node/deps/v8/src/snapshot/code-serializer.cc
|
|
224
|
-
index
|
|
238
|
+
index ec69ad51239..5bc92af5aad 100644
|
|
225
239
|
--- node/deps/v8/src/snapshot/code-serializer.cc
|
|
226
240
|
+++ node/deps/v8/src/snapshot/code-serializer.cc
|
|
227
241
|
@@ -703,10 +703,6 @@ SerializedCodeSanityCheckResult SerializedCodeData::SanityCheck(
|
|
@@ -235,7 +249,7 @@ index ec69ad5123..1894032344 100644
|
|
|
235
249
|
return SerializedCodeSanityCheckResult::kSuccess;
|
|
236
250
|
}
|
|
237
251
|
|
|
238
|
-
@@ -723,
|
|
252
|
+
@@ -723,13 +719,12 @@ SerializedCodeSanityCheckResult SerializedCodeData::SanityCheckWithoutSource(
|
|
239
253
|
if (version_hash != Version::Hash()) {
|
|
240
254
|
return SerializedCodeSanityCheckResult::kVersionMismatch;
|
|
241
255
|
}
|
|
@@ -246,11 +260,31 @@ index ec69ad5123..1894032344 100644
|
|
|
246
260
|
uint32_t ro_snapshot_checksum =
|
|
247
261
|
GetHeaderValue(kReadOnlySnapshotChecksumOffset);
|
|
248
262
|
if (ro_snapshot_checksum != expected_ro_snapshot_checksum) {
|
|
263
|
+
+ // for debugging snapshot checkum issues
|
|
264
|
+
+ // PrintF("[pkg] ReadOnlySnapshotChecksum mismatch: code=%08x built=%08x\n",
|
|
265
|
+
+ // ro_snapshot_checksum, expected_ro_snapshot_checksum);
|
|
266
|
+
return SerializedCodeSanityCheckResult::kReadOnlySnapshotChecksumMismatch;
|
|
267
|
+
}
|
|
268
|
+
uint32_t payload_length = GetHeaderValue(kPayloadLengthOffset);
|
|
269
|
+
diff --git node/deps/v8/src/snapshot/read-only-serializer.cc node/deps/v8/src/snapshot/read-only-serializer.cc
|
|
270
|
+
index 29c69a782ef..4431cd14ac8 100644
|
|
271
|
+
--- node/deps/v8/src/snapshot/read-only-serializer.cc
|
|
272
|
+
+++ node/deps/v8/src/snapshot/read-only-serializer.cc
|
|
273
|
+
@@ -237,6 +237,9 @@ class EncodeRelocationsVisitor final : public ObjectVisitor {
|
|
274
|
+
|
|
275
|
+
// Encode:
|
|
276
|
+
ro::EncodedTagged encoded = Encode(isolate_, o.GetHeapObject());
|
|
277
|
+
+ #ifndef V8_COMPRESS_POINTERS
|
|
278
|
+
+ memset(segment_->contents.get() + slot_offset, 0, kTaggedSize);
|
|
279
|
+
+ #endif
|
|
280
|
+
memcpy(segment_->contents.get() + slot_offset, &encoded,
|
|
281
|
+
ro::EncodedTagged::kSize);
|
|
282
|
+
|
|
249
283
|
diff --git node/lib/child_process.js node/lib/child_process.js
|
|
250
|
-
index
|
|
284
|
+
index 655349b6fa1..77092e0cd5b 100644
|
|
251
285
|
--- node/lib/child_process.js
|
|
252
286
|
+++ node/lib/child_process.js
|
|
253
|
-
@@ -
|
|
287
|
+
@@ -171,7 +171,7 @@ function fork(modulePath, args = [], options) {
|
|
254
288
|
throw new ERR_CHILD_PROCESS_IPC_REQUIRED('options.stdio');
|
|
255
289
|
}
|
|
256
290
|
|
|
@@ -261,7 +295,7 @@ index e848b3d5ee..3e3ad3ec7c 100644
|
|
|
261
295
|
function _forkChild(fd, serializationMode) {
|
|
262
296
|
diff --git node/lib/internal/bootstrap/pkg.js node/lib/internal/bootstrap/pkg.js
|
|
263
297
|
new file mode 100644
|
|
264
|
-
index
|
|
298
|
+
index 00000000000..a697294fdfe
|
|
265
299
|
--- /dev/null
|
|
266
300
|
+++ node/lib/internal/bootstrap/pkg.js
|
|
267
301
|
@@ -0,0 +1,49 @@
|
|
@@ -315,10 +349,10 @@ index 0000000000..a697294fdf
|
|
|
315
349
|
+ }());
|
|
316
350
|
+}());
|
|
317
351
|
diff --git node/lib/internal/modules/cjs/loader.js node/lib/internal/modules/cjs/loader.js
|
|
318
|
-
index
|
|
352
|
+
index a7d8fa1139c..bffe5a8a538 100644
|
|
319
353
|
--- node/lib/internal/modules/cjs/loader.js
|
|
320
354
|
+++ node/lib/internal/modules/cjs/loader.js
|
|
321
|
-
@@ -
|
|
355
|
+
@@ -252,14 +252,18 @@ function stat(filename) {
|
|
322
356
|
// Guard against internal bugs where a non-string filename is passed in by mistake.
|
|
323
357
|
assert(typeof filename === 'string');
|
|
324
358
|
|
|
@@ -328,19 +362,22 @@ index d90476addb..8c87fa9019 100644
|
|
|
328
362
|
const result = statCache.get(filename);
|
|
329
363
|
if (result !== undefined) { return result; }
|
|
330
364
|
}
|
|
331
|
-
- const result = internalFsBinding.internalModuleStat(
|
|
365
|
+
- const result = internalFsBinding.internalModuleStat(filename);
|
|
332
366
|
+ const fs = require('fs');
|
|
333
367
|
+ const result = fs.existsSync(origFilename) ?
|
|
334
368
|
+ (fs.statSync(origFilename).isDirectory() ? 1 : 0) : -1;
|
|
335
369
|
+
|
|
336
370
|
if (statCache !== null && result >= 0) {
|
|
337
|
-
|
|
371
|
+
- // Only set cache when `internalModuleStat(filename)` succeeds.
|
|
372
|
+
+ // Only set cache when `internalModuleStat(internalFsBinding, filename)` succeeds.
|
|
338
373
|
statCache.set(filename, result);
|
|
374
|
+
}
|
|
375
|
+
return result;
|
|
339
376
|
diff --git node/lib/internal/modules/package_json_reader.js node/lib/internal/modules/package_json_reader.js
|
|
340
|
-
index
|
|
377
|
+
index fb669ea12ee..6ad993581bb 100644
|
|
341
378
|
--- node/lib/internal/modules/package_json_reader.js
|
|
342
379
|
+++ node/lib/internal/modules/package_json_reader.js
|
|
343
|
-
@@ -
|
|
380
|
+
@@ -108,17 +108,20 @@ const requiresJSONParse = (value) => (value !== undefined && (value[0] === '[' |
|
|
344
381
|
* @returns {PackageConfig}
|
|
345
382
|
*/
|
|
346
383
|
function read(jsonPath, { base, specifier, isESM } = kEmptyObject) {
|
|
@@ -373,7 +410,7 @@ index df23a30b1b..4a414c469c 100644
|
|
|
373
410
|
__proto__: null,
|
|
374
411
|
...result.data,
|
|
375
412
|
diff --git node/lib/internal/process/pre_execution.js node/lib/internal/process/pre_execution.js
|
|
376
|
-
index
|
|
413
|
+
index 98ed40e3076..f9da878ea06 100644
|
|
377
414
|
--- node/lib/internal/process/pre_execution.js
|
|
378
415
|
+++ node/lib/internal/process/pre_execution.js
|
|
379
416
|
@@ -50,7 +50,11 @@ const {
|
|
@@ -398,7 +435,7 @@ index 4e7be0594c..09efa7b745 100644
|
|
|
398
435
|
// Expand process.argv[1] into a full path.
|
|
399
436
|
const path = require('path');
|
|
400
437
|
try {
|
|
401
|
-
@@ -
|
|
438
|
+
@@ -725,6 +730,7 @@ function loadPreloadModules() {
|
|
402
439
|
// For user code, we preload modules if `-r` is passed
|
|
403
440
|
const preloadModules = getOptionValue('--require');
|
|
404
441
|
if (preloadModules && preloadModules.length > 0) {
|
|
@@ -407,7 +444,7 @@ index 4e7be0594c..09efa7b745 100644
|
|
|
407
444
|
Module: {
|
|
408
445
|
_preloadModules,
|
|
409
446
|
diff --git node/lib/vm.js node/lib/vm.js
|
|
410
|
-
index
|
|
447
|
+
index ae710806201..b05638de759 100644
|
|
411
448
|
--- node/lib/vm.js
|
|
412
449
|
+++ node/lib/vm.js
|
|
413
450
|
@@ -98,6 +98,7 @@ class Script extends ContextifyScript {
|
|
@@ -429,10 +466,10 @@ index ae71080620..b05638de75 100644
|
|
|
429
466
|
throw e; /* node-do-not-add-exception-line */
|
|
430
467
|
}
|
|
431
468
|
diff --git node/src/inspector_agent.cc node/src/inspector_agent.cc
|
|
432
|
-
index
|
|
469
|
+
index aca49fddce0..ddc54909ea7 100644
|
|
433
470
|
--- node/src/inspector_agent.cc
|
|
434
471
|
+++ node/src/inspector_agent.cc
|
|
435
|
-
@@ -
|
|
472
|
+
@@ -832,11 +832,6 @@ bool Agent::Start(const std::string& path,
|
|
436
473
|
StartIoThreadAsyncCallback));
|
|
437
474
|
uv_unref(reinterpret_cast<uv_handle_t*>(&start_io_thread_async));
|
|
438
475
|
start_io_thread_async.data = this;
|
|
@@ -445,7 +482,7 @@ index fa6eb29e6e..5d6dd23f6a 100644
|
|
|
445
482
|
parent_env_->AddCleanupHook([](void* data) {
|
|
446
483
|
Environment* env = static_cast<Environment*>(data);
|
|
447
484
|
diff --git node/src/node.cc node/src/node.cc
|
|
448
|
-
index
|
|
485
|
+
index 1b5e989e545..20f49ba2f26 100644
|
|
449
486
|
--- node/src/node.cc
|
|
450
487
|
+++ node/src/node.cc
|
|
451
488
|
@@ -404,6 +404,8 @@ MaybeLocal<Value> StartExecution(Environment* env, StartExecutionCallback cb) {
|
|
@@ -473,7 +510,7 @@ index c0d0b734ed..58583892f9 100644
|
|
|
473
510
|
}
|
|
474
511
|
|
|
475
512
|
diff --git node/src/node_contextify.cc node/src/node_contextify.cc
|
|
476
|
-
index
|
|
513
|
+
index 386102dfe7e..fa452538bf1 100644
|
|
477
514
|
--- node/src/node_contextify.cc
|
|
478
515
|
+++ node/src/node_contextify.cc
|
|
479
516
|
@@ -86,6 +86,7 @@ using v8::Symbol;
|
|
@@ -484,7 +521,7 @@ index 7bfe42c593..836d98d6ed 100644
|
|
|
484
521
|
|
|
485
522
|
// The vm module executes code in a sandboxed environment with a different
|
|
486
523
|
// global object than the rest of the code. This is achieved by applying
|
|
487
|
-
@@ -
|
|
524
|
+
@@ -993,13 +994,13 @@ void ContextifyScript::New(const FunctionCallbackInfo<Value>& args) {
|
|
488
525
|
Local<ArrayBufferView> cached_data_buf;
|
|
489
526
|
bool produce_cached_data = false;
|
|
490
527
|
Local<Context> parsing_context = context;
|
|
@@ -501,7 +538,7 @@ index 7bfe42c593..836d98d6ed 100644
|
|
|
501
538
|
CHECK(args[2]->IsNumber());
|
|
502
539
|
line_offset = args[2].As<Int32>()->Value();
|
|
503
540
|
CHECK(args[3]->IsNumber());
|
|
504
|
-
@@ -
|
|
541
|
+
@@ -1020,6 +1021,10 @@ void ContextifyScript::New(const FunctionCallbackInfo<Value>& args) {
|
|
505
542
|
}
|
|
506
543
|
CHECK(args[7]->IsSymbol());
|
|
507
544
|
id_symbol = args[7].As<Symbol>();
|
|
@@ -512,7 +549,7 @@ index 7bfe42c593..836d98d6ed 100644
|
|
|
512
549
|
}
|
|
513
550
|
|
|
514
551
|
ContextifyScript* contextify_script =
|
|
515
|
-
@@ -
|
|
552
|
+
@@ -1067,6 +1072,10 @@ void ContextifyScript::New(const FunctionCallbackInfo<Value>& args) {
|
|
516
553
|
ShouldNotAbortOnUncaughtScope no_abort_scope(env);
|
|
517
554
|
Context::Scope scope(parsing_context);
|
|
518
555
|
|
|
@@ -523,7 +560,7 @@ index 7bfe42c593..836d98d6ed 100644
|
|
|
523
560
|
MaybeLocal<UnboundScript> maybe_v8_script =
|
|
524
561
|
ScriptCompiler::CompileUnboundScript(isolate, &source, compile_options);
|
|
525
562
|
|
|
526
|
-
@@ -
|
|
563
|
+
@@ -1081,6 +1090,12 @@ void ContextifyScript::New(const FunctionCallbackInfo<Value>& args) {
|
|
527
564
|
return;
|
|
528
565
|
}
|
|
529
566
|
|
|
@@ -536,7 +573,7 @@ index 7bfe42c593..836d98d6ed 100644
|
|
|
536
573
|
contextify_script->script_.Reset(isolate, v8_script);
|
|
537
574
|
contextify_script->script_.SetWeak();
|
|
538
575
|
contextify_script->object()->SetInternalField(kUnboundScriptSlot, v8_script);
|
|
539
|
-
@@ -
|
|
576
|
+
@@ -1120,6 +1135,10 @@ void ContextifyScript::New(const FunctionCallbackInfo<Value>& args) {
|
|
540
577
|
.IsNothing())
|
|
541
578
|
return;
|
|
542
579
|
|
|
@@ -548,7 +585,7 @@ index 7bfe42c593..836d98d6ed 100644
|
|
|
548
585
|
}
|
|
549
586
|
|
|
550
587
|
diff --git node/src/node_main.cc node/src/node_main.cc
|
|
551
|
-
index
|
|
588
|
+
index f66099a5570..4048f6bd937 100644
|
|
552
589
|
--- node/src/node_main.cc
|
|
553
590
|
+++ node/src/node_main.cc
|
|
554
591
|
@@ -22,6 +22,8 @@
|
|
@@ -658,7 +695,7 @@ index f66099a557..4048f6bd93 100644
|
|
|
658
695
|
+ return adjacent(c, nargv);
|
|
659
696
|
+}
|
|
660
697
|
diff --git node/src/node_options.cc node/src/node_options.cc
|
|
661
|
-
index
|
|
698
|
+
index 249361e3519..ef61e29dfb3 100644
|
|
662
699
|
--- node/src/node_options.cc
|
|
663
700
|
+++ node/src/node_options.cc
|
|
664
701
|
@@ -319,6 +319,7 @@ void Parse(
|
|
@@ -670,7 +707,7 @@ index da39abf79c..7f97afe7dc 100644
|
|
|
670
707
|
if (sea::IsSingleExecutable()) return;
|
|
671
708
|
#endif
|
|
672
709
|
diff --git node/tools/icu/icu-generic.gyp node/tools/icu/icu-generic.gyp
|
|
673
|
-
index
|
|
710
|
+
index f007c65232c..002a00a6aee 100644
|
|
674
711
|
--- node/tools/icu/icu-generic.gyp
|
|
675
712
|
+++ node/tools/icu/icu-generic.gyp
|
|
676
713
|
@@ -52,7 +52,7 @@
|