@vercel/build-utils 8.4.8 → 8.4.9
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.d.ts +1 -0
- package/dist/fs/run-user-scripts.js +8 -3
- package/dist/index.js +6 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
@@ -81,6 +81,7 @@ export declare function runShellScript(fsPath: string, args?: string[], spawnOpt
|
|
81
81
|
export declare function getSpawnOptions(meta: Meta, nodeVersion: NodeVersion): SpawnOptions;
|
82
82
|
export declare function getNodeVersion(destPath: string, fallbackVersion?: string | undefined, config?: Config, meta?: Meta, availableVersions?: number[]): Promise<NodeVersion>;
|
83
83
|
export declare function scanParentDirs(destPath: string, readPackageJson?: boolean, base?: string): Promise<ScanParentDirsResult>;
|
84
|
+
export declare function turboVersionSpecifierSupportsCorepack(turboVersionSpecifier: string): boolean;
|
84
85
|
export declare function usingCorepack(env: {
|
85
86
|
[x: string]: string | undefined;
|
86
87
|
}, packageJsonPackageManager: string | undefined, turboSupportsCorepackHome: boolean | undefined): boolean;
|
@@ -49,6 +49,7 @@ __export(run_user_scripts_exports, {
|
|
49
49
|
spawnAsync: () => spawnAsync,
|
50
50
|
spawnCommand: () => spawnCommand,
|
51
51
|
traverseUpDirectories: () => traverseUpDirectories,
|
52
|
+
turboVersionSpecifierSupportsCorepack: () => turboVersionSpecifierSupportsCorepack,
|
52
53
|
usingCorepack: () => usingCorepack,
|
53
54
|
walkParentDirs: () => walkParentDirs
|
54
55
|
});
|
@@ -300,7 +301,7 @@ async function scanParentDirs(destPath, readPackageJson = false, base = "/") {
|
|
300
301
|
};
|
301
302
|
}
|
302
303
|
async function checkTurboSupportsCorepack(turboVersionRange, rootDir) {
|
303
|
-
if (
|
304
|
+
if (turboVersionSpecifierSupportsCorepack(turboVersionRange)) {
|
304
305
|
return true;
|
305
306
|
}
|
306
307
|
const turboJsonPath = import_path.default.join(rootDir, "turbo.json");
|
@@ -308,9 +309,12 @@ async function checkTurboSupportsCorepack(turboVersionRange, rootDir) {
|
|
308
309
|
const turboJson = turboJsonExists ? JSON.parse(await import_fs_extra.default.readFile(turboJsonPath, "utf8")) : void 0;
|
309
310
|
return turboJson?.globalPassThroughEnv?.includes("COREPACK_HOME") || false;
|
310
311
|
}
|
311
|
-
function
|
312
|
+
function turboVersionSpecifierSupportsCorepack(turboVersionSpecifier) {
|
313
|
+
if (!(0, import_semver.validRange)(turboVersionSpecifier)) {
|
314
|
+
return false;
|
315
|
+
}
|
312
316
|
const versionSupportingCorepack = "2.1.3";
|
313
|
-
const minTurboBeingUsed = (0, import_semver.minVersion)(
|
317
|
+
const minTurboBeingUsed = (0, import_semver.minVersion)(turboVersionSpecifier);
|
314
318
|
if (!minTurboBeingUsed) {
|
315
319
|
return false;
|
316
320
|
}
|
@@ -891,6 +895,7 @@ const installDependencies = (0, import_util.deprecate)(
|
|
891
895
|
spawnAsync,
|
892
896
|
spawnCommand,
|
893
897
|
traverseUpDirectories,
|
898
|
+
turboVersionSpecifierSupportsCorepack,
|
894
899
|
usingCorepack,
|
895
900
|
walkParentDirs
|
896
901
|
});
|
package/dist/index.js
CHANGED
@@ -23670,7 +23670,7 @@ async function scanParentDirs(destPath, readPackageJson = false, base = "/") {
|
|
23670
23670
|
};
|
23671
23671
|
}
|
23672
23672
|
async function checkTurboSupportsCorepack(turboVersionRange, rootDir) {
|
23673
|
-
if (
|
23673
|
+
if (turboVersionSpecifierSupportsCorepack(turboVersionRange)) {
|
23674
23674
|
return true;
|
23675
23675
|
}
|
23676
23676
|
const turboJsonPath = import_path5.default.join(rootDir, "turbo.json");
|
@@ -23678,9 +23678,12 @@ async function checkTurboSupportsCorepack(turboVersionRange, rootDir) {
|
|
23678
23678
|
const turboJson = turboJsonExists ? JSON.parse(await import_fs_extra7.default.readFile(turboJsonPath, "utf8")) : void 0;
|
23679
23679
|
return turboJson?.globalPassThroughEnv?.includes("COREPACK_HOME") || false;
|
23680
23680
|
}
|
23681
|
-
function
|
23681
|
+
function turboVersionSpecifierSupportsCorepack(turboVersionSpecifier) {
|
23682
|
+
if (!(0, import_semver2.validRange)(turboVersionSpecifier)) {
|
23683
|
+
return false;
|
23684
|
+
}
|
23682
23685
|
const versionSupportingCorepack = "2.1.3";
|
23683
|
-
const minTurboBeingUsed = (0, import_semver2.minVersion)(
|
23686
|
+
const minTurboBeingUsed = (0, import_semver2.minVersion)(turboVersionSpecifier);
|
23684
23687
|
if (!minTurboBeingUsed) {
|
23685
23688
|
return false;
|
23686
23689
|
}
|