@wix/evalforge-evaluator 0.171.0 → 0.172.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 +4 -6
- package/build/index.js.map +2 -2
- package/build/index.mjs +7 -11
- package/build/index.mjs.map +3 -3
- package/package.json +2 -2
package/build/index.js
CHANGED
|
@@ -470,8 +470,7 @@ function detectPackageManager(workDir) {
|
|
|
470
470
|
if ((0, import_fs.existsSync)(import_path2.default.join(workDir, "yarn.lock"))) {
|
|
471
471
|
return { cmd: "yarn", args: ["install", "--frozen-lockfile"], cacheSourceFile: "yarn.lock" };
|
|
472
472
|
}
|
|
473
|
-
|
|
474
|
-
return { cmd: "yarn", args: ["install"], cacheSourceFile: "package.json" };
|
|
473
|
+
return { cmd: "npm", args: ["install", "--legacy-peer-deps", "--prefer-offline", "--no-fund", "--no-audit"], cacheSourceFile: "package.json" };
|
|
475
474
|
}
|
|
476
475
|
function cloneDirectory(src, dest) {
|
|
477
476
|
if (process.platform === "darwin") {
|
|
@@ -499,7 +498,7 @@ function installWithCache(workDir, exec, cacheBase, pm) {
|
|
|
499
498
|
}
|
|
500
499
|
console.log(`[environment] Running ${pm.cmd} ${pm.args.join(" ")} in ${workDir} (cache key: ${cacheKey})`);
|
|
501
500
|
try {
|
|
502
|
-
exec(pm.cmd, pm.args, { cwd: workDir, stdio: "inherit", timeout: 18e4 });
|
|
501
|
+
exec(pm.cmd, pm.args, { cwd: workDir, stdio: "inherit", timeout: 18e4, env: { ...process.env, NODE_ENV: "development" } });
|
|
503
502
|
} catch (err) {
|
|
504
503
|
console.error("[environment] Dependency installation failed:", err instanceof Error ? err.message : String(err));
|
|
505
504
|
return;
|
|
@@ -511,8 +510,7 @@ function installWithCache(workDir, exec, cacheBase, pm) {
|
|
|
511
510
|
if ((0, import_fs.existsSync)(yarnLockPath)) {
|
|
512
511
|
(0, import_fs.copyFileSync)(yarnLockPath, cachedYarnLock);
|
|
513
512
|
}
|
|
514
|
-
(
|
|
515
|
-
cloneDirectory(cachedNodeModules, targetNodeModules);
|
|
513
|
+
cloneDirectory(targetNodeModules, cachedNodeModules);
|
|
516
514
|
} catch (err) {
|
|
517
515
|
console.error("[environment] Failed to save to cache (installation still succeeded):", err instanceof Error ? err.message : String(err));
|
|
518
516
|
}
|
|
@@ -528,7 +526,7 @@ async function installDependencies(workDir, exec = import_child_process.execFile
|
|
|
528
526
|
}
|
|
529
527
|
console.log(`[environment] Running ${pm.cmd} ${pm.args.join(" ")} in ${workDir}`);
|
|
530
528
|
try {
|
|
531
|
-
exec(pm.cmd, pm.args, { cwd: workDir, stdio: "inherit", timeout: 18e4 });
|
|
529
|
+
exec(pm.cmd, pm.args, { cwd: workDir, stdio: "inherit", timeout: 18e4, env: { ...process.env, NODE_ENV: "development" } });
|
|
532
530
|
console.log("[environment] Dependency installation complete");
|
|
533
531
|
} catch (err) {
|
|
534
532
|
console.error("[environment] Dependency installation failed:", err instanceof Error ? err.message : String(err));
|