vite-plus 0.3.0 → 0.3.1

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 (80) hide show
  1. package/LICENSE +29 -29
  2. package/README.md +2 -2
  3. package/binding/index.cjs +60 -55
  4. package/binding/index.d.cts +125 -14
  5. package/dist/{agent-Wqx0MPk0.js → agent-C5jMYVfB.js} +3 -2
  6. package/dist/bin.js +89 -58
  7. package/dist/cli-parse-DHE8NrBU.js +13 -0
  8. package/dist/client/bundledDevClient.mjs +1 -1
  9. package/dist/client/client.mjs +1 -1
  10. package/dist/client/env.mjs +1 -1
  11. package/dist/client.d.ts +1 -1
  12. package/dist/config/bin.js +83 -55
  13. package/dist/{constants-Bn-U8o4v.js → constants-0IAVgpox.js} +3 -3
  14. package/dist/create/bin.d.ts +13 -5
  15. package/dist/create/bin.js +37 -190
  16. package/dist/{define-config-WiVlryJ2.cjs → define-config-DIE9de46.cjs} +1 -1
  17. package/dist/{define-config-DWoAkNdp.d.ts → define-config-DPNEJxPz.d.ts} +5 -9
  18. package/dist/{define-config-GXUdVT-0.js → define-config-U3_xg7i-.js} +2 -2
  19. package/dist/define-config.cjs +1 -1
  20. package/dist/define-config.d.ts +1 -1
  21. package/dist/define-config.js +1 -1
  22. package/dist/dist-DfmT__Aw.js +619 -0
  23. package/dist/{editor-CC4DqODz.js → editor-B5-lvRaU.js} +68 -40
  24. package/dist/hooks/bin.js +9 -114
  25. package/dist/{hooks-DFqViZqZ.js → hooks-C-4gykWR.js} +1 -1
  26. package/dist/index.cjs +2 -2
  27. package/dist/index.d.ts +2 -2
  28. package/dist/index.js +2 -2
  29. package/dist/internal.d.ts +1 -1
  30. package/dist/internal.js +1 -1
  31. package/dist/migration/bin.js +24 -143
  32. package/dist/migration/compat/worker.js +1 -1
  33. package/dist/module-runner.d.ts +1 -1
  34. package/dist/module-runner.js +1 -1
  35. package/dist/{oxlint-plugin-config-DX5ezKbB.js → oxlint-plugin-config-Drdl67Xp.js} +1 -1
  36. package/dist/oxlint-plugin.d.ts +2 -2
  37. package/dist/oxlint-plugin.js +1 -1
  38. package/dist/{pack-PvUg_xpv.d.ts → pack-BK38MLVZ.d.ts} +1 -1
  39. package/dist/pack-bin.d.ts +2 -3
  40. package/dist/pack-bin.js +5 -622
  41. package/dist/pack-client.d.ts +1 -1
  42. package/dist/pack.d.ts +2 -2
  43. package/dist/pack.js +1 -1
  44. package/dist/{package-CBe9EWPY.js → package-BZz2Ij68.js} +1 -1
  45. package/dist/{prompts-DF3yU-eU.js → prompts-CtzEgFY-.js} +3 -1400
  46. package/dist/{report-ZNR1Mk6h.js → report-CK5TnTsr.js} +1 -0
  47. package/dist/{resolve-vite-config-ipGb39Jo.js → resolve-vite-config-CGks1xR7.js} +3 -3
  48. package/dist/resolve-vite-config-Dnmc-lBc.js +2 -0
  49. package/dist/semver-CaDAb8vV.js +1400 -0
  50. package/dist/staged/bin.js +83 -218
  51. package/dist/sync-versions/bin.d.ts +1 -0
  52. package/dist/sync-versions/bin.js +3884 -0
  53. package/dist/sync-versions/bin.mjs +13323 -0
  54. package/dist/toolchain.js +9 -9
  55. package/dist/toolchain.json +9 -9
  56. package/dist/{tsconfig-LD2QhQ0O.js → tsconfig-CUggNuJR.js} +2 -2
  57. package/dist/{tsconfig-BVHG3DpR.js → tsconfig-VAbm4ZzJ.js} +1 -1
  58. package/dist/tsgolint-path.d.ts +3 -4
  59. package/dist/types/customEvent.d.ts +1 -1
  60. package/dist/types/hmrPayload.d.ts +1 -1
  61. package/dist/types/hot.d.ts +1 -1
  62. package/dist/types/import-meta.d.ts +1 -1
  63. package/dist/types/importGlob.d.ts +1 -1
  64. package/dist/types/importMeta.d.ts +1 -1
  65. package/dist/types/metadata.d.ts +1 -1
  66. package/dist/version.d.ts +2 -3
  67. package/dist/version.js +2 -2
  68. package/dist/versions.js +4 -4
  69. package/dist/vitest-ecosystem-BiRqcaRI.js +23 -0
  70. package/docs/guide/check.md +1 -0
  71. package/docs/guide/ci.md +42 -2
  72. package/docs/guide/env.md +124 -52
  73. package/docs/guide/ide-integration.md +14 -2
  74. package/docs/guide/index.md +1 -1
  75. package/docs/guide/install.md +3 -1
  76. package/docs/guide/installer-env-vars.md +10 -0
  77. package/docs/guide/migrate-rules.md +57 -2
  78. package/package.json +17 -19
  79. package/dist/lib-L3DWSRQp.js +0 -75
  80. package/dist/{log-update-DHZRyJ2m.js → log-update-CoW8Z4Dl.js} +1 -1
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.3.0",
7
+ "version": "0.3.1",
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.3.0",
17
+ "version": "0.3.1",
18
18
  "kind": "package",
19
19
  "delivery": [
20
20
  "dependency"
@@ -36,7 +36,7 @@ export const toolchain = {
36
36
  {
37
37
  "id": "rolldown",
38
38
  "name": "rolldown",
39
- "version": "1.2.5",
39
+ "version": "1.2.7",
40
40
  "kind": "tool",
41
41
  "delivery": [
42
42
  "bundled",
@@ -57,7 +57,7 @@ export const toolchain = {
57
57
  {
58
58
  "id": "oxlint",
59
59
  "name": "oxlint",
60
- "version": "1.79.0",
60
+ "version": "1.81.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.64.0",
70
+ "version": "0.66.0",
71
71
  "kind": "tool",
72
72
  "delivery": [
73
73
  "dependency"
@@ -89,7 +89,7 @@ export const toolchain = {
89
89
  {
90
90
  "id": "tsdown",
91
91
  "name": "tsdown",
92
- "version": "0.22.14",
92
+ "version": "0.23.0",
93
93
  "kind": "tool",
94
94
  "delivery": [
95
95
  "bundled"
@@ -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-24T03:41:26Z",
103
+ "builtAt": "2026-09-08T13:14:20Z",
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.146.0",
113
+ "version": "0.148.0",
114
114
  "kind": "engine",
115
115
  "delivery": [
116
116
  "compiled"
@@ -120,7 +120,7 @@ export const toolchain = {
120
120
  {
121
121
  "id": "oxc-resolver",
122
122
  "name": "oxc-resolver",
123
- "version": "11.24.2",
123
+ "version": "11.24.3",
124
124
  "kind": "engine",
125
125
  "delivery": [
126
126
  "compiled"
@@ -4,7 +4,7 @@
4
4
  {
5
5
  "id": "vite-plus",
6
6
  "name": "vite-plus",
7
- "version": "0.3.0",
7
+ "version": "0.3.1",
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.3.0",
17
+ "version": "0.3.1",
18
18
  "kind": "package",
19
19
  "delivery": [
20
20
  "dependency"
@@ -36,7 +36,7 @@
36
36
  {
37
37
  "id": "rolldown",
38
38
  "name": "rolldown",
39
- "version": "1.2.5",
39
+ "version": "1.2.7",
40
40
  "kind": "tool",
41
41
  "delivery": [
42
42
  "bundled",
@@ -57,7 +57,7 @@
57
57
  {
58
58
  "id": "oxlint",
59
59
  "name": "oxlint",
60
- "version": "1.79.0",
60
+ "version": "1.81.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.64.0",
70
+ "version": "0.66.0",
71
71
  "kind": "tool",
72
72
  "delivery": [
73
73
  "dependency"
@@ -89,7 +89,7 @@
89
89
  {
90
90
  "id": "tsdown",
91
91
  "name": "tsdown",
92
- "version": "0.22.14",
92
+ "version": "0.23.0",
93
93
  "kind": "tool",
94
94
  "delivery": [
95
95
  "bundled"
@@ -100,7 +100,7 @@
100
100
  "id": "vite-task",
101
101
  "name": "vite-task",
102
102
  "revision": "d05b1dcdbaabaa69643ee0b89cebe3cd390957e9",
103
- "builtAt": "2026-08-24T03:41:26Z",
103
+ "builtAt": "2026-09-08T13:14:20Z",
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.146.0",
113
+ "version": "0.148.0",
114
114
  "kind": "engine",
115
115
  "delivery": [
116
116
  "compiled"
@@ -120,7 +120,7 @@
120
120
  {
121
121
  "id": "oxc-resolver",
122
122
  "name": "oxc-resolver",
123
- "version": "11.24.2",
123
+ "version": "11.24.3",
124
124
  "kind": "engine",
125
125
  "delivery": [
126
126
  "compiled"
@@ -1,6 +1,6 @@
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";
1
+ import { p as createBaseUrlTsconfigFixArgs, t as BASEURL_TSCONFIG_FIX_PACKAGE } from "./constants-0IAVgpox.js";
3
2
  import { c as parse, o as applyEdits, s as modify } from "./json-cULBl7Pi.js";
3
+ import { S as log, b as confirm, k as isCancel, t as cancelAndExit } from "./prompts-CtzEgFY-.js";
4
4
  import { n as runCommandSilently } from "./command-CguLh2KL.js";
5
5
  import path from "node:path";
6
6
  import { styleText } from "node:util";
@@ -1,2 +1,2 @@
1
- import { a as hasBaseUrlInTsconfig, i as fixBaseUrlInTsconfig } from "./tsconfig-LD2QhQ0O.js";
1
+ import { a as hasBaseUrlInTsconfig, i as fixBaseUrlInTsconfig } from "./tsconfig-CUggNuJR.js";
2
2
  export { fixBaseUrlInTsconfig, hasBaseUrlInTsconfig };
@@ -1,8 +1,7 @@
1
1
  //#region src/utils/tsgolint-path.d.ts
2
- declare function resolveWindowsTsgolintExecutable(pathCandidates: string[], options: {
2
+ export declare function resolveWindowsTsgolintExecutable(pathCandidates: string[], options: {
3
3
  exists: (path: string) => boolean;
4
4
  getRealpathCandidates?: () => string[];
5
5
  }): string;
6
- declare function resolveTsgolintExecutable(tsgolintBinPath: string, scriptUrl: string): string;
7
- //#endregion
8
- export { resolveTsgolintExecutable, resolveWindowsTsgolintExecutable };
6
+ export declare function resolveTsgolintExecutable(tsgolintBinPath: string, scriptUrl: string): string;
7
+ //#endregion
@@ -1 +1 @@
1
- export type * from '@voidzero-dev/vite-plus-core/types/customEvent.d.ts';
1
+ export type * from 'vite/types/customEvent.d.ts';
@@ -1 +1 @@
1
- export type * from '@voidzero-dev/vite-plus-core/types/hmrPayload.d.ts';
1
+ export type * from 'vite/types/hmrPayload.d.ts';
@@ -1 +1 @@
1
- export type * from '@voidzero-dev/vite-plus-core/types/hot.d.ts';
1
+ export type * from 'vite/types/hot.d.ts';
@@ -1 +1 @@
1
- export type * from '@voidzero-dev/vite-plus-core/types/import-meta.d.ts';
1
+ export type * from 'vite/types/import-meta.d.ts';
@@ -1 +1 @@
1
- export type * from '@voidzero-dev/vite-plus-core/types/importGlob.d.ts';
1
+ export type * from 'vite/types/importGlob.d.ts';
@@ -1 +1 @@
1
- export type * from '@voidzero-dev/vite-plus-core/types/importMeta.d.ts';
1
+ export type * from 'vite/types/importMeta.d.ts';
@@ -1 +1 @@
1
- export type * from '@voidzero-dev/vite-plus-core/types/metadata.d.ts';
1
+ export type * from 'vite/types/metadata.d.ts';
package/dist/version.d.ts CHANGED
@@ -2,6 +2,5 @@
2
2
  /**
3
3
  * Print version information
4
4
  */
5
- declare function printVersion(cwd: string): Promise<void>;
6
- //#endregion
7
- export { printVersion };
5
+ export declare function printVersion(cwd: string): Promise<void>;
6
+ //#endregion
package/dist/version.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { t as renderCliDoc } from "./help-BmKpeOP9.js";
2
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";
3
+ import { _ as version } from "./constants-0IAVgpox.js";
4
+ import { i as hasVitePlusDependency, n as detectPackageMetadata } from "./package-BZz2Ij68.js";
5
5
  import path from "node:path";
6
6
  import fs from "node:fs";
7
7
  //#region src/version.ts
package/dist/versions.js CHANGED
@@ -1,9 +1,9 @@
1
1
  export const versions = {
2
2
  "vite": "8.2.2",
3
- "rolldown": "1.2.5",
3
+ "rolldown": "1.2.7",
4
4
  "vitest": "4.1.11",
5
- "oxfmt": "0.64.0",
6
- "oxlint": "1.79.0",
5
+ "oxfmt": "0.66.0",
6
+ "oxlint": "1.81.0",
7
7
  "oxlint-tsgolint": "7.0.2001",
8
- "tsdown": "0.22.14"
8
+ "tsdown": "0.23.0"
9
9
  };
@@ -0,0 +1,23 @@
1
+ //#region src/utils/package-overrides.ts
2
+ function extractOverrideTargetName(key) {
3
+ let target = key.trim();
4
+ for (let delimiter = target.search(/[^ |@]>/); delimiter !== -1; delimiter = target.search(/[^ |@]>/)) target = target.slice(delimiter + 2).trim();
5
+ if (!target) return target;
6
+ if (target.includes("/")) {
7
+ const segments = target.split("/");
8
+ const last = segments[segments.length - 1];
9
+ const scope = segments[segments.length - 2];
10
+ target = scope?.startsWith("@") ? `${scope}/${last}` : last;
11
+ }
12
+ const nameStart = target.startsWith("@") ? target.indexOf("/") + 1 : 0;
13
+ const versionAt = target.indexOf("@", nameStart);
14
+ return versionAt > 0 ? target.slice(0, versionAt) : target;
15
+ }
16
+ //#endregion
17
+ //#region src/utils/vitest-ecosystem.ts
18
+ const VITEST_ALIGN_EXCLUDED = /* @__PURE__ */ new Set(["@vitest/eslint-plugin", "@vitest/coverage-c8"]);
19
+ function isAlignableVitestEcosystemPackage(name) {
20
+ return name.startsWith("@vitest/") && !VITEST_ALIGN_EXCLUDED.has(name);
21
+ }
22
+ //#endregion
23
+ export { extractOverrideTargetName as n, isAlignableVitestEcosystemPackage as t };
@@ -15,6 +15,7 @@ We recommend turning `typeCheck` on so `vp check` becomes the single command for
15
15
  ```bash
16
16
  vp check
17
17
  vp check --fix # Format and run autofixers.
18
+ vp check --quiet # Hide lint warnings; still report and fail on errors.
18
19
  vp check --no-fmt # Skip format; run lint (and type-check if enabled).
19
20
  vp check --no-lint # Skip lint rules; keep type-check when enabled.
20
21
  vp check --no-fmt --no-lint # Type-check only (requires `typeCheck` enabled).
package/docs/guide/ci.md CHANGED
@@ -4,12 +4,17 @@ You can use `voidzero-dev/setup-vp` to use Vite+ in CI environments.
4
4
 
5
5
  ## Overview
6
6
 
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.
7
+ [`voidzero-dev/setup-vp`](https://github.com/voidzero-dev/setup-vp) provides integrations for GitHub Actions, GitLab CI/CD, and Azure Pipelines. All three install Vite+ and can install project dependencies. The GitHub Action and Azure Pipelines template 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
9
  ## setup-vp Versioning
10
10
 
11
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
12
 
13
+ Run `vp migrate` to replace exact `voidzero-dev/setup-vp@v1` references in
14
+ GitHub Actions workflows and composite actions under `.github` with the latest
15
+ exact release known to your Vite+ version. Existing exact versions and commit
16
+ SHAs remain unchanged.
17
+
13
18
  ### Automatic Version Updates
14
19
 
15
20
  Dependabot and Renovate can update exact versions in GitHub Actions workflows.
@@ -35,7 +40,7 @@ When you use a commit SHA, add the exact release tag in a comment. Renovate uses
35
40
  - uses: voidzero-dev/setup-vp@<commit-sha> # <setup-vp-version>
36
41
  ```
37
42
 
38
- These settings apply only to GitHub Actions workflows. For GitLab CI/CD, update both version values together.
43
+ These settings apply only to GitHub Actions workflows. For GitLab CI/CD and Azure Pipelines, update both version values together.
39
44
 
40
45
  ## GitHub Actions
41
46
 
@@ -85,6 +90,41 @@ The GitLab CI/CD integration differs from the GitHub Action in a few ways:
85
90
 
86
91
  For advanced configuration and the complete input reference, see the [`setup-vp` GitLab CI/CD documentation](https://github.com/voidzero-dev/setup-vp#gitlab-cicd).
87
92
 
93
+ ## Azure Pipelines
94
+
95
+ Use the reusable `setup-vp` step template in your Azure Pipelines configuration. Create a GitHub service connection named `github`, then reference the template from the `setup-vp` repository:
96
+
97
+ ```yaml [azure-pipelines.yml]
98
+ resources:
99
+ repositories:
100
+ - repository: setupVp
101
+ type: github
102
+ endpoint: github
103
+ name: voidzero-dev/setup-vp
104
+ ref: refs/tags/<setup-vp-version>
105
+
106
+ pool:
107
+ vmImage: ubuntu-latest
108
+
109
+ steps:
110
+ - checkout: self
111
+ - template: azure/setup-vp.yml@setupVp
112
+ parameters:
113
+ setupRef: '<setup-vp-version>'
114
+ nodeVersion: 24.x
115
+ cache: true
116
+ runInstall: true
117
+ - script: vp check
118
+ - script: vp test
119
+ - script: vp build
120
+ ```
121
+
122
+ Pin `ref` and `setupRef` to the same tag or commit SHA for strict reproducibility.
123
+
124
+ The Azure Pipelines template supports Microsoft-hosted Linux, macOS, and Windows agents. It uses Azure's native `UseNode@1` and `Cache@2` tasks to set up Node.js and cache package-manager data.
125
+
126
+ For advanced configuration and the complete parameter reference, see the [`setup-vp` Azure Pipelines documentation](https://github.com/voidzero-dev/setup-vp#azure-pipelines).
127
+
88
128
  ## Simplifying Existing Workflows
89
129
 
90
130
  If you are migrating an existing GitHub Actions workflow, you can often replace large blocks of Node, package-manager, and cache setup with a single `setup-vp` step.
package/docs/guide/env.md CHANGED
@@ -1,10 +1,23 @@
1
1
  # Environment
2
2
 
3
- `vp env` manages Node.js versions globally and per project.
3
+ `vp env` manages the complete JavaScript environment: one Node.js runtime and one selected package manager. npm, pnpm, Yarn, and Bun are peer package-manager families.
4
4
 
5
5
  ## Overview
6
6
 
7
- Managed mode is on by default, so `node`, `npm`, and related shims resolve through Vite+ and pick the right Node.js version for the current project.
7
+ Managed mode is on by default, so Node.js and configured package-manager shims resolve through Vite+ and pick the right versions for the current project. Fresh installers record managed mode for npm, pnpm, Yarn, and Bun after the user enables environment management.
8
+
9
+ When an upgrade adds a package-manager shim that has no recorded mode, its first interactive invocation asks what to do only when the corresponding system binary is already on PATH. The current family defaults to managed mode; choosing a system tool or applying a choice to every family remains explicit. Non-interactive invocations use managed mode without recording a choice.
10
+
11
+ Most commands operate on both components when no selector is given. Add `node`, `pm`, `npm`, `pnpm`, `yarn`, or `bun` to narrow the command. `pm` means all four families for listing and cleanup, but the single selected package manager for project operations.
12
+
13
+ Unqualified versions remain Node.js versions for compatibility:
14
+
15
+ ```bash
16
+ vp env pin 22.0.0 # Node.js only
17
+ vp env pin pnpm@10.18.0 # pnpm only
18
+ vp env pin node@24 pnpm@12 # Both components
19
+ vp env pin 22.0.0 pnpm@10.18.0 # Also both components
20
+ ```
8
21
 
9
22
  Vite+ checks the current directory first, then walks up through its parents. The nearest directory
10
23
  with a supported declaration wins. Within each directory, sources are checked in this order:
@@ -19,7 +32,29 @@ latest LTS.
19
32
 
20
33
  `devEngines.runtime` ranks above `engines.node` because it declares the development-environment requirement, while `engines.node` is a consumer-facing support range. `vp env doctor` warns when declared sources conflict.
21
34
 
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.
35
+ ::: tip Using pnpm with Vite+ runtime management
36
+ pnpm can also manage the runtime declared in `devEngines.runtime`. When both pnpm and Vite+ manage Node.js, they can download the same version separately or select different versions, causing inconsistent behavior between commands.
37
+
38
+ If you want Vite+ to manage Node.js, pnpm 11+ supports disabling pnpm's automatic runtime management globally with [`runtimeOnFail`](https://pnpm.io/settings/cli#runtimeonfail):
39
+
40
+ ```bash
41
+ pnpm config set --global runtimeOnFail ignore
42
+ ```
43
+
44
+ This setting also disables pnpm's automatic management of other declared runtimes, including Bun and Deno. Consider whether any of your projects rely on that behavior before setting it globally.
45
+ :::
46
+
47
+ Package-manager selection uses this priority:
48
+
49
+ 1. Explicit command override
50
+ 2. `VP_PACKAGE_MANAGER` or the shell-session override
51
+ 3. Top-level `packageManager`
52
+ 4. `devEngines.packageManager`
53
+ 5. Lockfile or manager-specific configuration
54
+ 6. The named package manager's global default version
55
+ 7. The named shim's latest release
56
+
57
+ A selected manager controls only its named shims. For example, pnpm controls `pnpm` and `pnpx`; invoking `npm` still resolves npm independently. Alias pairs are `npm`/`npx`, `pnpm`/`pnpx`, `yarn`/`yarnpkg`, and `bun`/`bunx`. Without a matching project selection, a named shim uses its configured default version and otherwise uses the latest release without prompting. The resolved version is cached for one hour and an expired cache remains available when the registry cannot be reached. The directly invoked npm shim keeps its Node-bundled fallback, while an explicit `vp env ... npm` family scope uses standalone npm's latest release.
23
58
 
24
59
  A fresh install uses the split platform layout by default. On Unix, Vite+
25
60
  stores managed runtimes and related files in `~/.local/share/vite-plus`. It
@@ -34,7 +69,14 @@ If you want to keep that behavior, run:
34
69
  vp env on
35
70
  ```
36
71
 
37
- This enables managed mode, where the shims always use the Vite+-managed Node.js installation.
72
+ This enables managed mode for both components. Their modes can also be changed independently, including one package-manager family:
73
+
74
+ ```bash
75
+ vp env on node
76
+ vp env off pm
77
+ vp env off pnpm
78
+ vp env on bun
79
+ ```
38
80
 
39
81
  If you do not want Vite+ to manage Node.js first, run:
40
82
 
@@ -42,16 +84,17 @@ If you do not want Vite+ to manage Node.js first, run:
42
84
  vp env off
43
85
  ```
44
86
 
45
- This switches to system-first mode, where the shims prefer your system Node.js and only fall back to the Vite+-managed runtime when needed.
87
+ This switches both components to system-first mode. Vite+ prefers system tools and falls back to managed installations. Mixed configurations compose: a system package-manager launcher receives the Node.js selected by the Node mode.
88
+
89
+ Using `pm` records the selected mode for all currently supported package managers and replaces their individual choices. An unscoped `on` or `off` does the same while also changing Node.js. A family without a recorded mode remains undecided until its shim is first used or an `on` / `off` command configures it.
46
90
 
47
91
  ## Commands
48
92
 
49
93
  ### Setup
50
94
 
51
- - `vp env setup` creates or updates shims in the resolved bin directory. It writes shell setup scripts in the config directory.
52
- - `vp env on` enables managed mode so shims always use Vite+-managed Node.js
53
- - `vp env off` enables system-first mode so shims prefer system Node.js first
54
- - `vp env print` prints the shell snippet for the current session
95
+ - `vp env setup` creates or updates the `node`, `npm`, `npx`, `pnpm`, `pnpx`, `yarn`, `yarnpkg`, `bun`, `bunx`, `vpx`, and `vpr` shims in the resolved bin directory. It writes shell setup scripts in the config directory.
96
+ - `vp env on` / `vp env off` changes both modes; append `node`, `pm`, `npm`, `pnpm`, `yarn`, or `bun` to narrow the change
97
+ - `vp env print` prints PATH setup for both components; append a selector to print one
55
98
 
56
99
  PowerShell needs to dot-source the generated setup script in the current shell before `vp env use` can affect only that shell session:
57
100
 
@@ -87,28 +130,28 @@ vp-use --unset
87
130
  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.
88
131
 
89
132
  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.
133
+ Node.js or package-manager session file in the resolved state directory. Later
134
+ shim calls in the same job use these files to resolve the same environment.
92
135
 
93
136
  ### Manage
94
137
 
95
- - `vp env default` sets or shows the global default Node.js version
96
- - `vp env pin` pins a Node.js version in the current directory: an existing `.node-version` keeps being updated; otherwise the pin is written to `package.json#devEngines.runtime`; `.node-version` is only created when the directory has no `package.json`. Use `--target node-version` or `--target dev-engines` to choose explicitly. An existing `engines.node` is never modified.
97
- - `vp env unpin` removes the pin from the same source `vp env pin` would write
98
- - `vp env use` sets a Node.js version for the current shell session
99
- - `vp env install` installs a Node.js version
100
- - `vp env uninstall` removes an installed Node.js version
101
- - `vp env clean` removes unused managed Node.js runtimes, all downloaded package managers, and the Corepack cache.
102
- - `vp env exec` runs a command with a specific Node.js version
103
- - `vp node` runs a Node.js script shorthand for `vp env exec node`
138
+ - `vp env default` shows the global Node.js default and each configured package-manager version. Bare versions set Node.js; qualified specs such as `pnpm@10.18.0` set that package manager's shim default without replacing the defaults for Bun, Yarn, or npm. `--unset` clears all defaults unless scoped.
139
+ - `vp env pin` shows or writes project pins. Existing `.node-version` and top-level `packageManager` fields keep being updated for compatibility; otherwise Vite+ writes the matching `devEngines` entry. Use `--target node-version`, `--target dev-engines`, or `--target package-manager` to choose explicitly.
140
+ - `vp env unpin` removes both effective pins by default; append a selector to remove one. Lower-priority declarations are not deleted.
141
+ - `vp env use` activates the complete project environment. Explicit specs override selected components; `--unset` clears both unless scoped.
142
+ - `vp env install` installs the complete resolved environment, a selected component, or explicit specs.
143
+ - `vp env uninstall` removes explicit exact Node.js or qualified package-manager versions.
144
+ - `vp env clean` removes unused installs. Use `clean node`, `clean pm`, or a concrete manager. Current and configured-default versions are preserved.
145
+ - `vp env exec` runs a command in the resolved environment. Use `--node` and `--package-manager`; `--npm` is an alias for `--package-manager npm@…`.
146
+ - `vp node` uses the resolved Node.js runtime and exposes the selected package-manager path to child processes.
104
147
 
105
148
  ### Inspect
106
149
 
107
150
  - `vp env current` shows the current resolved environment
108
151
  - `vp env doctor` runs environment diagnostics
109
152
  - `vp env which` shows which tool path will be used
110
- - `vp env list` shows locally installed Node.js versions
111
- - `vp env list-remote` shows available Node.js versions from the registry
153
+ - `vp env list` shows separate Node.js, npm, pnpm, Yarn, and Bun sections; selectors narrow output
154
+ - `vp env list-remote` fetches Node.js and all four PM registries concurrently; selectors narrow network work. `--lts` implicitly selects Node.js.
112
155
 
113
156
  ## Project Setup
114
157
 
@@ -120,54 +163,83 @@ use this file to select the Node.js version.
120
163
 
121
164
  ```bash
122
165
  # Setup
123
- vp env setup # Create shims for node, npm, npx, corepack
124
- vp env on # Use Vite+ managed Node.js
125
- vp env print # Print shell snippet for this session
166
+ vp env setup # Create Node.js and package-manager shims
167
+ vp env on # Manage Node.js and package managers
168
+ vp env off pm # Prefer system package managers only
169
+ vp env off pnpm # Prefer system pnpm only
170
+ vp env print # Print PATH setup for both components
126
171
 
127
172
  # Manage
128
- vp env pin lts # Pin the project to the latest LTS release
129
- vp env install # Install the version from .node-version, package.json, or .nvmrc
130
- vp env default lts # Set the global default version
131
- vp env use 20 # Use Node.js 20 for the current shell session
132
- vp env use --unset # Remove the session override
133
- vp env clean # Remove unused managed caches
173
+ vp env pin lts pnpm@10 # Pin both project components to exact versions
174
+ vp env install # Install the complete resolved environment
175
+ vp env default node@24 # Set the global Node.js default
176
+ vp env default pnpm@10 # Set pnpm's global default version
177
+ vp env use 20 pnpm@10 # Override both components for this shell
178
+ vp env use --unset pm # Remove only the PM session override
179
+ vp env clean # Remove unused managed Node.js and package manager versions
134
180
 
135
181
  # Inspect
136
182
  vp env current # Show current resolved environment
137
183
  vp env current --json # JSON output for automation
138
184
  vp env which node # Show which node binary will be used
139
185
  vp env which npx # Show pinned package-manager alias when packageManager matches
140
- vp env list-remote --lts # List only LTS versions
186
+ vp env list # Show every locally installed component
187
+ vp env list node # Show only Node.js installations
188
+ vp env list-remote --lts # List only Node.js LTS versions
141
189
 
142
190
  # Execute
143
- vp env exec --node lts npm i # Execute npm with latest LTS
191
+ vp env exec --node lts --package-manager pnpm@10 pnpm install
144
192
  vp env exec node -v # Use shim mode with automatic version resolution
145
193
  vp node script.js # Shorthand: run a Node.js script with the resolved version
146
194
  vp node -e "console.log(1+1)" # Shorthand: forward any node flag or argument
147
195
  ```
148
196
 
149
- ## Corepack
150
-
151
- Vite+ creates a `corepack` shim by default, so corepack works without a system Node.js installation:
152
-
153
- - On Node.js 24 and earlier, the shim runs the corepack bundled with the resolved Node.js version.
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.
155
- - If you install corepack explicitly with `vp install -g corepack`, that installation is always preferred.
156
-
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:
162
-
163
- ```bash
164
- corepack enable # pnpm and yarn now resolve via corepack
165
- corepack disable # Remove the pnpm/yarn launchers again
197
+ ## JSON output
198
+
199
+ The JSON output for `current`, `list`, and `list-remote` is organized by component. `current --json` returns sibling `node` and `package_manager` objects:
200
+
201
+ ```json
202
+ {
203
+ "node": {
204
+ "version": "22.0.0",
205
+ "source": "devEngines.runtime",
206
+ "source_path": "/project/package.json",
207
+ "project_root": "/project",
208
+ "bin_path": "/home/.vite-plus/js_runtime/node/22.0.0/bin/node",
209
+ "installed": true,
210
+ "mode": "managed"
211
+ },
212
+ "package_manager": {
213
+ "name": "pnpm",
214
+ "version": "10.18.0",
215
+ "source": "packageManager",
216
+ "source_path": "/project/package.json",
217
+ "project_root": "/project",
218
+ "bin_paths": {
219
+ "pnpm": "/home/.vite-plus/package_manager/pnpm/10.18.0/pnpm/bin/pnpm",
220
+ "pnpx": "/home/.vite-plus/package_manager/pnpm/10.18.0/pnpm/bin/pnpx"
221
+ },
222
+ "installed": true,
223
+ "mode": "managed"
224
+ }
225
+ }
166
226
  ```
167
227
 
168
- The launchers reference the corepack copy that created them. If that copy is later removed (for example by uninstalling the Node.js version it shipped with), rerun `corepack enable` to recreate them.
228
+ `list --json` and `list-remote --json` group the component arrays:
229
+
230
+ ```json
231
+ {
232
+ "node": [],
233
+ "package_managers": {
234
+ "npm": [],
235
+ "pnpm": [],
236
+ "yarn": [],
237
+ "bun": []
238
+ }
239
+ }
240
+ ```
169
241
 
170
- Shims owned by Vite+ (`npm`, `npx`, and binaries installed with `vp install -g`) are protected: if corepack removes or replaces them, Vite+ restores them and prints a warning.
242
+ Selectors omit unselected top-level fields or PM families. Registry listing is all-or-error: Vite+ prints no partial human or JSON result when any selected registry request fails.
171
243
 
172
244
  ## Custom Node.js Mirror
173
245