vite-plus 0.3.2 → 0.3.3
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/binding/index.cjs +137 -55
- package/binding/index.d.cts +40 -0
- package/dist/{agent-C59HKB4Y.js → agent-Cu6-tXIP.js} +2 -2
- package/dist/bin.js +5 -5
- package/dist/config/bin.js +2 -2
- package/dist/{constants-IhOditRA.js → constants-C2dTOTe-.js} +1 -1
- package/dist/create/bin.js +84 -65
- package/dist/{define-config-DpAPETDf.cjs → define-config-D0mevyb3.cjs} +1 -1
- package/dist/{define-config-DAaCa0U_.js → define-config-IgzmnvvV.js} +1 -1
- package/dist/define-config.cjs +1 -1
- package/dist/define-config.js +1 -1
- package/dist/{editor-QOIGtmH4.js → editor-4sjlHmUh.js} +17 -6
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/lint-plugins.cjs +1 -1
- package/dist/migration/bin.js +6 -6
- package/dist/{oxlint-plugin-config-BU42tr8y.js → oxlint-plugin-config-BVqEe9KY.js} +1 -1
- package/dist/oxlint-plugin.js +1 -1
- package/dist/pack-bin.js +1 -1
- package/dist/{package-BB-Jh_z3.js → package-CHH8jWan.js} +1 -1
- package/dist/{prompts-CujFOJXu.js → prompts-k14KgthC.js} +1 -1
- package/dist/{resolve-vite-config-CHHjsjKJ.js → resolve-vite-config-BqvS2P98.js} +2 -2
- package/dist/{resolve-vite-config-6Nox70uP.js → resolve-vite-config-CTOTuqTi.js} +1 -1
- package/dist/staged/bin.js +1 -1
- package/dist/toolchain.js +7 -7
- package/dist/toolchain.json +7 -7
- package/dist/{tsconfig-DCtWfQPA.js → tsconfig-C3h9CVTA.js} +2 -2
- package/dist/{tsconfig-MXktI3SX.js → tsconfig-euB-GmIE.js} +1 -1
- package/dist/version.js +2 -2
- package/dist/versions.js +3 -3
- package/docs/config/staged.md +1 -2
- package/docs/guide/ci.md +28 -31
- package/docs/guide/commit-hooks.md +11 -34
- package/docs/guide/create.md +1 -2
- package/docs/guide/docker.md +20 -68
- package/docs/guide/env.md +30 -20
- package/docs/guide/global-cli.md +426 -0
- package/docs/guide/ide-integration.md +1 -2
- package/docs/guide/implode.md +14 -1
- package/docs/guide/index.md +37 -34
- package/docs/guide/install.md +17 -19
- package/docs/guide/lint.md +3 -9
- package/docs/guide/local-cli.md +123 -0
- package/docs/guide/migrate-rules.md +93 -290
- package/docs/guide/migrate.md +5 -48
- package/docs/guide/run.md +1 -1
- package/docs/guide/troubleshooting.md +3 -8
- package/docs/guide/upgrade-project.md +61 -0
- package/docs/guide/upgrade.md +17 -62
- package/package.json +17 -17
- package/docs/guide/installer-env-vars.md +0 -286
|
@@ -15,18 +15,14 @@ Vite+ expects modern upstream tool versions.
|
|
|
15
15
|
|
|
16
16
|
If you are migrating an existing project and it still depends on older Vite or Vitest versions, upgrade those first before adopting Vite+.
|
|
17
17
|
|
|
18
|
-
Run `vp toolchain` to show the versions from the local Vite+ package.
|
|
19
|
-
Run `vp toolchain --global` to show the versions from the global Vite+ release.
|
|
18
|
+
Run `vp toolchain` to show the versions from the local Vite+ package. Run `vp toolchain --global` to show the versions from the global Vite+ release.
|
|
20
19
|
|
|
21
20
|
## `vp check` does not run type-aware lint rules or type checks
|
|
22
21
|
|
|
23
22
|
- Confirm that `lint.options.typeAware` and `lint.options.typeCheck` are enabled in `vite.config.ts`
|
|
24
23
|
- Check whether your `tsconfig.json` still uses `compilerOptions.baseUrl`
|
|
25
24
|
|
|
26
|
-
The Oxlint type checker path powered by `tsgolint` does not support `baseUrl`.
|
|
27
|
-
`vp migrate` and `vp lint --init` try to run the `vp dlx @andrewbranch/ts5to6 --fixBaseUrl .`
|
|
28
|
-
fix before enabling type-aware linting. If that fix fails or is declined, Vite+
|
|
29
|
-
skips `typeAware` and `typeCheck`.
|
|
25
|
+
The Oxlint type checker path powered by `tsgolint` does not support `baseUrl`. `vp migrate` and `vp lint --init` try to run the `vp dlx @andrewbranch/ts5to6 --fixBaseUrl .` fix before enabling type-aware linting. If that fix fails or is declined, Vite+ skips `typeAware` and `typeCheck`.
|
|
30
26
|
|
|
31
27
|
## Nested lint or format config is not applied
|
|
32
28
|
|
|
@@ -76,8 +72,7 @@ If `vp staged` fails or your pre-commit hook does not run:
|
|
|
76
72
|
- if status shows `Preference: disabled (local)`, re-enable with `vp hooks enable`
|
|
77
73
|
- check whether hooks were skipped intentionally through `VP_GIT_HOOKS=0`
|
|
78
74
|
|
|
79
|
-
To stop hooks in this clone without deleting project policy files, run `vp hooks disable`.
|
|
80
|
-
See the [Commit hooks guide](/guide/commit-hooks) for the full workflow.
|
|
75
|
+
To stop hooks in this clone without deleting project policy files, run `vp hooks disable`. See the [Commit hooks guide](/guide/commit-hooks) for the full workflow.
|
|
81
76
|
|
|
82
77
|
A minimal staged config looks like this:
|
|
83
78
|
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Update Vite+
|
|
2
|
+
|
|
3
|
+
Updating `vite-plus` and its related project dependencies. To upgrade the global `vp` binary, see [Upgrading Vite+](/guide/upgrade).
|
|
4
|
+
|
|
5
|
+
## Update with Migrate
|
|
6
|
+
|
|
7
|
+
The recommended way to update a project is to use `vp migrate`, which keeps the toolchain dependencies aligned.
|
|
8
|
+
|
|
9
|
+
After updating the project's `vite-plus` dependency, run the local CLI to align the toolchain versions:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
./node_modules/.bin/vp migrate
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
If your global CLI is newer than the project's version, running `vp migrate` upgrades the project to that global version instead:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
vp migrate
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
On a project that is already on Vite+, migrate does a toolchain version upgrade only: it re-pins `vite-plus`, the `vite` -> `@voidzero-dev/vite-plus-core` alias, and the `vitest` pin to the versions bundled with the CLI running the migration, across every workspace package. It skips the first-time setup steps (git hooks, editor and agent files, lint migration), so a version bump does not re-touch things you already configured. Pass `--full` to also run that setup.
|
|
22
|
+
|
|
23
|
+
## Manually Updating
|
|
24
|
+
|
|
25
|
+
Update `vite-plus` and the `vite` alias to `@voidzero-dev/vite-plus-core` together, keeping the core version aligned with `vite-plus`. Update these entries wherever they are declared in your workspace, including overrides or catalogs, then install dependencies to refresh the lockfile. Also [update the Vitest pin](#updating-the-vitest-pin) to match the bundled version.
|
|
26
|
+
|
|
27
|
+
Without the global CLI, run the `vp` commands on this page through your package manager, for example `pnpm exec vp toolchain vitest`.
|
|
28
|
+
|
|
29
|
+
### Updating the Vitest Pin
|
|
30
|
+
|
|
31
|
+
If you migrated with `vp migrate`, your project pins `vitest` to an exact version so the whole project shares a single Vitest copy with the bundled `vp test` runner. The pin lives in your package manager's override block:
|
|
32
|
+
|
|
33
|
+
- **npm / Bun:** a `vitest` entry under `overrides` in `package.json`
|
|
34
|
+
- **Yarn:** a `vitest` entry under `resolutions` in `package.json`
|
|
35
|
+
- **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`.
|
|
36
|
+
|
|
37
|
+
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.
|
|
38
|
+
|
|
39
|
+
After upgrading `vite-plus`, re-pin `vitest` to the version Vite+ now bundles. Check that version with:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
vp toolchain vitest
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Then set the `vitest` override to that exact version and reinstall dependencies.
|
|
46
|
+
|
|
47
|
+
::: details Why pnpm overrides use `@*`
|
|
48
|
+
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.
|
|
49
|
+
:::
|
|
50
|
+
|
|
51
|
+
## Preview Builds
|
|
52
|
+
|
|
53
|
+
After [installing a preview build of the global CLI](/guide/upgrade#global-vp-preview), run migrate in the project to move its local `vite-plus` onto the same build:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
vp migrate
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Migrate writes the bridge registry to `.npmrc`. For Yarn Berry, it writes the registry to `.yarnrc.yml`. It pins `vite-plus` and the `vite` alias to the matching `0.0.0-commit.<sha>` version. The `vite` alias points to `@voidzero-dev/vite-plus-core`. Commit the registry line if the project CI must test the preview.
|
|
60
|
+
|
|
61
|
+
After the install, run `vp toolchain` to show the selected versions. After testing, set `vite-plus` to `latest`. Remove the bridge `registry` line from `.npmrc` or `.yarnrc.yml`. Then run `vp install`.
|
package/docs/guide/upgrade.md
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# Upgrading Vite+
|
|
2
2
|
|
|
3
|
-
Use `vp upgrade` to update the global `vp` binary
|
|
3
|
+
Use `vp upgrade` to update the global `vp` binary. To update the local `vite-plus` package in a project, see [Update Vite+](/guide/upgrade-project).
|
|
4
4
|
|
|
5
5
|
## Overview
|
|
6
6
|
|
|
7
7
|
There are two parts to upgrading Vite+:
|
|
8
8
|
|
|
9
9
|
- The global `vp` command installed on your machine
|
|
10
|
-
- The local `vite-plus` package used by an individual project
|
|
10
|
+
- The [local `vite-plus` package](/guide/upgrade-project) used by an individual project
|
|
11
11
|
|
|
12
12
|
You can upgrade both of them independently.
|
|
13
13
|
|
|
@@ -22,20 +22,18 @@ vp toolchain vite rolldown oxc
|
|
|
22
22
|
vp toolchain --json
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
-
The command uses the local `vite-plus` package when the project has one. Use
|
|
26
|
-
`--global` to show the release for the global `vp` command:
|
|
25
|
+
The command uses the local `vite-plus` package when the project has one. Use `--global` to show the release for the global `vp` command:
|
|
27
26
|
|
|
28
27
|
```bash
|
|
29
28
|
vp toolchain --global
|
|
30
29
|
```
|
|
31
30
|
|
|
32
|
-
`vp why <package>` shows the dependency graph from the package manager. It
|
|
33
|
-
cannot show code bundled into `@voidzero-dev/vite-plus-core`. It also cannot
|
|
34
|
-
show engines compiled into Vite+. Use `vp toolchain` to show those versions and
|
|
35
|
-
relationships.
|
|
31
|
+
`vp why <package>` shows the dependency graph from the package manager. It cannot show code bundled into `@voidzero-dev/vite-plus-core`. It also cannot show engines compiled into Vite+. Use `vp toolchain` to show those versions and relationships.
|
|
36
32
|
|
|
37
33
|
## Global `vp`
|
|
38
34
|
|
|
35
|
+
Update the global CLI with:
|
|
36
|
+
|
|
39
37
|
```bash
|
|
40
38
|
vp upgrade # upgrade to the latest version
|
|
41
39
|
vp upgrade --check # check for updates without installing
|
|
@@ -45,27 +43,14 @@ vp upgrade --registry <registry> # use a custom npm registry
|
|
|
45
43
|
|
|
46
44
|
### Move an Existing Install to the Split Directory Layout
|
|
47
45
|
|
|
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.
|
|
46
|
+
Vite+ 0.3.0 is the first release that supports the split directory layout. Vite+ 0.2.x and earlier use the single-root layout for fresh installs and upgrades.
|
|
51
47
|
|
|
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.
|
|
48
|
+
`vp upgrade` keeps an existing default install in `~/.vite-plus` on Unix or `%USERPROFILE%\.vite-plus` on Windows. The command upgrades the CLI in that directory. It does not move the install to the split platform directories. You can continue to use the existing layout.
|
|
56
49
|
|
|
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.
|
|
50
|
+
To use the split layout now, remove the existing install. Then install Vite+ again. Run `vp implode` in a shell that uses the current install. The command removes the generated environment file and shell profile entries. It does not unset directory variables in the current shell. Unset all Vite+ directory variables before you run the installer. This can include values from an earlier preview environment file. Alternatively, start a new shell after `vp implode`. Then run the installer in the new shell.
|
|
64
51
|
|
|
65
52
|
::: 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.
|
|
53
|
+
`vp implode` removes all Vite+-managed Node.js runtimes, global packages, configuration, and caches. Keep the existing layout if you do not want to recreate that data.
|
|
69
54
|
:::
|
|
70
55
|
|
|
71
56
|
```bash
|
|
@@ -82,11 +67,7 @@ Remove-Item Env:\VP_HOME, Env:\VP_DATA_DIR, Env:\VP_BIN_DIR, Env:\VP_CACHE_DIR -
|
|
|
82
67
|
irm https://vite.plus/ps1 | iex
|
|
83
68
|
```
|
|
84
69
|
|
|
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.
|
|
70
|
+
Also remove persistent definitions of `VP_HOME`, `VP_DATA_DIR`, `VP_BIN_DIR`, and `VP_CACHE_DIR` from your shell profile or system environment. A fresh install uses `VP_HOME` or a complete `VP_*_DIR` group that remains set. `VP_HOME` selects the single-root layout. If you install Vite+ 0.2.x or earlier, the installer also uses this layout. The installer prints a notice.
|
|
90
71
|
|
|
91
72
|
### Rollback
|
|
92
73
|
|
|
@@ -98,35 +79,17 @@ vp upgrade --rollback
|
|
|
98
79
|
|
|
99
80
|
Older versions are pruned automatically after each upgrade. The active version and the previous version are always kept, so a rollback target is never removed.
|
|
100
81
|
|
|
101
|
-
|
|
82
|
+
### Homebrew
|
|
102
83
|
|
|
103
|
-
|
|
84
|
+
Homebrew owns its installed binary and JavaScript package. Update them with:
|
|
104
85
|
|
|
105
86
|
```bash
|
|
106
|
-
|
|
87
|
+
brew upgrade vite-plus
|
|
107
88
|
```
|
|
108
89
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
### Updating the Vitest Pin
|
|
112
|
-
|
|
113
|
-
If you migrated with `vp migrate`, your project pins `vitest` to an exact version so the whole project shares a single Vitest copy with the bundled `vp test` runner. The pin lives in your package manager's override block:
|
|
114
|
-
|
|
115
|
-
- **npm / Bun:** a `vitest` entry under `overrides` in `package.json`
|
|
116
|
-
- **Yarn:** a `vitest` entry under `resolutions` in `package.json`
|
|
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`.
|
|
90
|
+
`vp upgrade` detects Homebrew installations and directs you to this command without downloading or installing another version. This also applies to `--force`, a specific version, and `--rollback`. Use Homebrew to manage these installations.
|
|
118
91
|
|
|
119
|
-
|
|
120
|
-
|
|
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.
|
|
122
|
-
|
|
123
|
-
After upgrading `vite-plus`, re-pin `vitest` to the version Vite+ now bundles. Check that version with:
|
|
124
|
-
|
|
125
|
-
```bash
|
|
126
|
-
vp toolchain vitest
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
Then set the `vitest` override to that exact version, or rerun `vp migrate` to update the pin for you.
|
|
92
|
+
`vp upgrade --check` directs you to `brew outdated vite-plus`. Automatic npm update checks and notices are disabled for Homebrew installations.
|
|
130
93
|
|
|
131
94
|
## Preview Builds
|
|
132
95
|
|
|
@@ -160,12 +123,4 @@ The installer uses the registry bridge to resolve the ref to a `0.0.0-commit.<sh
|
|
|
160
123
|
|
|
161
124
|
### Local `vite-plus` Preview
|
|
162
125
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
```bash
|
|
166
|
-
vp migrate
|
|
167
|
-
```
|
|
168
|
-
|
|
169
|
-
Migrate writes the bridge registry to `.npmrc`. For Yarn Berry, it writes the registry to `.yarnrc.yml`. It pins `vite-plus` and the `vite` alias to the matching `0.0.0-commit.<sha>` version. The `vite` alias points to `@voidzero-dev/vite-plus-core`. Commit the registry line if the project CI must test the preview.
|
|
170
|
-
|
|
171
|
-
After the install, run `vp toolchain` to show the selected versions. After testing, set `vite-plus` to `latest`. Remove the bridge `registry` line from `.npmrc` or `.yarnrc.yml`. Then run `vp install`.
|
|
126
|
+
To use the same preview in a project, follow [Update Vite+](/guide/upgrade-project#preview-builds).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vite-plus",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.3",
|
|
4
4
|
"description": "The Unified Toolchain for the Web",
|
|
5
5
|
"homepage": "https://viteplus.dev/guide",
|
|
6
6
|
"bugs": {
|
|
@@ -359,7 +359,7 @@
|
|
|
359
359
|
}
|
|
360
360
|
},
|
|
361
361
|
"dependencies": {
|
|
362
|
-
"@oxc-project/types": "=0.
|
|
362
|
+
"@oxc-project/types": "=0.150.0",
|
|
363
363
|
"@oxlint/plugins": "=1.79.0",
|
|
364
364
|
"@vitest/browser": "4.1.11",
|
|
365
365
|
"@vitest/browser-preview": "4.1.11",
|
|
@@ -370,23 +370,23 @@
|
|
|
370
370
|
"@vitest/snapshot": "4.1.11",
|
|
371
371
|
"@vitest/spy": "4.1.11",
|
|
372
372
|
"@vitest/utils": "4.1.11",
|
|
373
|
-
"oxfmt": "=0.
|
|
374
|
-
"oxlint": "=1.
|
|
373
|
+
"oxfmt": "=0.68.0",
|
|
374
|
+
"oxlint": "=1.83.0",
|
|
375
375
|
"oxlint-tsgolint": "=7.0.2001",
|
|
376
|
-
"vite": "npm:@voidzero-dev/vite-plus-core@0.3.
|
|
376
|
+
"vite": "npm:@voidzero-dev/vite-plus-core@0.3.3",
|
|
377
377
|
"vitest": "4.1.11"
|
|
378
378
|
},
|
|
379
379
|
"devDependencies": {
|
|
380
|
-
"@emnapi/core": "2.0.0-alpha.
|
|
381
|
-
"@emnapi/runtime": "2.0.0-alpha.
|
|
382
|
-
"@napi-rs/cli": "^3.
|
|
380
|
+
"@emnapi/core": "2.0.0-alpha.5",
|
|
381
|
+
"@emnapi/runtime": "2.0.0-alpha.5",
|
|
382
|
+
"@napi-rs/cli": "^3.10.0",
|
|
383
383
|
"@nkzw/safe-word-list": "^3.1.0",
|
|
384
384
|
"@types/cross-spawn": "^6.0.6",
|
|
385
385
|
"@types/semver": "^7.8.0",
|
|
386
386
|
"@types/validate-npm-package-name": "^4.0.2",
|
|
387
387
|
"@vitest/browser-playwright": "4.1.11",
|
|
388
388
|
"@vitest/browser-webdriverio": "4.1.11",
|
|
389
|
-
"@voidzero-dev/vite-plus-prompts": "0.
|
|
389
|
+
"@voidzero-dev/vite-plus-prompts": "0.3.3",
|
|
390
390
|
"bingo": "^0.9.3",
|
|
391
391
|
"cac": "^7.0.0",
|
|
392
392
|
"cross-spawn": "^7.0.5",
|
|
@@ -434,14 +434,14 @@
|
|
|
434
434
|
"node": "^20.19.0 || ^22.18.0 || >=24.11.0"
|
|
435
435
|
},
|
|
436
436
|
"optionalDependencies": {
|
|
437
|
-
"@voidzero-dev/vite-plus-darwin-arm64": "0.3.
|
|
438
|
-
"@voidzero-dev/vite-plus-darwin-x64": "0.3.
|
|
439
|
-
"@voidzero-dev/vite-plus-linux-arm64-gnu": "0.3.
|
|
440
|
-
"@voidzero-dev/vite-plus-linux-arm64-musl": "0.3.
|
|
441
|
-
"@voidzero-dev/vite-plus-linux-x64-gnu": "0.3.
|
|
442
|
-
"@voidzero-dev/vite-plus-linux-x64-musl": "0.3.
|
|
443
|
-
"@voidzero-dev/vite-plus-win32-x64-msvc": "0.3.
|
|
444
|
-
"@voidzero-dev/vite-plus-win32-arm64-msvc": "0.3.
|
|
437
|
+
"@voidzero-dev/vite-plus-darwin-arm64": "0.3.3",
|
|
438
|
+
"@voidzero-dev/vite-plus-darwin-x64": "0.3.3",
|
|
439
|
+
"@voidzero-dev/vite-plus-linux-arm64-gnu": "0.3.3",
|
|
440
|
+
"@voidzero-dev/vite-plus-linux-arm64-musl": "0.3.3",
|
|
441
|
+
"@voidzero-dev/vite-plus-linux-x64-gnu": "0.3.3",
|
|
442
|
+
"@voidzero-dev/vite-plus-linux-x64-musl": "0.3.3",
|
|
443
|
+
"@voidzero-dev/vite-plus-win32-x64-msvc": "0.3.3",
|
|
444
|
+
"@voidzero-dev/vite-plus-win32-arm64-msvc": "0.3.3"
|
|
445
445
|
},
|
|
446
446
|
"scripts": {
|
|
447
447
|
"build": "oxnode -C dev ./build.ts",
|
|
@@ -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.
|