@vercel/build-utils 12.0.0 → 12.1.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/CHANGELOG.md +6 -0
- package/dist/fs/run-user-scripts.js +15 -3
- package/dist/index.js +15 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -347,13 +347,25 @@ async function checkTurboSupportsCorepack(turboVersionRange, rootDir) {
|
|
|
347
347
|
return true;
|
|
348
348
|
}
|
|
349
349
|
const turboJsonPath = import_path.default.join(rootDir, "turbo.json");
|
|
350
|
-
const
|
|
350
|
+
const turboJsoncPath = import_path.default.join(rootDir, "turbo.jsonc");
|
|
351
|
+
const [turboJsonExists, turboJsoncExists] = await Promise.all([
|
|
352
|
+
import_fs_extra.default.pathExists(turboJsonPath),
|
|
353
|
+
import_fs_extra.default.pathExists(turboJsoncPath)
|
|
354
|
+
]);
|
|
351
355
|
let turboJson = null;
|
|
356
|
+
let turboConfigPath = null;
|
|
352
357
|
if (turboJsonExists) {
|
|
358
|
+
turboConfigPath = turboJsonPath;
|
|
359
|
+
} else if (turboJsoncExists) {
|
|
360
|
+
turboConfigPath = turboJsoncPath;
|
|
361
|
+
}
|
|
362
|
+
if (turboConfigPath) {
|
|
353
363
|
try {
|
|
354
|
-
turboJson = import_json5.default.parse(await import_fs_extra.default.readFile(
|
|
364
|
+
turboJson = import_json5.default.parse(await import_fs_extra.default.readFile(turboConfigPath, "utf8"));
|
|
355
365
|
} catch (err) {
|
|
356
|
-
console.warn(
|
|
366
|
+
console.warn(
|
|
367
|
+
`WARNING: Failed to parse ${import_path.default.basename(turboConfigPath)}`
|
|
368
|
+
);
|
|
357
369
|
}
|
|
358
370
|
}
|
|
359
371
|
const turboJsonIncludesCorepackHome = turboJson !== null && typeof turboJson === "object" && "globalPassThroughEnv" in turboJson && Array.isArray(turboJson.globalPassThroughEnv) && turboJson.globalPassThroughEnv.includes("COREPACK_HOME");
|
package/dist/index.js
CHANGED
|
@@ -23421,13 +23421,25 @@ async function checkTurboSupportsCorepack(turboVersionRange, rootDir) {
|
|
|
23421
23421
|
return true;
|
|
23422
23422
|
}
|
|
23423
23423
|
const turboJsonPath = import_path5.default.join(rootDir, "turbo.json");
|
|
23424
|
-
const
|
|
23424
|
+
const turboJsoncPath = import_path5.default.join(rootDir, "turbo.jsonc");
|
|
23425
|
+
const [turboJsonExists, turboJsoncExists] = await Promise.all([
|
|
23426
|
+
import_fs_extra7.default.pathExists(turboJsonPath),
|
|
23427
|
+
import_fs_extra7.default.pathExists(turboJsoncPath)
|
|
23428
|
+
]);
|
|
23425
23429
|
let turboJson = null;
|
|
23430
|
+
let turboConfigPath = null;
|
|
23426
23431
|
if (turboJsonExists) {
|
|
23432
|
+
turboConfigPath = turboJsonPath;
|
|
23433
|
+
} else if (turboJsoncExists) {
|
|
23434
|
+
turboConfigPath = turboJsoncPath;
|
|
23435
|
+
}
|
|
23436
|
+
if (turboConfigPath) {
|
|
23427
23437
|
try {
|
|
23428
|
-
turboJson = import_json5.default.parse(await import_fs_extra7.default.readFile(
|
|
23438
|
+
turboJson = import_json5.default.parse(await import_fs_extra7.default.readFile(turboConfigPath, "utf8"));
|
|
23429
23439
|
} catch (err) {
|
|
23430
|
-
console.warn(
|
|
23440
|
+
console.warn(
|
|
23441
|
+
`WARNING: Failed to parse ${import_path5.default.basename(turboConfigPath)}`
|
|
23442
|
+
);
|
|
23431
23443
|
}
|
|
23432
23444
|
}
|
|
23433
23445
|
const turboJsonIncludesCorepackHome = turboJson !== null && typeof turboJson === "object" && "globalPassThroughEnv" in turboJson && Array.isArray(turboJson.globalPassThroughEnv) && turboJson.globalPassThroughEnv.includes("COREPACK_HOME");
|