vite-plus 0.2.8 → 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 (74) hide show
  1. package/AGENTS.md +7 -0
  2. package/README.md +9 -3
  3. package/binding/index.cjs +54 -54
  4. package/binding/index.d.cts +7 -3
  5. package/dist/{agent-CI79DuSy.js → agent-DQU8uS6P.js} +4 -188
  6. package/dist/bin.js +288 -278
  7. package/dist/config/bin.js +27 -15
  8. package/dist/{constants-BppDcRc1.js → constants-CG513DRa.js} +10 -2
  9. package/dist/create/bin.js +178 -204
  10. package/dist/{define-config-DPnHe1Mx.js → define-config-CV4bQG_8.js} +3 -3
  11. package/dist/{define-config-CEm_MtvJ.cjs → define-config-DyNLA_f0.cjs} +1 -1
  12. package/dist/define-config.cjs +1 -1
  13. package/dist/define-config.js +1 -1
  14. package/dist/{dist-CSQWHI6y.js → dist-BDYZP12R.js} +193 -149
  15. package/dist/dist-Dqv1-Clg.js +3 -0
  16. package/dist/{editor-CGWdbLgD.js → editor-g4PosU99.js} +188 -108
  17. package/dist/hooks/bin.d.ts +1 -0
  18. package/dist/hooks/bin.js +130 -0
  19. package/dist/hooks-pNCBWtFT.js +570 -0
  20. package/dist/index.cjs +1 -1
  21. package/dist/index.js +1 -1
  22. package/dist/{json-BU88uu6o.js → json-qlK6UH0r.js} +38 -32
  23. package/dist/migration/bin.js +15 -18
  24. package/dist/{oxlint-plugin-config-BHOzlwMw.js → oxlint-plugin-config-BEZ9IUf7.js} +1 -1
  25. package/dist/oxlint-plugin.js +1 -1
  26. package/dist/pack-bin.js +1 -1
  27. package/dist/{package-hV-77cBb.js → package-B4T8RGMG.js} +2 -2
  28. package/dist/{prompts-DYap08te.js → prompts-CHz_98bJ.js} +142 -50
  29. package/dist/{resolve-vite-config-EWXclqvV.js → resolve-vite-config-Dmeyeyj-.js} +2 -9
  30. package/dist/staged/bin.js +224 -206
  31. package/dist/{terminal-CrqqK8WT.js → terminal-Bz-ps6rJ.js} +33 -3
  32. package/dist/test/browser/providers/playwright/context.d.ts +1 -1
  33. package/dist/test/browser/providers/playwright.d.ts +6 -6
  34. package/dist/test/browser/providers/preview/context.d.ts +1 -1
  35. package/dist/test/browser/providers/preview.d.ts +4 -4
  36. package/dist/test/browser/providers/webdriverio/context.d.ts +1 -1
  37. package/dist/test/browser/providers/webdriverio.d.ts +6 -6
  38. package/dist/test/browser-playwright/context.d.ts +1 -1
  39. package/dist/test/browser-playwright.d.ts +6 -6
  40. package/dist/test/browser-preview/context.d.ts +1 -1
  41. package/dist/test/browser-preview.d.ts +4 -4
  42. package/dist/test/browser-webdriverio/context.d.ts +1 -1
  43. package/dist/test/browser-webdriverio.d.ts +6 -6
  44. package/dist/test/context.d.ts +3 -3
  45. package/dist/test/locators.d.ts +1 -1
  46. package/dist/toolchain.d.ts +25 -0
  47. package/dist/toolchain.js +194 -0
  48. package/dist/toolchain.json +193 -0
  49. package/dist/{tsconfig-CVUKLfL8.js → tsconfig-7v_BHagU.js} +3 -3
  50. package/dist/tsgolint-path.js +1 -1
  51. package/dist/version.js +4 -4
  52. package/dist/versions.d.ts +3 -3
  53. package/dist/versions.js +6 -6
  54. package/docs/guide/ci.md +37 -4
  55. package/docs/guide/commit-hooks.md +87 -14
  56. package/docs/guide/create.md +7 -4
  57. package/docs/guide/fmt.md +2 -2
  58. package/docs/guide/github-actions-cache.md +5 -1
  59. package/docs/guide/ide-integration.md +61 -2
  60. package/docs/guide/index.md +3 -1
  61. package/docs/guide/install.md +25 -0
  62. package/docs/guide/installer-env-vars.md +12 -1
  63. package/docs/guide/lint.md +3 -1
  64. package/docs/guide/migrate.md +39 -2
  65. package/docs/guide/monorepo.md +4 -4
  66. package/docs/guide/troubleshooting.md +12 -4
  67. package/docs/guide/upgrade.md +27 -4
  68. package/docs/package.json +1 -1
  69. package/docs/pnpm-workspace.yaml +7 -0
  70. package/docs/vite.config.ts +3 -0
  71. package/package.json +18 -14
  72. package/rules/vite-tools.yml +0 -7
  73. package/dist/dist-DT25H9pj.js +0 -3
  74. package/dist/{tsgolint-path-eMZT-oea.js → tsgolint-path-CbDReEOx.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
+ }
@@ -1,6 +1,6 @@
1
- import { t as BASEURL_TSCONFIG_FIX_PACKAGE, u as createBaseUrlTsconfigFixArgs } from "./constants-BppDcRc1.js";
2
- import { A as isCancel, C as log, M as runCommandSilently, t as cancelAndExit, x as confirm } from "./prompts-DYap08te.js";
3
- import { c as parse, o as applyEdits, s as modify } from "./json-BU88uu6o.js";
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
4
  import path from "node:path";
5
5
  import { styleText } from "node:util";
6
6
  import fs from "node:fs";
@@ -1,2 +1,2 @@
1
- import { n as resolveWindowsTsgolintExecutable, t as resolveTsgolintExecutable } from "./tsgolint-path-eMZT-oea.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,6 +1,6 @@
1
- import { a as printHeader, c as renderCliDoc, r as log, t as accent } from "./terminal-CrqqK8WT.js";
2
- import { m as version } from "./constants-BppDcRc1.js";
3
- import { i as hasVitePlusDependency, n as detectPackageMetadata } from "./package-hV-77cBb.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";
4
4
  import path from "node:path";
5
5
  import fs from "node:fs";
6
6
  //#region src/version.ts
@@ -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.2.0",
3
- "rolldown": "1.2.2",
4
- "tsdown": "0.22.14",
5
- "oxlint": "1.76.0",
6
- "oxfmt": "0.61.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
  };
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
@@ -1,7 +1,7 @@
1
1
  # Commit Hooks
2
2
 
3
- Use `vp config` to install the Git hook dispatcher, and `vp staged` to run checks on staged
4
- files.
3
+ Use `vp hooks` to manage the Git hook dispatcher, `vp config` for project setup
4
+ (hooks + agent integration), and `vp staged` to run checks on staged files.
5
5
 
6
6
  ## Overview
7
7
 
@@ -9,18 +9,65 @@ Vite+ supports commit hooks and staged-file checks without additional tooling.
9
9
 
10
10
  Use:
11
11
 
12
- - `vp config` to install generated hook infrastructure and related integrations
12
+ - `vp hooks enable` / `disable` / `status` to manage the generated hook dispatcher
13
+ - `vp config` to install the dispatcher (when not disabled) and update agent integration
13
14
  - `vp staged` to run checks against the files currently staged in Git
14
15
 
15
16
  If you use [`vp create`](/guide/create) or [`vp migrate`](/guide/migrate), Vite+ prompts you to set this up for your project automatically.
16
17
 
18
+ ### Quick start
19
+
20
+ ```bash
21
+ # Install or refresh the dispatcher
22
+ vp hooks enable
23
+
24
+ # Check what is active in this clone
25
+ vp hooks status
26
+
27
+ # Turn hooks off in this clone (survives npm install / prepare)
28
+ vp hooks disable
29
+
30
+ # Turn them back on
31
+ vp hooks enable
32
+ ```
33
+
17
34
  ## Commands
18
35
 
36
+ ### `vp hooks`
37
+
38
+ Manage the Vite+ Git hook dispatcher for the current repository:
39
+
40
+ ```bash
41
+ vp hooks enable
42
+ vp hooks enable --hooks-dir .custom-hooks
43
+ vp hooks disable
44
+ vp hooks status
45
+ ```
46
+
47
+ | Command | Behavior |
48
+ | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
49
+ | `enable` | Install or refresh the generated dispatcher under `<hooks-dir>/_` and set `core.hooksPath`. Clears a previous disable preference. |
50
+ | `disable` | Tear down the dispatcher (unset `core.hooksPath` when it points at Vite+, remove `<hooks-dir>/_`) and **persist** the disable decision in local git config so `vp config` / lifecycle scripts do not reinstall it. |
51
+ | `status` | Show preference, `core.hooksPath`, dispatcher presence, and project-owned hook scripts. |
52
+
53
+ By default, project hooks live in `.vite-hooks`. Pass `--hooks-dir` to use another subdirectory. After the first successful enable, the directory is remembered in local git config for later `enable` / `disable` / `status` / `vp config` calls in this clone.
54
+
55
+ `status` reports preference as:
56
+
57
+ - `not set` — no disable preference and no prior enable in this clone
58
+ - `enabled` — enable has run (or the dispatcher is currently owned)
59
+ - `disabled (local)` — after `vp hooks disable`
60
+
61
+ Check the `Dispatcher` and `core.hooksPath` lines to see whether hooks are actually active.
62
+
63
+ `disable` / `enable` do **not** delete project-owned hook scripts (for example `.vite-hooks/pre-commit`), the `staged` block in `vite.config.ts`, or lifecycle scripts that call `vp config`.
64
+
19
65
  ### `vp config`
20
66
 
21
67
  `vp config` configures Vite+ for the current project. It installs the generated Git hook
22
- dispatcher and can also handle related project integration such as agent setup. By default,
23
- project hooks are read from `.vite-hooks`:
68
+ dispatcher (unless hooks were disabled with `vp hooks disable`) and can also handle related
69
+ project integration such as agent setup. The hooks directory defaults to `.vite-hooks`, or the
70
+ last directory used by `vp hooks` / `vp config` in this clone:
24
71
 
25
72
  ```bash
26
73
  vp config
@@ -31,14 +78,17 @@ vp config --no-agent
31
78
 
32
79
  Use `--no-hooks` when you want `vp config` to leave the Git hook dispatcher unchanged. Use
33
80
  `--no-agent` when you want it to skip updates to existing coding agent instruction files. You can
34
- pass both flags when you want `vp config` to skip both setup steps.
81
+ pass both flags when you want `vp config` to skip both setup steps. After `vp hooks disable`,
82
+ `vp config` skips reinstalling the dispatcher and points you at `vp hooks enable` instead of
83
+ prompting again.
35
84
 
36
85
  You can also set `VP_GIT_HOOKS=0` to disable hook installation from lifecycle scripts such as
37
86
  `prepare` or `postinstall`.
38
87
 
39
88
  Project-owned hook scripts such as `.vite-hooks/pre-commit` should be committed to the repository.
40
- The generated dispatcher and shims under `.vite-hooks/_` are ignored and recreated by `vp config`.
41
- `vp config` does not create or modify project hook scripts or staged-file configuration.
89
+ The generated dispatcher and shims under `.vite-hooks/_` are ignored and recreated by `vp config`
90
+ or `vp hooks enable`. Neither command creates or modifies project hook scripts or staged-file
91
+ configuration.
42
92
 
43
93
  ### `vp staged`
44
94
 
@@ -88,7 +138,7 @@ Set `VP_GIT_HOOKS=0` in the environment of the process that runs `git commit`, a
88
138
  VP_GIT_HOOKS=0 git commit -m "content update"
89
139
  ```
90
140
 
91
- `HUSKY=0` is honored the same way for ecosystem tooling compatibility. Setting `VP_GIT_HOOKS=0` in an environment also keeps `vp config` from reinstalling hooks there when a lifecycle script such as `prepare` runs.
141
+ `HUSKY=0` is honored the same way for ecosystem tooling compatibility. Setting `VP_GIT_HOOKS=0` in an environment also keeps `vp config` / `vp hooks enable` from reinstalling hooks there when a lifecycle script such as `prepare` runs.
92
142
 
93
143
  ### Init script
94
144
 
@@ -107,21 +157,44 @@ Because the hook itself reads this file, it works even when the committing proce
107
157
 
108
158
  ## Removing commit hooks
109
159
 
110
- To stop using the Vite+ hook dispatcher:
160
+ To stop using the Vite+ hook dispatcher in this clone (and keep `prepare` / `vp config` from
161
+ reinstalling it):
111
162
 
112
- 1. Remove `vp config` from the `prepare` or `postinstall` script in `package.json`.
163
+ ```bash
164
+ vp hooks disable
165
+ # or, if you used a custom directory:
166
+ vp hooks disable --hooks-dir .custom-hooks
167
+ ```
113
168
 
114
- 2. Unset the Git hooks path that points at the Vite+ dispatcher:
169
+ This:
170
+
171
+ 1. Unsets `core.hooksPath` when it points at the Vite+ dispatcher
172
+ 2. Removes the generated `<hooks-dir>/_` directory
173
+ 3. Records a **local** disable preference so lifecycle scripts skip reinstall until you run
174
+ `vp hooks enable` again
175
+
176
+ To re-enable:
115
177
 
116
178
  ```bash
117
- git config --unset core.hooksPath
179
+ vp hooks enable
118
180
  ```
119
181
 
120
- 3. Remove the generated dispatcher directory (use your `--hooks-dir` value if you changed it):
182
+ If you no longer want hooks for the project at all (shared with teammates), also remove `vp config`
183
+ from the `prepare` or `postinstall` script in `package.json`.
184
+
185
+ ### Manual equivalent
186
+
187
+ If you prefer to do it by hand:
121
188
 
122
189
  ```bash
190
+ git config --unset core.hooksPath
123
191
  rm -rf .vite-hooks/_
192
+ # optional: prevent prepare/vp config from reinstalling in this clone
193
+ git config --local vp.hooks.disabled true
194
+ # optional: remembered hooks directory (set by enable/disable)
195
+ # git config --local vp.hooks.dir .vite-hooks
124
196
  ```
125
197
 
126
198
  Project-owned scripts such as `.vite-hooks/pre-commit` and the `staged` block in `vite.config.ts`
127
199
  can remain for later use, or you can remove them separately if the project no longer needs them.
200
+ `vp hooks disable` does **not** delete those project-owned files.
@@ -49,23 +49,26 @@ Run `vp create --list` to see the built-in templates and the common shorthand te
49
49
  - `--no-editor` skips editor config setup
50
50
  - `--git` initialize a git repository
51
51
  - `--no-git` skips git repository initialization
52
- - `--hooks` enables pre-commit hook setup
53
- - `--no-hooks` skips hook setup
54
52
  - `--package-manager <name>` uses a specified package manager (`pnpm`, `npm`, `yarn`, or `bun`)
55
53
  - `--approve-builds` approves and runs gated dependency build scripts without prompting
56
54
  - `--no-interactive` runs without prompts
57
55
  - `--verbose` shows detailed scaffolding output
58
56
  - `--list` prints the available built-in and popular templates
57
+ - `--hooks` enables pre-commit hook setup (dispatcher + `.vite-hooks` + `staged` config)
58
+ - `--no-hooks` skips hook setup
59
+
60
+ After create, manage the dispatcher with `vp hooks status`, `vp hooks disable`, and `vp hooks enable`.
61
+ See the [Commit hooks guide](/guide/commit-hooks).
59
62
 
60
63
  ### Dependency build scripts
61
64
 
62
- For security, pnpm, bun, and yarn (Berry) do not run a dependency's build scripts (`install` / `postinstall`, e.g. native builds like `better-sqlite3`) until you approve them. When a template adds such a dependency directly, `vp create` surfaces it after installing instead of leaving the project in a half-built state:
65
+ For security, pnpm, bun, yarn (Berry), and npm (v12+) do not run a dependency's build scripts (`install` / `postinstall`, e.g. native builds like `better-sqlite3`) until you approve them. When a template adds such a dependency directly, `vp create` surfaces it after installing instead of leaving the project in a half-built state:
63
66
 
64
67
  - Interactive: you are asked which of those dependencies to approve and build (nothing is selected by default).
65
68
  - Non-interactive: a note lists them and points at `vp pm approve-builds`.
66
69
  - `--approve-builds`: approves and builds them automatically, so non-interactive runs (CI) can produce a ready-to-use project.
67
70
 
68
- Approval is recorded the way each package manager expects: pnpm's `allowBuilds`, bun's `trustedDependencies`, or yarn's `dependenciesMeta.<pkg>.built` (in the workspace root manifest). Transitive build scripts you did not choose (e.g. `esbuild` pulled in by Vite) are left at the package manager's defaults and are not surfaced. npm runs build scripts by default, so there is nothing to approve there.
71
+ Approval is recorded the way each package manager expects: pnpm's `allowBuilds`, bun's `trustedDependencies`, npm's `allowScripts`, or yarn's `dependenciesMeta.<pkg>.built` (in the workspace root manifest). Transitive build scripts you did not choose (e.g. `esbuild` pulled in by Vite) are left at the package manager's defaults and are not surfaced. npm 11 and older run build scripts during install, so there is nothing to approve there.
69
72
 
70
73
  ## Template Options
71
74
 
package/docs/guide/fmt.md CHANGED
@@ -20,11 +20,11 @@ vp fmt . --write
20
20
 
21
21
  Put formatting configuration directly in the `fmt` block in `vite.config.ts` so all your configuration stays in one place. We do not recommend using `.oxfmtrc.json` with Vite+.
22
22
 
23
- For editors, point the formatter config path at `./vite.config.ts` so format-on-save uses the same `fmt` block:
23
+ For editors, disable nested formatter configs so format-on-save uses the root Vite+ `fmt` block:
24
24
 
25
25
  ```json [.vscode/settings.json]
26
26
  {
27
- "oxc.fmt.configPath": "./vite.config.ts"
27
+ "oxc.fmt.disableNestedConfig": true
28
28
  }
29
29
  ```
30
30
 
@@ -63,6 +63,10 @@ vp run lint # should print "cache hit"
63
63
 
64
64
  Restore `node_modules/.vite/task-cache` after `vp install`, because package installation can recreate or modify `node_modules`.
65
65
 
66
+ Set `<setup-vp-version>` below 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.
67
+
68
+ See [Automatic Version Updates](/guide/ci#automatic-version-updates) to configure Dependabot or Renovate.
69
+
66
70
  ```yaml [.github/workflows/ci.yml]
67
71
  name: CI
68
72
 
@@ -80,7 +84,7 @@ jobs:
80
84
  steps:
81
85
  - uses: actions/checkout@v4
82
86
 
83
- - uses: voidzero-dev/setup-vp@v1
87
+ - uses: voidzero-dev/setup-vp@<setup-vp-version>
84
88
  with:
85
89
  node-version: '24'
86
90
  cache: true
@@ -26,7 +26,8 @@ You can also manually set up the VS Code config:
26
26
  "[javascriptreact]": { "editor.defaultFormatter": "oxc.oxc-vscode" },
27
27
  "[typescript]": { "editor.defaultFormatter": "oxc.oxc-vscode" },
28
28
  "[typescriptreact]": { "editor.defaultFormatter": "oxc.oxc-vscode" },
29
- "oxc.fmt.configPath": "./vite.config.ts",
29
+ "oxc.disableNestedConfig": true,
30
+ "oxc.fmt.disableNestedConfig": true,
30
31
  "editor.formatOnSave": true,
31
32
  "editor.formatOnSaveMode": "file",
32
33
  "editor.codeActionsOnSave": {
@@ -35,7 +36,7 @@ You can also manually set up the VS Code config:
35
36
  }
36
37
  ```
37
38
 
38
- This gives the project a shared default formatter and enables Oxc-powered fix actions on save. The language-specific override blocks (`[javascript]`, `[typescript]`, etc.) are required because VS Code prioritizes user-level `[language]` settings over the workspace-level `editor.defaultFormatter` — without them, a global Prettier configuration would silently take over. Setting `oxc.fmt.configPath` to `./vite.config.ts` keeps editor format-on-save aligned with the `fmt` block in your Vite+ config. Vite+ uses `formatOnSaveMode: "file"` because Oxfmt does not support partial formatting.
39
+ This gives the project a shared default formatter and enables Oxc-powered fix actions on save. The language-specific override blocks (`[javascript]`, `[typescript]`, etc.) are required because VS Code prioritizes user-level `[language]` settings over the workspace-level `editor.defaultFormatter` — without them, a global Prettier configuration would silently take over. Setting `oxc.disableNestedConfig` and `oxc.fmt.disableNestedConfig` prevents nested Oxlint and Oxfmt configs from diverging from the root Vite+ config. Vite+ uses `formatOnSaveMode: "file"` because Oxfmt does not support partial formatting.
39
40
 
40
41
  To let the VS Code NPM Scripts panel run scripts through `vp`, add the following to your `.vscode/settings.json`:
41
42
 
@@ -99,3 +100,61 @@ You can also manually set up the Zed config:
99
100
  ```
100
101
 
101
102
  Setting `oxfmt.fmt.configPath` to `./vite.config.ts` keeps editor format-on-save aligned with the `fmt` block in your Vite+ config. The full generated config covers additional languages (CSS, HTML, JSON, Markdown, etc.) — run `vp create` or `vp migrate` to get the complete file written automatically.
103
+
104
+ ## JetBrains (IntelliJ, WebStorm, etc...)
105
+
106
+ For the best Vite+ experience with JetBrains IDEs such as IntelliJ & WebStorm, install the [Oxc](https://plugins.jetbrains.com/plugin/27061-oxc) plugin from the JetBrains marketplace.
107
+
108
+ When you create or migrate a project, Vite+ prompts you to choose whether you want the editor config written for JetBrains IDEs.
109
+
110
+ ::: tip Vite+ does not merge with existing config files
111
+ Due to some complexities with merging XML files, Vite+ currently does not merge your current files if the files already exist.
112
+ You'll be given the opportunity to replace any existing files, instead of merging.
113
+ :::
114
+
115
+ You can also manually set up the IDE configuration to match your Vite+ setup:
116
+
117
+ ```xml [.idea/externalDependencies.xml]
118
+ <?xml version="1.0" encoding="UTF-8"?>
119
+ <project version="4">
120
+ <component name="ExternalDependencies">
121
+ <plugin id="com.github.oxc.project.oxcintellijplugin" />
122
+ </component>
123
+ </project>
124
+ ```
125
+
126
+ ```xml [.idea/workspace.xml]
127
+ <?xml version="1.0" encoding="UTF-8"?>
128
+ <project version="4">
129
+ <!-- other settings... -->
130
+ <component name="PropertiesComponent">
131
+ <![CDATA[{
132
+ "keyToString": {
133
+ // other settings
134
+ "javascript.nodejs.core.library.configured.version": "24.18.0", // Replace with your selected Node.js version
135
+ "javascript.nodejs.core.library.typings.version": "24.13.3", // Replace with the version of @types/node that corresponds to your runtime (or omit if you don't want it)
136
+ "javascript.preferred.runtime.type.id": "node",
137
+ "nodejs_interpreter_path": "$USER_HOME$/.vite-plus/bin/node",
138
+ "nodejs_package_manager_path": "pnpm" // Replace with your package manager of choice
139
+ }
140
+ }]]>
141
+ </component>
142
+ </project>
143
+ ```
144
+
145
+ ```xml [.idea/OxfmtSettings.xml]
146
+ <?xml version="1.0" encoding="UTF-8"?>
147
+ <project version="4">
148
+ <component name="OxfmtSettings">
149
+ <option name="preferOxfmtCodeStyleSettings" value="true" />
150
+ </component>
151
+ </project>
152
+ ```
153
+
154
+ Often, `.idea` folders are gitignored in a project, even the `externalDependencies.xml` file, which is used to tell your IDE what plugins should be used for the workspace.
155
+
156
+ Please make sure to add this line to your main `.gitignore` file, to ensure that the file will be included:
157
+
158
+ ```gitignore [.gitignore]
159
+ !.idea/externalDependencies.xml
160
+ ```
@@ -4,7 +4,7 @@ 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:
7
+ Building with an AI assistant? View and copy a ready-made setup prompt:
8
8
 
9
9
  <CopyPrompt />
10
10
 
@@ -93,6 +93,7 @@ Vite+ can handle the entire local frontend development cycle from starting a pro
93
93
  - [`vp create`](/guide/create) creates new apps, packages, and monorepos.
94
94
  - [`vp migrate`](/guide/migrate) moves existing projects onto Vite+.
95
95
  - [`vp config`](/guide/commit-hooks) installs the Git hook dispatcher and configures agent integration.
96
+ - [`vp hooks`](/guide/commit-hooks) manages the Git hook dispatcher (`enable`, `disable`, `status`).
96
97
  - [`vp staged`](/guide/commit-hooks) runs checks on staged files.
97
98
  - [`vp install`](/guide/install) installs dependencies with the right package manager.
98
99
  - [`vp env`](/guide/env) manages Node.js versions.
@@ -126,6 +127,7 @@ Vite+ can handle the entire local frontend development cycle from starting a pro
126
127
 
127
128
  ### Maintain
128
129
 
130
+ - [`vp toolchain`](/guide/upgrade#show-the-toolchain) shows the versions and relationships in the active Vite+ toolchain.
129
131
  - [`vp upgrade`](/guide/upgrade) updates the `vp` installation itself.
130
132
  - [`vp implode`](/guide/implode) removes `vp` and related Vite+ data from your machine.
131
133