vite-plus 1.5.0 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/binding/index.cjs +117 -55
  2. package/binding/index.d.cts +9 -0
  3. package/dist/{agent-DkQD3xqe.js → agent-CTG3B-ec.js} +2 -2
  4. package/dist/bin.js +36 -7
  5. package/dist/{comparison-CmVirWIW-UlEf2maz.js → comparison-CmVirWIW-Z8p6CfWL.js} +4 -1
  6. package/dist/config/bin.js +2 -2
  7. package/dist/constants-DXqV1vWL.js +77 -0
  8. package/dist/create/bin.js +30 -35
  9. package/dist/{define-config-wR57OZG_.js → define-config-CeYkQCqG.js} +1 -1
  10. package/dist/{define-config-CwtQqYC1.cjs → define-config-jt2Hyhp2.cjs} +1 -1
  11. package/dist/define-config.cjs +1 -1
  12. package/dist/define-config.js +1 -1
  13. package/dist/{editor-aOy1T15H.js → editor-C0U0Ymqk.js} +213 -83
  14. package/dist/index.cjs +1 -1
  15. package/dist/index.js +1 -1
  16. package/dist/lint-plugins.cjs +1 -1
  17. package/dist/migration/bin.js +9 -8
  18. package/dist/{oxlint-plugin-config-CHsI_zKo.js → oxlint-plugin-config-DvBRM_Se.js} +1 -1
  19. package/dist/oxlint-plugin.js +2 -2
  20. package/dist/pack-bin.js +1 -1
  21. package/dist/{package-DfFo6-E-.js → package-CK48ZXBV.js} +1 -1
  22. package/dist/{constants-D2P2aVKb.js → package-Cc9gI1u1.js} +2 -77
  23. package/dist/{package-overrides-Ci8GXouY.js → package-overrides-nw4zcITi.js} +1 -1
  24. package/dist/{prompts-C7DI63WP.js → prompts-JkuWOV60.js} +9 -5
  25. package/dist/{resolve-vite-config-33bzSaeT.js → resolve-vite-config-CfUvxuCo.js} +1 -1
  26. package/dist/{resolve-vite-config-Cx3cnVVI.js → resolve-vite-config-x5QVnaf4.js} +2 -2
  27. package/dist/staged/bin.js +1 -1
  28. package/dist/sync-versions/bin.js +1 -1
  29. package/dist/toolchain.js +9 -9
  30. package/dist/toolchain.json +9 -9
  31. package/dist/{tsconfig-BE3Wj9OX.js → tsconfig-CZlh956U.js} +1 -1
  32. package/dist/{tsconfig-shNmmCE_.js → tsconfig-DUR3fhIX.js} +2 -2
  33. package/dist/user-agent-CpEaSTwI.js +6 -0
  34. package/dist/version.js +3 -2
  35. package/dist/versions.js +5 -5
  36. package/dist/vpx-bin.js +2 -0
  37. package/docs/config/run.md +8 -7
  38. package/docs/guide/automatic-data-tracking.md +138 -0
  39. package/docs/guide/check.md +13 -0
  40. package/docs/guide/global-cli.md +13 -3
  41. package/docs/guide/index.md +4 -4
  42. package/docs/guide/local-cli.md +1 -1
  43. package/docs/guide/migrate-rules.md +3 -1
  44. package/docs/guide/migrate.md +4 -4
  45. package/docs/guide/package-management/add.md +84 -0
  46. package/docs/guide/package-management/approve-builds.md +48 -0
  47. package/docs/guide/package-management/audit.md +39 -0
  48. package/docs/guide/package-management/cache.md +53 -0
  49. package/docs/guide/package-management/ci.md +28 -0
  50. package/docs/guide/package-management/config.md +119 -0
  51. package/docs/guide/package-management/dedupe.md +32 -0
  52. package/docs/guide/package-management/deprecate.md +39 -0
  53. package/docs/guide/package-management/dist-tag.md +61 -0
  54. package/docs/guide/package-management/dlx.md +40 -0
  55. package/docs/guide/package-management/fund.md +32 -0
  56. package/docs/guide/package-management/global-packages.md +32 -0
  57. package/docs/guide/package-management/index.md +78 -0
  58. package/docs/guide/package-management/info.md +35 -0
  59. package/docs/guide/package-management/install.md +89 -0
  60. package/docs/guide/package-management/licenses.md +42 -0
  61. package/docs/guide/package-management/link.md +29 -0
  62. package/docs/guide/package-management/list.md +60 -0
  63. package/docs/guide/package-management/login.md +34 -0
  64. package/docs/guide/package-management/logout.md +34 -0
  65. package/docs/guide/package-management/outdated.md +60 -0
  66. package/docs/guide/package-management/owner.md +79 -0
  67. package/docs/guide/package-management/pack.md +40 -0
  68. package/docs/guide/package-management/package-manager-selection.md +60 -0
  69. package/docs/guide/package-management/patch-commit.md +27 -0
  70. package/docs/guide/package-management/patch.md +29 -0
  71. package/docs/guide/package-management/ping.md +32 -0
  72. package/docs/guide/package-management/pkg.md +88 -0
  73. package/docs/guide/package-management/prune.md +34 -0
  74. package/docs/guide/package-management/publish.md +61 -0
  75. package/docs/guide/package-management/rebuild.md +31 -0
  76. package/docs/guide/package-management/remove.md +47 -0
  77. package/docs/guide/package-management/search.md +38 -0
  78. package/docs/guide/package-management/stage.md +175 -0
  79. package/docs/guide/package-management/team.md +140 -0
  80. package/docs/guide/package-management/token.md +87 -0
  81. package/docs/guide/package-management/unlink.md +33 -0
  82. package/docs/guide/package-management/update.md +62 -0
  83. package/docs/guide/package-management/version.md +36 -0
  84. package/docs/guide/package-management/whoami.md +30 -0
  85. package/docs/guide/package-management/why.md +55 -0
  86. package/docs/guide/run.md +22 -0
  87. package/docs/guide/vpx.md +1 -1
  88. package/package.json +18 -18
  89. package/docs/guide/package-management.md +0 -269
@@ -0,0 +1,60 @@
1
+ # Package Manager Selection
2
+
3
+ `vp` detects the package manager at the workspace root in this order:
4
+
5
+ 1. `packageManager` in `package.json`
6
+ 2. `devEngines.packageManager` in `package.json`
7
+ 3. `pnpm-workspace.yaml`
8
+ 4. `pnpm-lock.yaml`
9
+ 5. `yarn.lock` or `.yarnrc.yml`
10
+ 6. `package-lock.json`
11
+ 7. `bun.lock` or `bun.lockb`
12
+ 8. `.pnpmfile.cjs` or `pnpmfile.cjs`
13
+ 9. `bunfig.toml`
14
+ 10. `yarn.config.cjs`
15
+
16
+ If none of these declarations or files is present, Vite+ defaults to pnpm. Vite+ downloads the matching package manager as needed. Detection does not rewrite `package.json`.
17
+
18
+ Yarn Classic is Yarn 1. Yarn Modern is Yarn 2 or later.
19
+
20
+ ## Pinning a Version
21
+
22
+ Use [`vp env pin`](/guide/env) to declare an exact package-manager version:
23
+
24
+ ```bash
25
+ vp env pin pnpm@11.3.0
26
+ ```
27
+
28
+ A `packageManager` pin can include an integrity hash, such as `yarn@4.17.1+sha512.…`. Vite+ supports Corepack-compatible integrity hashes and stops if verification fails.
29
+
30
+ ## Version Ranges
31
+
32
+ The [`devEngines.packageManager`](https://docs.npmjs.com/cli/v11/configuring-npm/package-json#devengines) field accepts an object or an array of objects. Its `version` can be a semver range:
33
+
34
+ ```json
35
+ {
36
+ "devEngines": {
37
+ "packageManager": {
38
+ "name": "pnpm",
39
+ "version": "^11.0.0",
40
+ "onFail": "download"
41
+ }
42
+ }
43
+ }
44
+ ```
45
+
46
+ Vite+ uses an already-downloaded satisfying version when possible. Otherwise, it resolves the latest satisfying version from the npm registry. The range remains the source of truth and is not replaced with an exact `packageManager` pin.
47
+
48
+ When both fields are present, `packageManager` drives selection. Vite+ warns if it does not satisfy the `devEngines.packageManager` constraint. Run `vp env doctor` for details.
49
+
50
+ ## Package-Manager Shims
51
+
52
+ An explicit `packageManager` or `devEngines.packageManager` declaration also controls matching package-manager shims. For example, `packageManager: "npm@10.9.4"` makes `npm` and `npx` use npm 10.9.4.
53
+
54
+ The same applies to the generated aliases for each manager:
55
+
56
+ - pnpm: `pnpm`, `pnpx`, `pn`, and `pnx`.
57
+ - Yarn: `yarn` and `yarnpkg`.
58
+ - Bun: `bun` and `bunx`.
59
+
60
+ Mismatched tools are not translated. Running `npm` in a pnpm project still resolves npm. Use `vp` package-management commands when you want Vite+ to adapt the operation to the project's manager.
@@ -0,0 +1,27 @@
1
+ # vp pm patch-commit
2
+
3
+ Save edits prepared with [patch](./patch) as a dependency patch.
4
+
5
+ ```bash
6
+ vp pm patch-commit /path/to/edited-package
7
+ ```
8
+
9
+ ## Options
10
+
11
+ Supply the edit directory from the manager's patch workflow. There are no additional Vite+ options.
12
+
13
+ There are no command-specific options.
14
+
15
+ ## Compatibility
16
+
17
+ - **npm:** 12 or later: `npm patch commit`. Earlier versions warn and skip.
18
+ - **pnpm:** 7.4 or later: `pnpm patch-commit`. Earlier versions warn and skip.
19
+ - **Yarn Classic:** No command. Warns and exits successfully without performing the operation.
20
+ - **Yarn Modern:** 3 or later: `yarn patch-commit --save`. Earlier versions warn and skip.
21
+ - **Bun:** `bun patch --commit`.
22
+
23
+ Review and commit the patch and any manifest or lockfile changes produced by the manager.
24
+
25
+ ## Native Options
26
+
27
+ For native options, see [npm patch commit](https://docs.npmjs.com/cli/v12/commands/npm-patch), [pnpm patch-commit](https://pnpm.io/cli/patch-commit), [Yarn patch-commit](https://yarnpkg.com/cli/patch-commit), and [Bun patch --commit](https://bun.com/docs/pm/cli/patch). To pass these options through Vite+, see [Native Arguments](./#native-arguments).
@@ -0,0 +1,29 @@
1
+ # vp pm patch
2
+
3
+ Prepare an installed dependency for local patching.
4
+
5
+ ```bash
6
+ vp pm patch my-dependency@1.0.0
7
+ ```
8
+
9
+ Edit the package in the location reported by the native manager, then save the patch with [patch-commit](./patch-commit).
10
+
11
+ ## Options
12
+
13
+ A package specification is required. There are no additional Vite+ options.
14
+
15
+ There are no command-specific options.
16
+
17
+ ## Compatibility
18
+
19
+ - **npm:** 12 or later: `npm patch add`. Earlier versions warn and skip.
20
+ - **pnpm:** 7.4 or later: `pnpm patch`. Earlier versions warn and skip.
21
+ - **Yarn Classic:** No command. Warns and exits successfully without performing the operation.
22
+ - **Yarn Modern:** `yarn patch`.
23
+ - **Bun:** `bun patch`.
24
+
25
+ The edit location and patch storage format are native-manager details. Vite+ does not convert patches between managers.
26
+
27
+ ## Native Options
28
+
29
+ For native options, see [npm patch add](https://docs.npmjs.com/cli/v12/commands/npm-patch), [pnpm patch](https://pnpm.io/cli/patch), [Yarn patch](https://yarnpkg.com/cli/patch), and [Bun patch](https://bun.com/docs/pm/cli/patch). To pass these options through Vite+, see [Native Arguments](./#native-arguments).
@@ -0,0 +1,32 @@
1
+ # vp pm ping
2
+
3
+ Check connectivity to a package registry.
4
+
5
+ ```bash
6
+ vp pm ping
7
+ vp pm ping --registry https://registry.npmjs.org
8
+ ```
9
+
10
+ ## Options
11
+
12
+ | Option | Description | Notes |
13
+ | ------------------ | -------------------- | ----- |
14
+ | `--registry <url>` | Select the registry. | |
15
+
16
+ ## Compatibility
17
+
18
+ - **npm:** `npm ping`.
19
+ - **pnpm:** 11 or later: `pnpm ping`. Earlier versions use `npm ping` as a fallback.
20
+ - **Yarn Classic:** Fallback: `npm ping`.
21
+ - **Yarn Modern:** Fallback: `npm ping`.
22
+ - **Bun:** Fallback: `npm ping`.
23
+
24
+ | Option | npm | pnpm | Yarn Classic | Yarn Modern | Bun | Notes |
25
+ | ------------------ | --- | ---- | ------------ | ----------- | --- | ----- |
26
+ | `--registry <url>` | Yes | Yes | Yes | Yes | Yes | |
27
+
28
+ Registry configuration, output, and exit codes follow the command that runs. Use [whoami](./whoami) when you need to check the authenticated account rather than connectivity.
29
+
30
+ ## Native Options
31
+
32
+ For native options, see [npm ping](https://docs.npmjs.com/cli/v11/commands/npm-ping) and [pnpm ping](https://pnpm.io/cli/ping). To pass these options through Vite+, see [Native Arguments](./#native-arguments).
@@ -0,0 +1,88 @@
1
+ # vp pm pkg
2
+
3
+ Read and update `package.json` fields without editing the manifest by hand.
4
+
5
+ ```bash
6
+ vp pm pkg get name version
7
+ vp pm pkg set scripts.check='vp check'
8
+ vp pm pkg set private=true --json
9
+ vp pm pkg delete scripts.old
10
+ vp pm pkg fix
11
+ ```
12
+
13
+ ## Options
14
+
15
+ - `get [key...]` reads fields, or the entire manifest if no keys are supplied. `--json` requests native JSON output.
16
+ - `set <key=value...>` writes fields. `--json` parses values as JSON so booleans, numbers, arrays, and objects are not saved as strings.
17
+ - `delete <key...>` removes fields.
18
+ - `fix` asks the manager to correct common manifest errors.
19
+
20
+ Field paths and normalization follow the native manager. Quote paths with brackets or shell-sensitive characters.
21
+
22
+ ### `get`
23
+
24
+ | Option | Description | Notes |
25
+ | -------- | ---------------------- | --------------------------------- |
26
+ | `--json` | Output in JSON format. | Output retains the native schema. |
27
+
28
+ ### `set`
29
+
30
+ | Option | Description | Notes |
31
+ | -------- | ------------------------------------ | ------------------------------------------------------------------------- |
32
+ | `--json` | Parse values as JSON before writing. | Parses booleans, numbers, arrays, and objects rather than saving strings. |
33
+
34
+ ### `delete`
35
+
36
+ There are no command-specific options.
37
+
38
+ ### `fix`
39
+
40
+ There are no command-specific options.
41
+
42
+ ## Compatibility
43
+
44
+ ### `get`
45
+
46
+ - **npm:** 7.20.0 or later: `npm pkg get`. Earlier versions warn and skip.
47
+ - **pnpm:** 11.3.0 or later: `pnpm pkg get`. Earlier versions warn and skip.
48
+ - **Yarn Classic:** No command. Warns and exits successfully without performing the operation.
49
+ - **Yarn Modern:** No command. Warns and exits successfully without performing the operation.
50
+ - **Bun:** 1.2.19 or later: `bun pm pkg get`. Earlier versions warn and skip.
51
+
52
+ | Option | npm | pnpm | Yarn Classic | Yarn Modern | Bun | Notes |
53
+ | -------- | --------------- | --------------- | ------------ | ----------- | --------------- | ----- |
54
+ | `--json` | 7.20.0 or later | 11.3.0 or later | No | No | 1.2.19 or later | |
55
+
56
+ ### `set`
57
+
58
+ - **npm:** 7.20.0 or later: `npm pkg set`. Earlier versions warn and skip.
59
+ - **pnpm:** 11.3.0 or later: `pnpm pkg set`. Earlier versions warn and skip.
60
+ - **Yarn Classic:** No command. Warns and exits successfully without performing the operation.
61
+ - **Yarn Modern:** No command. Warns and exits successfully without performing the operation.
62
+ - **Bun:** 1.2.19 or later: `bun pm pkg set`. Earlier versions warn and skip.
63
+
64
+ | Option | npm | pnpm | Yarn Classic | Yarn Modern | Bun | Notes |
65
+ | -------- | --------------- | --------------- | ------------ | ----------- | --------------- | ----- |
66
+ | `--json` | 7.20.0 or later | 11.3.0 or later | No | No | 1.2.19 or later | |
67
+
68
+ ### `delete`
69
+
70
+ - **npm:** 7.20.0 or later: `npm pkg delete`. Earlier versions warn and skip.
71
+ - **pnpm:** 11.3.0 or later: `pnpm pkg delete`. Earlier versions warn and skip.
72
+ - **Yarn Classic:** No command. Warns and exits successfully without performing the operation.
73
+ - **Yarn Modern:** No command. Warns and exits successfully without performing the operation.
74
+ - **Bun:** 1.2.19 or later: `bun pm pkg delete`. Earlier versions warn and skip.
75
+
76
+ ### `fix`
77
+
78
+ - **npm:** 9.8.0 or later: `npm pkg fix`. Earlier versions warn and skip.
79
+ - **pnpm:** 11.3.0 or later: `pnpm pkg fix`. Earlier versions warn and skip.
80
+ - **Yarn Classic:** No command. Warns and exits successfully without performing the operation.
81
+ - **Yarn Modern:** No command. Warns and exits successfully without performing the operation.
82
+ - **Bun:** 1.2.19 or later: `bun pm pkg fix`. Earlier versions warn and skip.
83
+
84
+ Versions below the stated requirements warn and exit successfully without running the operation. There is no npm fallback for unsupported managers or versions.
85
+
86
+ ## Native Options
87
+
88
+ For native options, see [npm pkg](https://docs.npmjs.com/cli/v11/commands/npm-pkg), [pnpm pkg](https://pnpm.io/cli/pkg), and [Bun pm pkg](https://bun.com/docs/pm/cli/pm). To pass these options through Vite+, see [Native Arguments](./#native-arguments).
@@ -0,0 +1,34 @@
1
+ # vp pm prune
2
+
3
+ Remove unnecessary installed packages.
4
+
5
+ ```bash
6
+ vp pm prune
7
+ vp pm prune --prod
8
+ ```
9
+
10
+ ## Options
11
+
12
+ | Option | Description | Notes |
13
+ | --------------- | ----------------------------- | ----- |
14
+ | `--prod` | Remove devDependencies. | |
15
+ | `--no-optional` | Remove optional dependencies. | |
16
+
17
+ ## Compatibility
18
+
19
+ - **npm:** `npm prune`.
20
+ - **pnpm:** `pnpm prune`.
21
+ - **Yarn Classic:** No command. Warns and exits successfully without performing the operation.
22
+ - **Yarn Modern:** No command. Warns and exits successfully without performing the operation.
23
+ - **Bun:** 1.4 or later: `bun prune`. Earlier versions warn and skip.
24
+
25
+ | Option | npm | pnpm | Yarn Classic | Yarn Modern | Bun | Notes |
26
+ | --------------- | ---------- | ---- | ------------ | ----------- | ------------ | ----- |
27
+ | `--prod` | Yes | Yes | No | No | 1.4 or later | |
28
+ | `--no-optional` | 7 or later | Yes | No | No | 1.4 or later | |
29
+
30
+ npm 7 and later translate selection flags to `--omit=dev` and `--omit=optional`. npm 6 translates `--prod` to `--production` and does not support `--no-optional`. Bun translates `--prod` to `--production`. Yarn and older Bun remove extraneous packages during installation instead of providing a native prune command.
31
+
32
+ ## Native Options
33
+
34
+ For native options, see [npm prune](https://docs.npmjs.com/cli/v11/commands/npm-prune), [pnpm prune](https://pnpm.io/cli/prune), and [Bun prune](https://bun.com/docs/pm/cli/prune). To pass these options through Vite+, see [Native Arguments](./#native-arguments).
@@ -0,0 +1,61 @@
1
+ # vp pm publish
2
+
3
+ Publish a package to a registry. Supported targets and preview options depend on the package manager:
4
+
5
+ ```bash
6
+ vp pm publish --dry-run
7
+ vp pm publish --access public --tag next
8
+ vp pm publish ./package.tgz
9
+ ```
10
+
11
+ ## Options
12
+
13
+ | Option | Description | Notes |
14
+ | ------------------------------- | -------------------------------------------- | --------------------------------------------- |
15
+ | `--dry-run` | Preview without publishing. | |
16
+ | `--tag <tag>` | Select a distribution tag. | |
17
+ | `--access <public\|restricted>` | Request public or restricted package access. | |
18
+ | `--otp <otp>` | Supply a one-time password. | |
19
+ | `--no-git-checks` | Skip git checks. | |
20
+ | `--publish-branch <branch>` | Set the branch name to publish from. | |
21
+ | `--report-summary` | Save publish summary. | |
22
+ | `--provenance` | Publish with provenance. | Requires a compatible publishing environment. |
23
+ | `--force` | Request native forced publishing. | |
24
+ | `--json` | Request native JSON output. | Output retains the native schema. |
25
+ | `-r, --recursive` | Publish all workspace packages. | |
26
+ | `--filter <pattern>` | Select workspaces by pattern. | Can be repeated. |
27
+
28
+ ## Compatibility
29
+
30
+ - **npm:** `npm publish`.
31
+ - **pnpm:** `pnpm publish`.
32
+ - **Yarn Classic:** `yarn publish`.
33
+ - **Yarn Modern:** `yarn npm publish` for the active workspace. Explicit tarball or folder targets are rejected.
34
+ - **Bun:** `bun publish`.
35
+
36
+ | Option | npm | pnpm | Yarn Classic | Yarn Modern | Bun | Notes |
37
+ | ------------------------------- | --------------- | --------------------------------- | --------------- | -------------- | --- | ----- |
38
+ | `--dry-run` | 5.10.0 or later | Yes | No | 4.9.3 or later | Yes | |
39
+ | `--tag <tag>` | Yes | Yes | Yes | Yes | Yes | |
40
+ | `--access <public\|restricted>` | Yes | Yes | Yes | Yes | Yes | |
41
+ | `--otp <otp>` | Yes | Yes | 1.12.1 or later | 3.2.0 or later | Yes | |
42
+ | `--no-git-checks` | No | Yes | No | No | No | |
43
+ | `--publish-branch <branch>` | No | Yes | No | No | No | |
44
+ | `--report-summary` | No | Yes | No | No | No | |
45
+ | `--provenance` | 9.5.0 or later | Yes | No | 4.9.0 or later | No | |
46
+ | `--force` | Yes | Yes | No | No | No | |
47
+ | `--json` | Yes | Before 11.0.0 or 11.0.7 and later | Yes | 4.9.3 or later | No | |
48
+ | `-r, --recursive` | 7.13.0 or later | Yes | No | No | No | |
49
+ | `--filter <pattern>` | 7.13.0 or later | Yes | No | No | No | |
50
+
51
+ Yarn publishing uses Yarn's registry configuration and credentials. Unsupported targets and workspace selection cause an error rather than falling back to npm. Native publish failures are not retried through npm.
52
+
53
+ Vite+ rejects unsupported options before the native publish command runs. Yarn Classic can ignore `--dry-run` and publish for real, or accept `--provenance` without producing an attestation. Vite+ rejects both options on Yarn Classic.
54
+
55
+ Arguments after `--` are passed directly to the native command without these checks. Passing an unsupported safety option this way can result in a real publication or a publication without provenance.
56
+
57
+ For a workflow that separates CI uploads from maintainer approval, use [stage](./stage).
58
+
59
+ ## Native Options
60
+
61
+ For native options, see [npm publish](https://docs.npmjs.com/cli/v11/commands/npm-publish), [pnpm publish](https://pnpm.io/cli/publish), [Yarn Classic publish](https://classic.yarnpkg.com/en/docs/cli/publish), [Yarn npm publish](https://yarnpkg.com/cli/npm/publish), and [Bun publish](https://bun.com/docs/pm/cli/publish). To pass these options through Vite+, see [Native Arguments](./#native-arguments).
@@ -0,0 +1,31 @@
1
+ # vp rebuild
2
+
3
+ Rebuild installed packages, for example after switching Node.js versions or when a native addon needs recompilation. This top-level command requires the global CLI. Both the global and project-local CLI accept `vp pm rebuild` and its alias `vp pm rb`.
4
+
5
+ ```bash
6
+ vp rebuild
7
+ vp rebuild better-sqlite3 sharp
8
+ vp rebuild -- --update-binary
9
+ ```
10
+
11
+ ## Options
12
+
13
+ Supply package names to rebuild only those packages. Omit them to request a full rebuild. There are no additional Vite+ options.
14
+
15
+ There are no command-specific options.
16
+
17
+ ## Compatibility
18
+
19
+ - **npm:** `npm rebuild`.
20
+ - **pnpm:** `pnpm rebuild`.
21
+ - **Yarn Classic:** No command. Warns and exits successfully without performing the operation.
22
+ - **Yarn Modern:** `yarn rebuild`.
23
+ - **Bun:** No command. Warns and exits successfully without performing the operation.
24
+
25
+ With pnpm 10 and later, a bare rebuild respects build-script approvals. Naming a package explicitly bypasses that approval gate, so rebuild only packages whose scripts you trust.
26
+
27
+ On npm 12, [approving a dependency's scripts](./approve-builds) records policy but does not execute scripts skipped by an earlier install. Rebuild that package after approval.
28
+
29
+ ## Native Options
30
+
31
+ For native options, see [npm rebuild](https://docs.npmjs.com/cli/v11/commands/npm-rebuild), [pnpm rebuild](https://pnpm.io/cli/rebuild), and [Yarn rebuild](https://yarnpkg.com/cli/rebuild). To pass these options through Vite+, see [Native Arguments](./#native-arguments).
@@ -0,0 +1,47 @@
1
+ # vp remove
2
+
3
+ Remove dependencies from the project. Aliases: `vp rm`, `vp un`, and `vp uninstall`.
4
+
5
+ ```bash
6
+ vp remove react
7
+ vp remove --filter web react
8
+ vp remove -g --dry-run typescript
9
+ ```
10
+
11
+ ## Options
12
+
13
+ | Option | Description | Notes |
14
+ | ---------------------- | -------------------------------------------------------- | ---------------------------------------------------------------------------- |
15
+ | `-D, --save-dev` | Remove from devDependencies. | |
16
+ | `-O, --save-optional` | Remove from optionalDependencies. | |
17
+ | `-P, --save-prod` | Remove from dependencies. | |
18
+ | `--filter <pattern>` | Select workspaces by pattern. | Can be repeated. |
19
+ | `-w, --workspace-root` | Remove from workspace root. | |
20
+ | `-r, --recursive` | Remove recursively from all workspace packages. | |
21
+ | `-g, --global` | Remove global packages. | Requires the global CLI. Uses the [global package store](./global-packages). |
22
+ | `--dry-run` | Preview what would be removed without actually removing. | Requires --global. |
23
+
24
+ ## Compatibility
25
+
26
+ The commands below describe project operations. Global mode is described under [Options](#options).
27
+
28
+ - **npm:** `npm uninstall`.
29
+ - **pnpm:** `pnpm remove`.
30
+ - **Yarn Classic:** `yarn remove`.
31
+ - **Yarn Modern:** `yarn remove`.
32
+ - **Bun:** `bun remove`.
33
+
34
+ | Option | npm | pnpm | Yarn Classic | Yarn Modern | Bun | Notes |
35
+ | ---------------------- | --------------- | ---- | ------------ | ----------- | ------------ | -------------------------------- |
36
+ | `-D, --save-dev` | Yes | Yes | No | No | No | |
37
+ | `-O, --save-optional` | Yes | Yes | No | No | No | |
38
+ | `-P, --save-prod` | Yes | Yes | No | No | No | |
39
+ | `--filter <pattern>` | 7.14.0 or later | Yes | One filter | Yes | 1.4 or later | |
40
+ | `-w, --workspace-root` | 8.1.0 or later | Yes | No | No | No | |
41
+ | `-r, --recursive` | 8.1.0 or later | Yes | No | Yes | No | npm includes the workspace root. |
42
+ | `-g, --global` | Yes | Yes | Yes | Yes | Yes | |
43
+ | `--dry-run` | Yes | Yes | Yes | Yes | Yes | |
44
+
45
+ ## Native Options
46
+
47
+ For native options, see [npm uninstall](https://docs.npmjs.com/cli/v11/commands/npm-uninstall), [pnpm remove](https://pnpm.io/cli/remove), [Yarn remove](https://yarnpkg.com/cli/remove), [Yarn Classic remove](https://classic.yarnpkg.com/en/docs/cli/remove), and [Bun remove](https://bun.com/docs/pm/cli/remove). To pass these options through Vite+, see [Native Arguments](./#native-arguments).
@@ -0,0 +1,38 @@
1
+ # vp pm search
2
+
3
+ Search the package registry.
4
+
5
+ ```bash
6
+ vp pm search vite plugin
7
+ vp pm search typescript --json
8
+ ```
9
+
10
+ ## Options
11
+
12
+ At least one search term is required.
13
+
14
+ | Option | Description | Notes |
15
+ | ------------------ | --------------------------- | --------------------------------- |
16
+ | `--json` | Request native JSON output. | Output retains the native schema. |
17
+ | `--long` | Show extended information. | |
18
+ | `--registry <url>` | Select the registry. | |
19
+
20
+ ## Compatibility
21
+
22
+ - **npm:** `npm search`.
23
+ - **pnpm:** 11 or later: `pnpm search`. Earlier versions use `npm search` as a fallback.
24
+ - **Yarn Classic:** Fallback: `npm search`.
25
+ - **Yarn Modern:** Fallback: `npm search`.
26
+ - **Bun:** Fallback: `npm search`.
27
+
28
+ | Option | npm | pnpm | Yarn Classic | Yarn Modern | Bun | Notes |
29
+ | ------------------ | --- | --------- | ------------ | ----------- | --- | ----- |
30
+ | `--json` | Yes | Yes | Yes | Yes | Yes | |
31
+ | `--long` | Yes | Before 11 | Yes | Yes | Yes | |
32
+ | `--registry <url>` | Yes | Yes | Yes | Yes | Yes | |
33
+
34
+ Registry settings and output follow the command that runs.
35
+
36
+ ## Native Options
37
+
38
+ For native options, see [npm search](https://docs.npmjs.com/cli/v11/commands/npm-search) and [pnpm search](https://pnpm.io/cli/search). To pass these options through Vite+, see [Native Arguments](./#native-arguments).
@@ -0,0 +1,175 @@
1
+ # vp pm stage
2
+
3
+ Use staged publishing to separate a package upload from its release. A CI job can upload a staged version without 2FA, then a maintainer approves or rejects it from a trusted device with 2FA.
4
+
5
+ ```bash
6
+ vp pm stage publish --dry-run
7
+ vp pm stage publish
8
+ vp pm stage list
9
+ vp pm stage view <stage-id>
10
+ vp pm stage download <stage-id>
11
+ vp pm stage approve <stage-id>
12
+ vp pm stage reject <stage-id>
13
+ ```
14
+
15
+ ## Options
16
+
17
+ Use the subcommands below to upload, inspect, approve, or reject staged versions.
18
+
19
+ ### `publish`
20
+
21
+ Upload a package. Accepts an optional tarball or folder target.
22
+
23
+ | Option | Description | Notes |
24
+ | ------------------------------- | -------------------------------------------- | --------------------------------------------- |
25
+ | `--tag <tag>` | Publish tag. | |
26
+ | `--access <public\|restricted>` | Request public or restricted package access. | |
27
+ | `--otp <otp>` | Supply a one-time password. | |
28
+ | `--dry-run` | Preview without staging. | |
29
+ | `--json` | Request native JSON output. | Output retains the native schema. |
30
+ | `-r, --recursive` | Stage all publishable workspace packages. | |
31
+ | `--filter <pattern>` | Select workspaces by pattern. | Can be repeated. |
32
+ | `--provenance` | Stage with provenance. | Requires a compatible publishing environment. |
33
+ | `--registry <url>` | Select the registry. | |
34
+
35
+ ### `list`
36
+
37
+ List staged versions. Accepts an optional package specification. Alias: `ls`.
38
+
39
+ | Option | Description | Notes |
40
+ | ------------------ | --------------------------- | --------------------------------- |
41
+ | `--json` | Request native JSON output. | Output retains the native schema. |
42
+ | `--registry <url>` | Select the registry. | |
43
+
44
+ ### `view`
45
+
46
+ Inspect a staged version. Requires a stage ID.
47
+
48
+ | Option | Description | Notes |
49
+ | ------------------ | --------------------------- | --------------------------------- |
50
+ | `--json` | Request native JSON output. | Output retains the native schema. |
51
+ | `--registry <url>` | Select the registry. | |
52
+
53
+ ### `download`
54
+
55
+ Download a staged tarball. Requires a stage ID.
56
+
57
+ | Option | Description | Notes |
58
+ | ------------------ | -------------------- | ----- |
59
+ | `--registry <url>` | Select the registry. | |
60
+
61
+ ### `approve`
62
+
63
+ Promote a staged version to the live registry. Requires a stage ID.
64
+
65
+ | Option | Description | Notes |
66
+ | ------------------ | --------------------------- | ----- |
67
+ | `--otp <otp>` | Supply a one-time password. | |
68
+ | `--registry <url>` | Select the registry. | |
69
+
70
+ ### `reject`
71
+
72
+ Discard a staged version. Requires a stage ID.
73
+
74
+ | Option | Description | Notes |
75
+ | ------------------ | --------------------------- | ----- |
76
+ | `--otp <otp>` | Supply a one-time password. | |
77
+ | `--registry <url>` | Select the registry. | |
78
+
79
+ ## Compatibility
80
+
81
+ All npm paths, including fallbacks, require npm 11.15 or later and Node.js 22.14 or later.
82
+
83
+ ### `publish`
84
+
85
+ - **npm:** 11.15 or later: `npm stage publish`. Earlier versions warn and skip.
86
+ - **pnpm:** 11.3 or later: `pnpm stage publish`. Earlier versions warn and skip.
87
+ - **Yarn Classic:** Fallback: `npm stage publish`.
88
+ - **Yarn Modern:** 4.16.0 or later: `yarn npm publish --staged`. Earlier versions use `npm stage publish` as a fallback. Explicit targets use npm fallback.
89
+ - **Bun:** Fallback: `npm stage publish`.
90
+
91
+ | Option | npm | pnpm | Yarn Classic | Yarn Modern | Bun | Notes |
92
+ | ------------------------------- | ----------------------- | ---- | ----------------------- | ----------------------------------------- | ----------------------- | ------------------------------------------------ |
93
+ | `--tag <tag>` | Yes | Yes | Yes | Yes | Yes | |
94
+ | `--access <public\|restricted>` | Yes | Yes | Yes | Yes | Yes | |
95
+ | `--otp <otp>` | Yes | Yes | Yes | Yes | Yes | |
96
+ | `--dry-run` | Yes | Yes | Yes | Yes | Yes | |
97
+ | `--json` | Yes | Yes | Yes | Yes | Yes | |
98
+ | `-r, --recursive` | No target or target `.` | Yes | No target or target `.` | Before 4.16 with no target, or target `.` | No target or target `.` | |
99
+ | `--filter <pattern>` | No target or target `.` | Yes | No target or target `.` | Before 4.16 with no target, or target `.` | No target or target `.` | |
100
+ | `--provenance` | Yes | Yes | Yes | Yes | Yes | |
101
+ | `--registry <url>` | Yes | Yes | Yes | Before 4.16, or an explicit target | Yes | Use Yarn registry settings on native Yarn paths. |
102
+
103
+ ### `list`
104
+
105
+ - **npm:** 11.15 or later: `npm stage list`. Earlier versions warn and skip.
106
+ - **pnpm:** 11.3 or later: `pnpm stage list`. Earlier versions warn and skip.
107
+ - **Yarn Classic:** Fallback: `npm stage list`.
108
+ - **Yarn Modern:** 4.16.0 or later: `yarn npm stage list`. Earlier versions use `npm stage list` as a fallback.
109
+ - **Bun:** Fallback: `npm stage list`.
110
+
111
+ | Option | npm | pnpm | Yarn Classic | Yarn Modern | Bun | Notes |
112
+ | ------------------ | --- | ---- | ------------ | ------------- | --- | ------------------------------------------------ |
113
+ | `--json` | Yes | Yes | Yes | Yes | Yes | |
114
+ | `--registry <url>` | Yes | Yes | Yes | Before 4.16.0 | Yes | Use Yarn registry settings on native Yarn paths. |
115
+
116
+ ### `view`
117
+
118
+ - **npm:** 11.15 or later: `npm stage view`. Earlier versions warn and skip.
119
+ - **pnpm:** 11.3 or later: `pnpm stage view`. Earlier versions warn and skip.
120
+ - **Yarn Classic:** Fallback: `npm stage view`.
121
+ - **Yarn Modern:** Fallback: `npm stage view`.
122
+ - **Bun:** Fallback: `npm stage view`.
123
+
124
+ | Option | npm | pnpm | Yarn Classic | Yarn Modern | Bun | Notes |
125
+ | ------------------ | --- | ---- | ------------ | ----------- | --- | ----- |
126
+ | `--json` | Yes | Yes | Yes | Yes | Yes | |
127
+ | `--registry <url>` | Yes | Yes | Yes | Yes | Yes | |
128
+
129
+ ### `download`
130
+
131
+ - **npm:** 11.15 or later: `npm stage download`. Earlier versions warn and skip.
132
+ - **pnpm:** 11.3 or later: `pnpm stage download`. Earlier versions warn and skip.
133
+ - **Yarn Classic:** Fallback: `npm stage download`.
134
+ - **Yarn Modern:** Fallback: `npm stage download`.
135
+ - **Bun:** Fallback: `npm stage download`.
136
+
137
+ | Option | npm | pnpm | Yarn Classic | Yarn Modern | Bun | Notes |
138
+ | ------------------ | --- | ---- | ------------ | ----------- | --- | ----- |
139
+ | `--registry <url>` | Yes | Yes | Yes | Yes | Yes | |
140
+
141
+ ### `approve`
142
+
143
+ - **npm:** 11.15 or later: `npm stage approve`. Earlier versions warn and skip.
144
+ - **pnpm:** 11.3 or later: `pnpm stage approve`. Earlier versions warn and skip.
145
+ - **Yarn Classic:** Fallback: `npm stage approve`.
146
+ - **Yarn Modern:** 4.16.0 or later: `yarn npm stage approve`. Earlier versions use `npm stage approve` as a fallback.
147
+ - **Bun:** Fallback: `npm stage approve`.
148
+
149
+ | Option | npm | pnpm | Yarn Classic | Yarn Modern | Bun | Notes |
150
+ | ------------------ | --- | ---- | ------------ | ------------- | --- | ------------------------------------------------ |
151
+ | `--otp <otp>` | Yes | Yes | Yes | Yes | Yes | |
152
+ | `--registry <url>` | Yes | Yes | Yes | Before 4.16.0 | Yes | Use Yarn registry settings on native Yarn paths. |
153
+
154
+ ### `reject`
155
+
156
+ - **npm:** 11.15 or later: `npm stage reject`. Earlier versions warn and skip.
157
+ - **pnpm:** 11.3 or later: `pnpm stage reject`. Earlier versions warn and skip.
158
+ - **Yarn Classic:** Fallback: `npm stage reject`.
159
+ - **Yarn Modern:** 4.16.0 or later: `yarn npm stage reject`. Earlier versions use `npm stage reject` as a fallback.
160
+ - **Bun:** Fallback: `npm stage reject`.
161
+
162
+ | Option | npm | pnpm | Yarn Classic | Yarn Modern | Bun | Notes |
163
+ | ------------------ | --- | ---- | ------------ | ------------- | --- | ------------------------------------------------ |
164
+ | `--otp <otp>` | Yes | Yes | Yes | Yes | Yes | |
165
+ | `--registry <url>` | Yes | Yes | Yes | Before 4.16.0 | Yes | Use Yarn registry settings on native Yarn paths. |
166
+
167
+ Yarn fallback paths and Bun warn before invoking npm.
168
+
169
+ This command is unrelated to Yarn's version-control staging command or Vite+'s staged-file checks.
170
+
171
+ ## Native Options
172
+
173
+ For native options, see [npm stage](https://docs.npmjs.com/cli/v11/commands/npm-stage), [pnpm stage](https://pnpm.io/cli/stage), [Yarn npm publish](https://yarnpkg.com/cli/npm/publish), [Yarn npm stage list](https://yarnpkg.com/cli/npm/stage/list), [Yarn npm stage approve](https://yarnpkg.com/cli/npm/stage/approve), and [Yarn npm stage reject](https://yarnpkg.com/cli/npm/stage/reject). To pass these options through Vite+, see [Native Arguments](./#native-arguments).
174
+
175
+ For the registry workflow, see [npm staged publishing](https://docs.npmjs.com/staged-publishing).