@vercel/build-utils 10.3.2 → 10.5.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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # @vercel/build-utils
2
2
 
3
+ ## 10.5.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Disable yarn global cache before installs so build cache caches deps ([#13144](https://github.com/vercel/vercel/pull/13144))
8
+
9
+ ## 10.4.0
10
+
11
+ ### Minor Changes
12
+
13
+ - Expose pnpm6 within the detected package manager path for future versions of the build container ([#13132](https://github.com/vercel/vercel/pull/13132))
14
+
3
15
  ## 10.3.2
4
16
 
5
17
  ### Patch Changes
@@ -144,11 +144,6 @@ export declare function detectPackageManager(cliType: CliType, lockfileVersion:
144
144
  detectedLockfile: string;
145
145
  detectedPackageManager: string;
146
146
  pnpmVersionRange: string;
147
- } | {
148
- path: undefined;
149
- detectedLockfile: string;
150
- detectedPackageManager: string;
151
- pnpmVersionRange: string;
152
147
  } | {
153
148
  path: string;
154
149
  detectedLockfile: string;
@@ -521,6 +521,16 @@ async function runNpmInstall(destPath, args = [], spawnOpts, meta, nodeVersion,
521
521
  }
522
522
  meta.runNpmInstallSet = runNpmInstallSet;
523
523
  }
524
+ if (cliType === "yarn") {
525
+ const yarnVersion = detectYarnVersion(lockfileVersion);
526
+ if (["yarn@3.x", "yarn@4.x"].includes(yarnVersion)) {
527
+ await spawnAsync(
528
+ "yarn",
529
+ ["config", "set", "enableGlobalCache", "false"],
530
+ { cwd: destPath }
531
+ );
532
+ }
533
+ }
524
534
  const installTime = Date.now();
525
535
  console.log("Installing dependencies...");
526
536
  (0, import_debug.default)(`Installing to ${destPath}`);
@@ -833,8 +843,7 @@ function detectPackageManager(cliType, lockfileVersion, projectCreatedAt) {
833
843
  };
834
844
  case "pnpm 6":
835
845
  return {
836
- // undefined because pnpm@6 is the current default in the build container
837
- path: void 0,
846
+ path: "/pnpm6/node_modules/.bin",
838
847
  detectedLockfile: "pnpm-lock.yaml",
839
848
  detectedPackageManager: "pnpm@6.x",
840
849
  pnpmVersionRange: "6.x"
package/dist/index.js CHANGED
@@ -23535,6 +23535,16 @@ async function runNpmInstall(destPath, args = [], spawnOpts, meta, nodeVersion,
23535
23535
  }
23536
23536
  meta.runNpmInstallSet = runNpmInstallSet;
23537
23537
  }
23538
+ if (cliType === "yarn") {
23539
+ const yarnVersion = detectYarnVersion(lockfileVersion);
23540
+ if (["yarn@3.x", "yarn@4.x"].includes(yarnVersion)) {
23541
+ await spawnAsync(
23542
+ "yarn",
23543
+ ["config", "set", "enableGlobalCache", "false"],
23544
+ { cwd: destPath }
23545
+ );
23546
+ }
23547
+ }
23538
23548
  const installTime = Date.now();
23539
23549
  console.log("Installing dependencies...");
23540
23550
  debug(`Installing to ${destPath}`);
@@ -23847,8 +23857,7 @@ function detectPackageManager(cliType, lockfileVersion, projectCreatedAt) {
23847
23857
  };
23848
23858
  case "pnpm 6":
23849
23859
  return {
23850
- // undefined because pnpm@6 is the current default in the build container
23851
- path: void 0,
23860
+ path: "/pnpm6/node_modules/.bin",
23852
23861
  detectedLockfile: "pnpm-lock.yaml",
23853
23862
  detectedPackageManager: "pnpm@6.x",
23854
23863
  pnpmVersionRange: "6.x"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/build-utils",
3
- "version": "10.3.2",
3
+ "version": "10.5.0",
4
4
  "license": "Apache-2.0",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.js",