vite-plus 1.1.0 → 1.2.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.
Files changed (81) hide show
  1. package/LICENSE +29 -1
  2. package/binding/index.cjs +54 -54
  3. package/binding/index.d.cts +3 -0
  4. package/dist/{agent-eISuMXJb.js → agent-KeDc6vmg.js} +2 -2
  5. package/dist/bin.js +10 -10
  6. package/dist/command-DaRqSNpP.js +1 -0
  7. package/dist/comparison-CmVirWIW-DUGaiYqF.js +121 -0
  8. package/dist/config/bin.js +4 -4
  9. package/dist/{constants-CCQkpaxK.js → constants-BW3g7VnD.js} +3 -3
  10. package/dist/create/bin.d.ts +2 -1
  11. package/dist/create/bin.js +91 -23
  12. package/dist/{define-config-CeW9DETl.d.ts → define-config-Bexdd6RZ.d.ts} +1 -1
  13. package/dist/{define-config-Ro6PS4dP.js → define-config-CIlk9scU.js} +111 -6
  14. package/dist/{define-config-CREUiMmM.cjs → define-config-Dq_23Eyr.cjs} +89 -3
  15. package/dist/define-config.cjs +1 -1
  16. package/dist/define-config.d.ts +1 -1
  17. package/dist/define-config.js +1 -2
  18. package/dist/{dist-BsAzy8OW.js → dist-Bi7ZEK3c.js} +1 -2
  19. package/dist/dist-CBWGibx8.js +3 -0
  20. package/dist/{dist-DfmT__Aw.js → dist-Cqz8OtiO.js} +24 -21
  21. package/dist/{editor-B8tkz7nL.js → editor-b1XUwt9v.js} +30 -23
  22. package/dist/fmt.js +1 -2
  23. package/dist/hooks/bin.js +1 -1
  24. package/dist/{hooks-C-4gykWR.js → hooks-DhwsWb46.js} +34 -22
  25. package/dist/index.cjs +1 -1
  26. package/dist/index.d.ts +1 -1
  27. package/dist/index.js +1 -1
  28. package/dist/lint-plugins-dev.js +1 -2
  29. package/dist/lint-plugins.cjs +1 -1
  30. package/dist/lint-plugins.js +1 -2
  31. package/dist/migration/bin.js +17 -15
  32. package/dist/{oxlint-plugin-config-CbG58Kzr.js → oxlint-plugin-config-Dx-ZY2MN.js} +1 -1
  33. package/dist/oxlint-plugin.js +2 -2
  34. package/dist/pack-bin.js +2 -2
  35. package/dist/{package-BS84eWrW.js → package-BP16iQby.js} +1 -1
  36. package/dist/{package-overrides-CpoQngt3.js → package-overrides-D1RcXSFl.js} +1 -1
  37. package/dist/{prompts-ByOzbMBG.js → prompts-BGpQtC5z.js} +15 -14
  38. package/dist/resolve-vite-config-CGzlyhGr.js +1 -0
  39. package/dist/{resolve-vite-config-Be237LWp.js → resolve-vite-config-x47JetlI.js} +2 -2
  40. package/dist/staged/bin.js +2 -2
  41. package/dist/sync-versions/bin.js +4759 -3369
  42. package/dist/sync-versions/bin.mjs +4893 -3500
  43. package/dist/test/browser/providers/playwright.d.ts +7 -2
  44. package/dist/test/browser-playwright.d.ts +7 -2
  45. package/dist/toolchain.js +12 -12
  46. package/dist/toolchain.json +12 -12
  47. package/dist/tsconfig-C5PnJfW4.js +1 -0
  48. package/dist/{tsconfig-DzZ-nrx2.js → tsconfig-D2DzAQ_D.js} +2 -2
  49. package/dist/version.js +2 -2
  50. package/dist/versions.js +7 -7
  51. package/docs/config/run.md +9 -5
  52. package/docs/config/staged.md +1 -1
  53. package/docs/guide/automatic-data-tracking.md +7 -6
  54. package/docs/guide/cache.md +3 -3
  55. package/docs/guide/check.md +7 -7
  56. package/docs/guide/commit-hooks.md +3 -1
  57. package/docs/guide/create.md +14 -4
  58. package/docs/guide/env.md +9 -2
  59. package/docs/guide/github-actions-cache.md +1 -1
  60. package/docs/guide/global-cli.md +36 -10
  61. package/docs/guide/ide-integration.md +1 -1
  62. package/docs/guide/index.md +8 -8
  63. package/docs/guide/local-cli.md +20 -4
  64. package/docs/guide/migrate-rules.md +3 -3
  65. package/docs/guide/migrate.md +9 -9
  66. package/docs/guide/{install.md → package-management.md} +25 -4
  67. package/docs/guide/run.md +10 -8
  68. package/docs/guide/test.md +3 -1
  69. package/docs/guide/troubleshooting.md +7 -5
  70. package/docs/guide/upgrade-project.md +1 -5
  71. package/docs/guide/upgrade.md +6 -0
  72. package/docs/guide/vitest-v5.md +2 -2
  73. package/docs/guide/vpx.md +3 -3
  74. package/package.json +30 -29
  75. package/templates/generator/bin/index.ts +0 -0
  76. package/templates/generator/package.json +2 -2
  77. package/templates/generator/src/template.ts +1 -0
  78. package/dist/command-CLJK5jGW.js +0 -2
  79. package/dist/dist-DUsqQuw8.js +0 -6774
  80. package/dist/resolve-vite-config-CofpYgnY.js +0 -2
  81. package/dist/tsconfig-3ONY2k2K.js +0 -2
@@ -1,2 +1 @@
1
- import { a as defineConfig, c as lazyPlugins, i as computeAutoInlineList, l as resolveCoverageProviderToCheck, n as assertCoverageProviderVersionMatch, o as defineProject, r as checkCoverageProviderVersion, s as isVitestFamilySpecifier, t as AUTO_INLINE_DEPS, u as withConfigMetadataResolution } from "./define-config-Ro6PS4dP.js";
2
- export { AUTO_INLINE_DEPS, assertCoverageProviderVersionMatch, checkCoverageProviderVersion, computeAutoInlineList, defineConfig, defineProject, isVitestFamilySpecifier, lazyPlugins, resolveCoverageProviderToCheck, withConfigMetadataResolution };
1
+ export { t as AUTO_INLINE_DEPS, n as assertCoverageProviderVersionMatch, r as checkCoverageProviderVersion, i as computeAutoInlineList, a as defineConfig, o as defineProject, s as isVitestFamilySpecifier, c as lazyPlugins, l as resolveCoverageProviderToCheck, u as withConfigMetadataResolution } from "./define-config-CIlk9scU.js";
@@ -6655,5 +6655,4 @@ var require_dist = /* @__PURE__ */ __commonJSMin(((exports) => {
6655
6655
  exports.visitAsync = visit.visitAsync;
6656
6656
  }));
6657
6657
  //#endregion
6658
- export default require_dist();
6659
- export {};
6658
+ export { require_dist as t };
@@ -0,0 +1,3 @@
1
+ import { t as require_dist } from "./dist-Bi7ZEK3c.js";
2
+ export default require_dist();
3
+ export {};
@@ -1,4 +1,4 @@
1
- //#region ../../node_modules/.pnpm/cac@7.0.0/node_modules/cac/dist/index.js
1
+ //#region ../../node_modules/.pnpm/cac@7.0.1/node_modules/cac/dist/index.js
2
2
  function toArr(any) {
3
3
  return any == null ? [] : Array.isArray(any) ? any : [any];
4
4
  }
@@ -99,23 +99,23 @@ function findAllBrackets(v) {
99
99
  }
100
100
  function getMriOptions(options) {
101
101
  const result = {
102
- alias: {},
102
+ alias: Object.create(null),
103
103
  boolean: []
104
104
  };
105
105
  for (const [index, option] of options.entries()) {
106
106
  if (option.names.length > 1) result.alias[option.names[0]] = option.names.slice(1);
107
- if (option.isBoolean) if (option.negated) {
108
- if (!options.some((o, i) => {
109
- return i !== index && o.names.some((name) => option.names.includes(name)) && typeof o.required === "boolean";
110
- })) result.boolean.push(option.names[0]);
111
- } else result.boolean.push(option.names[0]);
107
+ if (option.isBoolean) {
108
+ if (option.negated) {
109
+ if (!options.some((o, i) => {
110
+ return i !== index && o.names.some((name) => option.names.includes(name)) && typeof o.required === "boolean";
111
+ })) result.boolean.push(option.names[0]);
112
+ } else result.boolean.push(option.names[0]);
113
+ }
112
114
  }
113
115
  return result;
114
116
  }
115
117
  function findLongest(arr) {
116
- return arr.sort((a, b) => {
117
- return a.length > b.length ? -1 : 1;
118
- })[0];
118
+ return arr.sort((a, b) => b.length - a.length)[0];
119
119
  }
120
120
  function padRight(str, length) {
121
121
  return str.length >= length ? str : `${str}${" ".repeat(length - str.length)}`;
@@ -125,7 +125,13 @@ function camelcase(input) {
125
125
  return p1 + p2.toUpperCase();
126
126
  });
127
127
  }
128
+ const UNSAFE_KEYS = /* @__PURE__ */ new Set([
129
+ "__proto__",
130
+ "constructor",
131
+ "prototype"
132
+ ]);
128
133
  function setDotProp(obj, keys, val) {
134
+ if (keys.some((key) => UNSAFE_KEYS.has(key))) return;
129
135
  let current = obj;
130
136
  for (let i = 0; i < keys.length; i++) {
131
137
  const key = keys[i];
@@ -141,12 +147,9 @@ function setDotProp(obj, keys, val) {
141
147
  }
142
148
  }
143
149
  function setByType(obj, transforms) {
144
- for (const key of Object.keys(transforms)) {
145
- const transform = transforms[key];
146
- if (transform.shouldTransform) {
147
- obj[key] = [obj[key]].flat();
148
- if (typeof transform.transformFunction === "function") obj[key] = obj[key].map(transform.transformFunction);
149
- }
150
+ for (const [key, transform] of Object.entries(transforms)) if (transform.shouldTransform) {
151
+ obj[key] = [obj[key]].flat();
152
+ if (typeof transform.transformFunction === "function") obj[key] = obj[key].map(transform.transformFunction);
150
153
  }
151
154
  }
152
155
  function getFileName(input) {
@@ -189,7 +192,7 @@ var Option = class {
189
192
  name = name.replace(/^no-/, "");
190
193
  }
191
194
  return camelcaseOptionName(name);
192
- }).sort((a, b) => a.length > b.length ? 1 : -1);
195
+ }).sort((a, b) => a.length - b.length);
193
196
  this.name = this.names.at(-1);
194
197
  if (this.negated && this.config.default == null) this.config.default = true;
195
198
  if (rawName.includes("<")) this.required = true;
@@ -292,7 +295,7 @@ var Command = class {
292
295
  * @param name Option name
293
296
  */
294
297
  hasOption(name) {
295
- name = name.split(".")[0];
298
+ name = name.split(".", 1)[0];
296
299
  return this.options.find((option) => {
297
300
  return option.names.includes(name);
298
301
  });
@@ -367,7 +370,7 @@ var Command = class {
367
370
  const { options: parsedOptions, globalCommand } = this.cli;
368
371
  const options = [...globalCommand.options, ...this.options];
369
372
  for (const option of options) {
370
- const value = parsedOptions[option.name.split(".")[0]];
373
+ const value = parsedOptions[option.name.split(".", 1)[0]];
371
374
  if (option.required) {
372
375
  const hasNegated = options.some((o) => o.negated && o.names.includes(option.name));
373
376
  if (value === true || value === false && !hasNegated) throw new CACError(`option \`${option.rawName}\` value is missing`);
@@ -586,8 +589,8 @@ var CAC = class extends EventTarget {
586
589
  transforms[cliOption.name].transformFunction = cliOption.config.type[0];
587
590
  }
588
591
  }
589
- for (const key of Object.keys(parsed)) if (key !== "_") {
590
- setDotProp(options, key.split("."), parsed[key]);
592
+ for (const [key, value] of Object.entries(parsed)) if (key !== "_") {
593
+ setDotProp(options, key.split("."), value);
591
594
  setByType(options, transforms);
592
595
  }
593
596
  return {
@@ -1,24 +1,24 @@
1
1
  import { r as __toESM } from "./rolldown-runtime-CMFfr-1z.js";
2
2
  import { t as documentationUrl$1 } from "./documentation-DqcZSthV.js";
3
- import { a as SETUP_VP_VERSION, c as VITEST_VERSION, d as VITE_PLUS_OVERRIDE_PACKAGES, f as VITE_PLUS_VERSION, l as VITE_CONFIG_FILES, m as isForceOverrideMode, n as BASEURL_TSCONFIG_WARNING, o as TSDOWN_MIGRATION_SKILL_URL, s as VITEST_AGE_GATE_EXEMPT_PACKAGES, u as VITE_PLUS_NAME } from "./constants-CCQkpaxK.js";
4
- import { i as ensureVitePlusImportRuleDefaults, r as createDefaultVitePlusLintConfig } from "./oxlint-plugin-config-CbG58Kzr.js";
3
+ import { a as SETUP_VP_VERSION, c as VITEST_VERSION, d as VITE_PLUS_OVERRIDE_PACKAGES, f as VITE_PLUS_VERSION, l as VITE_CONFIG_FILES, m as isForceOverrideMode, n as BASEURL_TSCONFIG_WARNING, o as TSDOWN_MIGRATION_SKILL_URL, s as VITEST_AGE_GATE_EXEMPT_PACKAGES, u as VITE_PLUS_NAME } from "./constants-BW3g7VnD.js";
4
+ import { i as ensureVitePlusImportRuleDefaults, r as createDefaultVitePlusLintConfig } from "./oxlint-plugin-config-Dx-ZY2MN.js";
5
5
  import { a as writeJsonFile, c as modify, i as readJsonFile, l as parse, n as editJsonFile, o as applyEdits, r as isJsonFile, t as detectFormattingOptions } from "./json-JP24qHUF.js";
6
- import { c as getNpmRegistry, n as detectPackageMetadata, r as getScopeFromPackageName, s as fetchNpmResource } from "./package-BS84eWrW.js";
6
+ import { c as getNpmRegistry, n as detectPackageMetadata, r as getScopeFromPackageName, s as fetchNpmResource } from "./package-BP16iQby.js";
7
7
  import { n as isAlignableVitestEcosystemPackage } from "./vitest-ecosystem-BU0AqZq-.js";
8
- import { C as confirm, E as multiselect, M as isCancel, O as select, S as normalize$2, T as log, _ as getSpinner, b as coerce, d as readYamlFile, f as scalarString, g as getSilentSpinner, t as cancelAndExit, u as editYamlFile, y as PackageManager } from "./prompts-ByOzbMBG.js";
9
- import { g as compareReversed, t as require_dist, v as isGreaterThanOrEqual, y as isLessThanOrEqual } from "./dist-DUsqQuw8.js";
10
- import { i as normalizeRange, s as satisfies, t as extractOverrideTargetName } from "./package-overrides-CpoQngt3.js";
11
- import { l as displayRelative, u as rulesDir } from "./agent-eISuMXJb.js";
8
+ import { C as confirm, E as multiselect, M as isCancel, O as select, S as normalize$2, T as log, _ as getSpinner, b as coerce, d as readYamlFile, f as scalarString, g as getSilentSpinner, t as cancelAndExit, u as editYamlFile, y as PackageManager } from "./prompts-BGpQtC5z.js";
9
+ import { _ as isGreaterThanOrEqual, h as compareReversed, v as isLessThanOrEqual } from "./comparison-CmVirWIW-DUGaiYqF.js";
10
+ import { i as normalizeRange, s as satisfies, t as extractOverrideTargetName } from "./package-overrides-D1RcXSFl.js";
11
+ import { l as displayRelative, u as rulesDir } from "./agent-KeDc6vmg.js";
12
12
  import { n as addMigrationWarning, t as addManualStep } from "./report-NhQk8VHb.js";
13
13
  import { n as runCommandSilently, r as require_cross_spawn } from "./command-CguLh2KL.js";
14
- import { a as hasBaseUrlInTsconfig, c as hasVitestTypesInTsconfig, l as removeDeprecatedTsconfigFalseOption, n as findTsconfigFiles, s as hasTypesToRewriteInTsconfig, u as rewriteTypesInTsconfig } from "./tsconfig-DzZ-nrx2.js";
15
- import { i as findUnsafeHookInstallPath, t as SUPPORTED_GIT_HOOK_NAMES } from "./hooks-C-4gykWR.js";
14
+ import { t as require_dist } from "./dist-Bi7ZEK3c.js";
15
+ import { a as hasBaseUrlInTsconfig, c as hasVitestTypesInTsconfig, l as removeDeprecatedTsconfigFalseOption, n as findTsconfigFiles, s as hasTypesToRewriteInTsconfig, u as rewriteTypesInTsconfig } from "./tsconfig-D2DzAQ_D.js";
16
+ import { i as findUnsafeHookInstallPath, t as SUPPORTED_GIT_HOOK_NAMES } from "./hooks-DhwsWb46.js";
16
17
  import path, { posix, win32 } from "node:path";
17
18
  import { fileURLToPath } from "node:url";
18
19
  import { detectWorkspace, getVpDirs, hasConfigKey, mergeJsonConfig, mergeTsdownConfig, migrateTaskCacheConfig, rewriteEslint, rewriteImportsInDirectory, rewritePrettier, rewriteScripts, wrapLazyPlugins } from "../binding/index.js";
19
20
  import { styleText } from "node:util";
20
- import * as actualFS from "node:fs";
21
- import fs from "node:fs";
21
+ import fs, * as actualFS from "node:fs";
22
22
  import os from "node:os";
23
23
  import "oxlint";
24
24
  import { lstatSync as lstatSync$1, readdir, readdirSync as readdirSync$1, readlinkSync, realpathSync as realpathSync$1 } from "fs";
@@ -908,7 +908,7 @@ function detectPrettierProject(projectPath, packages) {
908
908
  }
909
909
  /**
910
910
  * Run `vp fmt --migrate=prettier` step with graceful error handling.
911
- * Returns true on success, false on failure.
911
+ * Unsupported config formats are skipped; other errors still fail migration.
912
912
  */
913
913
  async function runPrettierMigrateStep(vpBin, cwd, spinner, failMessage, manualHint) {
914
914
  try {
@@ -919,17 +919,22 @@ async function runPrettierMigrateStep(vpBin, cwd, spinner, failMessage, manualHi
919
919
  envs: process.env
920
920
  });
921
921
  if (result.exitCode !== 0) {
922
- spinner.stop(failMessage);
923
922
  const stderr = result.stderr.toString().trim();
923
+ const unsupportedConfig = stderr.includes("Failed to load Prettier config at:") && (stderr.includes("YAML, JSON5 and TOML formats are not supported.") || stderr.includes("Only JSON format is supported for `.prettierrc`."));
924
+ spinner.stop(unsupportedConfig ? "Prettier migration skipped" : failMessage);
924
925
  if (stderr) log.warn(`⚠ ${stderr}`);
926
+ if (unsupportedConfig) {
927
+ log.info("Keeping Prettier. Convert its config to JSON or JS and run `vp migrate --full` to migrate it later.");
928
+ return "skipped";
929
+ }
925
930
  log.info(manualHint);
926
- return false;
931
+ return "failed";
927
932
  }
928
- return true;
933
+ return "migrated";
929
934
  } catch {
930
935
  spinner.stop(failMessage);
931
936
  log.info(manualHint);
932
- return false;
937
+ return "failed";
933
938
  }
934
939
  }
935
940
  async function migratePrettierToOxfmt(projectPath, interactive, prettierConfigFile, packages, options) {
@@ -943,11 +948,12 @@ async function migratePrettierToOxfmt(projectPath, interactive, prettierConfigFi
943
948
  if (pkg.prettier) {
944
949
  tempPrettierConfig = path.join(projectPath, ".prettierrc.json");
945
950
  fs.writeFileSync(tempPrettierConfig, JSON.stringify(pkg.prettier, null, 2));
946
- } else return true;
951
+ } else return "skipped";
947
952
  }
948
953
  try {
949
954
  spinner.start("Migrating Prettier config to Oxfmt...");
950
- if (!await runPrettierMigrateStep(vpBin, projectPath, spinner, "Prettier migration failed", "You can run `vp fmt --migrate=prettier` manually later")) return false;
955
+ const result = await runPrettierMigrateStep(vpBin, projectPath, spinner, "Prettier migration failed", "You can run `vp fmt --migrate=prettier` manually later");
956
+ if (result !== "migrated") return result;
951
957
  spinner.stop("Prettier config migrated to .oxfmtrc.json");
952
958
  } finally {
953
959
  if (tempPrettierConfig) try {
@@ -962,7 +968,7 @@ async function migratePrettierToOxfmt(projectPath, interactive, prettierConfigFi
962
968
  rewritePrettierLintStagedConfigFiles(projectPath, options?.report);
963
969
  const prettierIgnorePath = path.join(projectPath, ".prettierignore");
964
970
  if (fs.existsSync(prettierIgnorePath)) warnMigration(`${displayRelative(prettierIgnorePath)} found — Oxfmt supports .prettierignore, but using the \`ignorePatterns\` option is recommended.`, options?.report);
965
- return true;
971
+ return "migrated";
966
972
  }
967
973
  function deletePrettierConfigFiles(basePath, report, silent = false) {
968
974
  const configs = detectConfigs(basePath);
@@ -1049,8 +1055,9 @@ async function promptPrettierMigration(projectPath, interactive, packages) {
1049
1055
  return false;
1050
1056
  }
1051
1057
  if (!await confirmPrettierMigration(interactive)) return false;
1052
- if (!await migratePrettierToOxfmt(projectPath, interactive, prettierProject.configFile, packages)) cancelAndExit("Prettier migration failed.", 1);
1053
- return true;
1058
+ const result = await migratePrettierToOxfmt(projectPath, interactive, prettierProject.configFile, packages);
1059
+ if (result === "failed") cancelAndExit("Prettier migration failed.", 1);
1060
+ return result === "migrated";
1054
1061
  }
1055
1062
  //#endregion
1056
1063
  //#region src/migration/migrator/tsup.ts
@@ -1791,7 +1798,7 @@ function vitestEcosystemCatalogReferencesPending(pkg, catalogDependencyResolver)
1791
1798
  pkg.optionalDependencies
1792
1799
  ]) {
1793
1800
  if (!dependencies) continue;
1794
- for (const [name, spec] of Object.entries(dependencies)) if (isAlignableVitestEcosystemPackage(name) && spec.startsWith("catalog:") && catalogDependencyResolver(spec, name) !== "5.0.3") return true;
1801
+ for (const [name, spec] of Object.entries(dependencies)) if (isAlignableVitestEcosystemPackage(name) && spec.startsWith("catalog:") && catalogDependencyResolver(spec, name) !== "5.0.4") return true;
1795
1802
  }
1796
1803
  return false;
1797
1804
  }
@@ -8394,7 +8401,7 @@ function isSemanticVitePlusOverrideSpec(dependencyName, spec) {
8394
8401
  if (!spec) return false;
8395
8402
  if (isLegacyWrapperSpec(spec)) return false;
8396
8403
  if (spec === VITE_PLUS_OVERRIDE_PACKAGES[dependencyName]) return true;
8397
- if (dependencyName === "@vitest/browser" && spec === "5.0.3") return true;
8404
+ if (dependencyName === "@vitest/browser" && spec === "5.0.4") return true;
8398
8405
  return false;
8399
8406
  }
8400
8407
  function overrideSpecSatisfiesVitePlus(dependencyName, spec, catalogDependencyResolver) {
package/dist/fmt.js CHANGED
@@ -1,2 +1 @@
1
- import { format } from "oxfmt";
2
- export { format };
1
+ export { format } from "oxfmt";
package/dist/hooks/bin.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { i as log } from "../terminal-MKGAuy-p.js";
2
- import { l as status, n as disable, r as enable } from "../hooks-C-4gykWR.js";
2
+ import { l as status, n as disable, r as enable } from "../hooks-DhwsWb46.js";
3
3
  import { t as unwrapCliParseOutcome } from "../cli-parse-DHE8NrBU.js";
4
4
  import { parseHooksArgs } from "../../binding/index.js";
5
5
  //#region src/hooks/bin.ts
@@ -50,15 +50,6 @@ d=${nestedDirname(dir.split(separators).filter((s) => s !== "" && s !== ".").len
50
50
  __vp_shell=/bin/sh
51
51
  [ -x "$__vp_shell" ] || __vp_shell=$(command -v sh)
52
52
 
53
- if [ -n "\${VP_HOME-}" ]; then
54
- __vp_bin="$VP_HOME/bin"
55
- elif [ -n "\${HOME-}" ]; then
56
- __vp_bin="$HOME/.vite-plus/bin"
57
- else
58
- __vp_bin=""
59
- fi
60
- [ -n "$__vp_bin" ] && [ -d "$__vp_bin" ] && export PATH="$PATH:$__vp_bin"
61
-
62
53
  export PATH="$d/node_modules/.bin:$PATH"
63
54
  "$__vp_shell" -e "$s" "$@"
64
55
  c=$?
@@ -158,7 +149,25 @@ function gitConfigGet(key, options) {
158
149
  if (result.status !== 0) return null;
159
150
  return result.stdout?.toString().trim() || null;
160
151
  }
152
+ function gitConfigLocalHas(key, value) {
153
+ const result = spawnSync("git", [
154
+ "config",
155
+ "--local",
156
+ "--get-all",
157
+ key
158
+ ]);
159
+ return result.status === 0 && result.stdout?.toString() === `${value}\n`;
160
+ }
161
+ function gitConfigLocalMissing(key) {
162
+ return spawnSync("git", [
163
+ "config",
164
+ "--local",
165
+ "--get-all",
166
+ key
167
+ ]).status === 1;
168
+ }
161
169
  function gitConfigSet(key, value) {
170
+ if (gitConfigLocalHas(key, value)) return { ok: true };
162
171
  const result = spawnSync("git", [
163
172
  "config",
164
173
  "--local",
@@ -176,6 +185,7 @@ function gitConfigSet(key, value) {
176
185
  return { ok: true };
177
186
  }
178
187
  function gitConfigUnset(key) {
188
+ if (gitConfigLocalMissing(key)) return { ok: true };
179
189
  const result = spawnSync("git", [
180
190
  "config",
181
191
  "--local",
@@ -414,19 +424,21 @@ function install(dir, options = {}) {
414
424
  writeFileSync(internal(hook), `#!/usr/bin/env sh\n. "$(dirname "$0")/h"`, { mode: 493 });
415
425
  chmodSync(internal(hook), 493);
416
426
  }
417
- const { status, stderr } = spawnSync("git", [
418
- "config",
419
- "core.hooksPath",
420
- location.target
421
- ]);
422
- if (status == null) return {
423
- message: "git command not found",
424
- isError: true
425
- };
426
- if (status) return {
427
- message: "" + stderr,
428
- isError: true
429
- };
427
+ if (!gitConfigLocalHas("core.hooksPath", location.target)) {
428
+ const { status, stderr } = spawnSync("git", [
429
+ "config",
430
+ "core.hooksPath",
431
+ location.target
432
+ ]);
433
+ if (status == null) return {
434
+ message: "git command not found",
435
+ isError: true
436
+ };
437
+ if (status) return {
438
+ message: "" + stderr,
439
+ isError: true
440
+ };
441
+ }
430
442
  const clearDisabled = setHooksUserDisabled(false);
431
443
  if (!clearDisabled.ok) return {
432
444
  message: clearDisabled.error || "failed to clear hooks disabled preference",
package/dist/index.cjs CHANGED
@@ -1,4 +1,4 @@
1
- const require_define_config = require("./define-config-CREUiMmM.cjs");
1
+ const require_define_config = require("./define-config-Dq_23Eyr.cjs");
2
2
  //#region src/index.cts
3
3
  const vite = require("vite");
4
4
  const { configDefaults, coverageConfigDefaults, defaultBrowserPort, defaultExclude, defaultInclude } = require("vitest/config");
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { a as defineConfig, c as lazyPlugins, o as defineProject } from "./define-config-CeW9DETl.js";
1
+ import { a as defineConfig, c as lazyPlugins, o as defineProject } from "./define-config-Bexdd6RZ.js";
2
2
  import { TestProjectConfiguration, TestProjectInlineConfiguration, TestTagDefinition, TestUserConfig, UserProjectConfigExport, UserProjectConfigFn, UserWorkspaceConfig, ViteUserConfig, ViteUserConfigExport, ViteUserConfigFn, ViteUserConfigFnObject, ViteUserConfigFnPromise, WatcherTriggerPattern, configDefaults, coverageConfigDefaults, defaultBrowserPort, defaultExclude, defaultInclude } from "vitest/config";
3
3
  export * from "vite";
4
4
  export { type TestProjectConfiguration, type TestProjectInlineConfiguration, type TestTagDefinition, type TestUserConfig, type UserProjectConfigExport, type UserProjectConfigFn, type UserWorkspaceConfig, type ViteUserConfig, type ViteUserConfigExport, type ViteUserConfigFn, type ViteUserConfigFnObject, type ViteUserConfigFnPromise, type WatcherTriggerPattern, configDefaults, coverageConfigDefaults, defaultBrowserPort, defaultExclude, defaultInclude, defineConfig, defineProject, lazyPlugins };
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a as defineConfig, c as lazyPlugins, o as defineProject } from "./define-config-Ro6PS4dP.js";
1
+ import { a as defineConfig, c as lazyPlugins, o as defineProject } from "./define-config-CIlk9scU.js";
2
2
  import { configDefaults, coverageConfigDefaults, defaultBrowserPort, defaultExclude, defaultInclude } from "vitest/config";
3
3
  export * from "vite";
4
4
  export { configDefaults, coverageConfigDefaults, defaultBrowserPort, defaultExclude, defaultInclude, defineConfig, defineProject, lazyPlugins };
@@ -1,2 +1 @@
1
- import { RuleTester } from "oxlint/plugins-dev";
2
- export { RuleTester };
1
+ export { RuleTester } from "oxlint/plugins-dev";
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- require("./define-config-CREUiMmM.cjs");
2
+ require("./define-config-Dq_23Eyr.cjs");
3
3
  let _oxlint_plugins = require("@oxlint/plugins");
4
4
  Object.defineProperty(exports, "definePlugin", {
5
5
  enumerable: true,
@@ -1,2 +1 @@
1
- import { definePlugin, defineRule, eslintCompatPlugin } from "@oxlint/plugins";
2
- export { definePlugin, defineRule, eslintCompatPlugin };
1
+ export { definePlugin, defineRule, eslintCompatPlugin } from "@oxlint/plugins";
@@ -1,17 +1,18 @@
1
1
  import { t as documentationUrl$1 } from "../documentation-DqcZSthV.js";
2
2
  import { a as muted, c as warnMsg, i as log, o as printHeader, r as formatDuration, t as accent } from "../terminal-MKGAuy-p.js";
3
- import { _ as engines, a as SETUP_VP_VERSION, d as VITE_PLUS_OVERRIDE_PACKAGES, f as VITE_PLUS_VERSION, m as isForceOverrideMode } from "../constants-CCQkpaxK.js";
3
+ import { _ as engines, a as SETUP_VP_VERSION, d as VITE_PLUS_OVERRIDE_PACKAGES, f as VITE_PLUS_VERSION, m as isForceOverrideMode } from "../constants-BW3g7VnD.js";
4
4
  import { a as writeJsonFile, c as modify, i as readJsonFile, l as parse, o as applyEdits, s as findNodeAtLocation, u as parseTree } from "../json-JP24qHUF.js";
5
- import { a as hasVitePlusDependency, i as hasPackageManagerDeclaration, n as detectPackageMetadata, o as readNearestPackageJson } from "../package-BS84eWrW.js";
5
+ import { a as hasVitePlusDependency, i as hasPackageManagerDeclaration, n as detectPackageMetadata, o as readNearestPackageJson } from "../package-BP16iQby.js";
6
6
  import { t as vitest_v5_entry_points_default } from "../vitest-v5-entry-points-DthU1e_O.js";
7
- import { C as confirm, D as outro, M as isCancel, O as select, S as normalize$1, T as log$1, c as selectPackageManager, i as promptGitHooks, k as spinner, l as upgradeYarn, n as defaultInteractive, o as runViteFmt, r as downloadPackageManager$1, s as runViteInstall, t as cancelAndExit, x as getMajor, y as PackageManager } from "../prompts-ByOzbMBG.js";
8
- import { m as compare, t as require_dist, v as isGreaterThanOrEqual } from "../dist-DUsqQuw8.js";
9
- import { a as rangeToComparators, i as normalizeRange, n as findMinimumForRange, o as rangesIntersect, r as isRangeSubset, s as satisfies, t as extractOverrideTargetName } from "../package-overrides-CpoQngt3.js";
10
- import { i as selectAgentTargetPaths, l as displayRelative, n as detectAgentConflicts, r as detectExistingAgentTargetPaths, s as writeAgentInstructions } from "../agent-eISuMXJb.js";
7
+ import { C as confirm, D as outro, M as isCancel, O as select, S as normalize$1, T as log$1, c as selectPackageManager, i as promptGitHooks, k as spinner, l as upgradeYarn, n as defaultInteractive, o as runViteFmt, r as downloadPackageManager$1, s as runViteInstall, t as cancelAndExit, x as getMajor, y as PackageManager } from "../prompts-BGpQtC5z.js";
8
+ import { _ as isGreaterThanOrEqual, p as compare } from "../comparison-CmVirWIW-DUGaiYqF.js";
9
+ import { a as rangeToComparators, i as normalizeRange, n as findMinimumForRange, o as rangesIntersect, r as isRangeSubset, s as satisfies, t as extractOverrideTargetName } from "../package-overrides-D1RcXSFl.js";
10
+ import { i as selectAgentTargetPaths, l as displayRelative, n as detectAgentConflicts, r as detectExistingAgentTargetPaths, s as writeAgentInstructions } from "../agent-KeDc6vmg.js";
11
11
  import { n as addMigrationWarning, r as createMigrationReport } from "../report-NhQk8VHb.js";
12
- import { $ as confirmEslintMigration, A as createCatalogDependencyResolver, B as addFrameworkShim, C as mergeViteConfigFiles, D as usesWebdriverioProvider, E as ensureVitePlusBootstrap, G as migrateTsupToTsdown, H as hasFrameworkShim, I as minimatch, J as confirmPrettierMigration, L as findGitRoot, M as detectWorkspace$1, O as configureYarnNodeModulesMode, Q as warnPackageLevelPrettier, S as mergeTsdownConfigFile, T as detectVitePlusBootstrapPending, U as confirmTsupMigration, V as detectFramework, W as detectTsupProject, X as migratePrettierToOxfmt, Y as detectPrettierProject, _ as installGitHooks, at as warnLegacyEslintConfig, ct as checkViteVersion, d as finalizeCoreMigrationForExistingVitePlus, et as detectEslintProject, f as detectNodeVersionManagerFile, g as detectLegacyGitHooksMigrationCandidate, i as selectEditor, it as warnIncompatibleEslintIntegration, k as detectYarnPnpMode, l as rewriteStandaloneProject, lt as checkVitestVersion, m as migrateSetupVpVersion, nt as migrateEslintToOxlint, o as writeEditorConfigs, ot as warnPackageLevelEslint, p as migrateNodeVersionManagerFile, q as warnMissingTsupConfig, r as isJsonLikeFile, s as rewriteMonorepo, st as WEBDRIVERIO_PROVIDER, t as detectEditorConflicts, tt as detectIncompatibleEslintIntegration, u as detectPendingCoreMigration, v as preflightGitHooksSetup, w as collectToolchainVersionChanges, x as injectLintTypeCheckDefaults, y as shouldSkipStagedMigrationForHooks, z as extractOverrideParentSegments } from "../editor-B8tkz7nL.js";
12
+ import { $ as confirmEslintMigration, A as createCatalogDependencyResolver, B as addFrameworkShim, C as mergeViteConfigFiles, D as usesWebdriverioProvider, E as ensureVitePlusBootstrap, G as migrateTsupToTsdown, H as hasFrameworkShim, I as minimatch, J as confirmPrettierMigration, L as findGitRoot, M as detectWorkspace$1, O as configureYarnNodeModulesMode, Q as warnPackageLevelPrettier, S as mergeTsdownConfigFile, T as detectVitePlusBootstrapPending, U as confirmTsupMigration, V as detectFramework, W as detectTsupProject, X as migratePrettierToOxfmt, Y as detectPrettierProject, _ as installGitHooks, at as warnLegacyEslintConfig, ct as checkViteVersion, d as finalizeCoreMigrationForExistingVitePlus, et as detectEslintProject, f as detectNodeVersionManagerFile, g as detectLegacyGitHooksMigrationCandidate, i as selectEditor, it as warnIncompatibleEslintIntegration, k as detectYarnPnpMode, l as rewriteStandaloneProject, lt as checkVitestVersion, m as migrateSetupVpVersion, nt as migrateEslintToOxlint, o as writeEditorConfigs, ot as warnPackageLevelEslint, p as migrateNodeVersionManagerFile, q as warnMissingTsupConfig, r as isJsonLikeFile, s as rewriteMonorepo, st as WEBDRIVERIO_PROVIDER, t as detectEditorConflicts, tt as detectIncompatibleEslintIntegration, u as detectPendingCoreMigration, v as preflightGitHooksSetup, w as collectToolchainVersionChanges, x as injectLintTypeCheckDefaults, y as shouldSkipStagedMigrationForHooks, z as extractOverrideParentSegments } from "../editor-b1XUwt9v.js";
13
13
  import { n as runCommandSilently } from "../command-CguLh2KL.js";
14
- import { a as hasBaseUrlInTsconfig, i as fixBaseUrlInTsconfig, t as confirmBaseUrlFix } from "../tsconfig-DzZ-nrx2.js";
14
+ import { t as require_dist } from "../dist-Bi7ZEK3c.js";
15
+ import { a as hasBaseUrlInTsconfig, i as fixBaseUrlInTsconfig, t as confirmBaseUrlFix } from "../tsconfig-D2DzAQ_D.js";
15
16
  import { t as unwrapCliParseOutcome } from "../cli-parse-DHE8NrBU.js";
16
17
  import { t as ROLLDOWN_COMPAT_RESULT_PREFIX } from "../protocol-D99W10Qi.js";
17
18
  import path from "node:path";
@@ -3725,7 +3726,7 @@ function showMigrationSummary(options) {
3725
3726
  async function downloadSupportedPackageManager(options) {
3726
3727
  const { rootDir, packageManager, packageManagerVersion, interactive, updateMigrationProgress, failMigrationProgress } = options;
3727
3728
  updateMigrationProgress("Preparing migration");
3728
- const downloadResult = await downloadPackageManager$1(packageManager, packageManagerVersion, interactive, true);
3729
+ const downloadResult = await downloadPackageManager$1(packageManager, packageManagerVersion, interactive, true, rootDir);
3729
3730
  if (packageManager === PackageManager.yarn && satisfies(downloadResult.version, ">=4.0.0 <4.10.0")) {
3730
3731
  updateMigrationProgress("Upgrading Yarn");
3731
3732
  await upgradeYarn(rootDir, interactive, true);
@@ -3836,10 +3837,10 @@ async function executeMigrationPlan(workspaceInfoOptional, plan, interactive, vi
3836
3837
  }
3837
3838
  if (plan.migratePrettier) {
3838
3839
  updateMigrationProgress("Migrating Prettier");
3839
- if (!await migratePrettierToOxfmt(workspaceInfo.rootDir, interactive, plan.prettierConfigFile, workspaceInfo.packages, {
3840
+ if (await migratePrettierToOxfmt(workspaceInfo.rootDir, interactive, plan.prettierConfigFile, workspaceInfo.packages, {
3840
3841
  silent: true,
3841
3842
  report
3842
- })) {
3843
+ }) === "failed") {
3843
3844
  failMigrationProgress("Migration failed");
3844
3845
  cancelAndExit("Prettier migration failed. Fix the issue and re-run `vp migrate`.", 1);
3845
3846
  }
@@ -3896,7 +3897,7 @@ async function executeMigrationPlan(workspaceInfoOptional, plan, interactive, vi
3896
3897
  clearMigrationProgress();
3897
3898
  const initialInstallDurationMs = handleInstallResult(initialInstallSummary, workspaceInfo.rootDir, report, { propagateExitCode: false });
3898
3899
  const finalInstallDurationMs = handleInstallResult(finalInstallSummary, workspaceInfo.rootDir, report);
3899
- if (finalInstallSummary.status === "installed" && canFormatWithOxfmt(plan.hasPrettierDependency, plan.migratePrettier)) await formatMigratedProject(workspaceInfo.rootDir, interactive, report, { excludedPaths: preExistingChangedPaths });
3900
+ if (finalInstallSummary.status === "installed" && canFormatWithOxfmt(plan.hasPrettierDependency, report.prettierMigrated)) await formatMigratedProject(workspaceInfo.rootDir, interactive, report, { excludedPaths: preExistingChangedPaths });
3900
3901
  return {
3901
3902
  installDurationMs: initialInstallDurationMs + finalInstallDurationMs,
3902
3903
  finalInstallOk: finalInstallSummary.status === "installed",
@@ -4047,14 +4048,15 @@ async function main() {
4047
4048
  if (await confirmPrettierMigration(options.interactive)) {
4048
4049
  await ensureExistingPackageManager();
4049
4050
  updateMigrationProgress("Migrating Prettier");
4050
- if (!await migratePrettierToOxfmt(workspaceInfoOptional.rootDir, options.interactive, prettierProject.configFile, workspaceInfoOptional.packages, {
4051
+ const prettierResult = await migratePrettierToOxfmt(workspaceInfoOptional.rootDir, options.interactive, prettierProject.configFile, workspaceInfoOptional.packages, {
4051
4052
  silent: true,
4052
4053
  report
4053
- })) {
4054
+ });
4055
+ if (prettierResult === "failed") {
4054
4056
  clearMigrationProgress();
4055
4057
  cancelAndExit("Prettier migration failed. Fix the issue and re-run `vp migrate`.", 1);
4056
4058
  }
4057
- prettierMigrated = true;
4059
+ prettierMigrated = prettierResult === "migrated";
4058
4060
  }
4059
4061
  } else if (prettierProject.hasDependency) warnPackageLevelPrettier();
4060
4062
  }
@@ -1,4 +1,4 @@
1
- import { u as VITE_PLUS_NAME } from "./constants-CCQkpaxK.js";
1
+ import { u as VITE_PLUS_NAME } from "./constants-BW3g7VnD.js";
2
2
  //#region src/oxlint-plugin-config.ts
3
3
  const VITE_PLUS_OXLINT_PLUGIN_NAME = VITE_PLUS_NAME;
4
4
  const VITE_PLUS_OXLINT_PLUGIN_SPECIFIER = `${VITE_PLUS_NAME}/oxlint-plugin`;
@@ -1,5 +1,5 @@
1
- import { v as exports } from "./constants-CCQkpaxK.js";
2
- import { n as VITE_PLUS_OXLINT_PLUGIN_NAME, t as PREFER_VITE_PLUS_IMPORTS_RULE_NAME } from "./oxlint-plugin-config-CbG58Kzr.js";
1
+ import { v as exports } from "./constants-BW3g7VnD.js";
2
+ import { n as VITE_PLUS_OXLINT_PLUGIN_NAME, t as PREFER_VITE_PLUS_IMPORTS_RULE_NAME } from "./oxlint-plugin-config-Dx-ZY2MN.js";
3
3
  import { t as vitest_v5_entry_points_default } from "./vitest-v5-entry-points-DthU1e_O.js";
4
4
  import path from "node:path";
5
5
  import fs from "node:fs";
package/dist/pack-bin.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
- import { t as cac } from "./dist-DfmT__Aw.js";
3
- import { o as resolveViteConfig } from "./resolve-vite-config-Be237LWp.js";
2
+ import { t as cac } from "./dist-Cqz8OtiO.js";
3
+ import { o as resolveViteConfig } from "./resolve-vite-config-x47JetlI.js";
4
4
  import module from "node:module";
5
5
  import path from "node:path";
6
6
  import { buildWithConfigs, enableDebug, globalLogger, resolveUserConfig } from "vite/pack";
@@ -1,4 +1,4 @@
1
- import "./constants-CCQkpaxK.js";
1
+ import "./constants-BW3g7VnD.js";
2
2
  import { i as readJsonFile } from "./json-JP24qHUF.js";
3
3
  import { createRequire } from "node:module";
4
4
  import path from "node:path";
@@ -1,4 +1,4 @@
1
- import { S as tryParse, _ as formatComparableVersion, a as FULL_PLAIN, b as parse, c as LONE_TILDE, f as XRANGE_PLAIN, h as compareParsed, l as LOOSE_PLAIN, n as BUILD, o as GREATER_LESS_THAN, p as XRANGE_PLAIN_LOOSE, s as LONE_CARET, x as safeRegex } from "./dist-DUsqQuw8.js";
1
+ import { a as GREATER_LESS_THAN, b as safeRegex, c as LOOSE_PLAIN, d as XRANGE_PLAIN, f as XRANGE_PLAIN_LOOSE, g as formatComparableVersion, i as FULL_PLAIN, m as compareParsed, o as LONE_CARET, s as LONE_TILDE, t as BUILD, x as tryParse, y as parse } from "./comparison-CmVirWIW-DUGaiYqF.js";
2
2
  //#region ../../node_modules/.pnpm/verkit@0.5.0/node_modules/verkit/dist/set-BGFWKKE8.js
3
3
  const STRICT_COMPARATOR = safeRegex(String.raw`^${GREATER_LESS_THAN}\s*(${FULL_PLAIN})$|^$`);
4
4
  const LOOSE_COMPARATOR$1 = safeRegex(String.raw`^${GREATER_LESS_THAN}\s*(${LOOSE_PLAIN})$|^$`);
@@ -1,16 +1,16 @@
1
1
  import { r as __toESM, t as __commonJSMin } from "./rolldown-runtime-CMFfr-1z.js";
2
2
  import { t as accent } from "./terminal-MKGAuy-p.js";
3
- import { f as VITE_PLUS_VERSION } from "./constants-CCQkpaxK.js";
3
+ import { f as VITE_PLUS_VERSION } from "./constants-BW3g7VnD.js";
4
4
  import { a as writeJsonFile, i as readJsonFile } from "./json-JP24qHUF.js";
5
- import { S as tryParse, _ as formatComparableVersion, b as parse, d as PRERELEASE_LOOSE, i as COERCE_FULL, r as COERCE, t as require_dist, u as PRERELEASE, v as isGreaterThanOrEqual, x as safeRegex } from "./dist-DUsqQuw8.js";
5
+ import { _ as isGreaterThanOrEqual, b as safeRegex, g as formatComparableVersion, l as PRERELEASE, n as COERCE, r as COERCE_FULL, u as PRERELEASE_LOOSE, x as tryParse, y as parse } from "./comparison-CmVirWIW-DUGaiYqF.js";
6
6
  import { n as runCommandSilently } from "./command-CguLh2KL.js";
7
+ import { t as require_dist } from "./dist-Bi7ZEK3c.js";
7
8
  import path from "node:path";
8
9
  import { downloadPackageManager } from "../binding/index.js";
9
10
  import { stripVTControlCharacters, styleText } from "node:util";
10
11
  import fs from "node:fs";
11
12
  import process$1, { stdin, stdout } from "node:process";
12
- import * as l from "node:readline";
13
- import l__default from "node:readline";
13
+ import l__default, * as l from "node:readline";
14
14
  import { ReadStream } from "node:tty";
15
15
  import { randomBytes } from "node:crypto";
16
16
  //#region ../../node_modules/.pnpm/fast-string-truncated-width@3.0.3/node_modules/fast-string-truncated-width/dist/utils.js
@@ -1474,13 +1474,13 @@ import_picocolors.default.gray;
1474
1474
  * piped output never see these markers as content (they only update the
1475
1475
  * window title, which the runner's PTY captures).
1476
1476
  *
1477
- * Protocol (shared with vite-task's `pty_terminal_test_client` crate):
1478
- * `OSC 2 ; pty-terminal-test:<32-hex-id>:<base64url(name)> ST`. The runner
1477
+ * Protocol (shared with vite-task's `vt_pty_terminal_test_client` crate):
1478
+ * `OSC 2 ; vt-pty-terminal-test:<32-hex-id>:<base64url(name)> ST`. The runner
1479
1479
  * decodes the title with `decode_milestone_title`, ignoring ordinary title
1480
1480
  * updates. A fresh random id per emission keeps repeated milestones with the
1481
1481
  * same name observable as distinct title changes through Windows ConPTY.
1482
1482
  */
1483
- const MILESTONE_TITLE_MARKER = "pty-terminal-test:";
1483
+ const MILESTONE_TITLE_MARKER = "vt-pty-terminal-test:";
1484
1484
  const OSC2_OPEN = "\x1B]2;";
1485
1485
  const ST = "\x1B\\";
1486
1486
  const MILESTONES_ENABLED = process.env.VP_EMIT_MILESTONES === "1";
@@ -1537,9 +1537,9 @@ const log = {
1537
1537
  const parts = [];
1538
1538
  const hasGuide = getGuide({ withGuide });
1539
1539
  const spacingString = !hasGuide ? "" : secondarySymbol;
1540
- const prefix = symbol ? `${symbol} ` : hasGuide ? `${secondarySymbol} ` : "";
1540
+ const prefix = symbol ? `${symbol} ` : hasGuide ? `${secondarySymbol} ` : "";
1541
1541
  const marker = symbol ?? secondarySymbol;
1542
- const secondaryPrefix = hasGuide ? `${secondarySymbol} ` : symbol ? " " : "";
1542
+ const secondaryPrefix = hasGuide ? `${secondarySymbol} ` : symbol ? " " : "";
1543
1543
  for (let i = 0; i < spacing; i++) parts.push(spacingString);
1544
1544
  const messageParts = Array.isArray(message) ? message : message.split("\n");
1545
1545
  if (messageParts.length > 0) {
@@ -1778,11 +1778,11 @@ const spinner = ({ indicator = "dots", onCancel, output = process.stdout, cancel
1778
1778
  clearPrevMessage();
1779
1779
  const frame = styleFn(frames[frameIndex] ?? (unicode ? "◒" : "o"));
1780
1780
  let outputMessage;
1781
- if (isCI$1) outputMessage = `${frame} ${_message}...`;
1782
- else if (indicator === "timer") outputMessage = `${frame} ${_message} ${formatTimer(getElapsedMs())}`;
1781
+ if (isCI$1) outputMessage = `${frame} ${_message}...`;
1782
+ else if (indicator === "timer") outputMessage = `${frame} ${_message} ${formatTimer(getElapsedMs())}`;
1783
1783
  else {
1784
1784
  const loadingDots = ".".repeat(Math.floor(indicatorTimer)).slice(0, 3);
1785
- outputMessage = `${frame} ${_message}${loadingDots}`;
1785
+ outputMessage = `${frame} ${_message}${loadingDots}`;
1786
1786
  }
1787
1787
  const wrapped = wrapAnsi(outputMessage, columns, {
1788
1788
  hard: true,
@@ -2627,12 +2627,13 @@ async function selectPackageManager(interactive, silent = false) {
2627
2627
  return PackageManager.pnpm;
2628
2628
  }
2629
2629
  }
2630
- async function downloadPackageManager$1(packageManager, version, interactive, silent = false) {
2630
+ async function downloadPackageManager$1(packageManager, version, interactive, silent = false, cwd) {
2631
2631
  const spinner = silent ? getSilentSpinner() : getSpinner(interactive);
2632
2632
  spinner.start(`${packageManager}@${version} installing...`);
2633
2633
  const downloadResult = await downloadPackageManager({
2634
2634
  name: packageManager,
2635
- version
2635
+ version,
2636
+ cwd
2636
2637
  });
2637
2638
  spinner.stop(`${packageManager}@${downloadResult.version} installed`);
2638
2639
  return downloadResult;
@@ -0,0 +1 @@
1
+ export { a as resolveUniversalViteConfig } from "./resolve-vite-config-x47JetlI.js";
@@ -1,5 +1,5 @@
1
- import { l as VITE_CONFIG_FILES } from "./constants-CCQkpaxK.js";
2
- import { u as withConfigMetadataResolution } from "./define-config-Ro6PS4dP.js";
1
+ import { l as VITE_CONFIG_FILES } from "./constants-BW3g7VnD.js";
2
+ import { u as withConfigMetadataResolution } from "./define-config-CIlk9scU.js";
3
3
  import path from "node:path";
4
4
  import fs from "node:fs";
5
5
  //#region src/resolve-vite-config.ts