@wix/evalforge-evaluator 0.194.0 → 0.195.0
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/build/index.js +19 -13
- package/build/index.js.map +2 -2
- package/build/index.mjs +19 -13
- package/build/index.mjs.map +2 -2
- package/package.json +2 -2
package/build/index.mjs
CHANGED
|
@@ -7402,7 +7402,7 @@ import { createHash } from "crypto";
|
|
|
7402
7402
|
import path from "path";
|
|
7403
7403
|
import { spawn, execFileSync } from "child_process";
|
|
7404
7404
|
var INSTALL_TIMEOUT_MS = 1e5;
|
|
7405
|
-
var
|
|
7405
|
+
var PNPM_BOOTSTRAP_TIMEOUT_MS = 6e4;
|
|
7406
7406
|
var HEARTBEAT_INTERVAL_MS = 5e3;
|
|
7407
7407
|
function reportRegistry(workDir, onProgress) {
|
|
7408
7408
|
try {
|
|
@@ -7518,34 +7518,40 @@ async function runCommand(exec, cmd, args, workDir, onProgress, label, timeoutMs
|
|
|
7518
7518
|
clearInterval(heartbeat);
|
|
7519
7519
|
}
|
|
7520
7520
|
}
|
|
7521
|
+
var PNPM_INSTALL_ARGS = [
|
|
7522
|
+
"install",
|
|
7523
|
+
"--shamefully-hoist",
|
|
7524
|
+
"--ignore-scripts",
|
|
7525
|
+
"--network-concurrency=8"
|
|
7526
|
+
];
|
|
7521
7527
|
async function runInstall(exec, pm, workDir, onProgress) {
|
|
7522
7528
|
reportRegistry(workDir, onProgress);
|
|
7523
|
-
const
|
|
7529
|
+
const pnpmReady = await runCommand(
|
|
7524
7530
|
exec,
|
|
7525
7531
|
"npm",
|
|
7526
|
-
["install", "-g", "
|
|
7532
|
+
["install", "-g", "pnpm"],
|
|
7527
7533
|
workDir,
|
|
7528
7534
|
onProgress,
|
|
7529
|
-
"
|
|
7530
|
-
|
|
7535
|
+
"pnpm bootstrap",
|
|
7536
|
+
PNPM_BOOTSTRAP_TIMEOUT_MS
|
|
7531
7537
|
);
|
|
7532
|
-
if (
|
|
7533
|
-
const
|
|
7538
|
+
if (pnpmReady) {
|
|
7539
|
+
const pnpmOk = await runCommand(
|
|
7534
7540
|
exec,
|
|
7535
|
-
"
|
|
7536
|
-
|
|
7541
|
+
"pnpm",
|
|
7542
|
+
PNPM_INSTALL_ARGS,
|
|
7537
7543
|
workDir,
|
|
7538
7544
|
onProgress,
|
|
7539
|
-
"
|
|
7545
|
+
"pnpm install",
|
|
7540
7546
|
INSTALL_TIMEOUT_MS
|
|
7541
7547
|
);
|
|
7542
|
-
if (
|
|
7548
|
+
if (pnpmOk) {
|
|
7543
7549
|
reportNodeModules(workDir, onProgress);
|
|
7544
7550
|
return true;
|
|
7545
7551
|
}
|
|
7546
|
-
onProgress("[diag]
|
|
7552
|
+
onProgress("[diag] pnpm install failed \u2014 falling back to npm");
|
|
7547
7553
|
} else {
|
|
7548
|
-
onProgress("[diag]
|
|
7554
|
+
onProgress("[diag] pnpm bootstrap failed \u2014 falling back to npm");
|
|
7549
7555
|
}
|
|
7550
7556
|
const ok = await runCommand(
|
|
7551
7557
|
exec,
|