vite-plus 0.2.7 → 0.2.9

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 (89) hide show
  1. package/AGENTS.md +7 -0
  2. package/LICENSE +5 -1
  3. package/README.md +9 -3
  4. package/bin/vpr +3 -2
  5. package/binding/index.cjs +193 -80
  6. package/binding/index.d.cts +106 -11
  7. package/dist/agent-DQU8uS6P.js +416 -0
  8. package/dist/bin.js +1388 -23
  9. package/dist/{cli-truncate-BVOlIIPy.js → cli-truncate-Bg3RDXpi.js} +0 -2
  10. package/dist/client/bundledDevClient.mjs +1 -0
  11. package/dist/config/bin.js +32 -133
  12. package/dist/{constants-BsuzPowC.js → constants-CG513DRa.js} +10 -2
  13. package/dist/create/bin.js +255 -268
  14. package/dist/{define-config-C2KfLHpC.js → define-config-CV4bQG_8.js} +3 -3
  15. package/dist/{define-config-eLQH9us2.d.ts → define-config-DWoAkNdp.d.ts} +16 -0
  16. package/dist/{define-config-DLh9fE95.cjs → define-config-DyNLA_f0.cjs} +1 -1
  17. package/dist/define-config.cjs +1 -1
  18. package/dist/define-config.d.ts +1 -1
  19. package/dist/define-config.js +1 -1
  20. package/dist/{dist-CKz3vcoG.js → dist-BDYZP12R.js} +196 -157
  21. package/dist/dist-Dqv1-Clg.js +3 -0
  22. package/dist/{agent-CPwWJ4qf.js → editor-g4PosU99.js} +819 -628
  23. package/dist/hooks/bin.d.ts +1 -0
  24. package/dist/hooks/bin.js +130 -0
  25. package/dist/hooks-pNCBWtFT.js +570 -0
  26. package/dist/index.cjs +1 -1
  27. package/dist/index.d.ts +1 -1
  28. package/dist/index.js +1 -1
  29. package/dist/{json-DiRs8ceZ.js → json-qlK6UH0r.js} +40 -38
  30. package/dist/migration/bin.js +65 -58
  31. package/dist/{oxlint-plugin-config-Bxgc4cwF.js → oxlint-plugin-config-BEZ9IUf7.js} +1 -1
  32. package/dist/oxlint-plugin.js +1 -1
  33. package/dist/pack-bin.js +1 -1
  34. package/dist/{package-Ds3uThLb.js → package-B4T8RGMG.js} +2 -2
  35. package/dist/{tsconfig-Jia2vgMG.js → prompts-CHz_98bJ.js} +169 -219
  36. package/dist/{resolve-vite-config-BiuLZnn8.js → resolve-vite-config-Dmeyeyj-.js} +2 -9
  37. package/dist/{rolldown-runtime-C7HZzL1F.js → rolldown-runtime-CMFfr-1z.js} +1 -1
  38. package/dist/staged/bin.js +241 -226
  39. package/dist/terminal-Bz-ps6rJ.js +128 -0
  40. package/dist/test/browser/providers/playwright/context.d.ts +1 -1
  41. package/dist/test/browser/providers/playwright.d.ts +6 -6
  42. package/dist/test/browser/providers/preview/context.d.ts +1 -1
  43. package/dist/test/browser/providers/preview.d.ts +4 -4
  44. package/dist/test/browser/providers/webdriverio/context.d.ts +1 -1
  45. package/dist/test/browser/providers/webdriverio.d.ts +6 -6
  46. package/dist/test/browser-playwright/context.d.ts +1 -1
  47. package/dist/test/browser-playwright.d.ts +6 -6
  48. package/dist/test/browser-preview/context.d.ts +1 -1
  49. package/dist/test/browser-preview.d.ts +4 -4
  50. package/dist/test/browser-webdriverio/context.d.ts +1 -1
  51. package/dist/test/browser-webdriverio.d.ts +6 -6
  52. package/dist/test/context.d.ts +3 -3
  53. package/dist/test/locators.d.ts +1 -1
  54. package/dist/toolchain.d.ts +25 -0
  55. package/dist/toolchain.js +194 -0
  56. package/dist/toolchain.json +193 -0
  57. package/dist/tsconfig-7v_BHagU.js +151 -0
  58. package/dist/{tsgolint-path-B-yOos8p.js → tsgolint-path-CbDReEOx.js} +5 -3
  59. package/dist/tsgolint-path.js +1 -1
  60. package/dist/version.js +6 -6
  61. package/dist/versions.d.ts +3 -3
  62. package/dist/versions.js +6 -6
  63. package/docs/config/index.md +13 -0
  64. package/docs/config/staged.md +2 -1
  65. package/docs/guide/ci.md +37 -4
  66. package/docs/guide/commit-hooks.md +112 -21
  67. package/docs/guide/create.md +7 -4
  68. package/docs/guide/env.md +8 -4
  69. package/docs/guide/fmt.md +2 -2
  70. package/docs/guide/github-actions-cache.md +5 -1
  71. package/docs/guide/ide-integration.md +61 -2
  72. package/docs/guide/index.md +4 -2
  73. package/docs/guide/install.md +27 -0
  74. package/docs/guide/installer-env-vars.md +14 -3
  75. package/docs/guide/lint.md +3 -1
  76. package/docs/guide/migrate.md +49 -4
  77. package/docs/guide/monorepo.md +98 -10
  78. package/docs/guide/troubleshooting.md +12 -3
  79. package/docs/guide/upgrade.md +27 -4
  80. package/docs/package.json +1 -1
  81. package/docs/pnpm-workspace.yaml +7 -0
  82. package/docs/vite.config.ts +3 -0
  83. package/package.json +21 -23
  84. package/rules/vite-tools.yml +0 -7
  85. package/dist/dist-CtM2JRbM.js +0 -3
  86. package/dist/editor-BbT1lTNc.js +0 -675
  87. package/dist/help-YP84FSEz.js +0 -61
  88. package/dist/terminal-uTv0ZaMr.js +0 -33
  89. package/dist/{log-update-DHZRyJ2m.js → log-update-CoW8Z4Dl.js} +1 -1
@@ -0,0 +1,193 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "nodes": [
4
+ {
5
+ "id": "vite-plus",
6
+ "name": "vite-plus",
7
+ "version": "0.2.9",
8
+ "kind": "package",
9
+ "delivery": [
10
+ "dependency"
11
+ ],
12
+ "aliases": []
13
+ },
14
+ {
15
+ "id": "vite-plus-core",
16
+ "name": "@voidzero-dev/vite-plus-core",
17
+ "version": "0.2.9",
18
+ "kind": "package",
19
+ "delivery": [
20
+ "dependency"
21
+ ],
22
+ "aliases": [
23
+ "vite-plus-core"
24
+ ]
25
+ },
26
+ {
27
+ "id": "vite",
28
+ "name": "vite",
29
+ "version": "8.2.1",
30
+ "kind": "tool",
31
+ "delivery": [
32
+ "bundled"
33
+ ],
34
+ "aliases": []
35
+ },
36
+ {
37
+ "id": "rolldown",
38
+ "name": "rolldown",
39
+ "version": "1.2.3",
40
+ "kind": "tool",
41
+ "delivery": [
42
+ "bundled",
43
+ "compiled"
44
+ ],
45
+ "aliases": []
46
+ },
47
+ {
48
+ "id": "vitest",
49
+ "name": "vitest",
50
+ "version": "4.1.10",
51
+ "kind": "tool",
52
+ "delivery": [
53
+ "dependency"
54
+ ],
55
+ "aliases": []
56
+ },
57
+ {
58
+ "id": "oxlint",
59
+ "name": "oxlint",
60
+ "version": "1.77.0",
61
+ "kind": "tool",
62
+ "delivery": [
63
+ "dependency"
64
+ ],
65
+ "aliases": []
66
+ },
67
+ {
68
+ "id": "oxfmt",
69
+ "name": "oxfmt",
70
+ "version": "0.62.0",
71
+ "kind": "tool",
72
+ "delivery": [
73
+ "dependency"
74
+ ],
75
+ "aliases": []
76
+ },
77
+ {
78
+ "id": "oxlint-tsgolint",
79
+ "name": "oxlint-tsgolint",
80
+ "version": "7.0.2001",
81
+ "kind": "tool",
82
+ "delivery": [
83
+ "dependency"
84
+ ],
85
+ "aliases": [
86
+ "tsgolint"
87
+ ]
88
+ },
89
+ {
90
+ "id": "tsdown",
91
+ "name": "tsdown",
92
+ "version": "0.22.14",
93
+ "kind": "tool",
94
+ "delivery": [
95
+ "bundled"
96
+ ],
97
+ "aliases": []
98
+ },
99
+ {
100
+ "id": "vite-task",
101
+ "name": "vite-task",
102
+ "revision": "d05b1dcdbaabaa69643ee0b89cebe3cd390957e9",
103
+ "builtAt": "2026-08-12T02:51:52Z",
104
+ "kind": "tool",
105
+ "delivery": [
106
+ "compiled"
107
+ ],
108
+ "aliases": []
109
+ },
110
+ {
111
+ "id": "oxc",
112
+ "name": "oxc",
113
+ "version": "0.143.0",
114
+ "kind": "engine",
115
+ "delivery": [
116
+ "compiled"
117
+ ],
118
+ "aliases": []
119
+ },
120
+ {
121
+ "id": "oxc-resolver",
122
+ "name": "oxc-resolver",
123
+ "version": "11.24.2",
124
+ "kind": "engine",
125
+ "delivery": [
126
+ "compiled"
127
+ ],
128
+ "aliases": []
129
+ }
130
+ ],
131
+ "edges": [
132
+ {
133
+ "from": "vite-plus",
134
+ "to": "vite-plus-core",
135
+ "relationship": "depends-on"
136
+ },
137
+ {
138
+ "from": "vite-plus-core",
139
+ "to": "vite",
140
+ "relationship": "bundles"
141
+ },
142
+ {
143
+ "from": "vite",
144
+ "to": "rolldown",
145
+ "relationship": "uses"
146
+ },
147
+ {
148
+ "from": "vite-plus-core",
149
+ "to": "rolldown",
150
+ "relationship": "bundles"
151
+ },
152
+ {
153
+ "from": "rolldown",
154
+ "to": "oxc",
155
+ "relationship": "compiles"
156
+ },
157
+ {
158
+ "from": "rolldown",
159
+ "to": "oxc-resolver",
160
+ "relationship": "compiles"
161
+ },
162
+ {
163
+ "from": "vite-plus-core",
164
+ "to": "tsdown",
165
+ "relationship": "bundles"
166
+ },
167
+ {
168
+ "from": "vite-plus",
169
+ "to": "vitest",
170
+ "relationship": "depends-on"
171
+ },
172
+ {
173
+ "from": "vite-plus",
174
+ "to": "oxlint",
175
+ "relationship": "depends-on"
176
+ },
177
+ {
178
+ "from": "vite-plus",
179
+ "to": "oxlint-tsgolint",
180
+ "relationship": "depends-on"
181
+ },
182
+ {
183
+ "from": "vite-plus",
184
+ "to": "oxfmt",
185
+ "relationship": "depends-on"
186
+ },
187
+ {
188
+ "from": "vite-plus",
189
+ "to": "vite-task",
190
+ "relationship": "compiles"
191
+ }
192
+ ]
193
+ }
@@ -0,0 +1,151 @@
1
+ import { d as createBaseUrlTsconfigFixArgs, t as BASEURL_TSCONFIG_FIX_PACKAGE } from "./constants-CG513DRa.js";
2
+ import { A as isCancel, C as log, M as runCommandSilently, t as cancelAndExit, x as confirm } from "./prompts-CHz_98bJ.js";
3
+ import { c as parse, o as applyEdits, s as modify } from "./json-qlK6UH0r.js";
4
+ import path from "node:path";
5
+ import { styleText } from "node:util";
6
+ import fs from "node:fs";
7
+ //#region src/utils/tsconfig.ts
8
+ /**
9
+ * Check if tsconfig.json has compilerOptions.baseUrl set.
10
+ * oxlint's TypeScript checker (tsgolint) does not support baseUrl,
11
+ * so typeAware/typeCheck must be disabled when it is present.
12
+ */
13
+ function hasBaseUrlInTsconfigFile(filePath) {
14
+ try {
15
+ return parse(fs.readFileSync(filePath, "utf-8"))?.compilerOptions?.baseUrl != null;
16
+ } catch {
17
+ return false;
18
+ }
19
+ }
20
+ const TSCONFIG_FILE_RE = /^tsconfig(\.[\w-]+)?\.json$/i;
21
+ function findTsconfigFiles(projectPath) {
22
+ try {
23
+ return fs.readdirSync(projectPath).filter((name) => TSCONFIG_FILE_RE.test(name)).map((name) => path.join(projectPath, name));
24
+ } catch {
25
+ return [];
26
+ }
27
+ }
28
+ function hasBaseUrlInTsconfig(projectPath) {
29
+ return findTsconfigFiles(projectPath).some((filePath) => hasBaseUrlInTsconfigFile(filePath));
30
+ }
31
+ function findTsconfigFilesWithBaseUrl(projectPath) {
32
+ return findTsconfigFiles(projectPath).filter((filePath) => hasBaseUrlInTsconfigFile(filePath));
33
+ }
34
+ async function confirmBaseUrlFix(interactive) {
35
+ if (!interactive) return true;
36
+ const command = [BASEURL_TSCONFIG_FIX_PACKAGE, ...createBaseUrlTsconfigFixArgs("<tsconfig path>")].join(" ");
37
+ const confirmed = await confirm({
38
+ 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}\``),
39
+ initialValue: true
40
+ });
41
+ if (isCancel(confirmed)) cancelAndExit();
42
+ return confirmed;
43
+ }
44
+ async function fixBaseUrlInTsconfig(projectPath, options) {
45
+ const files = findTsconfigFilesWithBaseUrl(projectPath);
46
+ if (files.length === 0) return "not-needed";
47
+ if (!(options?.confirmed ?? await confirmBaseUrlFix(options?.interactive ?? false))) {
48
+ options?.onStatus?.("declined", projectPath);
49
+ return "declined";
50
+ }
51
+ try {
52
+ for (const filePath of files) {
53
+ const target = path.relative(projectPath, filePath) || filePath;
54
+ const fixArgs = createBaseUrlTsconfigFixArgs(target);
55
+ if (!options?.silent) log.info(`Running vp dlx ${BASEURL_TSCONFIG_FIX_PACKAGE} ${fixArgs.join(" ")}`);
56
+ const result = await runCommandSilently({
57
+ command: process.env.VP_CLI_BIN ?? "vp",
58
+ args: [
59
+ "dlx",
60
+ BASEURL_TSCONFIG_FIX_PACKAGE,
61
+ ...fixArgs
62
+ ],
63
+ cwd: projectPath,
64
+ envs: process.env
65
+ });
66
+ if (result.exitCode !== 0) {
67
+ if (!options?.silent) {
68
+ const output = `${result.stdout.toString()}${result.stderr.toString()}`.trim();
69
+ if (output) log.warn(output);
70
+ }
71
+ options?.onStatus?.("failed", projectPath);
72
+ return "failed";
73
+ }
74
+ }
75
+ if (hasBaseUrlInTsconfig(projectPath)) {
76
+ if (!options?.silent) log.warn("tsconfig still contains baseUrl after running the fixer.");
77
+ options?.onStatus?.("failed", projectPath);
78
+ return "failed";
79
+ }
80
+ } catch (error) {
81
+ if (!options?.silent && error instanceof Error) log.warn(error.message);
82
+ options?.onStatus?.("failed", projectPath);
83
+ return "failed";
84
+ }
85
+ options?.onStatus?.("fixed", projectPath);
86
+ return "fixed";
87
+ }
88
+ function removeDeprecatedTsconfigFalseOption(filePath, optionName) {
89
+ let text;
90
+ try {
91
+ text = fs.readFileSync(filePath, "utf-8");
92
+ } catch {
93
+ return false;
94
+ }
95
+ if (parse(text)?.compilerOptions?.[optionName] !== false) return false;
96
+ const edits = modify(text, ["compilerOptions", optionName], void 0, {});
97
+ if (edits.length === 0) return false;
98
+ const newText = applyEdits(text, edits);
99
+ fs.writeFileSync(filePath, newText);
100
+ return true;
101
+ }
102
+ const TSCONFIG_TYPE_REPLACEMENTS = { "tsdown/client": "vite-plus/pack/client" };
103
+ function hasTypesToRewriteInTsconfig(filePath) {
104
+ let text;
105
+ try {
106
+ text = fs.readFileSync(filePath, "utf-8");
107
+ } catch {
108
+ return false;
109
+ }
110
+ const types = parse(text)?.compilerOptions?.types;
111
+ return Array.isArray(types) && types.some((t) => typeof t === "string" && t in TSCONFIG_TYPE_REPLACEMENTS);
112
+ }
113
+ function hasVitestTypesInTsconfig(filePath) {
114
+ let text;
115
+ try {
116
+ text = fs.readFileSync(filePath, "utf-8");
117
+ } catch {
118
+ return false;
119
+ }
120
+ const types = parse(text)?.compilerOptions?.types;
121
+ return Array.isArray(types) && types.some((type) => typeof type === "string" ? type === "vitest" || type.startsWith("vitest/") : false);
122
+ }
123
+ function rewriteTypesInTsconfig(filePath) {
124
+ let text;
125
+ try {
126
+ text = fs.readFileSync(filePath, "utf-8");
127
+ } catch {
128
+ return false;
129
+ }
130
+ const types = parse(text)?.compilerOptions?.types;
131
+ if (!Array.isArray(types)) return false;
132
+ const toReplace = types.map((t, i) => typeof t === "string" && t in TSCONFIG_TYPE_REPLACEMENTS ? {
133
+ i,
134
+ newVal: TSCONFIG_TYPE_REPLACEMENTS[t]
135
+ } : null).filter((x) => x !== null);
136
+ if (toReplace.length === 0) return false;
137
+ let currentText = text;
138
+ for (let j = toReplace.length - 1; j >= 0; j--) {
139
+ const { i, newVal } = toReplace[j];
140
+ const edits = modify(currentText, [
141
+ "compilerOptions",
142
+ "types",
143
+ i
144
+ ], newVal, {});
145
+ if (edits.length > 0) currentText = applyEdits(currentText, edits);
146
+ }
147
+ fs.writeFileSync(filePath, currentText);
148
+ return true;
149
+ }
150
+ //#endregion
151
+ export { hasTypesToRewriteInTsconfig as a, rewriteTypesInTsconfig as c, hasBaseUrlInTsconfig as i, findTsconfigFiles as n, hasVitestTypesInTsconfig as o, fixBaseUrlInTsconfig as r, removeDeprecatedTsconfigFalseOption as s, confirmBaseUrlFix as t };
@@ -1,6 +1,6 @@
1
1
  import { dirname, join } from "node:path";
2
- import { existsSync, realpathSync } from "node:fs";
3
2
  import { fileURLToPath } from "node:url";
3
+ import { existsSync, realpathSync } from "node:fs";
4
4
  //#region src/utils/tsgolint-path.ts
5
5
  function resolveWindowsTsgolintExecutable(pathCandidates, options) {
6
6
  let oxlintTsgolintPath = pathCandidates.find((p) => options.exists(p)) ?? "";
@@ -14,7 +14,8 @@ function resolveTsgolintExecutable(tsgolintBinPath, scriptUrl) {
14
14
  if (process.platform !== "win32") return tsgolintBinPath;
15
15
  const scriptDir = dirname(fileURLToPath(scriptUrl));
16
16
  const localBinDir = join(scriptDir, "..", "node_modules", ".bin");
17
- const projectBinDir = join(dirname(dirname(tsgolintBinPath)), "..", ".bin");
17
+ const oxlintTsgolintPackagePath = dirname(dirname(tsgolintBinPath));
18
+ const projectBinDir = join(oxlintTsgolintPackagePath, "..", ".bin");
18
19
  return resolveWindowsTsgolintExecutable([
19
20
  join(localBinDir, "tsgolint.exe"),
20
21
  join(localBinDir, "tsgolint.cmd"),
@@ -23,7 +24,8 @@ function resolveTsgolintExecutable(tsgolintBinPath, scriptUrl) {
23
24
  ], {
24
25
  exists: existsSync,
25
26
  getRealpathCandidates: () => {
26
- const realBinDir = join(dirname(realpathSync(join(scriptDir, ".."))), ".bin");
27
+ const realPkgDir = realpathSync(join(scriptDir, ".."));
28
+ const realBinDir = join(dirname(realPkgDir), ".bin");
27
29
  return [join(realBinDir, "tsgolint.exe"), join(realBinDir, "tsgolint.cmd")];
28
30
  }
29
31
  });
@@ -1,2 +1,2 @@
1
- import { n as resolveWindowsTsgolintExecutable, t as resolveTsgolintExecutable } from "./tsgolint-path-B-yOos8p.js";
1
+ import { n as resolveWindowsTsgolintExecutable, t as resolveTsgolintExecutable } from "./tsgolint-path-CbDReEOx.js";
2
2
  export { resolveTsgolintExecutable, resolveWindowsTsgolintExecutable };
package/dist/version.js CHANGED
@@ -1,7 +1,6 @@
1
- import { m as version } from "./constants-BsuzPowC.js";
2
- import { a as printHeader, r as log, t as accent } from "./terminal-uTv0ZaMr.js";
3
- import { i as hasVitePlusDependency, n as detectPackageMetadata } from "./package-Ds3uThLb.js";
4
- import { t as renderCliDoc } from "./help-YP84FSEz.js";
1
+ import { i as log, l as renderCliDoc, o as printHeader, t as accent } from "./terminal-Bz-ps6rJ.js";
2
+ import { h as version } from "./constants-CG513DRa.js";
3
+ import { i as hasVitePlusDependency, n as detectPackageMetadata } from "./package-B4T8RGMG.js";
5
4
  import path from "node:path";
6
5
  import fs from "node:fs";
7
6
  //#region src/version.ts
@@ -30,7 +29,8 @@ function isVitePlusDeclaredInAncestors(cwd) {
30
29
  while (true) {
31
30
  const packageJsonPath = path.join(currentDir, "package.json");
32
31
  try {
33
- if (hasVitePlusDependency(JSON.parse(fs.readFileSync(packageJsonPath, "utf8")))) return true;
32
+ const pkg = JSON.parse(fs.readFileSync(packageJsonPath, "utf8"));
33
+ if (hasVitePlusDependency(pkg)) return true;
34
34
  } catch {}
35
35
  const parentDir = path.dirname(currentDir);
36
36
  if (parentDir === currentDir) break;
@@ -40,7 +40,7 @@ function isVitePlusDeclaredInAncestors(cwd) {
40
40
  }
41
41
  /**
42
42
  * Resolve all tool versions from the locally installed vite-plus package.
43
- * Uses the `vite-plus/versions` export generated by `syncVersionsExport()`.
43
+ * Uses the `vite-plus/versions` export generated by `syncToolchainExports()`.
44
44
  */
45
45
  async function resolveToolVersions(localPackagePath) {
46
46
  try {
@@ -1,9 +1,9 @@
1
1
  export declare const versions: {
2
2
  readonly 'vite': string;
3
3
  readonly 'rolldown': string;
4
- readonly 'tsdown': string;
5
- readonly 'oxlint': string;
4
+ readonly 'vitest': string;
6
5
  readonly 'oxfmt': string;
6
+ readonly 'oxlint': string;
7
7
  readonly 'oxlint-tsgolint': string;
8
- readonly 'vitest': string;
8
+ readonly 'tsdown': string;
9
9
  };
package/dist/versions.js CHANGED
@@ -1,9 +1,9 @@
1
1
  export const versions = {
2
- "vite": "8.1.5",
3
- "rolldown": "1.2.0",
4
- "tsdown": "0.22.14",
5
- "oxlint": "1.75.0",
6
- "oxfmt": "0.60.0",
2
+ "vite": "8.2.1",
3
+ "rolldown": "1.2.3",
4
+ "vitest": "4.1.10",
5
+ "oxfmt": "0.62.0",
6
+ "oxlint": "1.77.0",
7
7
  "oxlint-tsgolint": "7.0.2001",
8
- "vitest": "4.1.10"
8
+ "tsdown": "0.22.14"
9
9
  };
@@ -33,3 +33,16 @@ Vite+ extends the basic Vite configuration with these additions:
33
33
  - [`test`](/config/test) for Vitest
34
34
  - [`pack`](/config/pack) for tsdown
35
35
  - [`staged`](/config/staged) for staged-file checks
36
+ - [`defaultPackage`](#defaultpackage) for the default target of bare app commands at a workspace root
37
+
38
+ ## defaultPackage
39
+
40
+ Default target directory for `vp dev` / `vp build` / `vp preview` / `vp pack` when you invoke them bare in the directory containing the config, an implicit [`vp -C <dir>`](/guide/monorepo#app-commands):
41
+
42
+ ```ts [vite.config.ts]
43
+ export default {
44
+ defaultPackage: './frontend',
45
+ };
46
+ ```
47
+
48
+ vp reads the values without executing the config, so `defaultPackage` also works at repository roots with no vite-plus dependency (for example a Laravel or Rails repo whose Vite app lives in `frontend/`, with vite-plus installed only there). That static read is why the values must stay plain string literals rather than expressions. An explicit `-C` or positional target always wins over the config.
@@ -1,6 +1,7 @@
1
1
  # Staged Config
2
2
 
3
- `vp staged` and `vp config` read staged-file rules from the `staged` block in `vite.config.ts`. See the [Commit hooks guide](/guide/commit-hooks).
3
+ `vp staged` reads staged-file rules from the `staged` block in `vite.config.ts`. See the
4
+ [Commit hooks guide](/guide/commit-hooks).
4
5
 
5
6
  ## Example
6
7
 
package/docs/guide/ci.md CHANGED
@@ -6,12 +6,43 @@ You can use `voidzero-dev/setup-vp` to use Vite+ in CI environments.
6
6
 
7
7
  [`voidzero-dev/setup-vp`](https://github.com/voidzero-dev/setup-vp) provides integrations for GitHub Actions and GitLab CI/CD. Both install Vite+ and can install project dependencies. The GitHub Action can also set up Node.js and cache package manager data automatically, while the GitLab CI/CD template uses the Node.js runtime and cache configuration provided by the job.
8
8
 
9
+ ## setup-vp Versioning
10
+
11
+ Set `<setup-vp-version>` in each example to an exact version from the [`setup-vp` releases page](https://github.com/voidzero-dev/setup-vp/releases). You can use a commit SHA instead. Do not use the `v1` tag. The `v1` tag no longer receives updates.
12
+
13
+ ### Automatic Version Updates
14
+
15
+ Dependabot and Renovate can update exact versions in GitHub Actions workflows.
16
+
17
+ To use [Dependabot version updates](https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuring-dependabot-version-updates), add a `github-actions` entry to `.github/dependabot.yml`:
18
+
19
+ ```yaml [.github/dependabot.yml]
20
+ version: 2
21
+ updates:
22
+ - package-ecosystem: github-actions
23
+ directory: /
24
+ schedule:
25
+ interval: weekly
26
+ ```
27
+
28
+ Dependabot checks `uses:` entries in `.github/workflows` each week.
29
+
30
+ [Renovate's GitHub Actions manager](https://docs.renovatebot.com/modules/manager/github-actions/) detects `uses:` entries by default. You do not need a package rule for `setup-vp`.
31
+
32
+ When you use a commit SHA, add the exact release tag in a comment. Renovate uses the comment to find updates:
33
+
34
+ ```yaml
35
+ - uses: voidzero-dev/setup-vp@<commit-sha> # <setup-vp-version>
36
+ ```
37
+
38
+ These settings apply only to GitHub Actions workflows. For GitLab CI/CD, update both version values together.
39
+
9
40
  ## GitHub Actions
10
41
 
11
42
  The GitHub Action sets up Vite+, the required Node.js version, and the package manager. This means you usually do not need separate `setup-node`, package-manager setup, or manual dependency caching steps in your workflow.
12
43
 
13
44
  ```yaml [.github/workflows/ci.yml]
14
- - uses: voidzero-dev/setup-vp@v1
45
+ - uses: voidzero-dev/setup-vp@<setup-vp-version>
15
46
  with:
16
47
  node-version: '24'
17
48
  cache: true
@@ -29,11 +60,13 @@ With `cache: true`, `setup-vp` handles dependency caching for you automatically.
29
60
 
30
61
  ## GitLab CI/CD
31
62
 
32
- Use the reusable `setup-vp` remote template in your GitLab CI/CD configuration:
63
+ Use the reusable `setup-vp` remote template in your GitLab CI/CD configuration. Set the remote URL and `setup-ref` to the same release tag or commit SHA:
33
64
 
34
65
  ```yaml [.gitlab-ci.yml]
35
66
  include:
36
- - remote: 'https://raw.githubusercontent.com/voidzero-dev/setup-vp/v1/gitlab/setup-vp.yml'
67
+ - remote: 'https://raw.githubusercontent.com/voidzero-dev/setup-vp/<setup-vp-version>/gitlab/setup-vp.yml'
68
+ inputs:
69
+ setup-ref: '<setup-vp-version>'
37
70
 
38
71
  test:
39
72
  extends: .setup-vp
@@ -76,7 +109,7 @@ If you are migrating an existing GitHub Actions workflow, you can often replace
76
109
  #### After:
77
110
 
78
111
  ```yaml [.github/workflows/ci.yml]
79
- - uses: voidzero-dev/setup-vp@v1
112
+ - uses: voidzero-dev/setup-vp@<setup-vp-version>
80
113
  with:
81
114
  node-version: '24'
82
115
  cache: true