@vercel/build-utils 10.4.0 → 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,11 @@
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
+
3
9
  ## 10.4.0
4
10
 
5
11
  ### Minor Changes
@@ -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}`);
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}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/build-utils",
3
- "version": "10.4.0",
3
+ "version": "10.5.0",
4
4
  "license": "Apache-2.0",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.js",