@yao-pkg/pkg-fetch 3.5.12 → 3.5.14
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,15 +43,15 @@
|
|
|
43
43
|
"node-v20.17.0-macos-x64": "cb37f44c3cdc12fe6e2e6b461cfdacba35177426bd8ab85f39e4c3d279fca11b",
|
|
44
44
|
"node-v20.17.0-win-arm64": "9769ad72c8ab0f6b1705c9bffb03585044a917511a30d74c68205b7923ff9fa2",
|
|
45
45
|
"node-v20.17.0-win-x64": "9c15a64b3babd2e7cd6c0cb1770495c331bea6df4544df92f734a23cc55bc1bf",
|
|
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.
|
|
46
|
+
"node-v22.9.0-alpine-arm64": "89c3d4143af78170083b4c0f0e458a3efefe7f62483ddf149aa0d42a31130fe1",
|
|
47
|
+
"node-v22.9.0-alpine-x64": "e04f1127d7d4f5d288779f561d17de0c3f784325fc473aa5278263a711e97369",
|
|
48
|
+
"node-v22.9.0-linux-arm64": "63584c21d102a4b4f015c145ede2bd9cc0dd64a36ee0c31a1c93a0ba907e5b19",
|
|
49
|
+
"node-v22.9.0-linux-x64": "43a17431d84c2e86d44da21b8450c6750767a816ce35000f1afb4e2f2c0385ea",
|
|
50
|
+
"node-v22.9.0-linuxstatic-arm64": "6a605ce05d247947b26008fffa333105aa5c8df619326dabf5bb8469b7578683",
|
|
51
|
+
"node-v22.9.0-linuxstatic-armv7": "24039ad7df5ca6c809686f0bbc35322a6aba250c943fce7cc03042595c983c06",
|
|
52
|
+
"node-v22.9.0-linuxstatic-x64": "ddeac8eb7de34ec82c29cdc61cee6f5cc782acf6dd7cfa0f0196165fe03dadba",
|
|
53
|
+
"node-v22.9.0-macos-arm64": "d74c297b69ae697fd0ddba6dd69af059704357c7ab6c8ce5a9d1f9cd6e34e0d1",
|
|
54
|
+
"node-v22.9.0-macos-x64": "495df5c07003d0695ba4ada2ea88c84a1fabb4e08061ac7ca81a76392e8c6a34",
|
|
55
|
+
"node-v22.9.0-win-arm64": "039526a19a9ccebde669cfaa4668f0578fcba7fe69b94a796bd6002dfcdd95ea",
|
|
56
|
+
"node-v22.9.0-win-x64": "d87659ec8165cbafd9772046f023bfa6bc2f76c46e2b85189c9fda6777dd2442"
|
|
57
57
|
}
|
package/lib-es5/index.js
CHANGED
|
@@ -146,9 +146,9 @@ function getNodeVersion(nodeRange) {
|
|
|
146
146
|
exports.getNodeVersion = getNodeVersion;
|
|
147
147
|
function need(opts) {
|
|
148
148
|
return __awaiter(this, void 0, void 0, function () {
|
|
149
|
-
var _a, forceFetch, forceBuild, dryRun, output, nodeRange, _b, platform, arch, nodeVersion, fetched, built, remote, fetchFailed;
|
|
150
|
-
return __generator(this, function (
|
|
151
|
-
switch (
|
|
149
|
+
var _a, forceFetch, forceBuild, dryRun, output, nodeRange, _b, platform, arch, nodeVersion, fetched, built, remote, fetchFailed, _c;
|
|
150
|
+
return __generator(this, function (_d) {
|
|
151
|
+
switch (_d.label) {
|
|
152
152
|
case 0:
|
|
153
153
|
_a = opts || {}, forceFetch = _a.forceFetch, forceBuild = _a.forceBuild, dryRun = _a.dryRun, output = _a.output, nodeRange = _a.nodeRange;
|
|
154
154
|
_b = opts || {}, platform = _b.platform, arch = _b.arch;
|
|
@@ -178,51 +178,57 @@ function need(opts) {
|
|
|
178
178
|
output: output,
|
|
179
179
|
});
|
|
180
180
|
remote = (0, places_1.remotePlace)({ arch: arch, nodeVersion: nodeVersion, platform: platform, version: package_json_1.version });
|
|
181
|
-
if (!!forceBuild) return [3 /*break*/,
|
|
181
|
+
if (!!forceBuild) return [3 /*break*/, 4];
|
|
182
182
|
return [4 /*yield*/, exists(fetched)];
|
|
183
183
|
case 1:
|
|
184
|
-
if (!
|
|
184
|
+
if (!_d.sent()) return [3 /*break*/, 4];
|
|
185
185
|
if (dryRun) {
|
|
186
186
|
return [2 /*return*/, 'exists'];
|
|
187
187
|
}
|
|
188
|
+
_c = !!process.env.PKG_NODE_PATH;
|
|
189
|
+
if (_c) return [3 /*break*/, 3];
|
|
188
190
|
return [4 /*yield*/, (0, utils_1.hash)(fetched)];
|
|
189
191
|
case 2:
|
|
190
|
-
|
|
192
|
+
_c = (_d.sent()) === expected_1.EXPECTED_HASHES[remote.name];
|
|
193
|
+
_d.label = 3;
|
|
194
|
+
case 3:
|
|
195
|
+
// when node path is set, skip hash check
|
|
196
|
+
if (_c) {
|
|
191
197
|
return [2 /*return*/, fetched];
|
|
192
198
|
}
|
|
193
199
|
log_1.log.info('Binary hash does NOT match. Re-fetching...');
|
|
194
200
|
fs_extra_1.default.unlinkSync(fetched);
|
|
195
|
-
|
|
196
|
-
case 3:
|
|
197
|
-
if (!!forceFetch) return [3 /*break*/, 5];
|
|
198
|
-
return [4 /*yield*/, exists(built)];
|
|
201
|
+
_d.label = 4;
|
|
199
202
|
case 4:
|
|
200
|
-
if (
|
|
203
|
+
if (!!forceFetch) return [3 /*break*/, 6];
|
|
204
|
+
return [4 /*yield*/, exists(built)];
|
|
205
|
+
case 5:
|
|
206
|
+
if (_d.sent()) {
|
|
201
207
|
if (dryRun)
|
|
202
208
|
return [2 /*return*/, 'exists'];
|
|
203
209
|
if (forceBuild)
|
|
204
210
|
log_1.log.info('Reusing base binaries built locally:', built);
|
|
205
211
|
return [2 /*return*/, built];
|
|
206
212
|
}
|
|
207
|
-
|
|
208
|
-
case
|
|
209
|
-
if (!!forceBuild) return [3 /*break*/,
|
|
213
|
+
_d.label = 6;
|
|
214
|
+
case 6:
|
|
215
|
+
if (!!forceBuild) return [3 /*break*/, 10];
|
|
210
216
|
if (dryRun)
|
|
211
217
|
return [2 /*return*/, 'fetched'];
|
|
212
218
|
return [4 /*yield*/, download(remote, fetched)];
|
|
213
|
-
case 6:
|
|
214
|
-
if (!_c.sent()) return [3 /*break*/, 8];
|
|
215
|
-
return [4 /*yield*/, (0, utils_1.hash)(fetched)];
|
|
216
219
|
case 7:
|
|
217
|
-
if (
|
|
220
|
+
if (!_d.sent()) return [3 /*break*/, 9];
|
|
221
|
+
return [4 /*yield*/, (0, utils_1.hash)(fetched)];
|
|
222
|
+
case 8:
|
|
223
|
+
if ((_d.sent()) === expected_1.EXPECTED_HASHES[remote.name]) {
|
|
218
224
|
return [2 /*return*/, fetched];
|
|
219
225
|
}
|
|
220
226
|
fs_extra_1.default.unlinkSync(fetched);
|
|
221
227
|
throw (0, log_1.wasReported)('Binary hash does NOT match.');
|
|
222
|
-
case 8:
|
|
223
|
-
fetchFailed = true;
|
|
224
|
-
_c.label = 9;
|
|
225
228
|
case 9:
|
|
229
|
+
fetchFailed = true;
|
|
230
|
+
_d.label = 10;
|
|
231
|
+
case 10:
|
|
226
232
|
if (!dryRun && fetchFailed) {
|
|
227
233
|
log_1.log.info('Not found in remote cache:', JSON.stringify(remote));
|
|
228
234
|
if (forceFetch) {
|
|
@@ -244,8 +250,8 @@ function need(opts) {
|
|
|
244
250
|
return [2 /*return*/, 'built'];
|
|
245
251
|
}
|
|
246
252
|
return [4 /*yield*/, (0, build_1.default)(nodeVersion, arch, platform, built)];
|
|
247
|
-
case
|
|
248
|
-
|
|
253
|
+
case 11:
|
|
254
|
+
_d.sent();
|
|
249
255
|
return [2 /*return*/, built];
|
|
250
256
|
}
|
|
251
257
|
});
|
package/package.json
CHANGED
|
@@ -259,7 +259,7 @@ index ec69ad5123..1894032344 100644
|
|
|
259
259
|
GetHeaderValue(kReadOnlySnapshotChecksumOffset);
|
|
260
260
|
if (ro_snapshot_checksum != expected_ro_snapshot_checksum) {
|
|
261
261
|
diff --git node/lib/child_process.js node/lib/child_process.js
|
|
262
|
-
index
|
|
262
|
+
index 580a441a80..bef63ab3e9 100644
|
|
263
263
|
--- node/lib/child_process.js
|
|
264
264
|
+++ node/lib/child_process.js
|
|
265
265
|
@@ -168,7 +168,7 @@ function fork(modulePath, args = [], options) {
|
|
@@ -327,17 +327,23 @@ index 0000000000..a697294fdf
|
|
|
327
327
|
+ }());
|
|
328
328
|
+}());
|
|
329
329
|
diff --git node/lib/internal/modules/cjs/loader.js node/lib/internal/modules/cjs/loader.js
|
|
330
|
-
index 451b7c2195..
|
|
330
|
+
index 451b7c2195..7733dfb3d6 100644
|
|
331
331
|
--- node/lib/internal/modules/cjs/loader.js
|
|
332
332
|
+++ node/lib/internal/modules/cjs/loader.js
|
|
333
|
-
@@ -
|
|
333
|
+
@@ -229,12 +229,16 @@ function wrapModuleLoad(request, parent, isMain) {
|
|
334
|
+
* @param {string} filename Absolute path to the file
|
|
335
|
+
*/
|
|
336
|
+
function stat(filename) {
|
|
337
|
+
+ const origFilename = filename;
|
|
338
|
+
filename = path.toNamespacedPath(filename);
|
|
339
|
+
if (statCache !== null) {
|
|
334
340
|
const result = statCache.get(filename);
|
|
335
341
|
if (result !== undefined) { return result; }
|
|
336
342
|
}
|
|
337
343
|
- const result = internalFsBinding.internalModuleStat(filename);
|
|
338
344
|
+ const fs = require('fs');
|
|
339
|
-
+ const result = fs.existsSync(
|
|
340
|
-
+ (fs.statSync(
|
|
345
|
+
+ const result = fs.existsSync(origFilename) ?
|
|
346
|
+
+ (fs.statSync(origFilename).isDirectory() ? 1 : 0) : -1;
|
|
341
347
|
+
|
|
342
348
|
if (statCache !== null && result >= 0) {
|
|
343
349
|
// Only set cache when `internalModuleStat(filename)` succeeds.
|
|
@@ -375,7 +381,7 @@ index 9a9dcebb79..9f00ec6a85 100644
|
|
|
375
381
|
|
|
376
382
|
/**
|
|
377
383
|
diff --git node/lib/internal/process/pre_execution.js node/lib/internal/process/pre_execution.js
|
|
378
|
-
index
|
|
384
|
+
index cb96fd1bc4..e6c5b11c0a 100644
|
|
379
385
|
--- node/lib/internal/process/pre_execution.js
|
|
380
386
|
+++ node/lib/internal/process/pre_execution.js
|
|
381
387
|
@@ -49,7 +49,11 @@ const {
|
|
@@ -447,7 +453,7 @@ index bb39a0cb42..5fa6cb65cc 100644
|
|
|
447
453
|
parent_env_->AddCleanupHook([](void* data) {
|
|
448
454
|
Environment* env = static_cast<Environment*>(data);
|
|
449
455
|
diff --git node/src/node.cc node/src/node.cc
|
|
450
|
-
index
|
|
456
|
+
index ccc1085a84..882ab5f0c9 100644
|
|
451
457
|
--- node/src/node.cc
|
|
452
458
|
+++ node/src/node.cc
|
|
453
459
|
@@ -394,6 +394,8 @@ MaybeLocal<Value> StartExecution(Environment* env, StartExecutionCallback cb) {
|
|
@@ -660,7 +666,7 @@ index f66099a557..4048f6bd93 100644
|
|
|
660
666
|
+ return adjacent(c, nargv);
|
|
661
667
|
+}
|
|
662
668
|
diff --git node/src/node_options.cc node/src/node_options.cc
|
|
663
|
-
index
|
|
669
|
+
index cfc599ec9a..f4c7a56850 100644
|
|
664
670
|
--- node/src/node_options.cc
|
|
665
671
|
+++ node/src/node_options.cc
|
|
666
672
|
@@ -307,6 +307,7 @@ void Parse(
|
|
@@ -672,7 +678,7 @@ index 545db1dbbc..183af9dbad 100644
|
|
|
672
678
|
if (sea::IsSingleExecutable()) return;
|
|
673
679
|
#endif
|
|
674
680
|
diff --git node/tools/icu/icu-generic.gyp node/tools/icu/icu-generic.gyp
|
|
675
|
-
index
|
|
681
|
+
index f007c65232..002a00a6ae 100644
|
|
676
682
|
--- node/tools/icu/icu-generic.gyp
|
|
677
683
|
+++ node/tools/icu/icu-generic.gyp
|
|
678
684
|
@@ -52,7 +52,7 @@
|
package/patches/patches.json
CHANGED