vercel-cli 41.1.0__py3-none-any.whl → 46.1.0__py3-none-any.whl

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.

Potentially problematic release.


This version of vercel-cli might be problematic. Click here for more details.

Files changed (30) hide show
  1. vercel_cli/vendor/README.md +1 -1
  2. vercel_cli/vendor/dist/index.js +72500 -59234
  3. vercel_cli/vendor/node_modules/.package-lock.json +12 -6
  4. vercel_cli/vendor/node_modules/@vercel/build-utils/CHANGELOG.md +168 -0
  5. vercel_cli/vendor/node_modules/@vercel/build-utils/dist/fs/node-version.d.ts +1 -0
  6. vercel_cli/vendor/node_modules/@vercel/build-utils/dist/fs/node-version.js +7 -1
  7. vercel_cli/vendor/node_modules/@vercel/build-utils/dist/fs/run-user-scripts.d.ts +11 -12
  8. vercel_cli/vendor/node_modules/@vercel/build-utils/dist/fs/run-user-scripts.js +220 -87
  9. vercel_cli/vendor/node_modules/@vercel/build-utils/dist/get-prefixed-env-vars.js +4 -1
  10. vercel_cli/vendor/node_modules/@vercel/build-utils/dist/index.js +393 -155
  11. vercel_cli/vendor/node_modules/@vercel/build-utils/dist/lambda.d.ts +44 -4
  12. vercel_cli/vendor/node_modules/@vercel/build-utils/dist/lambda.js +91 -3
  13. vercel_cli/vendor/node_modules/@vercel/build-utils/dist/prerender.d.ts +12 -1
  14. vercel_cli/vendor/node_modules/@vercel/build-utils/dist/prerender.js +3 -2
  15. vercel_cli/vendor/node_modules/@vercel/build-utils/dist/schemas.d.ts +41 -0
  16. vercel_cli/vendor/node_modules/@vercel/build-utils/dist/schemas.js +43 -1
  17. vercel_cli/vendor/node_modules/@vercel/build-utils/dist/types.d.ts +41 -10
  18. vercel_cli/vendor/node_modules/@vercel/build-utils/package.json +3 -2
  19. vercel_cli/vendor/node_modules/@vercel/detect-agent/LICENSE +202 -0
  20. vercel_cli/vendor/node_modules/@vercel/detect-agent/dist/index.d.ts +1 -0
  21. vercel_cli/vendor/node_modules/@vercel/detect-agent/dist/index.js +66 -0
  22. vercel_cli/vendor/node_modules/@vercel/detect-agent/package.json +31 -0
  23. vercel_cli/vendor/node_modules/@vercel/python/dist/index.js +29 -37
  24. vercel_cli/vendor/node_modules/@vercel/python/package.json +2 -2
  25. vercel_cli/vendor/node_modules/@vercel/python/vc_init.py +8 -7
  26. vercel_cli/vendor/package.json +4 -3
  27. {vercel_cli-41.1.0.dist-info → vercel_cli-46.1.0.dist-info}/METADATA +1 -1
  28. {vercel_cli-41.1.0.dist-info → vercel_cli-46.1.0.dist-info}/RECORD +30 -26
  29. {vercel_cli-41.1.0.dist-info → vercel_cli-46.1.0.dist-info}/WHEEL +0 -0
  30. {vercel_cli-41.1.0.dist-info → vercel_cli-46.1.0.dist-info}/entry_points.txt +0 -0
@@ -28,6 +28,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
29
  var run_user_scripts_exports = {};
30
30
  __export(run_user_scripts_exports, {
31
+ PNPM_10_PREFERRED_AT: () => PNPM_10_PREFERRED_AT,
31
32
  detectPackageManager: () => detectPackageManager,
32
33
  execCommand: () => execCommand,
33
34
  getEnvForPackageManager: () => getEnvForPackageManager,
@@ -67,7 +68,7 @@ var import_node_version = require("./node-version");
67
68
  var import_read_config_file = require("./read-config-file");
68
69
  var import_clone_env = require("../clone-env");
69
70
  var import_json5 = __toESM(require("json5"));
70
- const runNpmInstallSema = new import_async_sema.default(1);
71
+ var import_js_yaml = __toESM(require("js-yaml"));
71
72
  const NO_OVERRIDE = {
72
73
  detectedLockfile: void 0,
73
74
  detectedPackageManager: void 0,
@@ -238,14 +239,24 @@ async function scanParentDirs(destPath, readPackageJson = false, base = "/") {
238
239
  start: destPath,
239
240
  filename: "package.json"
240
241
  });
241
- const packageJson = readPackageJson && pkgJsonPath ? JSON.parse(await import_fs_extra.default.readFile(pkgJsonPath, "utf8")) : void 0;
242
+ let packageJson;
243
+ if (readPackageJson && pkgJsonPath) {
244
+ try {
245
+ packageJson = JSON.parse(await import_fs_extra.default.readFile(pkgJsonPath, "utf8"));
246
+ } catch (err) {
247
+ throw new Error(
248
+ `Could not read ${pkgJsonPath}: ${err.message}.`
249
+ );
250
+ }
251
+ }
242
252
  const {
243
253
  paths: [
244
254
  yarnLockPath,
245
255
  npmLockPath,
246
256
  pnpmLockPath,
247
257
  bunLockTextPath,
248
- bunLockBinPath
258
+ bunLockBinPath,
259
+ vltLockPath
249
260
  ],
250
261
  packageJsonPackageManager
251
262
  } = await walkParentDirsMulti({
@@ -256,18 +267,20 @@ async function scanParentDirs(destPath, readPackageJson = false, base = "/") {
256
267
  "package-lock.json",
257
268
  "pnpm-lock.yaml",
258
269
  "bun.lock",
259
- "bun.lockb"
270
+ "bun.lockb",
271
+ "vlt-lock.json"
260
272
  ]
261
273
  });
262
274
  let lockfilePath;
263
275
  let lockfileVersion;
264
276
  let cliType;
265
277
  const bunLockPath = bunLockTextPath ?? bunLockBinPath;
266
- const [hasYarnLock, packageLockJson, pnpmLockYaml, bunLock] = await Promise.all([
267
- Boolean(yarnLockPath),
278
+ const [packageLockJson, pnpmLockYaml, bunLock, yarnLock, vltLock] = await Promise.all([
268
279
  npmLockPath ? (0, import_read_config_file.readConfigFile)(npmLockPath) : null,
269
280
  pnpmLockPath ? (0, import_read_config_file.readConfigFile)(pnpmLockPath) : null,
270
- bunLockPath ? import_fs_extra.default.readFile(bunLockPath) : null
281
+ bunLockPath ? import_fs_extra.default.readFile(bunLockPath) : null,
282
+ yarnLockPath ? import_fs_extra.default.readFile(yarnLockPath, "utf8") : null,
283
+ vltLockPath ? (0, import_read_config_file.readConfigFile)(vltLockPath) : null
271
284
  ]);
272
285
  const rootProjectInfo = readPackageJson ? await readProjectRootInfo({
273
286
  base,
@@ -278,13 +291,14 @@ async function scanParentDirs(destPath, readPackageJson = false, base = "/") {
278
291
  turboVersionRange,
279
292
  rootProjectInfo?.rootDir
280
293
  ) : void 0;
281
- if (bunLock && hasYarnLock) {
294
+ if (bunLock && yarnLock) {
282
295
  cliType = "bun";
283
296
  lockfilePath = bunLockPath;
284
297
  lockfileVersion = bunLockTextPath ? 1 : 0;
285
- } else if (hasYarnLock) {
298
+ } else if (yarnLock) {
286
299
  cliType = "yarn";
287
300
  lockfilePath = yarnLockPath;
301
+ lockfileVersion = parseYarnLockVersion(yarnLock);
288
302
  } else if (pnpmLockYaml) {
289
303
  cliType = "pnpm";
290
304
  lockfilePath = pnpmLockPath;
@@ -297,6 +311,9 @@ async function scanParentDirs(destPath, readPackageJson = false, base = "/") {
297
311
  cliType = "bun";
298
312
  lockfilePath = bunLockPath;
299
313
  lockfileVersion = bunLockTextPath ? 1 : 0;
314
+ } else if (vltLock) {
315
+ cliType = "vlt";
316
+ lockfilePath = vltLockPath;
300
317
  } else {
301
318
  cliType = detectPackageManagerNameWithoutLockfile(
302
319
  packageJsonPackageManager,
@@ -314,6 +331,17 @@ async function scanParentDirs(destPath, readPackageJson = false, base = "/") {
314
331
  turboSupportsCorepackHome
315
332
  };
316
333
  }
334
+ function parseYarnLockVersion(yarnLock) {
335
+ if (!yarnLock.includes("__metadata:")) {
336
+ return 1;
337
+ }
338
+ try {
339
+ const metadata = import_js_yaml.default.load(yarnLock).__metadata;
340
+ return Number(metadata.version);
341
+ } catch {
342
+ return void 0;
343
+ }
344
+ }
317
345
  async function checkTurboSupportsCorepack(turboVersionRange, rootDir) {
318
346
  if (turboVersionSpecifierSupportsCorepack(turboVersionRange)) {
319
347
  return true;
@@ -423,7 +451,64 @@ async function walkParentDirsMulti({
423
451
  function isSet(v) {
424
452
  return v?.constructor?.name === "Set";
425
453
  }
426
- async function runNpmInstall(destPath, args = [], spawnOpts, meta, nodeVersion) {
454
+ function getInstallCommandForPackageManager(packageManager, args) {
455
+ switch (packageManager) {
456
+ case "npm":
457
+ return {
458
+ prettyCommand: "npm install",
459
+ commandArguments: args.filter((a) => a !== "--prefer-offline").concat(["install", "--no-audit", "--unsafe-perm"])
460
+ };
461
+ case "pnpm":
462
+ return {
463
+ prettyCommand: "pnpm install",
464
+ // PNPM's install command is similar to NPM's but without the audit nonsense
465
+ // @see options https://pnpm.io/cli/install
466
+ commandArguments: args.filter((a) => a !== "--prefer-offline").concat(["install", "--unsafe-perm"])
467
+ };
468
+ case "bun":
469
+ return {
470
+ prettyCommand: "bun install",
471
+ // @see options https://bun.sh/docs/cli/install
472
+ commandArguments: ["install", ...args]
473
+ };
474
+ case "yarn":
475
+ return {
476
+ prettyCommand: "yarn install",
477
+ commandArguments: ["install", ...args]
478
+ };
479
+ case "vlt":
480
+ return {
481
+ prettyCommand: "vlt install",
482
+ commandArguments: ["install", ...args]
483
+ };
484
+ }
485
+ }
486
+ async function runInstallCommand({
487
+ packageManager,
488
+ args,
489
+ opts
490
+ }) {
491
+ const { commandArguments, prettyCommand } = getInstallCommandForPackageManager(packageManager, args);
492
+ opts.prettyCommand = prettyCommand;
493
+ if (process.env.NPM_ONLY_PRODUCTION) {
494
+ commandArguments.push("--production");
495
+ }
496
+ await spawnAsync(packageManager, commandArguments, opts);
497
+ }
498
+ function initializeSet(set) {
499
+ if (!isSet(set)) {
500
+ return /* @__PURE__ */ new Set();
501
+ }
502
+ return set;
503
+ }
504
+ function checkIfAlreadyInstalled(runNpmInstallSet, packageJsonPath) {
505
+ const initializedRunNpmInstallSet = initializeSet(runNpmInstallSet);
506
+ const alreadyInstalled = initializedRunNpmInstallSet.has(packageJsonPath);
507
+ initializedRunNpmInstallSet.add(packageJsonPath);
508
+ return { alreadyInstalled, runNpmInstallSet: initializedRunNpmInstallSet };
509
+ }
510
+ const runNpmInstallSema = new import_async_sema.default(1);
511
+ async function runNpmInstall(destPath, args = [], spawnOpts, meta, nodeVersion, projectCreatedAt) {
427
512
  if (meta?.isDev) {
428
513
  (0, import_debug.default)("Skipping dependency installation because dev mode is enabled");
429
514
  return false;
@@ -443,19 +528,27 @@ async function runNpmInstall(destPath, args = [], spawnOpts, meta, nodeVersion)
443
528
  (0, import_debug.default)(
444
529
  `Skipping dependency installation because no package.json was found for ${destPath}`
445
530
  );
446
- runNpmInstallSema.release();
447
531
  return false;
448
532
  }
449
- if (meta && packageJsonPath && args.length === 0) {
450
- if (!isSet(meta.runNpmInstallSet)) {
451
- meta.runNpmInstallSet = /* @__PURE__ */ new Set();
533
+ const defaultInstall = args.length === 0;
534
+ if (meta && packageJsonPath && defaultInstall) {
535
+ const { alreadyInstalled, runNpmInstallSet } = checkIfAlreadyInstalled(
536
+ meta.runNpmInstallSet,
537
+ packageJsonPath
538
+ );
539
+ if (alreadyInstalled) {
540
+ return false;
452
541
  }
453
- if (isSet(meta.runNpmInstallSet)) {
454
- if (meta.runNpmInstallSet.has(packageJsonPath)) {
455
- return false;
456
- } else {
457
- meta.runNpmInstallSet.add(packageJsonPath);
458
- }
542
+ meta.runNpmInstallSet = runNpmInstallSet;
543
+ }
544
+ if (cliType === "yarn") {
545
+ const yarnVersion = detectYarnVersion(lockfileVersion);
546
+ if (["yarn@3.x", "yarn@4.x"].includes(yarnVersion)) {
547
+ await spawnAsync(
548
+ "yarn",
549
+ ["config", "set", "enableGlobalCache", "false"],
550
+ { cwd: destPath }
551
+ );
459
552
  }
460
553
  }
461
554
  const installTime = Date.now();
@@ -471,47 +564,20 @@ async function runNpmInstall(destPath, args = [], spawnOpts, meta, nodeVersion)
471
564
  nodeVersion,
472
565
  env,
473
566
  packageJsonEngines: packageJson?.engines,
474
- turboSupportsCorepackHome
567
+ turboSupportsCorepackHome,
568
+ projectCreatedAt
475
569
  });
476
- let commandArgs;
477
- const isPotentiallyBrokenNpm = cliType === "npm" && (nodeVersion?.major === 16 || opts.env.PATH?.includes("/node16/bin-npm7")) && !args.includes("--legacy-peer-deps") && spawnOpts?.env?.ENABLE_EXPERIMENTAL_COREPACK !== "1";
478
- if (cliType === "npm") {
479
- opts.prettyCommand = "npm install";
480
- commandArgs = args.filter((a) => a !== "--prefer-offline").concat(["install", "--no-audit", "--unsafe-perm"]);
481
- if (isPotentiallyBrokenNpm && spawnOpts?.env?.VERCEL_NPM_LEGACY_PEER_DEPS === "1") {
482
- commandArgs.push("--legacy-peer-deps");
483
- }
484
- } else if (cliType === "pnpm") {
485
- opts.prettyCommand = "pnpm install";
486
- commandArgs = args.filter((a) => a !== "--prefer-offline").concat(["install", "--unsafe-perm"]);
487
- } else if (cliType === "bun") {
488
- opts.prettyCommand = "bun install";
489
- commandArgs = ["install", ...args];
490
- } else {
491
- opts.prettyCommand = "yarn install";
492
- commandArgs = ["install", ...args];
493
- }
494
- if (process.env.NPM_ONLY_PRODUCTION) {
495
- commandArgs.push("--production");
496
- }
497
- try {
498
- await spawnAsync(cliType, commandArgs, opts);
499
- } catch (err) {
500
- const potentialErrorPath = import_path.default.join(
501
- process.env.HOME || "/",
502
- ".npm",
503
- "eresolve-report.txt"
570
+ const maySeeDynamicRequireYarnBug = process.env?.ENABLE_EXPERIMENTAL_COREPACK && packageJson?.packageManager?.startsWith("yarn") && packageJson?.type === "module";
571
+ if (maySeeDynamicRequireYarnBug) {
572
+ console.warn(
573
+ `Warning: This project may see "Error: Dynamic require of "util" is not supported". To avoid this error, remove \`"type": "module"\` from your package.json file, or use \`yarnPath\` instead of Corepack. Learn more: https://vercel.com/docs/errors/error-list#yarn-dynamic-require-of-util-is-not-supported`
504
574
  );
505
- if (isPotentiallyBrokenNpm && !commandArgs.includes("--legacy-peer-deps") && import_fs_extra.default.existsSync(potentialErrorPath)) {
506
- console.warn(
507
- 'Warning: Retrying "Install Command" with `--legacy-peer-deps` which may accept a potentially broken dependency and slow install time.'
508
- );
509
- commandArgs.push("--legacy-peer-deps");
510
- await spawnAsync(cliType, commandArgs, opts);
511
- } else {
512
- throw err;
513
- }
514
575
  }
576
+ await runInstallCommand({
577
+ packageManager: cliType,
578
+ args,
579
+ opts
580
+ });
515
581
  (0, import_debug.default)(`Install complete [${Date.now() - installTime}ms]`);
516
582
  return true;
517
583
  } finally {
@@ -525,7 +591,8 @@ function getEnvForPackageManager({
525
591
  nodeVersion,
526
592
  env,
527
593
  packageJsonEngines,
528
- turboSupportsCorepackHome
594
+ turboSupportsCorepackHome,
595
+ projectCreatedAt
529
596
  }) {
530
597
  const corepackEnabled = usingCorepack(
531
598
  env,
@@ -542,7 +609,8 @@ function getEnvForPackageManager({
542
609
  corepackPackageManager: packageJsonPackageManager,
543
610
  nodeVersion,
544
611
  corepackEnabled,
545
- packageJsonEngines
612
+ packageJsonEngines,
613
+ projectCreatedAt
546
614
  });
547
615
  if (corepackEnabled) {
548
616
  (0, import_debug.default)(
@@ -564,10 +632,26 @@ function getEnvForPackageManager({
564
632
  const oldPath = env.PATH + "";
565
633
  newEnv.PATH = `${newPath}${import_path.default.delimiter}${oldPath}`;
566
634
  if (detectedLockfile && detectedPackageManager) {
567
- const versionString = cliType === "pnpm" ? `version ${lockfileVersion} ` : "";
568
- console.log(
569
- `Detected \`${detectedLockfile}\` ${versionString}generated by ${detectedPackageManager}`
570
- );
635
+ const detectedV9PnpmLockfile = detectedLockfile === "pnpm-lock.yaml" && lockfileVersion === 9;
636
+ const pnpm10UsingPackageJsonPackageManager = detectedPackageManager === "pnpm@10.x" && packageJsonPackageManager;
637
+ if (pnpm10UsingPackageJsonPackageManager) {
638
+ const versionString = cliType === "pnpm" ? `version ${lockfileVersion} ` : "";
639
+ console.log(
640
+ `Detected \`${detectedLockfile}\` ${versionString}generated by ${detectedPackageManager} with package.json#packageManager ${packageJsonPackageManager}`
641
+ );
642
+ } else if (detectedV9PnpmLockfile) {
643
+ const otherVersion = detectedPackageManager === "pnpm@10.x" ? `pnpm@9.x` : `pnpm@10.x`;
644
+ console.log(
645
+ `Detected \`${detectedLockfile}\` ${lockfileVersion} which may be generated by pnpm@9.x or pnpm@10.x
646
+ Using ${detectedPackageManager} based on project creation date
647
+ To use ${otherVersion}, manually opt in using corepack (https://vercel.com/docs/deployments/configure-a-build#corepack)`
648
+ );
649
+ } else {
650
+ const versionString = cliType === "pnpm" ? `version ${lockfileVersion} ` : "";
651
+ console.log(
652
+ `Detected \`${detectedLockfile}\` ${versionString}generated by ${detectedPackageManager}`
653
+ );
654
+ }
571
655
  if (cliType === "bun") {
572
656
  console.warn(
573
657
  "Warning: Bun is used as a package manager at build time only, not at runtime with Functions"
@@ -580,7 +664,8 @@ function getEnvForPackageManager({
580
664
  }
581
665
  return newEnv;
582
666
  }
583
- function detectPnpmVersion(lockfileVersion) {
667
+ const PNPM_10_PREFERRED_AT = /* @__PURE__ */ new Date("2025-02-27T20:00:00Z");
668
+ function detectPnpmVersion(lockfileVersion, projectCreatedAt) {
584
669
  switch (true) {
585
670
  case lockfileVersion === void 0:
586
671
  return "not found";
@@ -590,21 +675,42 @@ function detectPnpmVersion(lockfileVersion) {
590
675
  return "pnpm 7";
591
676
  case (lockfileVersion === 6 || lockfileVersion === 6.1):
592
677
  return "pnpm 8";
593
- case (lockfileVersion === 7 || lockfileVersion === 9):
678
+ case lockfileVersion === 7:
594
679
  return "pnpm 9";
680
+ case lockfileVersion === 9: {
681
+ const projectPrefersPnpm10 = projectCreatedAt && projectCreatedAt >= PNPM_10_PREFERRED_AT.getTime();
682
+ return projectPrefersPnpm10 ? "pnpm 10" : "pnpm 9";
683
+ }
595
684
  default:
596
685
  return "not found";
597
686
  }
598
687
  }
688
+ function detectYarnVersion(lockfileVersion) {
689
+ if (lockfileVersion) {
690
+ if ([1].includes(lockfileVersion)) {
691
+ return "yarn@1.x";
692
+ } else if ([4, 5].includes(lockfileVersion)) {
693
+ return "yarn@2.x";
694
+ } else if ([6, 7].includes(lockfileVersion)) {
695
+ return "yarn@3.x";
696
+ } else if ([8].includes(lockfileVersion)) {
697
+ return "yarn@4.x";
698
+ }
699
+ }
700
+ return "unknown yarn";
701
+ }
599
702
  function validLockfileForPackageManager(cliType, lockfileVersion, packageManagerVersion) {
600
703
  const packageManagerMajorVersion = packageManagerVersion.major;
601
704
  switch (cliType) {
602
705
  case "npm":
603
706
  case "bun":
604
707
  case "yarn":
708
+ case "vlt":
605
709
  return true;
606
710
  case "pnpm":
607
711
  switch (packageManagerMajorVersion) {
712
+ case 10:
713
+ return lockfileVersion === 9;
608
714
  case 9:
609
715
  if ("9.0.0" === packageManagerVersion.version && lockfileVersion === 6) {
610
716
  return false;
@@ -626,25 +732,34 @@ function getPathOverrideForPackageManager({
626
732
  lockfileVersion,
627
733
  corepackPackageManager,
628
734
  corepackEnabled = true,
629
- packageJsonEngines
735
+ packageJsonEngines,
736
+ projectCreatedAt
630
737
  }) {
631
- const detectedPackageManger = detectPackageManager(cliType, lockfileVersion);
632
- if (!corepackPackageManager || !corepackEnabled) {
633
- if (cliType === "pnpm" && packageJsonEngines?.pnpm) {
738
+ const detectedPackageManger = detectPackageManager(
739
+ cliType,
740
+ lockfileVersion,
741
+ projectCreatedAt
742
+ );
743
+ const usingCorepack2 = corepackPackageManager && corepackEnabled;
744
+ if (usingCorepack2) {
745
+ validateCorepackPackageManager(
746
+ cliType,
747
+ lockfileVersion,
748
+ corepackPackageManager,
749
+ packageJsonEngines?.pnpm
750
+ );
751
+ return NO_OVERRIDE;
752
+ }
753
+ if (cliType === "pnpm" && packageJsonEngines?.pnpm) {
754
+ const usingDetected = detectedPackageManger?.pnpmVersionRange !== "10.x" || !corepackPackageManager;
755
+ if (usingDetected) {
634
756
  checkEnginesPnpmAgainstDetected(
635
757
  packageJsonEngines.pnpm,
636
758
  detectedPackageManger
637
759
  );
638
760
  }
639
- return detectedPackageManger ?? NO_OVERRIDE;
640
761
  }
641
- validateCorepackPackageManager(
642
- cliType,
643
- lockfileVersion,
644
- corepackPackageManager,
645
- packageJsonEngines?.pnpm
646
- );
647
- return NO_OVERRIDE;
762
+ return detectedPackageManger ?? NO_OVERRIDE;
648
763
  }
649
764
  function checkEnginesPnpmAgainstDetected(enginesPnpm, detectedPackageManger) {
650
765
  if (detectedPackageManger?.pnpmVersionRange && (0, import_semver.validRange)(detectedPackageManger.pnpmVersionRange) && (0, import_semver.validRange)(enginesPnpm)) {
@@ -719,12 +834,12 @@ function validateVersionSpecifier(version) {
719
834
  packageVersion
720
835
  };
721
836
  }
722
- function detectPackageManager(cliType, lockfileVersion) {
837
+ function detectPackageManager(cliType, lockfileVersion, projectCreatedAt) {
723
838
  switch (cliType) {
724
839
  case "npm":
725
840
  return void 0;
726
841
  case "pnpm":
727
- switch (detectPnpmVersion(lockfileVersion)) {
842
+ switch (detectPnpmVersion(lockfileVersion, projectCreatedAt)) {
728
843
  case "pnpm 7":
729
844
  return {
730
845
  path: "/pnpm7/node_modules/.bin",
@@ -746,10 +861,16 @@ function detectPackageManager(cliType, lockfileVersion) {
746
861
  detectedPackageManager: "pnpm@9.x",
747
862
  pnpmVersionRange: "9.x"
748
863
  };
864
+ case "pnpm 10":
865
+ return {
866
+ path: "/pnpm10/node_modules/.bin",
867
+ detectedLockfile: "pnpm-lock.yaml",
868
+ detectedPackageManager: "pnpm@10.x",
869
+ pnpmVersionRange: "10.x"
870
+ };
749
871
  case "pnpm 6":
750
872
  return {
751
- // undefined because pnpm@6 is the current default in the build container
752
- path: void 0,
873
+ path: "/pnpm6/node_modules/.bin",
753
874
  detectedLockfile: "pnpm-lock.yaml",
754
875
  detectedPackageManager: "pnpm@6.x",
755
876
  pnpmVersionRange: "6.x"
@@ -767,7 +888,13 @@ function detectPackageManager(cliType, lockfileVersion) {
767
888
  return {
768
889
  path: void 0,
769
890
  detectedLockfile: "yarn.lock",
770
- detectedPackageManager: "yarn"
891
+ detectedPackageManager: detectYarnVersion(lockfileVersion)
892
+ };
893
+ case "vlt":
894
+ return {
895
+ path: void 0,
896
+ detectedLockfile: "vlt-lock.json",
897
+ detectedPackageManager: "vlt@0.x"
771
898
  };
772
899
  }
773
900
  }
@@ -809,7 +936,8 @@ async function runCustomInstallCommand({
809
936
  destPath,
810
937
  installCommand,
811
938
  nodeVersion,
812
- spawnOpts
939
+ spawnOpts,
940
+ projectCreatedAt
813
941
  }) {
814
942
  console.log(`Running "install" command: \`${installCommand}\`...`);
815
943
  const {
@@ -826,7 +954,8 @@ async function runCustomInstallCommand({
826
954
  nodeVersion,
827
955
  env: spawnOpts?.env || {},
828
956
  packageJsonEngines: packageJson?.engines,
829
- turboSupportsCorepackHome
957
+ turboSupportsCorepackHome,
958
+ projectCreatedAt
830
959
  });
831
960
  (0, import_debug.default)(`Running with $PATH:`, env?.PATH || "");
832
961
  await execCommand(installCommand, {
@@ -835,7 +964,7 @@ async function runCustomInstallCommand({
835
964
  cwd: destPath
836
965
  });
837
966
  }
838
- async function runPackageJsonScript(destPath, scriptNames, spawnOpts) {
967
+ async function runPackageJsonScript(destPath, scriptNames, spawnOpts, projectCreatedAt) {
839
968
  (0, import_assert.default)(import_path.default.isAbsolute(destPath));
840
969
  const {
841
970
  packageJson,
@@ -862,7 +991,8 @@ async function runPackageJsonScript(destPath, scriptNames, spawnOpts) {
862
991
  nodeVersion: void 0,
863
992
  env: (0, import_clone_env.cloneEnv)(process.env, spawnOpts?.env),
864
993
  packageJsonEngines: packageJson?.engines,
865
- turboSupportsCorepackHome
994
+ turboSupportsCorepackHome,
995
+ projectCreatedAt
866
996
  })
867
997
  };
868
998
  if (cliType === "npm") {
@@ -871,6 +1001,8 @@ async function runPackageJsonScript(destPath, scriptNames, spawnOpts) {
871
1001
  opts.prettyCommand = `pnpm run ${scriptName}`;
872
1002
  } else if (cliType === "bun") {
873
1003
  opts.prettyCommand = `bun run ${scriptName}`;
1004
+ } else if (cliType === "vlt") {
1005
+ opts.prettyCommand = `vlt run ${scriptName}`;
874
1006
  } else {
875
1007
  opts.prettyCommand = `yarn run ${scriptName}`;
876
1008
  }
@@ -917,6 +1049,7 @@ const installDependencies = (0, import_util.deprecate)(
917
1049
  );
918
1050
  // Annotate the CommonJS export names for ESM import in node:
919
1051
  0 && (module.exports = {
1052
+ PNPM_10_PREFERRED_AT,
920
1053
  detectPackageManager,
921
1054
  execCommand,
922
1055
  getEnvForPackageManager,
@@ -29,9 +29,12 @@ function getPrefixedEnvVars({
29
29
  const allowed = [
30
30
  "VERCEL_URL",
31
31
  "VERCEL_ENV",
32
+ "VERCEL_TARGET_ENV",
32
33
  "VERCEL_REGION",
33
34
  "VERCEL_BRANCH_URL",
34
- "VERCEL_PROJECT_PRODUCTION_URL"
35
+ "VERCEL_PROJECT_PRODUCTION_URL",
36
+ "VERCEL_DEPLOYMENT_ID",
37
+ "VERCEL_PROJECT_ID"
35
38
  ];
36
39
  const newEnvs = {};
37
40
  if (envPrefix && envs.VERCEL_URL) {