vite-plus 0.1.23 → 0.1.24

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.
@@ -8,7 +8,7 @@ import fs from "node:fs";
8
8
  import { styleText } from "node:util";
9
9
  import process$1, { stdin, stdout } from "node:process";
10
10
  import * as b from "node:readline";
11
- import E from "node:readline";
11
+ import G from "node:readline";
12
12
  import { ReadStream } from "node:tty";
13
13
  //#region ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js
14
14
  var require_windows = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -737,7 +737,7 @@ function wrapAnsi$1(string, columns, options) {
737
737
  return String(string).normalize().split(CRLF_OR_LF$1).map((line) => exec$1(line, columns, options)).join("\n");
738
738
  }
739
739
  //#endregion
740
- //#region ../../node_modules/.pnpm/@clack+core@1.3.1/node_modules/@clack/core/dist/index.mjs
740
+ //#region ../../node_modules/.pnpm/@clack+core@1.4.0/node_modules/@clack/core/dist/index.mjs
741
741
  var import_src = (/* @__PURE__ */ __commonJSMin(((exports, module) => {
742
742
  const ESC = "\x1B";
743
743
  const CSI = `${ESC}[`;
@@ -847,7 +847,7 @@ function C(r, t) {
847
847
  for (const s of r) if (s !== void 0 && C(s, t)) return !0;
848
848
  return !1;
849
849
  }
850
- function z(r, t) {
850
+ function Y(r, t) {
851
851
  if (r === t) return;
852
852
  const s = r.split(`
853
853
  `), e = t.split(`
@@ -860,15 +860,15 @@ function z(r, t) {
860
860
  numLines: i
861
861
  };
862
862
  }
863
- const Y = globalThis.process.platform.startsWith("win"), k = Symbol("clack:cancel");
864
- function q(r) {
863
+ const q = globalThis.process.platform.startsWith("win"), k = Symbol("clack:cancel");
864
+ function R(r) {
865
865
  return r === k;
866
866
  }
867
867
  function w(r, t) {
868
868
  const s = r;
869
869
  s.isTTY && s.setRawMode(t);
870
870
  }
871
- function R({ input: r = stdin, output: t = stdout, overwrite: s = !0, hideCursor: e = !0 } = {}) {
871
+ function W({ input: r = stdin, output: t = stdout, overwrite: s = !0, hideCursor: e = !0 } = {}) {
872
872
  const i = b.createInterface({
873
873
  input: r,
874
874
  output: t,
@@ -894,11 +894,11 @@ function R({ input: r = stdin, output: t = stdout, overwrite: s = !0, hideCursor
894
894
  });
895
895
  };
896
896
  return e && t.write(import_src.cursor.hide), r.once("keypress", n), () => {
897
- r.off("keypress", n), e && t.write(import_src.cursor.show), r instanceof ReadStream && r.isTTY && !Y && r.setRawMode(!1), i.terminal = !1, i.close();
897
+ r.off("keypress", n), e && t.write(import_src.cursor.show), r instanceof ReadStream && r.isTTY && !q && r.setRawMode(!1), i.terminal = !1, i.close();
898
898
  };
899
899
  }
900
900
  const A = (r) => "columns" in r && typeof r.columns == "number" ? r.columns : 80, L = (r) => "rows" in r && typeof r.rows == "number" ? r.rows : 20;
901
- function W(r, t, s, e = s, i = s, n) {
901
+ function B(r, t, s, e = s, i = s, n) {
902
902
  return wrapAnsi$1(t, A(r ?? stdout) - s.length, {
903
903
  hard: !0,
904
904
  trim: !1
@@ -909,7 +909,15 @@ function W(r, t, s, e = s, i = s, n) {
909
909
  }).join(`
910
910
  `);
911
911
  }
912
- let m = class {
912
+ function P(r, t) {
913
+ if ("~standard" in r) {
914
+ const s = r["~standard"].validate(t);
915
+ if (s instanceof Promise) throw new TypeError("Schema validation must be synchronous. Update `validate()` and remove any asynchronous logic.");
916
+ return s.issues?.at(0)?.message;
917
+ }
918
+ return r(t);
919
+ }
920
+ var m = class {
913
921
  input;
914
922
  output;
915
923
  _abortSignal;
@@ -957,7 +965,7 @@ let m = class {
957
965
  this.state = "cancel", this.close();
958
966
  }, { once: !0 });
959
967
  }
960
- this.rl = E.createInterface({
968
+ this.rl = G.createInterface({
961
969
  input: this.input,
962
970
  tabSize: 2,
963
971
  prompt: "",
@@ -992,9 +1000,9 @@ let m = class {
992
1000
  if (this._track && s.name !== "return" && (s.name && this._isActionKey(t, s) && this.rl?.write(null, {
993
1001
  ctrl: !0,
994
1002
  name: "h"
995
- }), this._cursor = this.rl?.cursor ?? 0, this._setUserInput(this.rl?.line)), this.state === "error" && (this.state = "active"), s?.name && (!this._track && h.aliases.has(s.name) && this.emit("cursor", h.aliases.get(s.name)), h.actions.has(s.name) && this.emit("cursor", s.name)), t && (t.toLowerCase() === "y" || t.toLowerCase() === "n") && this.emit("confirm", t.toLowerCase() === "y"), this.emit("key", t?.toLowerCase(), s), s?.name === "return" && this._shouldSubmit(t, s)) {
1003
+ }), this._cursor = this.rl?.cursor ?? 0, this._setUserInput(this.rl?.line)), this.state === "error" && (this.state = "active"), s?.name && (!this._track && h.aliases.has(s.name) && this.emit("cursor", h.aliases.get(s.name)), h.actions.has(s.name) && this.emit("cursor", s.name)), t && (t.toLowerCase() === "y" || t.toLowerCase() === "n") && this.emit("confirm", t.toLowerCase() === "y"), this.emit("key", t, s), s?.name === "return" && this._shouldSubmit(t, s)) {
996
1004
  if (this.opts.validate) {
997
- const e = this.opts.validate(this.value);
1005
+ const e = P(this.opts.validate, this.value);
998
1006
  e && (this.error = e instanceof Error ? e.message : e, this.state = "error", this.rl?.write(this.userInput));
999
1007
  }
1000
1008
  this.state !== "error" && (this.state = "submit");
@@ -1025,7 +1033,7 @@ let m = class {
1025
1033
  if (t !== this._prevFrame) {
1026
1034
  if (this.state === "initial") this.output.write(import_src.cursor.hide);
1027
1035
  else {
1028
- const s = z(this._prevFrame, t), e = L(this.output);
1036
+ const s = Y(this._prevFrame, t), e = L(this.output);
1029
1037
  if (this.restoreCursor(), s) {
1030
1038
  const i = Math.max(0, s.numLinesAfter - e), n = Math.max(0, s.numLinesBefore - e);
1031
1039
  let o = s.lines.find((u) => u >= i);
@@ -1059,7 +1067,7 @@ let m = class {
1059
1067
  }
1060
1068
  }
1061
1069
  };
1062
- var X = class extends m {
1070
+ var Z = class extends m {
1063
1071
  get cursor() {
1064
1072
  return this.value ? 0 : 1;
1065
1073
  }
@@ -1076,7 +1084,7 @@ var X = class extends m {
1076
1084
  });
1077
1085
  }
1078
1086
  };
1079
- let nt = class extends m {
1087
+ let ut = class extends m {
1080
1088
  options;
1081
1089
  cursor = 0;
1082
1090
  get _value() {
@@ -1103,8 +1111,8 @@ let nt = class extends m {
1103
1111
  constructor(t) {
1104
1112
  super(t, !1), this.options = t.options, this.value = [...t.initialValues ?? []];
1105
1113
  const s = Math.max(this.options.findIndex(({ value: e }) => e === t.cursorAt), 0);
1106
- this.cursor = this.options[s].disabled ? f(s, 1, this.options) : s, this.on("key", (e) => {
1107
- e === "a" && this.toggleAll(), e === "i" && this.toggleInvert();
1114
+ this.cursor = this.options[s].disabled ? f(s, 1, this.options) : s, this.on("key", (e, i) => {
1115
+ i.name === "a" && this.toggleAll(), i.name === "i" && this.toggleInvert();
1108
1116
  }), this.on("cursor", (e) => {
1109
1117
  switch (e) {
1110
1118
  case "left":
@@ -1122,7 +1130,7 @@ let nt = class extends m {
1122
1130
  });
1123
1131
  }
1124
1132
  };
1125
- var ut = class extends m {
1133
+ var ht = class extends m {
1126
1134
  options;
1127
1135
  cursor = 0;
1128
1136
  get _selectedValue() {
@@ -1149,7 +1157,7 @@ var ut = class extends m {
1149
1157
  });
1150
1158
  }
1151
1159
  };
1152
- var ht = class extends m {
1160
+ var ct = class extends m {
1153
1161
  get userInputWithCursor() {
1154
1162
  if (this.state === "submit") return this.userInput;
1155
1163
  const t = this.userInput;
@@ -1672,7 +1680,7 @@ const limitOptions = (params) => {
1672
1680
  const confirm = (opts) => {
1673
1681
  const active = opts.active ?? "Yes";
1674
1682
  const inactive = opts.inactive ?? "No";
1675
- return new X({
1683
+ return new Z({
1676
1684
  active,
1677
1685
  inactive,
1678
1686
  signal: opts.signal,
@@ -1782,7 +1790,7 @@ const multiselect = (opts) => {
1782
1790
  };
1783
1791
  const required = opts.required ?? true;
1784
1792
  const hint = " " + import_picocolors.default.reset(import_picocolors.default.dim(`Press ${import_picocolors.default.gray(import_picocolors.default.bgWhite(import_picocolors.default.inverse(" space ")))} to select, ${import_picocolors.default.gray(import_picocolors.default.bgWhite(import_picocolors.default.inverse(" enter ")))} to submit`));
1785
- return new nt({
1793
+ return new ut({
1786
1794
  options: opts.options,
1787
1795
  signal: opts.signal,
1788
1796
  input: opts.input,
@@ -1799,7 +1807,7 @@ const multiselect = (opts) => {
1799
1807
  const formatMessageLines = (message) => {
1800
1808
  return message.split("\n").map((line, index) => `${index === 0 ? `${symbol(this.state)} ` : nestedPrefix}${line}`).join("\n");
1801
1809
  };
1802
- const wrappedMessage = hasGuide ? W(opts.output, opts.message, `${symbolBar(this.state)} `, `${symbol(this.state)} `) : formatMessageLines(opts.message);
1810
+ const wrappedMessage = hasGuide ? B(opts.output, opts.message, `${symbolBar(this.state)} `, `${symbol(this.state)} `) : formatMessageLines(opts.message);
1803
1811
  const title = `${hasGuide ? `${import_picocolors.default.gray(S_BAR)}\n` : ""}${wrappedMessage}\n`;
1804
1812
  const value = this.value ?? [];
1805
1813
  const styleOption = (option, active) => {
@@ -1813,13 +1821,13 @@ const multiselect = (opts) => {
1813
1821
  case "submit": {
1814
1822
  const submitText = this.options.filter(({ value: optionValue }) => value.includes(optionValue)).map((option) => opt(option, "submitted")).join(import_picocolors.default.dim(", ")) || import_picocolors.default.dim("none");
1815
1823
  const submitPrefix = hasGuide ? `${import_picocolors.default.gray(S_BAR)} ` : nestedPrefix;
1816
- return `${title}${W(opts.output, submitText, submitPrefix)}\n`;
1824
+ return `${title}${B(opts.output, submitText, submitPrefix)}\n`;
1817
1825
  }
1818
1826
  case "cancel": {
1819
1827
  const label = this.options.filter(({ value: optionValue }) => value.includes(optionValue)).map((option) => opt(option, "cancelled")).join(import_picocolors.default.dim(", "));
1820
1828
  if (label.trim() === "") return hasGuide ? `${title}${import_picocolors.default.gray(S_BAR)}\n` : `${title.trimEnd()}\n`;
1821
1829
  const cancelPrefix = hasGuide ? `${import_picocolors.default.gray(S_BAR)} ` : nestedPrefix;
1822
- const wrappedLabel = W(opts.output, label, cancelPrefix);
1830
+ const wrappedLabel = B(opts.output, label, cancelPrefix);
1823
1831
  return hasGuide ? `${title}${wrappedLabel}\n${import_picocolors.default.gray(S_BAR)}\n` : `${title}${wrappedLabel}\n`;
1824
1832
  }
1825
1833
  case "error": {
@@ -1931,7 +1939,7 @@ const spinner = ({ indicator = "dots", onCancel, output = process.stdout, cancel
1931
1939
  const hasGuide = opts.withGuide ?? false;
1932
1940
  const startLoop = () => {
1933
1941
  isSpinnerActive = true;
1934
- unblock = R({ output });
1942
+ unblock = W({ output });
1935
1943
  _origin = performance.now();
1936
1944
  _prevMessage = void 0;
1937
1945
  if (hasGuide) output.write(`${import_picocolors.default.gray(S_BAR)}\n`);
@@ -2032,7 +2040,7 @@ const select = (opts) => {
2032
2040
  default: return withMarker(import_picocolors.default.dim(" "), label, (text) => text, hint);
2033
2041
  }
2034
2042
  };
2035
- return new ut({
2043
+ return new ht({
2036
2044
  options: opts.options,
2037
2045
  signal: opts.signal,
2038
2046
  input: opts.input,
@@ -2045,16 +2053,16 @@ const select = (opts) => {
2045
2053
  return message.split("\n").map((line, index) => `${index === 0 ? `${symbol(this.state)} ` : nestedPrefix}${line}`).join("\n");
2046
2054
  };
2047
2055
  const hasMessage = opts.message.trim().length > 0;
2048
- const messageLines = !hasMessage ? "" : hasGuide ? W(opts.output, opts.message, `${symbolBar(this.state)} `, `${symbol(this.state)} `) : formatMessageLines(opts.message);
2056
+ const messageLines = !hasMessage ? "" : hasGuide ? B(opts.output, opts.message, `${symbolBar(this.state)} `, `${symbol(this.state)} `) : formatMessageLines(opts.message);
2049
2057
  const title = hasMessage ? `${hasGuide ? `${import_picocolors.default.gray(S_BAR)}\n` : ""}${messageLines}\n` : "";
2050
2058
  switch (this.state) {
2051
2059
  case "submit": {
2052
2060
  const submitPrefix = hasGuide ? `${import_picocolors.default.gray(S_BAR)} ` : nestedPrefix;
2053
- return `${title}${W(opts.output, opt(this.options[this.cursor], "selected"), submitPrefix)}\n`;
2061
+ return `${title}${B(opts.output, opt(this.options[this.cursor], "selected"), submitPrefix)}\n`;
2054
2062
  }
2055
2063
  case "cancel": {
2056
2064
  const cancelPrefix = hasGuide ? `${import_picocolors.default.gray(S_BAR)} ` : nestedPrefix;
2057
- return `${title}${W(opts.output, opt(this.options[this.cursor], "cancelled"), cancelPrefix)}${hasGuide ? `\n${import_picocolors.default.gray(S_BAR)}` : ""}\n`;
2065
+ return `${title}${B(opts.output, opt(this.options[this.cursor], "cancelled"), cancelPrefix)}${hasGuide ? `\n${import_picocolors.default.gray(S_BAR)}` : ""}\n`;
2058
2066
  }
2059
2067
  default: {
2060
2068
  const prefix = hasGuide ? `${import_picocolors.default.blue(S_BAR)} ` : nestedPrefix;
@@ -2076,7 +2084,7 @@ const select = (opts) => {
2076
2084
  }).prompt();
2077
2085
  };
2078
2086
  const text = (opts) => {
2079
- return new ht({
2087
+ return new ct({
2080
2088
  validate: opts.validate,
2081
2089
  placeholder: opts.placeholder,
2082
2090
  defaultValue: opts.defaultValue,
@@ -3534,7 +3542,7 @@ async function selectPackageManager(interactive, silent = false) {
3534
3542
  ],
3535
3543
  initialValue: PackageManager.pnpm
3536
3544
  });
3537
- if (q(selected)) cancelAndExit();
3545
+ if (R(selected)) cancelAndExit();
3538
3546
  return selected;
3539
3547
  } else {
3540
3548
  if (!silent) log.info(`Using default package manager: ${accent(PackageManager.pnpm)}`);
@@ -3648,7 +3656,7 @@ async function promptGitHooks(options) {
3648
3656
  message: "Set up pre-commit hooks to run formatting, linting, and type checking with auto-fixes?",
3649
3657
  initialValue: true
3650
3658
  });
3651
- if (q(selected)) {
3659
+ if (R(selected)) {
3652
3660
  cancelAndExit();
3653
3661
  return false;
3654
3662
  }
@@ -3664,7 +3672,7 @@ async function promptGitInit(options) {
3664
3672
  message: "Initialize a git repository with an initial commit?",
3665
3673
  initialValue: true
3666
3674
  });
3667
- if (q(selected)) {
3675
+ if (R(selected)) {
3668
3676
  cancelAndExit();
3669
3677
  return false;
3670
3678
  }
@@ -3731,7 +3739,7 @@ async function confirmBaseUrlFix(interactive) {
3731
3739
  message: "Your tsconfig contains `baseUrl`, which prevents enabling type-aware linting.\n " + styleText("gray", "`baseUrl` is deprecated in TypeScript 6.0 and removed in TypeScript 7.0.") + `\n Download and run the external \`${BASEURL_TSCONFIG_FIX_PACKAGE}\` fixer now?\n ` + styleText("gray", `Equivalent command: \`vp dlx ${command}\``),
3732
3740
  initialValue: true
3733
3741
  });
3734
- if (q(confirmed)) cancelAndExit();
3742
+ if (R(confirmed)) cancelAndExit();
3735
3743
  return confirmed;
3736
3744
  }
3737
3745
  async function fixBaseUrlInTsconfig(projectPath, options) {
@@ -3823,4 +3831,4 @@ function rewriteTypesInTsconfig(filePath) {
3823
3831
  return true;
3824
3832
  }
3825
3833
  //#endregion
3826
- export { q as A, log as C, spinner as D, select as E, runCommandSilently as M, require_cross_spawn as N, text as O, intro as S, outro as T, DependencyType as _, removeDeprecatedTsconfigFalseOption as a, cancel as b, defaultInteractive as c, promptGitHooks as d, promptGitInit as f, upgradeYarn as g, selectPackageManager as h, hasBaseUrlInTsconfig as i, runCommand$1 as j, require_picocolors as k, downloadPackageManager$1 as l, runViteInstall as m, findTsconfigFiles as n, rewriteTypesInTsconfig as o, runViteFmt as p, fixBaseUrlInTsconfig as r, cancelAndExit as s, confirmBaseUrlFix as t, getSpinner as u, PackageManager as v, multiselect as w, confirm as x, require_semver as y };
3834
+ export { R as A, log as C, spinner as D, select as E, runCommandSilently as M, require_cross_spawn as N, text as O, intro as S, outro as T, DependencyType as _, removeDeprecatedTsconfigFalseOption as a, cancel as b, defaultInteractive as c, promptGitHooks as d, promptGitInit as f, upgradeYarn as g, selectPackageManager as h, hasBaseUrlInTsconfig as i, runCommand$1 as j, require_picocolors as k, downloadPackageManager$1 as l, runViteInstall as m, findTsconfigFiles as n, rewriteTypesInTsconfig as o, runViteFmt as p, fixBaseUrlInTsconfig as r, cancelAndExit as s, confirmBaseUrlFix as t, getSpinner as u, PackageManager as v, multiselect as w, confirm as x, require_semver as y };
package/dist/version.js CHANGED
@@ -5,7 +5,7 @@ import { t as renderCliDoc } from "./help-YP84FSEz.js";
5
5
  import path from "node:path";
6
6
  import fs from "node:fs";
7
7
  //#region package.json
8
- var version = "0.1.23";
8
+ var version = "0.1.24";
9
9
  //#endregion
10
10
  //#region src/version.ts
11
11
  /** Tool display names in the order shown by `vp --version`. */
package/dist/versions.js CHANGED
@@ -1,8 +1,8 @@
1
1
  export const versions = {
2
- "vite": "8.0.14",
2
+ "vite": "8.0.16",
3
3
  "rolldown": "1.0.3",
4
- "tsdown": "0.22.0",
5
- "vitest": "4.1.7",
4
+ "tsdown": "0.22.1",
5
+ "vitest": "4.1.8",
6
6
  "oxlint": "1.67.0",
7
7
  "oxfmt": "0.52.0",
8
8
  "oxlint-tsgolint": "0.23.0"
@@ -1,7 +1,7 @@
1
- import { A as q, C as log, E as select, v as PackageManager, w as multiselect } from "./tsconfig-DlUVXT3J.js";
1
+ import { A as R$1, C as log, E as select, v as PackageManager, w as multiselect } from "./tsconfig-DFb5BKyT.js";
2
2
  import { t as require_dist } from "./dist-BgQuvbtq.js";
3
3
  import { c as editJsonFile, d as writeJsonFile, r as getScopeFromPackageName, u as readJsonFile } from "./package-PmBUZ-ve.js";
4
- import { B as editYamlFile, V as readYamlFile } from "./agent-aSGY0osq.js";
4
+ import { B as editYamlFile, V as readYamlFile } from "./agent-Nuk-9l77.js";
5
5
  import path, { posix, win32 } from "node:path";
6
6
  import { detectWorkspace } from "../binding/index.js";
7
7
  import * as actualFS from "node:fs";
@@ -156,7 +156,7 @@ async function selectEditor({ interactive, editor, onCancel }) {
156
156
  options: [...editorOptions, otherOption],
157
157
  initialValue: "vscode"
158
158
  });
159
- if (q(selectedEditor)) {
159
+ if (R$1(selectedEditor)) {
160
160
  onCancel();
161
161
  return;
162
162
  }
@@ -178,7 +178,7 @@ async function selectEditors({ interactive, editor, onCancel }) {
178
178
  initialValues: ["vscode"],
179
179
  required: false
180
180
  });
181
- if (q(selectedEditors)) {
181
+ if (R$1(selectedEditors)) {
182
182
  onCancel();
183
183
  return;
184
184
  }
@@ -260,7 +260,7 @@ async function writeEditorConfig({ projectRoot, editorId, interactive, conflictD
260
260
  }],
261
261
  initialValue: "skip"
262
262
  });
263
- conflictAction = q(action) || action === "skip" ? "skip" : "merge";
263
+ conflictAction = R$1(action) || action === "skip" ? "skip" : "merge";
264
264
  } else conflictAction = "merge";
265
265
  if (conflictAction === "merge") mergeAndWriteEditorConfig(filePath, incoming, fileName, displayPath, silent);
266
266
  else if (!silent) log.info(`Skipped writing ${displayPath}`);
@@ -3259,7 +3259,7 @@ const ENOCHILD = 704;
3259
3259
  const TYPEMASK = 1023;
3260
3260
  const entToType = (s) => s.isFile() ? IFREG : s.isDirectory() ? IFDIR : s.isSymbolicLink() ? IFLNK : s.isCharacterDevice() ? IFCHR : s.isBlockDevice() ? IFBLK : s.isSocket() ? IFSOCK : s.isFIFO() ? IFIFO : UNKNOWN;
3261
3261
  const normalizeCache = new L({ max: 2 ** 12 });
3262
- const normalize = (s) => {
3262
+ const normalize$1 = (s) => {
3263
3263
  const c = normalizeCache.get(s);
3264
3264
  if (c) return c;
3265
3265
  const n = s.normalize("NFKD");
@@ -3270,7 +3270,7 @@ const normalizeNocaseCache = new L({ max: 2 ** 12 });
3270
3270
  const normalizeNocase = (s) => {
3271
3271
  const c = normalizeNocaseCache.get(s);
3272
3272
  if (c) return c;
3273
- const n = normalize(s.toLowerCase());
3273
+ const n = normalize$1(s.toLowerCase());
3274
3274
  normalizeNocaseCache.set(s, n);
3275
3275
  return n;
3276
3276
  };
@@ -3459,7 +3459,7 @@ var PathBase = class {
3459
3459
  */
3460
3460
  constructor(name, type = UNKNOWN, root, roots, nocase, children, opts) {
3461
3461
  this.name = name;
3462
- this.#matchName = nocase ? normalizeNocase(name) : normalize(name);
3462
+ this.#matchName = nocase ? normalizeNocase(name) : normalize$1(name);
3463
3463
  this.#type = type & TYPEMASK;
3464
3464
  this.nocase = nocase;
3465
3465
  this.roots = roots;
@@ -3535,7 +3535,7 @@ var PathBase = class {
3535
3535
  if (pathPart === "" || pathPart === ".") return this;
3536
3536
  if (pathPart === "..") return this.parent || this;
3537
3537
  const children = this.children();
3538
- const name = this.nocase ? normalizeNocase(pathPart) : normalize(pathPart);
3538
+ const name = this.nocase ? normalizeNocase(pathPart) : normalize$1(pathPart);
3539
3539
  for (const p of children) if (p.#matchName === name) return p;
3540
3540
  const s = this.parent ? this.sep : "";
3541
3541
  const fullpath = this.#fullpath ? this.#fullpath + s + pathPart : void 0;
@@ -3750,7 +3750,7 @@ var PathBase = class {
3750
3750
  * directly.
3751
3751
  */
3752
3752
  isNamed(n) {
3753
- return !this.nocase ? this.#matchName === normalize(n) : this.#matchName === normalizeNocase(n);
3753
+ return !this.nocase ? this.#matchName === normalize$1(n) : this.#matchName === normalizeNocase(n);
3754
3754
  }
3755
3755
  /**
3756
3756
  * Return the Path object corresponding to the target of a symbolic link.
@@ -3862,7 +3862,7 @@ var PathBase = class {
3862
3862
  #readdirMaybePromoteChild(e, c) {
3863
3863
  for (let p = c.provisional; p < c.length; p++) {
3864
3864
  const pchild = c[p];
3865
- if ((this.nocase ? normalizeNocase(e.name) : normalize(e.name)) !== pchild.#matchName) continue;
3865
+ if ((this.nocase ? normalizeNocase(e.name) : normalize$1(e.name)) !== pchild.#matchName) continue;
3866
3866
  return this.#readdirPromoteChild(e, pchild, p, c);
3867
3867
  }
3868
3868
  }
@@ -10,11 +10,11 @@ export const core: DefaultTheme.TeamMember[] = [
10
10
  ],
11
11
  },
12
12
  {
13
- avatar: 'https://github.com/branchseer.png',
13
+ avatar: 'https://github.com/wan9chi.png',
14
14
  name: 'Wang Chi',
15
15
  links: [
16
- { icon: 'github', link: 'https://github.com/branchseer' },
17
- { icon: 'x', link: 'https://x.com/branchseer' },
16
+ { icon: 'github', link: 'https://github.com/wan9chi' },
17
+ { icon: 'x', link: 'https://x.com/wan9chi' },
18
18
  ],
19
19
  },
20
20
  {
@@ -4,6 +4,10 @@ Vite+ is the unified toolchain and entry point for web development. It manages y
4
4
 
5
5
  Vite+ ships in two parts: `vp`, the global command-line tool, and `vite-plus`, the local package installed in each project. If you already have a Vite project, use [`vp migrate`](/guide/migrate) to migrate it to Vite+, or paste our [migration prompt](/guide/migrate#migration-prompt) into your coding agent.
6
6
 
7
+ Building with an AI assistant? Copy a ready-made setup prompt:
8
+
9
+ <CopyPrompt />
10
+
7
11
  ## Install `vp`
8
12
 
9
13
  ### macOS / Linux
@@ -151,3 +151,20 @@ vp pm config get registry
151
151
  vp pm cache clean --force
152
152
  vp pm exec tsc --version
153
153
  ```
154
+
155
+ #### Staged publishing
156
+
157
+ `vp pm stage` exposes [npm's staged publishing](https://docs.npmjs.com/staged-publishing) workflow: a build is uploaded to a staging area (no 2FA, CI-friendly), then a maintainer approves or rejects it from a trusted device (2FA). It adapts to the detected package manager.
158
+
159
+ ```bash
160
+ vp pm stage publish # upload the package to staging (no 2FA)
161
+ vp pm stage list # list staged versions
162
+ vp pm stage view <stage-id> # inspect a staged version
163
+ vp pm stage download <stage-id> # download the staged tarball
164
+ vp pm stage approve <stage-id> # promote to the live registry (2FA)
165
+ vp pm stage reject <stage-id> # discard a staged version (2FA)
166
+ ```
167
+
168
+ - pnpm (`pnpm stage`, requires pnpm ≥ 11.3) and npm (`npm stage`, requires npm ≥ 11.15 and Node ≥ 22.14) pass through directly.
169
+ - yarn (Berry) uses its npm plugin (`yarn npm publish --staged`, `yarn npm stage …`); `view`/`download` fall back to npm.
170
+ - yarn Classic and bun have no staged-publishing support and fall back to `npm stage`.
@@ -76,7 +76,7 @@ After the migration:
76
76
 
77
77
  - Confirm `vite` imports were rewritten to `vite-plus` where needed
78
78
  - Confirm `vitest` imports were rewritten to `vite-plus/test` where needed
79
- - Remove old `vite` and `vitest` dependencies only after those rewrites are confirmed
79
+ - On pnpm, keep the `vite` / `vitest` entries that `vp migrate` aliased to the Vite+ packages so the workspace override stays effective; with other package managers you can remove them once those rewrites are confirmed
80
80
  - Move remaining tool-specific config into the appropriate blocks in `vite.config.ts`
81
81
 
82
82
  Command mapping to keep in mind:
@@ -25,37 +25,11 @@ The Oxlint type checker path powered by `tsgolint` does not support `baseUrl`.
25
25
  fix before enabling type-aware linting. If that fix fails or is declined, Vite+
26
26
  skips `typeAware` and `typeCheck`.
27
27
 
28
- ## `vp lint` / `vp fmt` may fail to read `vite.config.ts`
29
-
30
- `vp lint`, `vp fmt`, and the Oxc VS Code extension all read the `lint` / `fmt` blocks from `vite.config.ts`. Today that support has important limitations.
31
-
32
- ### What is currently supported
33
-
34
- - Static object export:
35
- - `export default { ... }`
36
- - `export default defineConfig({ ... })`
37
-
38
- ### What can fail in current integrations
39
-
40
- - Functional or async config:
41
- - `defineConfig((env) => ({ ... }))`
42
- - `defineConfig(async (env) => ({ ... }))`
43
- - Config files that rely on Vite transform/bundling behavior to execute.
44
-
45
- In scenarios reported in issue #930, Oxc-side integrations that read `vite.config.ts` can behave closer to native ESM loading (similar to Vite `--configLoader native`) than Vite's bundled default loader. That means configs depending on bundling/transforms can fail to load for lint/fmt/editor paths. See: https://github.com/voidzero-dev/vite-plus/issues/930
46
-
47
- ### Workarounds
48
-
49
- - Prefer a static `defineConfig({ ... })` export when you need `lint` / `fmt` in `vite.config.ts`.
50
- - Avoid Node-specific globals (`__dirname` in ESM), unresolved TS-only imports, or JSON imports without import attributes in config code used by lint/fmt.
51
- - If needed, keep `.oxlintrc.*` / `.oxfmtrc.*` as temporary fallback, [although we do not recommend doing this normally](/guide/lint##configuration), while this integration behavior is being improved.
52
-
53
- ### VS Code multi-root workspace note
28
+ ## VS Code extension does not read `vite.config.ts`
54
29
 
55
30
  If VS Code has multiple folders open, the shared Oxc language server may pick a different workspace than expected. That can make it look like `vite.config.ts` support is missing.
56
31
 
57
32
  - Confirm the extension is using the intended workspace.
58
- - Confirm the workspace resolves to a recent Oxc/Oxlint/Oxfmt toolchain.
59
33
 
60
34
  ## `vp build` does not run my build script
61
35
 
@@ -14,9 +14,20 @@ You can upgrade both of them independently.
14
14
  ## Global `vp`
15
15
 
16
16
  ```bash
17
- vp upgrade
17
+ vp upgrade # upgrade to the latest version
18
+ vp upgrade --check # check for updates without installing
18
19
  ```
19
20
 
21
+ ### Rollback
22
+
23
+ Vite+ keeps the **3 most recent** versions installed so you can revert quickly:
24
+
25
+ ```bash
26
+ vp upgrade --rollback
27
+ ```
28
+
29
+ Older versions are pruned automatically after each upgrade. The active version and the previous version are always kept, so a rollback target is never removed.
30
+
20
31
  ## Local `vite-plus`
21
32
 
22
33
  Update the project dependency with the package manager commands in Vite+:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite-plus",
3
- "version": "0.1.23",
3
+ "version": "0.1.24",
4
4
  "description": "The Unified Toolchain for the Web",
5
5
  "homepage": "https://viteplus.dev/guide",
6
6
  "bugs": {
@@ -333,8 +333,8 @@
333
333
  "oxfmt": "=0.52.0",
334
334
  "oxlint": "=1.67.0",
335
335
  "oxlint-tsgolint": "=0.23.0",
336
- "@voidzero-dev/vite-plus-test": "0.1.23",
337
- "@voidzero-dev/vite-plus-core": "0.1.23"
336
+ "@voidzero-dev/vite-plus-core": "0.1.24",
337
+ "@voidzero-dev/vite-plus-test": "0.1.24"
338
338
  },
339
339
  "devDependencies": {
340
340
  "@napi-rs/cli": "^3.6.1",
@@ -356,12 +356,12 @@
356
356
  "picocolors": "^1.1.1",
357
357
  "rolldown-plugin-dts": "^0.25.1",
358
358
  "semver": "^7.8.0",
359
- "tsdown": "^0.22.0",
359
+ "tsdown": "^0.22.1",
360
360
  "validate-npm-package-name": "^7.0.2",
361
361
  "yaml": "^2.8.1",
362
362
  "@voidzero-dev/vite-plus-prompts": "0.0.0",
363
- "vite": "npm:@voidzero-dev/vite-plus-core@0.1.23",
364
- "@voidzero-dev/vite-plus-tools": "0.0.0"
363
+ "@voidzero-dev/vite-plus-tools": "0.0.0",
364
+ "vite": "npm:@voidzero-dev/vite-plus-core@0.1.24"
365
365
  },
366
366
  "napi": {
367
367
  "binaryName": "vite-plus",
@@ -381,14 +381,14 @@
381
381
  "node": "^20.19.0 || >=22.12.0"
382
382
  },
383
383
  "optionalDependencies": {
384
- "@voidzero-dev/vite-plus-darwin-arm64": "0.1.23",
385
- "@voidzero-dev/vite-plus-darwin-x64": "0.1.23",
386
- "@voidzero-dev/vite-plus-linux-arm64-gnu": "0.1.23",
387
- "@voidzero-dev/vite-plus-linux-arm64-musl": "0.1.23",
388
- "@voidzero-dev/vite-plus-linux-x64-gnu": "0.1.23",
389
- "@voidzero-dev/vite-plus-linux-x64-musl": "0.1.23",
390
- "@voidzero-dev/vite-plus-win32-x64-msvc": "0.1.23",
391
- "@voidzero-dev/vite-plus-win32-arm64-msvc": "0.1.23"
384
+ "@voidzero-dev/vite-plus-darwin-arm64": "0.1.24",
385
+ "@voidzero-dev/vite-plus-darwin-x64": "0.1.24",
386
+ "@voidzero-dev/vite-plus-linux-arm64-gnu": "0.1.24",
387
+ "@voidzero-dev/vite-plus-linux-arm64-musl": "0.1.24",
388
+ "@voidzero-dev/vite-plus-linux-x64-gnu": "0.1.24",
389
+ "@voidzero-dev/vite-plus-linux-x64-musl": "0.1.24",
390
+ "@voidzero-dev/vite-plus-win32-x64-msvc": "0.1.24",
391
+ "@voidzero-dev/vite-plus-win32-arm64-msvc": "0.1.24"
392
392
  },
393
393
  "scripts": {
394
394
  "build": "oxnode -C dev ./build.ts",