@yao-pkg/pkg-fetch 3.5.23 → 3.5.25
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 +39 -16
- package/lib-es5/expected-shas.json +33 -23
- package/lib-es5/utils.js +11 -2
- package/package.json +1 -1
- package/patches/{node.v20.19.1.cpp.patch → node.v20.19.5.cpp.patch} +6 -6
- package/patches/{node.v22.15.1.cpp.patch → node.v22.19.0.cpp.patch} +80 -43
- package/patches/node.v24.8.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 = {
|
|
@@ -326,17 +341,25 @@ function compileOnUnix(nodeVersion, targetArch, targetPlatform) {
|
|
|
326
341
|
}
|
|
327
342
|
if (targetArch === 'armv7') {
|
|
328
343
|
_a = process.env, _b = _a.CFLAGS, CFLAGS = _b === void 0 ? '' : _b, _c = _a.CXXFLAGS, CXXFLAGS = _c === void 0 ? '' : _c;
|
|
329
|
-
process.env.CFLAGS = "".concat(CFLAGS, " -marm -mcpu=cortex-a7");
|
|
330
|
-
process.env.CXXFLAGS = "".concat(CXXFLAGS, " -marm -mcpu=cortex-a7");
|
|
344
|
+
process.env.CFLAGS = "".concat(CFLAGS, " -marm -mcpu=cortex-a7 -mfpu=vfpv3");
|
|
345
|
+
process.env.CXXFLAGS = "".concat(CXXFLAGS, " -marm -mcpu=cortex-a7 -mfpu=vfpv3");
|
|
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
|
});
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"node-v16.20.2-macos-arm64": "3d04eb7ddd8b614b888eeb1caa6e64a068b665ab4a26dd064051973ae5842a85",
|
|
24
24
|
"node-v18.20.8-alpine-arm64": "c7f20847fbfd765517612647593c7767331a318d2b229ddac2b4afd7d13b78d0",
|
|
25
25
|
"node-v18.20.8-alpine-x64": "3b24c6f571681046a6ed1b42752b21a41e10e8c7ac19416b9571927cc10f4a49",
|
|
26
|
-
"node-v18.20.8-linux-arm64": "
|
|
26
|
+
"node-v18.20.8-linux-arm64": "690ed47821dfbf842a1ba40a7cd2e28344e6ad998a89f5d0eb61da3c86fcd29c",
|
|
27
27
|
"node-v18.20.8-linux-x64": "0121b3c810db3f5e47028f0b1e2294a1a52a2aa20923c037247e39c82be0f789",
|
|
28
28
|
"node-v18.20.8-linuxstatic-arm64": "ac03e112f9229126e62924f1fefbb44c54f5fbbb4827d5ffa6243d3b8e81dfa4",
|
|
29
29
|
"node-v18.20.8-linuxstatic-armv7": "4c96d99319e850887d01cb63500e34f5db3b64944b3644f4ed5c94ae2be5b625",
|
|
@@ -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/lib-es5/utils.js
CHANGED
|
@@ -53,16 +53,25 @@ var log_1 = require("./log");
|
|
|
53
53
|
function downloadUrl(url, file) {
|
|
54
54
|
var _a, _b, _c;
|
|
55
55
|
return __awaiter(this, void 0, void 0, function () {
|
|
56
|
-
var proxy, res, tempFile, ws, totalSize, currentSize;
|
|
56
|
+
var proxy, res, err_1, tempFile, ws, totalSize, currentSize;
|
|
57
57
|
return __generator(this, function (_d) {
|
|
58
58
|
switch (_d.label) {
|
|
59
59
|
case 0:
|
|
60
60
|
log_1.log.enableProgress(path_1.default.basename(file));
|
|
61
61
|
log_1.log.showProgress(0);
|
|
62
62
|
proxy = (_c = (_b = (_a = process.env.HTTPS_PROXY) !== null && _a !== void 0 ? _a : process.env.https_proxy) !== null && _b !== void 0 ? _b : process.env.HTTP_PROXY) !== null && _c !== void 0 ? _c : process.env.http_proxy;
|
|
63
|
-
|
|
63
|
+
_d.label = 1;
|
|
64
64
|
case 1:
|
|
65
|
+
_d.trys.push([1, 3, , 4]);
|
|
66
|
+
return [4 /*yield*/, (0, node_fetch_1.default)(url, proxy ? { agent: (0, https_proxy_agent_1.default)(proxy) } : undefined)];
|
|
67
|
+
case 2:
|
|
65
68
|
res = _d.sent();
|
|
69
|
+
return [3 /*break*/, 4];
|
|
70
|
+
case 3:
|
|
71
|
+
err_1 = _d.sent();
|
|
72
|
+
log_1.log.disableProgress();
|
|
73
|
+
throw (0, log_1.wasReported)("Network error during fetch: ".concat(err_1.message));
|
|
74
|
+
case 4:
|
|
66
75
|
if (!res.ok) {
|
|
67
76
|
log_1.log.disableProgress();
|
|
68
77
|
throw (0, log_1.wasReported)("".concat(res.status, ": ").concat(res.statusText));
|
package/package.json
CHANGED
|
@@ -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;
|