vite-plus 0.3.2 → 1.0.0-rc.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 (149) hide show
  1. package/LICENSE +35 -146
  2. package/README.md +3 -3
  3. package/binding/index.cjs +140 -55
  4. package/binding/index.d.cts +49 -0
  5. package/dist/{agent-C59HKB4Y.js → agent-Dinpyd-k.js} +6 -5
  6. package/dist/bin.js +48 -18
  7. package/dist/config/bin.js +2 -2
  8. package/dist/constants-CiKwrA0v.js +356 -0
  9. package/dist/create/bin.js +96 -71
  10. package/dist/{define-config-DPNEJxPz.d.ts → define-config-B9usMnEa.d.ts} +51 -10
  11. package/dist/{define-config-DpAPETDf.cjs → define-config-CBccpane.cjs} +173 -44
  12. package/dist/{define-config-DAaCa0U_.js → define-config-jhuYJ7Tb.js} +158 -42
  13. package/dist/define-config.cjs +1 -1
  14. package/dist/define-config.d.ts +1 -1
  15. package/dist/define-config.js +1 -1
  16. package/dist/documentation-DqcZSthV.js +11 -0
  17. package/dist/{editor-QOIGtmH4.js → editor-DMBczTdj.js} +216 -152
  18. package/dist/index.cjs +1 -1
  19. package/dist/index.d.ts +1 -1
  20. package/dist/index.js +1 -1
  21. package/dist/{json-cULBl7Pi.js → json-JP24qHUF.js} +14 -6
  22. package/dist/lint-plugins.cjs +1 -1
  23. package/dist/migration/bin.js +3122 -15
  24. package/dist/{oxlint-plugin-config-BU42tr8y.js → oxlint-plugin-config-BgsDA6ua.js} +1 -1
  25. package/dist/oxlint-plugin.js +9 -7
  26. package/dist/pack-bin.js +1 -1
  27. package/dist/{package-BB-Jh_z3.js → package-B85H2Nw0.js} +6 -2
  28. package/dist/{vitest-ecosystem-BiRqcaRI.js → package-overrides-Dpn4scvN.js} +1 -7
  29. package/dist/{prompts-CujFOJXu.js → prompts-CQobX7uP.js} +2 -2
  30. package/dist/{resolve-vite-config-CHHjsjKJ.js → resolve-vite-config-BUFUmi8h.js} +2 -2
  31. package/dist/{resolve-vite-config-6Nox70uP.js → resolve-vite-config-I8fmpR7I.js} +1 -1
  32. package/dist/staged/bin.js +1205 -3317
  33. package/dist/sync-versions/bin.js +3 -2
  34. package/dist/sync-versions/bin.mjs +17 -2
  35. package/dist/test/browser/context.js +1 -1
  36. package/dist/test/browser/providers/playwright/context.js +1 -1
  37. package/dist/test/browser/providers/preview/context.js +1 -1
  38. package/dist/test/browser-playwright/context.js +1 -1
  39. package/dist/test/browser-preview/context.js +1 -1
  40. package/dist/test/context.d.ts +2 -942
  41. package/dist/test/context.js +1 -1
  42. package/dist/test/internal/traces.js +1 -0
  43. package/dist/test/locators.d.ts +2 -294
  44. package/dist/test/matchers.d.ts +2 -29
  45. package/dist/test/mocker.d.ts +2 -0
  46. package/dist/test/mocker.js +1 -0
  47. package/dist/test/{browser-webdriverio/context.js → plugins/browser-context.d.ts} +1 -0
  48. package/dist/test/plugins/browser-context.js +1 -1
  49. package/dist/test/plugins/browser-locators.d.ts +2 -0
  50. package/dist/test/plugins/browser-playwright.d.ts +2 -0
  51. package/dist/test/plugins/browser-preview.d.ts +2 -0
  52. package/dist/test/plugins/browser.d.ts +2 -0
  53. package/dist/test/plugins/mocker-automock.d.ts +2 -0
  54. package/dist/test/plugins/mocker-browser.d.ts +2 -0
  55. package/dist/test/plugins/mocker-node.d.ts +2 -0
  56. package/dist/test/plugins/mocker-redirect.d.ts +2 -0
  57. package/dist/test/plugins/mocker-register.d.ts +2 -0
  58. package/dist/test/plugins/mocker-transforms.d.ts +2 -0
  59. package/dist/test/plugins/mocker.d.ts +2 -0
  60. package/dist/test/plugins/pretty-format.d.ts +2 -0
  61. package/dist/test/plugins/snapshot-environment.d.ts +2 -0
  62. package/dist/test/plugins/snapshot-manager.d.ts +2 -0
  63. package/dist/test/plugins/snapshot.d.ts +2 -0
  64. package/dist/test/plugins/spy.d.ts +2 -0
  65. package/dist/test/plugins/utils-constants.d.ts +2 -0
  66. package/dist/test/plugins/utils-diff.d.ts +2 -0
  67. package/dist/test/plugins/utils-display.d.ts +2 -0
  68. package/dist/test/plugins/utils-error.d.ts +2 -0
  69. package/dist/test/plugins/utils-helpers.d.ts +2 -0
  70. package/dist/test/plugins/utils-offset.d.ts +2 -0
  71. package/dist/test/plugins/utils-resolver.d.ts +2 -0
  72. package/dist/test/plugins/utils-serialize.d.ts +2 -0
  73. package/dist/test/plugins/utils-source-map-node.d.ts +2 -0
  74. package/dist/test/plugins/utils-source-map.d.ts +2 -0
  75. package/dist/test/plugins/utils-timers.d.ts +2 -0
  76. package/dist/test/plugins/utils.d.ts +2 -0
  77. package/dist/toolchain.js +10 -10
  78. package/dist/toolchain.json +10 -10
  79. package/dist/{tsconfig-DCtWfQPA.js → tsconfig-Buo0RSzz.js} +8 -4
  80. package/dist/{tsconfig-MXktI3SX.js → tsconfig-C1VeTG9k.js} +1 -1
  81. package/dist/version.js +5 -3
  82. package/dist/versions.js +5 -5
  83. package/dist/vitest-ecosystem-BU0AqZq-.js +23 -0
  84. package/dist/vitest-v5-entry-points-DthU1e_O.js +25 -0
  85. package/docs/config/fmt.md +2 -2
  86. package/docs/config/lint.md +2 -2
  87. package/docs/config/run.md +1 -1
  88. package/docs/config/staged.md +1 -2
  89. package/docs/guide/check.md +2 -0
  90. package/docs/guide/ci.md +28 -31
  91. package/docs/guide/commit-hooks.md +18 -34
  92. package/docs/guide/create.md +1 -2
  93. package/docs/guide/docker.md +20 -68
  94. package/docs/guide/env.md +47 -32
  95. package/docs/guide/fmt.md +4 -2
  96. package/docs/guide/global-cli.md +426 -0
  97. package/docs/guide/ide-integration.md +1 -2
  98. package/docs/guide/implode.md +14 -1
  99. package/docs/guide/index.md +38 -35
  100. package/docs/guide/install.md +18 -20
  101. package/docs/guide/lint.md +6 -10
  102. package/docs/guide/local-cli.md +123 -0
  103. package/docs/guide/migrate-rules.md +104 -297
  104. package/docs/guide/migrate.md +82 -59
  105. package/docs/guide/monorepo.md +5 -1
  106. package/docs/guide/run.md +1 -1
  107. package/docs/guide/test.md +2 -0
  108. package/docs/guide/troubleshooting.md +6 -11
  109. package/docs/guide/upgrade-project.md +61 -0
  110. package/docs/guide/upgrade.md +17 -62
  111. package/docs/guide/vitest-v5.md +221 -0
  112. package/package.json +67 -90
  113. package/bin/oxfmt +0 -33
  114. package/bin/oxlint +0 -38
  115. package/dist/cli-truncate-Bg3RDXpi.js +0 -865
  116. package/dist/constants-IhOditRA.js +0 -80
  117. package/dist/is-fullwidth-code-point-BUNlIICg.js +0 -8
  118. package/dist/log-update-CoW8Z4Dl.js +0 -491
  119. package/dist/strip-ansi-C3wrWz9t.js +0 -853
  120. package/dist/test/browser/providers/webdriverio/context.d.ts +0 -1
  121. package/dist/test/browser/providers/webdriverio/context.js +0 -1
  122. package/dist/test/browser/providers/webdriverio.d.ts +0 -77
  123. package/dist/test/browser/providers/webdriverio.js +0 -1
  124. package/dist/test/browser-webdriverio/context.d.ts +0 -1
  125. package/dist/test/browser-webdriverio.d.ts +0 -77
  126. package/dist/test/browser-webdriverio.js +0 -1
  127. package/dist/test/coverage.d.ts +0 -2
  128. package/dist/test/coverage.js +0 -1
  129. package/dist/test/environments.d.ts +0 -2
  130. package/dist/test/environments.js +0 -1
  131. package/dist/test/plugins/browser-webdriverio.js +0 -1
  132. package/dist/test/plugins/expect.js +0 -1
  133. package/dist/test/plugins/runner-types.js +0 -1
  134. package/dist/test/plugins/runner-utils.js +0 -1
  135. package/dist/test/plugins/runner.js +0 -1
  136. package/dist/test/reporters.d.ts +0 -2
  137. package/dist/test/reporters.js +0 -1
  138. package/dist/test/runners.d.ts +0 -2
  139. package/dist/test/runners.js +0 -1
  140. package/dist/test/snapshot.d.ts +0 -2
  141. package/dist/test/snapshot.js +0 -1
  142. package/dist/test/suite.d.ts +0 -2
  143. package/dist/test/suite.js +0 -1
  144. package/dist/tsgolint-path-CbDReEOx.js +0 -34
  145. package/dist/tsgolint-path.d.ts +0 -7
  146. package/dist/tsgolint-path.js +0 -2
  147. package/dist/wrap-ansi-DNjkuBEp.js +0 -157
  148. package/dist/wrap-ansi-DUi52C6W.js +0 -2
  149. package/docs/guide/installer-env-vars.md +0 -286
@@ -1,286 +0,0 @@
1
- # Installer Environment Variables
2
-
3
- The Vite+ installers (`vp-setup.exe`, `install.ps1`, and `install.sh`) and the installed `vp` CLI read the environment variables on this page.
4
-
5
- ## Installation Variables
6
-
7
- These variables control the installer scripts and the standalone Windows installer (`vp-setup.exe`).
8
-
9
- ### `VP_VERSION`
10
-
11
- - **Purpose**: Version to install
12
- - **Default**: `latest`
13
- - **CLI equivalent**: `--version`
14
- - **Note**: Vite+ 0.2.x and earlier do not support the split directory layout.
15
- The installer always puts these releases in the monolithic root (`VP_HOME` or
16
- `~/.vite-plus`). This rule also applies to a fresh machine. The installer
17
- checks the downloaded binary and prints a notice.
18
- - **Example**:
19
-
20
- ```bash
21
- # Unix
22
- curl -fsSL https://vite.plus | VP_VERSION=1.2.3 bash
23
- ```
24
-
25
- ```powershell
26
- # PowerShell
27
- $env:VP_VERSION = "1.2.3"; irm https://vite.plus/ps1 | iex
28
- ```
29
-
30
- ### `VP_HOME`
31
-
32
- - **Purpose**: Optional pin for the single-root layout. Set it to an absolute
33
- path. Vite+ then puts bin, data, cache, config, and state under that directory.
34
- The installed CLI reads the same variable. See [Environment](/guide/env).
35
- - **Default**: unset. Vite+ reuses an existing install in `~/.vite-plus` on
36
- Unix or `%USERPROFILE%\.vite-plus` on Windows. The directory must contain a
37
- `current` link. Otherwise, a fresh install uses the split platform layout. On
38
- Unix, it uses `~/.local/share/vite-plus` and its Vite+-owned `bin`
39
- subdirectory. On Windows, it uses `%LOCALAPPDATA%\vite-plus\data` and
40
- `%LOCALAPPDATA%\vite-plus\bin`.
41
- - **Example**:
42
-
43
- ```bash
44
- # Unix
45
- curl -fsSL https://vite.plus | VP_HOME=/opt/vite-plus bash
46
- ```
47
-
48
- ```powershell
49
- # PowerShell
50
- $env:VP_HOME = "D:\vite-plus"; irm https://vite.plus/ps1 | iex
51
- ```
52
-
53
- ### `VP_BIN_DIR` / `VP_DATA_DIR` / `VP_CACHE_DIR`
54
-
55
- - **Purpose**: Internal absolute directory overrides for integrations that
56
- must pin a split install. Set all three variables together. The installer
57
- rejects an incomplete group. Vite+ ignores the group when `VP_HOME` is set
58
- or when it reuses an existing `~/.vite-plus` install.
59
- - **Default**: unset (XDG / platform defaults)
60
- - **Persistence**: The generated environment file does not export these
61
- variables. An integration that uses them must provide the complete group to
62
- each Vite+ process.
63
- - **Example**:
64
-
65
- ```bash
66
- export VP_DATA_DIR=$HOME/vite-plus-data
67
- export VP_BIN_DIR=$VP_DATA_DIR/bin
68
- export VP_CACHE_DIR=$HOME/.cache/vite-plus
69
- curl -fsSL https://vite.plus | bash
70
- ```
71
-
72
- ### `NPM_CONFIG_REGISTRY`
73
-
74
- - **Purpose**: Custom npm registry URL
75
- - **Default**: `https://registry.npmjs.org`
76
- - **CLI equivalent**: `--registry`
77
- - **Example**:
78
- ```bash
79
- curl -fsSL https://vite.plus | NPM_CONFIG_REGISTRY=https://registry.npmmirror.com bash
80
- ```
81
-
82
- ### `VP_NODE_MANAGER`
83
-
84
- - **Purpose**: Control Node.js version manager setup during installation.
85
- - **Values**: `yes` or `no`
86
- - **Default**: Auto-detected
87
- - **CLI equivalent**: `--no-node-manager` (inverted)
88
- - **Example**:
89
- ```bash
90
- # Skip Node.js manager setup in CI
91
- curl -fsSL https://vite.plus | VP_NODE_MANAGER=no bash
92
- ```
93
-
94
- ### `VP_PM_MANAGER`
95
-
96
- - **Purpose**: Set the management preference for all four package-manager
97
- families: npm, pnpm, Yarn, and Bun.
98
- - **Values**: `yes` uses Vite+ management; `no` prefers system tools, with
99
- managed tools as a fallback when a system tool is unavailable.
100
- - **Default**: Unset. The installer's combined Node.js and package-manager
101
- choice remains the default. With the script installers, setting only
102
- `VP_NODE_MANAGER` preserves existing package-manager preferences.
103
-
104
- ### `VP_NPM_MANAGER` / `VP_PNPM_MANAGER` / `VP_YARN_MANAGER` / `VP_BUN_MANAGER`
105
-
106
- - **Purpose**: Set the management preference for an individual package-manager
107
- family. Each variable overrides `VP_PM_MANAGER` for that family.
108
- - **Values**: `yes` or `no`, with the same meaning as `VP_PM_MANAGER`.
109
- - **Default**: Unset (use `VP_PM_MANAGER`, then the combined installer choice,
110
- or preserve the existing preference).
111
- - **Example**:
112
-
113
- ```bash
114
- # Keep system Node.js and package managers, but let Vite+ manage pnpm.
115
- curl -fsSL https://vite.plus | VP_NODE_MANAGER=no VP_PM_MANAGER=no VP_PNPM_MANAGER=yes bash
116
- ```
117
-
118
- These management variables are installation choices, saved in Vite+'s config.
119
- The interactive prompt still controls both Node.js and package managers;
120
- explicit package-manager variables override that combined choice. The standalone
121
- `vp-setup` installer uses its existing combined option as the default for both
122
- variables, in interactive and silent installations alike.
123
- In-place upgrades preserve the saved choices. Unrecognized values are ignored.
124
- They select management behavior, not package-manager versions, and do not
125
- prevent the installer from creating shims. Older releases installed through
126
- the legacy installer retain their original behavior.
127
-
128
- ### `VP_PR_VERSION`
129
-
130
- - **Purpose**: Install a preview build from a pull request or commit SHA
131
- - **Values**: PR number or commit SHA
132
- - **Default**: None
133
- - **Details**: [Global `vp` Preview](/guide/upgrade#global-vp-preview)
134
-
135
- ### Development variables
136
-
137
- Use `VP_LOCAL_TGZ` and `VP_LOCAL_BINARY` when you develop Vite+ itself.
138
- `VP_LOCAL_TGZ` specifies a local `vite-plus.tgz` file. `VP_LOCAL_BINARY`
139
- specifies a local `vp` binary. The installers use these files for the local
140
- build. They use `VP_DUMP_DIRS=1` to get the layout mode and all five `EnvConfig`
141
- category roots from the selected binary. They do not resolve the directory
142
- variables. The installers set `VP_INSTALL_STOP`; do not set it manually.
143
-
144
- ## Runtime Variables
145
-
146
- These variables configure the installed Vite+ CLI. `VP_HOME` (above) also applies at runtime.
147
-
148
- ### `VP_NODE_DIST_MIRROR`
149
-
150
- - **Purpose**: Node.js distribution mirror URL
151
- - **Default**: `https://nodejs.org/dist`
152
- - **Details**: [Custom Node.js Mirror](/guide/env#custom-node-js-mirror)
153
-
154
- ### `VP_NODE_VERSION`
155
-
156
- - **Purpose**: Override Node.js version
157
- - **Default**: None (auto-detected)
158
- - **Example**:
159
- ```bash
160
- # Run a command with a specific Node.js version
161
- VP_NODE_VERSION=22 vp env exec node -v
162
- ```
163
-
164
- ### `VP_PACKAGE_MANAGER`
165
-
166
- - **Purpose**: Override the selected package manager and version
167
- - **Default**: None (resolved from the project or global default)
168
- - **Format**: `npm|pnpm|yarn|bun@<version>`
169
- - **Example**:
170
- ```bash
171
- VP_PACKAGE_MANAGER=pnpm@10.18.0 vp install
172
- ```
173
-
174
- ### `VP_NODE_SKIP_SIGNATURE_VERIFY`
175
-
176
- - **Purpose**: Skip PGP signature verification of Node.js downloads
177
- - **Values**: Any non-empty value
178
- - **Default**: None (verification enabled)
179
- - **Details**: [Node.js Signature Verification](/guide/env#node-js-signature-verification)
180
-
181
- ### `VP_DOWNLOAD_TIMEOUT`
182
-
183
- - **Purpose**: Per-request timeout, in seconds, for large downloads such as Node.js runtimes and package-manager tarballs
184
- - **Values**: Positive integer, at most `86400` (24 hours); invalid values are ignored with a warning
185
- - **Default**: `600` (10 minutes)
186
- - **Example**:
187
- ```bash
188
- # Allow up to 30 minutes per download on a slow connection
189
- VP_DOWNLOAD_TIMEOUT=1800 vp env install 22
190
- ```
191
-
192
- ### `VP_SHELL`
193
-
194
- - **Purpose**: Specify the current shell
195
- - **Default**: Auto-detected
196
- - **Example**:
197
- ```bash
198
- VP_SHELL=bash vp env print
199
- ```
200
-
201
- ### `VP_BYPASS`
202
-
203
- - **Purpose**: Bypass the Vite+ shim and use the system tool
204
- - **Values**: `PATH`-style list of directories to bypass
205
- - **Default**: None
206
- - **Example**:
207
- ```bash
208
- VP_BYPASS=/usr/local/bin node -v
209
- ```
210
-
211
- ### Internal variables
212
-
213
- Vite+ sets additional `VP_*` variables during shim dispatch and shell integration (recursion guards, active-version records, wrapper flags); do not set them manually.
214
-
215
- ## TLS/CA Configuration
216
-
217
- ### `SSL_CERT_FILE` / `NODE_EXTRA_CA_CERTS`
218
-
219
- - **Purpose**: Path to PEM bundle of extra CA certificates (`NODE_EXTRA_CA_CERTS` is the Node.js convention)
220
- - **Default**: System trust store
221
- - **Example**:
222
- ```bash
223
- export SSL_CERT_FILE=/path/to/custom-ca.pem
224
- ```
225
-
226
- ### `VP_INSECURE_TLS`
227
-
228
- - **Purpose**: Disable HTTPS certificate verification
229
- - **Values**: Any non-empty value (`1`, `true`, `yes`)
230
- - **Default**: None (verification enabled)
231
- - **Warning**: Diagnostic escape hatch only; do not use in production
232
- - **Example**:
233
- ```bash
234
- VP_INSECURE_TLS=1 vp env install 22
235
- ```
236
-
237
- ## Logging and Debugging
238
-
239
- ### `VP_LOG`
240
-
241
- - **Purpose**: Log filter string for `tracing_subscriber`
242
- - **Installer behavior**: When `CI=true`, `install.sh` hides shell file errors.
243
- Set `VP_LOG=trace` to show these errors.
244
- - **Default**: None
245
- - **Example**:
246
- ```bash
247
- VP_LOG=debug vp dev
248
- VP_LOG=vt=trace vp build
249
- ```
250
-
251
- ### `VP_DEBUG_SHIM`
252
-
253
- - **Purpose**: Enable debug output for shim dispatch
254
- - **Values**: Any non-empty value
255
- - **Default**: None
256
- - **Example**:
257
- ```bash
258
- VP_DEBUG_SHIM=1 node -v
259
- ```
260
-
261
- ## Standard Environment Variables
262
-
263
- Vite+ also respects these standard environment variables:
264
-
265
- ### `CI`
266
-
267
- - **Purpose**: Indicates running in CI environment
268
- - **Effect**: Enables silent mode (`--yes`) for installers
269
-
270
- ### `NO_COLOR`
271
-
272
- - **Purpose**: Disable colored output
273
- - **Effect**: Disables ANSI color codes
274
-
275
- ### `HOME` / `USERPROFILE`
276
-
277
- - **Purpose**: User home directory
278
- - **Effect**: Base for the existing-install probe (`~/.vite-plus`) and for split platform defaults
279
-
280
- ## Precedence
281
-
282
- 1. CLI flags (highest priority)
283
- 2. Environment variables
284
- 3. Default values (lowest priority)
285
-
286
- For example, `VP_VERSION=1.0.0 vp-setup.exe --version 2.0.0` installs version 2.0.0.