vite-plus 0.2.9 → 0.3.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.
- package/README.md +4 -3
- package/binding/index.cjs +57 -54
- package/binding/index.d.cts +93 -0
- package/dist/{agent-DQU8uS6P.js → agent-Wqx0MPk0.js} +1 -1
- package/dist/bin.js +16 -6
- package/dist/command-CLJK5jGW.js +2 -0
- package/dist/command-CguLh2KL.js +471 -0
- package/dist/config/bin.js +7 -5
- package/dist/{constants-CG513DRa.js → constants-Bn-U8o4v.js} +5 -3
- package/dist/create/bin.js +28 -52
- package/dist/{define-config-CV4bQG_8.js → define-config-GXUdVT-0.js} +2 -2
- package/dist/{define-config-DyNLA_f0.cjs → define-config-WiVlryJ2.cjs} +2 -2
- package/dist/define-config.cjs +1 -1
- package/dist/define-config.js +1 -1
- package/dist/{editor-g4PosU99.js → editor-CC4DqODz.js} +562 -59
- package/dist/{terminal-Bz-ps6rJ.js → help-BmKpeOP9.js} +1 -38
- package/dist/hooks/bin.js +3 -2
- package/dist/{hooks-pNCBWtFT.js → hooks-DFqViZqZ.js} +5 -2
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/migration/bin.js +60 -11
- package/dist/migration/compat/worker.js +1 -1
- package/dist/{oxlint-plugin-config-BEZ9IUf7.js → oxlint-plugin-config-DX5ezKbB.js} +1 -1
- package/dist/oxlint-plugin.js +1 -1
- package/dist/pack-bin.js +5 -4
- package/dist/{package-B4T8RGMG.js → package-CBe9EWPY.js} +2 -2
- package/dist/{prompts-CHz_98bJ.js → prompts-DF3yU-eU.js} +6 -474
- package/dist/{report-BS7ULx7A.js → report-ZNR1Mk6h.js} +1 -0
- package/dist/{resolve-vite-config-Dmeyeyj-.js → resolve-vite-config-ipGb39Jo.js} +2 -2
- package/dist/staged/bin.js +77 -47
- package/dist/terminal-MKGAuy-p.js +39 -0
- package/dist/toolchain.js +9 -9
- package/dist/toolchain.json +9 -9
- package/dist/tsconfig-BVHG3DpR.js +2 -0
- package/dist/{tsconfig-7v_BHagU.js → tsconfig-LD2QhQ0O.js} +5 -4
- package/dist/version.js +4 -3
- package/dist/versions.js +5 -5
- package/docs/guide/env.md +20 -6
- package/docs/guide/install.md +2 -1
- package/docs/guide/installer-env-vars.md +41 -5
- package/docs/guide/migrate-rules.md +9 -0
- package/docs/guide/migrate.md +5 -5
- package/docs/guide/test.md +8 -0
- package/docs/guide/upgrade.md +48 -1
- package/package.json +32 -33
- package/docs/_data/team.ts +0 -131
- package/docs/package.json +0 -30
- package/docs/pnpm-lock.yaml +0 -4003
- package/docs/pnpm-workspace.yaml +0 -13
- package/docs/public/checkmark.svg +0 -1
- package/docs/public/cta-background.jpg +0 -0
- package/docs/public/favicon.svg +0 -1
- package/docs/public/icon.svg +0 -1
- package/docs/public/logo.svg +0 -1
- package/docs/public/og.jpg +0 -0
- package/docs/vite.config.ts +0 -20
- package/dist/{json-qlK6UH0r.js → json-cULBl7Pi.js} +107 -107
- package/dist/{log-update-CoW8Z4Dl.js → log-update-DHZRyJ2m.js} +1 -1
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { shouldPrintVitePlusHeader, vitePlusHeader } from "../binding/index.js";
|
|
2
|
+
import { styleText } from "node:util";
|
|
3
|
+
//#region src/utils/terminal.ts
|
|
4
|
+
function log(message) {
|
|
5
|
+
console.log(message);
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Emit the Vite+ banner (header line + trailing blank line) to stdout.
|
|
9
|
+
* Gating (non-TTY, git hooks) lives in `shouldPrintVitePlusHeader` on the
|
|
10
|
+
* Rust side so both CLIs stay in sync.
|
|
11
|
+
*/
|
|
12
|
+
function printHeader() {
|
|
13
|
+
if (!shouldPrintVitePlusHeader()) return;
|
|
14
|
+
log(vitePlusHeader());
|
|
15
|
+
log("");
|
|
16
|
+
}
|
|
17
|
+
function accent(text) {
|
|
18
|
+
return styleText("blue", text);
|
|
19
|
+
}
|
|
20
|
+
function muted(text) {
|
|
21
|
+
return styleText("gray", text);
|
|
22
|
+
}
|
|
23
|
+
function success(text) {
|
|
24
|
+
return styleText("green", text);
|
|
25
|
+
}
|
|
26
|
+
function formatDuration(durationMs) {
|
|
27
|
+
if (durationMs < 1e3) return `${Math.max(1, durationMs)}ms`;
|
|
28
|
+
const durationSeconds = durationMs / 1e3;
|
|
29
|
+
if (durationSeconds < 10) return `${durationSeconds.toFixed(1)}s`;
|
|
30
|
+
return `${Math.round(durationSeconds)}s`;
|
|
31
|
+
}
|
|
32
|
+
function warnMsg(msg) {
|
|
33
|
+
console.error(styleText(["yellow", "bold"], "warn:"), msg);
|
|
34
|
+
}
|
|
35
|
+
function errorMsg(msg) {
|
|
36
|
+
console.error(styleText(["red", "bold"], "error:"), msg);
|
|
37
|
+
}
|
|
38
|
+
//#endregion
|
|
39
|
+
export { muted as a, warnMsg as c, log as i, errorMsg as n, printHeader as o, formatDuration as r, success as s, accent as t };
|
package/dist/toolchain.js
CHANGED
|
@@ -4,7 +4,7 @@ export const toolchain = {
|
|
|
4
4
|
{
|
|
5
5
|
"id": "vite-plus",
|
|
6
6
|
"name": "vite-plus",
|
|
7
|
-
"version": "0.
|
|
7
|
+
"version": "0.3.0",
|
|
8
8
|
"kind": "package",
|
|
9
9
|
"delivery": [
|
|
10
10
|
"dependency"
|
|
@@ -14,7 +14,7 @@ export const toolchain = {
|
|
|
14
14
|
{
|
|
15
15
|
"id": "vite-plus-core",
|
|
16
16
|
"name": "@voidzero-dev/vite-plus-core",
|
|
17
|
-
"version": "0.
|
|
17
|
+
"version": "0.3.0",
|
|
18
18
|
"kind": "package",
|
|
19
19
|
"delivery": [
|
|
20
20
|
"dependency"
|
|
@@ -26,7 +26,7 @@ export const toolchain = {
|
|
|
26
26
|
{
|
|
27
27
|
"id": "vite",
|
|
28
28
|
"name": "vite",
|
|
29
|
-
"version": "8.2.
|
|
29
|
+
"version": "8.2.2",
|
|
30
30
|
"kind": "tool",
|
|
31
31
|
"delivery": [
|
|
32
32
|
"bundled"
|
|
@@ -36,7 +36,7 @@ export const toolchain = {
|
|
|
36
36
|
{
|
|
37
37
|
"id": "rolldown",
|
|
38
38
|
"name": "rolldown",
|
|
39
|
-
"version": "1.2.
|
|
39
|
+
"version": "1.2.5",
|
|
40
40
|
"kind": "tool",
|
|
41
41
|
"delivery": [
|
|
42
42
|
"bundled",
|
|
@@ -47,7 +47,7 @@ export const toolchain = {
|
|
|
47
47
|
{
|
|
48
48
|
"id": "vitest",
|
|
49
49
|
"name": "vitest",
|
|
50
|
-
"version": "4.1.
|
|
50
|
+
"version": "4.1.11",
|
|
51
51
|
"kind": "tool",
|
|
52
52
|
"delivery": [
|
|
53
53
|
"dependency"
|
|
@@ -57,7 +57,7 @@ export const toolchain = {
|
|
|
57
57
|
{
|
|
58
58
|
"id": "oxlint",
|
|
59
59
|
"name": "oxlint",
|
|
60
|
-
"version": "1.
|
|
60
|
+
"version": "1.79.0",
|
|
61
61
|
"kind": "tool",
|
|
62
62
|
"delivery": [
|
|
63
63
|
"dependency"
|
|
@@ -67,7 +67,7 @@ export const toolchain = {
|
|
|
67
67
|
{
|
|
68
68
|
"id": "oxfmt",
|
|
69
69
|
"name": "oxfmt",
|
|
70
|
-
"version": "0.
|
|
70
|
+
"version": "0.64.0",
|
|
71
71
|
"kind": "tool",
|
|
72
72
|
"delivery": [
|
|
73
73
|
"dependency"
|
|
@@ -100,7 +100,7 @@ export const toolchain = {
|
|
|
100
100
|
"id": "vite-task",
|
|
101
101
|
"name": "vite-task",
|
|
102
102
|
"revision": "d05b1dcdbaabaa69643ee0b89cebe3cd390957e9",
|
|
103
|
-
"builtAt": "2026-08-
|
|
103
|
+
"builtAt": "2026-08-24T03:41:26Z",
|
|
104
104
|
"kind": "tool",
|
|
105
105
|
"delivery": [
|
|
106
106
|
"compiled"
|
|
@@ -110,7 +110,7 @@ export const toolchain = {
|
|
|
110
110
|
{
|
|
111
111
|
"id": "oxc",
|
|
112
112
|
"name": "oxc",
|
|
113
|
-
"version": "0.
|
|
113
|
+
"version": "0.146.0",
|
|
114
114
|
"kind": "engine",
|
|
115
115
|
"delivery": [
|
|
116
116
|
"compiled"
|
package/dist/toolchain.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
{
|
|
5
5
|
"id": "vite-plus",
|
|
6
6
|
"name": "vite-plus",
|
|
7
|
-
"version": "0.
|
|
7
|
+
"version": "0.3.0",
|
|
8
8
|
"kind": "package",
|
|
9
9
|
"delivery": [
|
|
10
10
|
"dependency"
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
{
|
|
15
15
|
"id": "vite-plus-core",
|
|
16
16
|
"name": "@voidzero-dev/vite-plus-core",
|
|
17
|
-
"version": "0.
|
|
17
|
+
"version": "0.3.0",
|
|
18
18
|
"kind": "package",
|
|
19
19
|
"delivery": [
|
|
20
20
|
"dependency"
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
{
|
|
27
27
|
"id": "vite",
|
|
28
28
|
"name": "vite",
|
|
29
|
-
"version": "8.2.
|
|
29
|
+
"version": "8.2.2",
|
|
30
30
|
"kind": "tool",
|
|
31
31
|
"delivery": [
|
|
32
32
|
"bundled"
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
{
|
|
37
37
|
"id": "rolldown",
|
|
38
38
|
"name": "rolldown",
|
|
39
|
-
"version": "1.2.
|
|
39
|
+
"version": "1.2.5",
|
|
40
40
|
"kind": "tool",
|
|
41
41
|
"delivery": [
|
|
42
42
|
"bundled",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
{
|
|
48
48
|
"id": "vitest",
|
|
49
49
|
"name": "vitest",
|
|
50
|
-
"version": "4.1.
|
|
50
|
+
"version": "4.1.11",
|
|
51
51
|
"kind": "tool",
|
|
52
52
|
"delivery": [
|
|
53
53
|
"dependency"
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
{
|
|
58
58
|
"id": "oxlint",
|
|
59
59
|
"name": "oxlint",
|
|
60
|
-
"version": "1.
|
|
60
|
+
"version": "1.79.0",
|
|
61
61
|
"kind": "tool",
|
|
62
62
|
"delivery": [
|
|
63
63
|
"dependency"
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
{
|
|
68
68
|
"id": "oxfmt",
|
|
69
69
|
"name": "oxfmt",
|
|
70
|
-
"version": "0.
|
|
70
|
+
"version": "0.64.0",
|
|
71
71
|
"kind": "tool",
|
|
72
72
|
"delivery": [
|
|
73
73
|
"dependency"
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
"id": "vite-task",
|
|
101
101
|
"name": "vite-task",
|
|
102
102
|
"revision": "d05b1dcdbaabaa69643ee0b89cebe3cd390957e9",
|
|
103
|
-
"builtAt": "2026-08-
|
|
103
|
+
"builtAt": "2026-08-24T03:41:26Z",
|
|
104
104
|
"kind": "tool",
|
|
105
105
|
"delivery": [
|
|
106
106
|
"compiled"
|
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
{
|
|
111
111
|
"id": "oxc",
|
|
112
112
|
"name": "oxc",
|
|
113
|
-
"version": "0.
|
|
113
|
+
"version": "0.146.0",
|
|
114
114
|
"kind": "engine",
|
|
115
115
|
"delivery": [
|
|
116
116
|
"compiled"
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { A as isCancel, C as log,
|
|
3
|
-
import { c as parse, o as applyEdits, s as modify } from "./json-
|
|
1
|
+
import { p as createBaseUrlTsconfigFixArgs, t as BASEURL_TSCONFIG_FIX_PACKAGE } from "./constants-Bn-U8o4v.js";
|
|
2
|
+
import { A as isCancel, C as log, t as cancelAndExit, x as confirm } from "./prompts-DF3yU-eU.js";
|
|
3
|
+
import { c as parse, o as applyEdits, s as modify } from "./json-cULBl7Pi.js";
|
|
4
|
+
import { n as runCommandSilently } from "./command-CguLh2KL.js";
|
|
4
5
|
import path from "node:path";
|
|
5
6
|
import { styleText } from "node:util";
|
|
6
7
|
import fs from "node:fs";
|
|
@@ -148,4 +149,4 @@ function rewriteTypesInTsconfig(filePath) {
|
|
|
148
149
|
return true;
|
|
149
150
|
}
|
|
150
151
|
//#endregion
|
|
151
|
-
export {
|
|
152
|
+
export { hasBaseUrlInTsconfig as a, hasVitestTypesInTsconfig as c, fixBaseUrlInTsconfig as i, removeDeprecatedTsconfigFalseOption as l, findTsconfigFiles as n, hasBaseUrlInTsconfigFile as o, findTsconfigFilesWithBaseUrl as r, hasTypesToRewriteInTsconfig as s, confirmBaseUrlFix as t, rewriteTypesInTsconfig as u };
|
package/dist/version.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { t as renderCliDoc } from "./help-BmKpeOP9.js";
|
|
2
|
+
import { i as log, o as printHeader, t as accent } from "./terminal-MKGAuy-p.js";
|
|
3
|
+
import { _ as version } from "./constants-Bn-U8o4v.js";
|
|
4
|
+
import { i as hasVitePlusDependency, n as detectPackageMetadata } from "./package-CBe9EWPY.js";
|
|
4
5
|
import path from "node:path";
|
|
5
6
|
import fs from "node:fs";
|
|
6
7
|
//#region src/version.ts
|
package/dist/versions.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export const versions = {
|
|
2
|
-
"vite": "8.2.
|
|
3
|
-
"rolldown": "1.2.
|
|
4
|
-
"vitest": "4.1.
|
|
5
|
-
"oxfmt": "0.
|
|
6
|
-
"oxlint": "1.
|
|
2
|
+
"vite": "8.2.2",
|
|
3
|
+
"rolldown": "1.2.5",
|
|
4
|
+
"vitest": "4.1.11",
|
|
5
|
+
"oxfmt": "0.64.0",
|
|
6
|
+
"oxlint": "1.79.0",
|
|
7
7
|
"oxlint-tsgolint": "7.0.2001",
|
|
8
8
|
"tsdown": "0.22.14"
|
|
9
9
|
};
|
package/docs/guide/env.md
CHANGED
|
@@ -21,7 +21,12 @@ latest LTS.
|
|
|
21
21
|
|
|
22
22
|
When a project declares `packageManager` (or `devEngines.packageManager`) in `package.json`, matching package-manager shims also use that package-manager version. For example, `packageManager: "npm@10.9.4"` makes both `npm` and `npx` run through npm 10.9.4. Alias pairs follow the installed package-manager shims: `npm`/`npx`, `pnpm`/`pnpx`, `yarn`/`yarnpkg`, and `bun`/`bunx`. Vite+ does not translate mismatched commands, so a project pinned to `pnpm` still lets `npm` fall back to the npm that comes with the resolved Node.js runtime.
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
A fresh install uses the split platform layout by default. On Unix, Vite+
|
|
25
|
+
stores managed runtimes and related files in `~/.local/share/vite-plus`. It
|
|
26
|
+
stores executables in the Vite+-owned `~/.local/share/vite-plus/bin` directory.
|
|
27
|
+
On Windows, Vite+ uses `%LOCALAPPDATA%\vite-plus\data` for data and
|
|
28
|
+
`%LOCALAPPDATA%\vite-plus\bin` for executables. Vite+ does not move an existing
|
|
29
|
+
`~/.vite-plus` install. `VP_HOME` puts all categories under one custom root.
|
|
25
30
|
|
|
26
31
|
If you want to keep that behavior, run:
|
|
27
32
|
|
|
@@ -43,7 +48,7 @@ This switches to system-first mode, where the shims prefer your system Node.js a
|
|
|
43
48
|
|
|
44
49
|
### Setup
|
|
45
50
|
|
|
46
|
-
- `vp env setup` creates or updates shims in
|
|
51
|
+
- `vp env setup` creates or updates shims in the resolved bin directory. It writes shell setup scripts in the config directory.
|
|
47
52
|
- `vp env on` enables managed mode so shims always use Vite+-managed Node.js
|
|
48
53
|
- `vp env off` enables system-first mode so shims prefer system Node.js first
|
|
49
54
|
- `vp env print` prints the shell snippet for the current session
|
|
@@ -51,9 +56,12 @@ This switches to system-first mode, where the shims prefer your system Node.js a
|
|
|
51
56
|
PowerShell needs to dot-source the generated setup script in the current shell before `vp env use` can affect only that shell session:
|
|
52
57
|
|
|
53
58
|
```powershell
|
|
54
|
-
. "$env:
|
|
59
|
+
. "$env:APPDATA\vite-plus\env.ps1"
|
|
55
60
|
```
|
|
56
61
|
|
|
62
|
+
If an older Vite+ install uses `%USERPROFILE%\.vite-plus`, source the `env.ps1`
|
|
63
|
+
file in that directory instead.
|
|
64
|
+
|
|
57
65
|
Add that line to the end of your PowerShell `$PROFILE` to apply it automatically in new shells. It does not require elevated privileges.
|
|
58
66
|
|
|
59
67
|
Create the profile file if it does not already exist:
|
|
@@ -76,9 +84,11 @@ node --version
|
|
|
76
84
|
vp-use --unset
|
|
77
85
|
```
|
|
78
86
|
|
|
79
|
-
Only `vp env use` needs this alternate command. Other `vp env` commands work normally in Command Prompt. `vp env setup` creates `vp-use.cmd`
|
|
87
|
+
Only `vp env use` needs this alternate command. Other `vp env` commands work normally in Command Prompt. `vp env setup` creates `vp-use.cmd` in the bin directory on Windows.
|
|
80
88
|
|
|
81
|
-
In CI, `vp env use` can
|
|
89
|
+
In CI, `vp env use` can run without shell initialization. It writes a temporary
|
|
90
|
+
session file in the resolved state directory. Later shim calls in the same job
|
|
91
|
+
use this file to select the Node.js version.
|
|
82
92
|
|
|
83
93
|
### Manage
|
|
84
94
|
|
|
@@ -144,7 +154,11 @@ Vite+ creates a `corepack` shim by default, so corepack works without a system N
|
|
|
144
154
|
- On Node.js 25 and later, where corepack is no longer bundled, Vite+ installs corepack as a managed global package on first use. Only the `corepack` binary is linked; run `vp install -g corepack` yourself if you also want the package's pnpm/yarn launchers exposed directly.
|
|
145
155
|
- If you install corepack explicitly with `vp install -g corepack`, that installation is always preferred.
|
|
146
156
|
|
|
147
|
-
`corepack enable` normally creates `pnpm
|
|
157
|
+
`corepack enable` normally creates `pnpm` and `yarn` launchers next to the
|
|
158
|
+
corepack binary. Vite+ does not add that location to `PATH`. The shim sets
|
|
159
|
+
`--install-directory` to the resolved bin directory by default. The launchers
|
|
160
|
+
are then available on `PATH`. They still use the Node.js and package-manager
|
|
161
|
+
versions for the project:
|
|
148
162
|
|
|
149
163
|
```bash
|
|
150
164
|
corepack enable # pnpm and yarn now resolve via corepack
|
package/docs/guide/install.md
CHANGED
|
@@ -81,7 +81,8 @@ Updates keep the version spec a package was installed with: a package installed
|
|
|
81
81
|
::: warning
|
|
82
82
|
These commands do **NOT** interact with the underlying package manager's global installation directory.
|
|
83
83
|
|
|
84
|
-
Instead, Vite+
|
|
84
|
+
Instead, Vite+ stores its global packages in `packages/` under the resolved data
|
|
85
|
+
directory. These packages remain available across different Node.js versions.
|
|
85
86
|
|
|
86
87
|
As a result, commands such as `vp link` do not affect Vite+'s global packages and will not appear in `vp list -g`.
|
|
87
88
|
:::
|
|
@@ -11,6 +11,10 @@ These variables control the installer scripts and the standalone Windows install
|
|
|
11
11
|
- **Purpose**: Version to install
|
|
12
12
|
- **Default**: `latest`
|
|
13
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.
|
|
14
18
|
- **Example**:
|
|
15
19
|
|
|
16
20
|
```bash
|
|
@@ -25,9 +29,15 @@ These variables control the installer scripts and the standalone Windows install
|
|
|
25
29
|
|
|
26
30
|
### `VP_HOME`
|
|
27
31
|
|
|
28
|
-
- **Purpose**:
|
|
29
|
-
|
|
30
|
-
|
|
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`.
|
|
31
41
|
- **Example**:
|
|
32
42
|
|
|
33
43
|
```bash
|
|
@@ -40,6 +50,25 @@ These variables control the installer scripts and the standalone Windows install
|
|
|
40
50
|
$env:VP_HOME = "D:\vite-plus"; irm https://vite.plus/ps1 | iex
|
|
41
51
|
```
|
|
42
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
|
+
|
|
43
72
|
### `NPM_CONFIG_REGISTRY`
|
|
44
73
|
|
|
45
74
|
- **Purpose**: Custom npm registry URL
|
|
@@ -71,7 +100,12 @@ These variables control the installer scripts and the standalone Windows install
|
|
|
71
100
|
|
|
72
101
|
### Development variables
|
|
73
102
|
|
|
74
|
-
|
|
103
|
+
Use `VP_LOCAL_TGZ` and `VP_LOCAL_BINARY` when you develop Vite+ itself.
|
|
104
|
+
`VP_LOCAL_TGZ` specifies a local `vite-plus.tgz` file. `VP_LOCAL_BINARY`
|
|
105
|
+
specifies a local `vp` binary. The installers use these files for the local
|
|
106
|
+
build. They use `VP_DUMP_DIRS=1` to get the layout mode and all five `EnvConfig`
|
|
107
|
+
category roots from the selected binary. They do not resolve the directory
|
|
108
|
+
variables. The installers set `VP_INSTALL_STOP`; do not set it manually.
|
|
75
109
|
|
|
76
110
|
## Runtime Variables
|
|
77
111
|
|
|
@@ -161,6 +195,8 @@ Vite+ sets additional `VP_*` variables during shim dispatch and shell integratio
|
|
|
161
195
|
### `VP_LOG`
|
|
162
196
|
|
|
163
197
|
- **Purpose**: Log filter string for `tracing_subscriber`
|
|
198
|
+
- **Installer behavior**: When `CI=true`, `install.sh` hides shell file errors.
|
|
199
|
+
Set `VP_LOG=trace` to show these errors.
|
|
164
200
|
- **Default**: None
|
|
165
201
|
- **Example**:
|
|
166
202
|
```bash
|
|
@@ -195,7 +231,7 @@ Vite+ also respects these standard environment variables:
|
|
|
195
231
|
### `HOME` / `USERPROFILE`
|
|
196
232
|
|
|
197
233
|
- **Purpose**: User home directory
|
|
198
|
-
- **Effect**: Base for the
|
|
234
|
+
- **Effect**: Base for the existing-install probe (`~/.vite-plus`) and for split platform defaults
|
|
199
235
|
|
|
200
236
|
## Precedence
|
|
201
237
|
|
|
@@ -82,6 +82,14 @@ Related rules:
|
|
|
82
82
|
- A direct `vite` declaration is never removed merely because a root override
|
|
83
83
|
exists.
|
|
84
84
|
- Plain or stale aliases are normalized; named catalog references are kept.
|
|
85
|
+
- Under pnpm the managed override keys use an explicit `@*` range (`vite@*`,
|
|
86
|
+
`vitest@*`). pnpm applies an override by replacing the declared spec on every
|
|
87
|
+
manifest, importer manifests included. A bare key matches any spec, including
|
|
88
|
+
`catalog:`, and `vp up` then rewrites that reference to a concrete version.
|
|
89
|
+
The `@*` range keeps the override on the semver ranges that transitive and
|
|
90
|
+
peer declarations use. It leaves `catalog:` references to the catalog, which
|
|
91
|
+
already resolves them to Vite+ core. Migration re-keys a project that still
|
|
92
|
+
holds the bare key, and keeps its named-catalog choice.
|
|
85
93
|
- The direct-entry rule above is pnpm-specific. Bun mirrors its core alias as
|
|
86
94
|
a direct dependency for its peer resolver, and npm browser-provider layouts
|
|
87
95
|
may need a top-level `vite` edge so nested Vitest packages can resolve
|
|
@@ -228,6 +236,7 @@ scripts while preserving their arguments:
|
|
|
228
236
|
| `lint-staged` | `vp staged` |
|
|
229
237
|
| `eslint` | `vp lint`, when its optional migration runs |
|
|
230
238
|
| `prettier` | `vp fmt`, when its optional migration runs |
|
|
239
|
+
| `tsup` | `vp pack`, when its optional migration runs |
|
|
231
240
|
|
|
232
241
|
For commands launched through `bunx`, migration preserves `bunx` and its
|
|
233
242
|
`--bun` flag (keeping the user's chosen runtime) and rewrites only the managed
|
package/docs/guide/migrate.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
## Overview
|
|
6
6
|
|
|
7
|
-
This command is the starting point for consolidating separate Vite, Vitest, Oxlint, Oxfmt, ESLint, and
|
|
7
|
+
This command is the starting point for consolidating separate Vite, Vitest, Oxlint, Oxfmt, ESLint, Prettier, and tsup setups into Vite+.
|
|
8
8
|
|
|
9
9
|
Use it when you want to take an existing project and move it onto the Vite+ defaults instead of wiring each tool by hand.
|
|
10
10
|
|
|
@@ -70,7 +70,7 @@ After running the migration:
|
|
|
70
70
|
- Run `vp install`
|
|
71
71
|
- Run `vp check`
|
|
72
72
|
- Run `vp test`
|
|
73
|
-
- Run `vp build`
|
|
73
|
+
- Run `vp build` (or `vp pack` if you are building a library)
|
|
74
74
|
|
|
75
75
|
## Manual Installation & Migration
|
|
76
76
|
|
|
@@ -85,7 +85,7 @@ You need to add overrides to your package manager so that other packages resolve
|
|
|
85
85
|
```json
|
|
86
86
|
"overrides": {
|
|
87
87
|
"vite": "npm:@voidzero-dev/vite-plus-core@latest",
|
|
88
|
-
"vitest": "4.1.
|
|
88
|
+
"vitest": "4.1.11"
|
|
89
89
|
}
|
|
90
90
|
```
|
|
91
91
|
|
|
@@ -94,7 +94,7 @@ If you are using `pnpm`, add this to your `pnpm-workspace.yaml`:
|
|
|
94
94
|
```yaml
|
|
95
95
|
overrides:
|
|
96
96
|
vite: npm:@voidzero-dev/vite-plus-core@latest
|
|
97
|
-
vitest: 4.1.
|
|
97
|
+
vitest: 4.1.11
|
|
98
98
|
```
|
|
99
99
|
|
|
100
100
|
Or, if you are using Yarn:
|
|
@@ -102,7 +102,7 @@ Or, if you are using Yarn:
|
|
|
102
102
|
```json
|
|
103
103
|
"resolutions": {
|
|
104
104
|
"vite": "npm:@voidzero-dev/vite-plus-core@latest",
|
|
105
|
-
"vitest": "4.1.
|
|
105
|
+
"vitest": "4.1.11"
|
|
106
106
|
}
|
|
107
107
|
```
|
|
108
108
|
|
package/docs/guide/test.md
CHANGED
|
@@ -6,6 +6,14 @@
|
|
|
6
6
|
|
|
7
7
|
`vp test` is built on [Vitest](https://vitest.dev/), so you get a Vite-native test runner that reuses your Vite config and plugins, supports Jest-style expectations, snapshots, and coverage, and handles modern ESM, TypeScript, and JSX projects cleanly.
|
|
8
8
|
|
|
9
|
+
Vitest APIs are available from `vite-plus/test`, so a single `vite-plus` install is enough — you do not need to install `vitest` directly:
|
|
10
|
+
|
|
11
|
+
```ts [src/example.test.ts]
|
|
12
|
+
import { describe, expect, it, vi } from 'vite-plus/test';
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
For the browser mode subpaths (`vite-plus/test/browser*`), see [Migrating Vitest](/guide/migrate#vitest).
|
|
16
|
+
|
|
9
17
|
::: info
|
|
10
18
|
`vp test` always runs the built-in Vitest command. If your project also has a `test` script in `package.json`, run `vp run test` when you want to run that script instead. See [Built-in Commands vs Scripts](/guide/run#built-in-commands-vs-scripts).
|
|
11
19
|
:::
|
package/docs/guide/upgrade.md
CHANGED
|
@@ -43,6 +43,51 @@ vp upgrade <version> # install a specific version
|
|
|
43
43
|
vp upgrade --registry <registry> # use a custom npm registry
|
|
44
44
|
```
|
|
45
45
|
|
|
46
|
+
### Move an Existing Install to the Split Directory Layout
|
|
47
|
+
|
|
48
|
+
Vite+ 0.3.0 is the first release that supports the split directory layout.
|
|
49
|
+
Vite+ 0.2.x and earlier use the single-root layout for fresh installs and
|
|
50
|
+
upgrades.
|
|
51
|
+
|
|
52
|
+
`vp upgrade` keeps an existing default install in `~/.vite-plus` on Unix or
|
|
53
|
+
`%USERPROFILE%\.vite-plus` on Windows. The command upgrades the CLI in that
|
|
54
|
+
directory. It does not move the install to the split platform directories. You
|
|
55
|
+
can continue to use the existing layout.
|
|
56
|
+
|
|
57
|
+
To use the split layout now, remove the existing install. Then install Vite+
|
|
58
|
+
again. Run `vp implode` in a shell that uses the current install. The command
|
|
59
|
+
removes the generated environment file and shell profile entries. It does not
|
|
60
|
+
unset directory variables in the current shell. Unset all Vite+ directory
|
|
61
|
+
variables before you run the installer. This can include values from an earlier
|
|
62
|
+
preview environment file. Alternatively, start a new shell after `vp implode`.
|
|
63
|
+
Then run the installer in the new shell.
|
|
64
|
+
|
|
65
|
+
::: warning
|
|
66
|
+
`vp implode` removes all Vite+-managed Node.js runtimes, global packages,
|
|
67
|
+
configuration, and caches. Keep the existing layout if you do not want to
|
|
68
|
+
recreate that data.
|
|
69
|
+
:::
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
vp implode
|
|
73
|
+
unset VP_HOME VP_DATA_DIR VP_BIN_DIR VP_CACHE_DIR
|
|
74
|
+
curl -fsSL https://vite.plus | bash
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
On Windows:
|
|
78
|
+
|
|
79
|
+
```powershell
|
|
80
|
+
vp implode
|
|
81
|
+
Remove-Item Env:\VP_HOME, Env:\VP_DATA_DIR, Env:\VP_BIN_DIR, Env:\VP_CACHE_DIR -ErrorAction SilentlyContinue
|
|
82
|
+
irm https://vite.plus/ps1 | iex
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Also remove persistent definitions of `VP_HOME`, `VP_DATA_DIR`, `VP_BIN_DIR`,
|
|
86
|
+
and `VP_CACHE_DIR` from your shell profile or system environment. A fresh
|
|
87
|
+
install uses `VP_HOME` or a complete `VP_*_DIR` group that remains set.
|
|
88
|
+
`VP_HOME` selects the single-root layout. If you install Vite+ 0.2.x or earlier,
|
|
89
|
+
the installer also uses this layout. The installer prints a notice.
|
|
90
|
+
|
|
46
91
|
### Rollback
|
|
47
92
|
|
|
48
93
|
Vite+ keeps the **3 most recent** versions installed so you can revert quickly:
|
|
@@ -69,7 +114,9 @@ If you migrated with `vp migrate`, your project pins `vitest` to an exact versio
|
|
|
69
114
|
|
|
70
115
|
- **npm / Bun:** a `vitest` entry under `overrides` in `package.json`
|
|
71
116
|
- **Yarn:** a `vitest` entry under `resolutions` in `package.json`
|
|
72
|
-
- **pnpm:** a `vitest
|
|
117
|
+
- **pnpm:** a `vitest@*` entry under `overrides` in `pnpm-workspace.yaml`. If your `package.json` already has a `pnpm` field, the entry lives under `pnpm.overrides` in `package.json` instead. pnpm ignores `pnpm-workspace.yaml` overrides when `package.json` defines `pnpm.overrides`.
|
|
118
|
+
|
|
119
|
+
Under pnpm the managed keys use an explicit `@*` range (`vite@*`, `vitest@*`). pnpm applies an override by replacing the declared spec on every manifest, importer manifests included. A bare key matches any spec, including `catalog:`. The `@*` range keeps the override on the semver ranges that transitive and peer declarations use, and leaves `catalog:` references intact. `vp up` therefore no longer rewrites them to a concrete version.
|
|
73
120
|
|
|
74
121
|
A Vite+ release can bump the bundled Vitest. Because that pin also applies to `vite-plus`'s own `vitest` dependency, an out-of-date pin keeps installing the previous runner even after you upgrade `vite-plus` — splitting Vitest's internals (mocks, `expect`, runner state) between the pinned copy and the one `vp test` loads.
|
|
75
122
|
|