vite-plus 1.5.0 → 1.5.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.
- package/binding/index.cjs +116 -55
- package/dist/{agent-DkQD3xqe.js → agent-CowvWq3j.js} +2 -2
- package/dist/bin.js +20 -6
- package/dist/config/bin.js +2 -2
- package/dist/{constants-D2P2aVKb.js → constants-D5f7inVN.js} +1 -1
- package/dist/create/bin.js +7 -7
- package/dist/{define-config-CwtQqYC1.cjs → define-config-BGCfAiIo.cjs} +1 -1
- package/dist/{define-config-wR57OZG_.js → define-config-XKYhw0xH.js} +1 -1
- package/dist/define-config.cjs +1 -1
- package/dist/define-config.js +1 -1
- package/dist/{editor-aOy1T15H.js → editor-BVaNnIey.js} +6 -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-CHsI_zKo.js → oxlint-plugin-config-5hVqz4kj.js} +1 -1
- package/dist/oxlint-plugin.js +2 -2
- package/dist/pack-bin.js +1 -1
- package/dist/{package-DfFo6-E-.js → package-DLUCo6L_.js} +1 -1
- package/dist/{prompts-C7DI63WP.js → prompts-DLpJGhfK.js} +1 -1
- package/dist/{resolve-vite-config-Cx3cnVVI.js → resolve-vite-config-D-JtjGRa.js} +2 -2
- package/dist/{resolve-vite-config-33bzSaeT.js → resolve-vite-config-D7IUZYKq.js} +1 -1
- package/dist/staged/bin.js +1 -1
- package/dist/toolchain.js +5 -5
- package/dist/toolchain.json +5 -5
- package/dist/{tsconfig-shNmmCE_.js → tsconfig-D3DiCiW6.js} +2 -2
- package/dist/{tsconfig-BE3Wj9OX.js → tsconfig-DLERIAbF.js} +1 -1
- package/dist/version.js +2 -2
- package/dist/versions.js +2 -2
- package/docs/guide/global-cli.md +1 -1
- package/docs/guide/index.md +4 -4
- package/docs/guide/local-cli.md +1 -1
- package/docs/guide/migrate.md +4 -4
- package/docs/guide/package-management/add.md +84 -0
- package/docs/guide/package-management/approve-builds.md +48 -0
- package/docs/guide/package-management/audit.md +39 -0
- package/docs/guide/package-management/cache.md +53 -0
- package/docs/guide/package-management/ci.md +28 -0
- package/docs/guide/package-management/config.md +119 -0
- package/docs/guide/package-management/dedupe.md +32 -0
- package/docs/guide/package-management/deprecate.md +39 -0
- package/docs/guide/package-management/dist-tag.md +61 -0
- package/docs/guide/package-management/dlx.md +40 -0
- package/docs/guide/package-management/fund.md +32 -0
- package/docs/guide/package-management/global-packages.md +32 -0
- package/docs/guide/package-management/index.md +78 -0
- package/docs/guide/package-management/info.md +35 -0
- package/docs/guide/package-management/install.md +89 -0
- package/docs/guide/package-management/licenses.md +42 -0
- package/docs/guide/package-management/link.md +29 -0
- package/docs/guide/package-management/list.md +60 -0
- package/docs/guide/package-management/login.md +34 -0
- package/docs/guide/package-management/logout.md +34 -0
- package/docs/guide/package-management/outdated.md +60 -0
- package/docs/guide/package-management/owner.md +79 -0
- package/docs/guide/package-management/pack.md +40 -0
- package/docs/guide/package-management/package-manager-selection.md +60 -0
- package/docs/guide/package-management/patch-commit.md +27 -0
- package/docs/guide/package-management/patch.md +29 -0
- package/docs/guide/package-management/ping.md +32 -0
- package/docs/guide/package-management/pkg.md +88 -0
- package/docs/guide/package-management/prune.md +34 -0
- package/docs/guide/package-management/publish.md +61 -0
- package/docs/guide/package-management/rebuild.md +31 -0
- package/docs/guide/package-management/remove.md +47 -0
- package/docs/guide/package-management/search.md +38 -0
- package/docs/guide/package-management/stage.md +175 -0
- package/docs/guide/package-management/team.md +140 -0
- package/docs/guide/package-management/token.md +87 -0
- package/docs/guide/package-management/unlink.md +33 -0
- package/docs/guide/package-management/update.md +62 -0
- package/docs/guide/package-management/version.md +36 -0
- package/docs/guide/package-management/whoami.md +30 -0
- package/docs/guide/package-management/why.md +55 -0
- package/docs/guide/vpx.md +1 -1
- package/package.json +12 -12
- package/docs/guide/package-management.md +0 -269
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# vp list
|
|
2
|
+
|
|
3
|
+
List installed dependencies. Alias: `vp ls`. These top-level commands require the global CLI. Both the global and project-local CLI accept `vp pm list` and `vp pm ls`.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
vp list
|
|
7
|
+
vp list react --depth 2
|
|
8
|
+
vp list --json
|
|
9
|
+
vp list -g
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Options
|
|
13
|
+
|
|
14
|
+
| Option | Description | Notes |
|
|
15
|
+
| ------------------------- | --------------------------------- | ---------------------------------------------------------------------------- |
|
|
16
|
+
| `--depth <depth>` | Maximum depth of dependency tree. | |
|
|
17
|
+
| `--json` | Request native JSON output. | Output retains the native schema. |
|
|
18
|
+
| `--long` | Show extended information. | |
|
|
19
|
+
| `--parseable` | Parseable output format. | |
|
|
20
|
+
| `-P, --prod` | Only production dependencies. | |
|
|
21
|
+
| `-D, --dev` | Include dev dependencies. | |
|
|
22
|
+
| `--no-optional` | Exclude optional dependencies. | |
|
|
23
|
+
| `--exclude-peers` | Exclude peer dependencies. | |
|
|
24
|
+
| `--only-projects` | Show only project packages. | |
|
|
25
|
+
| `--find-by <finder_name>` | Use a finder function. | |
|
|
26
|
+
| `-r, --recursive` | List across all workspaces. | |
|
|
27
|
+
| `--filter <pattern>` | Select workspaces by pattern. | Can be repeated. |
|
|
28
|
+
| `-g, --global` | List global packages. | Requires the global CLI. Uses the [global package store](./global-packages). |
|
|
29
|
+
|
|
30
|
+
## Compatibility
|
|
31
|
+
|
|
32
|
+
The commands below describe project operations. Global mode is described under [Options](#options).
|
|
33
|
+
|
|
34
|
+
- **npm:** `npm list`.
|
|
35
|
+
- **pnpm:** `pnpm list`.
|
|
36
|
+
- **Yarn Classic:** `yarn list`.
|
|
37
|
+
- **Yarn Modern:** No command. Warns and exits successfully without performing the operation.
|
|
38
|
+
- **Bun:** `bun pm ls`.
|
|
39
|
+
|
|
40
|
+
| Option | npm | pnpm | Yarn Classic | Yarn Modern | Bun | Notes |
|
|
41
|
+
| ------------------------- | --------------- | ---------------- | ------------ | ----------- | --- | ----------------------------------------------------------------- |
|
|
42
|
+
| `--depth <depth>` | Yes | Yes | Yes | No | No | |
|
|
43
|
+
| `--json` | Yes | Yes | Yes | No | No | |
|
|
44
|
+
| `--long` | Yes | Yes | No | No | No | |
|
|
45
|
+
| `--parseable` | Yes | Yes | No | No | No | |
|
|
46
|
+
| `-P, --prod` | Yes | Yes | Yes | No | No | npm 6 uses `--production`, which also excludes peer dependencies. |
|
|
47
|
+
| `-D, --dev` | Yes | Yes | Yes | No | No | |
|
|
48
|
+
| `--no-optional` | 7 or later | Yes | No | No | No | |
|
|
49
|
+
| `--exclude-peers` | 7 or later | Yes | No | No | No | |
|
|
50
|
+
| `--only-projects` | No | Yes | No | No | No | |
|
|
51
|
+
| `--find-by <finder_name>` | No | 10.16.0 or later | No | No | No | |
|
|
52
|
+
| `-r, --recursive` | 7.14.0 or later | Yes | No | No | No | |
|
|
53
|
+
| `--filter <pattern>` | 7.14.0 or later | Yes | No | No | No | |
|
|
54
|
+
| `-g, --global` | Yes | Yes | Yes | Yes | Yes | |
|
|
55
|
+
|
|
56
|
+
These results describe installed packages, not Vite+'s bundled tools. Use `vp toolchain [tool]` to inspect bundled Vite, Rolldown, Oxc, and other tool versions.
|
|
57
|
+
|
|
58
|
+
## Native Options
|
|
59
|
+
|
|
60
|
+
For native options, see [npm ls](https://docs.npmjs.com/cli/v11/commands/npm-ls), [pnpm list](https://pnpm.io/cli/list), [Yarn Classic list](https://classic.yarnpkg.com/en/docs/cli/list), and [Bun pm ls](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 login
|
|
2
|
+
|
|
3
|
+
Authenticate with a package registry. Alias: `vp pm adduser`.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
vp pm login
|
|
7
|
+
vp pm login --scope @my-org
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
## Options
|
|
11
|
+
|
|
12
|
+
| Option | Description | Notes |
|
|
13
|
+
| ------------------ | -------------------- | ----- |
|
|
14
|
+
| `--registry <url>` | Select the registry. | |
|
|
15
|
+
| `--scope <scope>` | Scope for the login. | |
|
|
16
|
+
|
|
17
|
+
## Compatibility
|
|
18
|
+
|
|
19
|
+
- **npm:** `npm login`.
|
|
20
|
+
- **pnpm:** 11 or later: `pnpm login`. Earlier versions use `npm login` as a fallback.
|
|
21
|
+
- **Yarn Classic:** `yarn login`.
|
|
22
|
+
- **Yarn Modern:** `yarn npm login`.
|
|
23
|
+
- **Bun:** Fallback: `npm login`.
|
|
24
|
+
|
|
25
|
+
| Option | npm | pnpm | Yarn Classic | Yarn Modern | Bun | Notes |
|
|
26
|
+
| ------------------ | --- | -------------------------- | ------------ | ----------- | --- | ---------------------------------------- |
|
|
27
|
+
| `--registry <url>` | Yes | Yes | No | No | Yes | Configure the registry in Yarn settings. |
|
|
28
|
+
| `--scope <scope>` | Yes | Before 11 or 11.2 or later | No | Yes | Yes | |
|
|
29
|
+
|
|
30
|
+
Authentication prompts and credential storage belong to the native command. pnpm login does not copy credentials to npm, so commands that still use npm may require a separate login. See [whoami](./whoami) to check the selected account and [logout](./logout) to end authentication.
|
|
31
|
+
|
|
32
|
+
## Native Options
|
|
33
|
+
|
|
34
|
+
For native options, see [npm login](https://docs.npmjs.com/cli/v11/commands/npm-login), [pnpm login](https://pnpm.io/cli/login), [Yarn npm login](https://yarnpkg.com/cli/npm/login), and [Yarn Classic login](https://classic.yarnpkg.com/en/docs/cli/login). To pass these options through Vite+, see [Native Arguments](./#native-arguments).
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# vp pm logout
|
|
2
|
+
|
|
3
|
+
Log out from a package registry.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
vp pm logout
|
|
7
|
+
vp pm logout --scope @my-org
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
## Options
|
|
11
|
+
|
|
12
|
+
| Option | Description | Notes |
|
|
13
|
+
| ------------------ | --------------------- | ----- |
|
|
14
|
+
| `--registry <url>` | Select the registry. | |
|
|
15
|
+
| `--scope <scope>` | Scope for the logout. | |
|
|
16
|
+
|
|
17
|
+
## Compatibility
|
|
18
|
+
|
|
19
|
+
- **npm:** `npm logout`.
|
|
20
|
+
- **pnpm:** 11 or later: `pnpm logout`. Earlier versions use `npm logout` as a fallback.
|
|
21
|
+
- **Yarn Classic:** `yarn logout`.
|
|
22
|
+
- **Yarn Modern:** `yarn npm logout`.
|
|
23
|
+
- **Bun:** Fallback: `npm logout`.
|
|
24
|
+
|
|
25
|
+
| Option | npm | pnpm | Yarn Classic | Yarn Modern | Bun | Notes |
|
|
26
|
+
| ------------------ | --- | --------- | ------------ | ----------- | --- | ---------------------------------------- |
|
|
27
|
+
| `--registry <url>` | Yes | Yes | No | No | Yes | Configure the registry in Yarn settings. |
|
|
28
|
+
| `--scope <scope>` | Yes | Before 11 | No | Yes | Yes | |
|
|
29
|
+
|
|
30
|
+
Credential removal and token invalidation follow the native manager and registry. Native pnpm logout does not run npm logout or perform additional credential cleanup. Use [login](./login) to authenticate again.
|
|
31
|
+
|
|
32
|
+
## Native Options
|
|
33
|
+
|
|
34
|
+
For native options, see [npm logout](https://docs.npmjs.com/cli/v11/commands/npm-logout), [pnpm logout](https://pnpm.io/cli/logout), [Yarn npm logout](https://yarnpkg.com/cli/npm/logout), and [Yarn Classic logout](https://classic.yarnpkg.com/en/docs/cli/logout). To pass these options through Vite+, see [Native Arguments](./#native-arguments).
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# vp outdated
|
|
2
|
+
|
|
3
|
+
Check which dependencies have newer versions available.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
vp outdated
|
|
7
|
+
vp outdated react
|
|
8
|
+
vp outdated --format json
|
|
9
|
+
vp outdated -g
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Options
|
|
13
|
+
|
|
14
|
+
| Option | Description | Notes |
|
|
15
|
+
| ------------------------------ | --------------------------------------------------- | ---------------------------------------------------------------------------- |
|
|
16
|
+
| `--long` | Show extended information. | |
|
|
17
|
+
| `--format <table\|list\|json>` | Select the output format. | |
|
|
18
|
+
| `-r, --recursive` | Check recursively across all workspaces. | |
|
|
19
|
+
| `--filter <pattern>` | Select workspaces by pattern. | Can be repeated. |
|
|
20
|
+
| `-w, --workspace-root` | Include workspace root. | |
|
|
21
|
+
| `-P, --prod` | Only production and optional dependencies. | |
|
|
22
|
+
| `-D, --dev` | Include dev dependencies. | |
|
|
23
|
+
| `--no-optional` | Exclude optional dependencies. | |
|
|
24
|
+
| `--compatible` | Show only versions within compatible ranges. | |
|
|
25
|
+
| `--sort-by <field>` | Sort results by field. | |
|
|
26
|
+
| `-g, --global` | Check globally installed packages. | Requires the global CLI. Uses the [global package store](./global-packages). |
|
|
27
|
+
| `--concurrency <number>` | Number of global package checks to run in parallel. | Requires --global. Must be a positive integer. |
|
|
28
|
+
|
|
29
|
+
## Compatibility
|
|
30
|
+
|
|
31
|
+
The commands below describe project operations. Global mode is described under [Options](#options).
|
|
32
|
+
|
|
33
|
+
- **npm:** `npm outdated`.
|
|
34
|
+
- **pnpm:** `pnpm outdated`.
|
|
35
|
+
- **Yarn Classic:** `yarn outdated`.
|
|
36
|
+
- **Yarn Modern:** Alternative: `yarn upgrade-interactive`.
|
|
37
|
+
- **Bun:** `bun outdated`.
|
|
38
|
+
|
|
39
|
+
| Option | npm | pnpm | Yarn Classic | Yarn Modern | Bun | Notes |
|
|
40
|
+
| ------------------------------ | ----------------- | ----------------- | ------------ | ----------- | --- | ------------------------------------------------------------------------- |
|
|
41
|
+
| `--long` | Yes | Yes | No | No | No | |
|
|
42
|
+
| `--format <table\|list\|json>` | table, list, json | table, list, json | table, json | No | No | |
|
|
43
|
+
| `-r, --recursive` | 7.14.0 or later | Yes | No | No | Yes | npm uses `--workspaces` to check workspaces, not transitive dependencies. |
|
|
44
|
+
| `--filter <pattern>` | 7.14.0 or later | Yes | No | No | Yes | |
|
|
45
|
+
| `-w, --workspace-root` | 8.1.0 or later | Yes | No | No | No | |
|
|
46
|
+
| `-P, --prod` | 7 or later | Yes | No | No | Yes | |
|
|
47
|
+
| `-D, --dev` | Yes | Yes | No | No | No | |
|
|
48
|
+
| `--no-optional` | 7 or later | Yes | No | No | Yes | |
|
|
49
|
+
| `--compatible` | No | Yes | No | No | No | |
|
|
50
|
+
| `--sort-by <field>` | No | Yes | No | No | No | |
|
|
51
|
+
| `-g, --global` | Yes | Yes | Yes | Yes | Yes | |
|
|
52
|
+
| `--concurrency <number>` | Yes | Yes | Yes | Yes | Yes | |
|
|
53
|
+
|
|
54
|
+
Yarn Modern does not forward positional package names. Its interactive updater can change dependencies, unlike a read-only outdated query.
|
|
55
|
+
|
|
56
|
+
Native output and exit codes differ. A nonzero exit can indicate outdated dependencies rather than a failure to query the registry.
|
|
57
|
+
|
|
58
|
+
## Native Options
|
|
59
|
+
|
|
60
|
+
For native options, see [npm outdated](https://docs.npmjs.com/cli/v11/commands/npm-outdated), [pnpm outdated](https://pnpm.io/cli/outdated), [Yarn upgrade-interactive](https://yarnpkg.com/cli/upgrade-interactive), [Yarn Classic outdated](https://classic.yarnpkg.com/en/docs/cli/outdated), and [Bun outdated](https://bun.com/docs/pm/cli/outdated). To pass these options through Vite+, see [Native Arguments](./#native-arguments).
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# vp pm owner
|
|
2
|
+
|
|
3
|
+
Manage package owners. Alias: `vp pm author`.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
vp pm owner list my-package
|
|
7
|
+
vp pm owner add alice my-package
|
|
8
|
+
vp pm owner rm alice my-package
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Options
|
|
12
|
+
|
|
13
|
+
- `list <package>` lists owners. Alias: `ls`.
|
|
14
|
+
- `add <user> <package>` grants ownership.
|
|
15
|
+
- `rm <user> <package>` removes ownership.
|
|
16
|
+
|
|
17
|
+
Each subcommand accepts `--otp <code>`. These subcommands do not accept additional native arguments after `--`. Ownership changes affect registry permissions, not the local manifest's author field.
|
|
18
|
+
|
|
19
|
+
### `list`
|
|
20
|
+
|
|
21
|
+
| Option | Description | Notes |
|
|
22
|
+
| ------------- | --------------------------- | ----- |
|
|
23
|
+
| `--otp <otp>` | Supply a one-time password. | |
|
|
24
|
+
|
|
25
|
+
### `add`
|
|
26
|
+
|
|
27
|
+
| Option | Description | Notes |
|
|
28
|
+
| ------------- | --------------------------- | ----- |
|
|
29
|
+
| `--otp <otp>` | Supply a one-time password. | |
|
|
30
|
+
|
|
31
|
+
### `rm`
|
|
32
|
+
|
|
33
|
+
| Option | Description | Notes |
|
|
34
|
+
| ------------- | --------------------------- | ----- |
|
|
35
|
+
| `--otp <otp>` | Supply a one-time password. | |
|
|
36
|
+
|
|
37
|
+
## Compatibility
|
|
38
|
+
|
|
39
|
+
### `list`
|
|
40
|
+
|
|
41
|
+
- **npm:** `npm owner list`.
|
|
42
|
+
- **pnpm:** 11.1 or later: `pnpm owner list`. Earlier versions use `npm owner list` as a fallback.
|
|
43
|
+
- **Yarn Classic:** `yarn owner list`.
|
|
44
|
+
- **Yarn Modern:** Fallback: `npm owner list`.
|
|
45
|
+
- **Bun:** Fallback: `npm owner list`.
|
|
46
|
+
|
|
47
|
+
| Option | npm | pnpm | Yarn Classic | Yarn Modern | Bun | Notes |
|
|
48
|
+
| ------------- | --- | ---- | --------------- | ----------- | --- | ----- |
|
|
49
|
+
| `--otp <otp>` | Yes | Yes | 1.12.1 or later | Yes | Yes | |
|
|
50
|
+
|
|
51
|
+
### `add`
|
|
52
|
+
|
|
53
|
+
- **npm:** `npm owner add`.
|
|
54
|
+
- **pnpm:** 11.1 or later: `pnpm owner add`. Earlier versions use `npm owner add` as a fallback. Native pnpm takes the package before the user.
|
|
55
|
+
- **Yarn Classic:** `yarn owner add`. Keeps the user before the package.
|
|
56
|
+
- **Yarn Modern:** Fallback: `npm owner add`.
|
|
57
|
+
- **Bun:** Fallback: `npm owner add`.
|
|
58
|
+
|
|
59
|
+
| Option | npm | pnpm | Yarn Classic | Yarn Modern | Bun | Notes |
|
|
60
|
+
| ------------- | --- | ---- | --------------- | ----------- | --- | ----- |
|
|
61
|
+
| `--otp <otp>` | Yes | Yes | 1.12.1 or later | Yes | Yes | |
|
|
62
|
+
|
|
63
|
+
### `rm`
|
|
64
|
+
|
|
65
|
+
- **npm:** `npm owner rm`.
|
|
66
|
+
- **pnpm:** 11.1 or later: `pnpm owner rm`. Earlier versions use `npm owner rm` as a fallback. Native pnpm takes the package before the user.
|
|
67
|
+
- **Yarn Classic:** `yarn owner remove`. Keeps the user before the package. Removal can fail in Yarn Classic 1.22.22 because of an upstream bug. Vite+ does not retry through npm.
|
|
68
|
+
- **Yarn Modern:** Fallback: `npm owner rm`.
|
|
69
|
+
- **Bun:** Fallback: `npm owner rm`.
|
|
70
|
+
|
|
71
|
+
| Option | npm | pnpm | Yarn Classic | Yarn Modern | Bun | Notes |
|
|
72
|
+
| ------------- | --- | ---- | --------------- | ----------- | --- | ----- |
|
|
73
|
+
| `--otp <otp>` | Yes | Yes | 1.12.1 or later | Yes | Yes | |
|
|
74
|
+
|
|
75
|
+
Registry credentials and authorization follow the command that runs.
|
|
76
|
+
|
|
77
|
+
## Native Options
|
|
78
|
+
|
|
79
|
+
For registry requirements and native options, see [npm owner](https://docs.npmjs.com/cli/v11/commands/npm-owner), [pnpm owner](https://pnpm.io/cli/owner), and [Yarn Classic owner](https://classic.yarnpkg.com/en/docs/cli/owner). Options not exposed above must be used with the native command directly.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# vp pm pack
|
|
2
|
+
|
|
3
|
+
Create a package tarball from the project. This is different from [`vp pack`](/guide/pack), which builds libraries with tsdown.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
vp pm pack
|
|
7
|
+
vp pm pack --pack-destination ./artifacts
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
## Options
|
|
11
|
+
|
|
12
|
+
| Option | Description | Notes |
|
|
13
|
+
| --------------------------------------- | -------------------------------------------------- | --------------------------------- |
|
|
14
|
+
| `-r, --recursive` | Pack all workspace packages. | |
|
|
15
|
+
| `--filter <pattern>` | Select workspaces by pattern. | Can be repeated. |
|
|
16
|
+
| `--out <out>` | Choose the tarball output path. | |
|
|
17
|
+
| `--pack-destination <pack-destination>` | Choose the tarball output directory. | |
|
|
18
|
+
| `--pack-gzip-level <pack-gzip-level>` | Request a gzip compression level from 0 through 9. | |
|
|
19
|
+
| `--json` | Request native JSON output. | Output retains the native schema. |
|
|
20
|
+
|
|
21
|
+
## Compatibility
|
|
22
|
+
|
|
23
|
+
- **npm:** `npm pack`.
|
|
24
|
+
- **pnpm:** `pnpm pack`.
|
|
25
|
+
- **Yarn Classic:** `yarn pack`.
|
|
26
|
+
- **Yarn Modern:** `yarn pack`.
|
|
27
|
+
- **Bun:** `bun pm pack`.
|
|
28
|
+
|
|
29
|
+
| Option | npm | pnpm | Yarn Classic | Yarn Modern | Bun | Notes |
|
|
30
|
+
| --------------------------------------- | --------------- | ---------------- | ------------ | ----------- | --- | ------------------------------------ |
|
|
31
|
+
| `-r, --recursive` | 7.9.0 or later | 10.11.0 or later | No | Yes | No | |
|
|
32
|
+
| `--filter <pattern>` | 7.9.0 or later | 10.11.0 or later | No | Yes | No | |
|
|
33
|
+
| `--out <out>` | No | 10.0.0 or later | Yes | Yes | Yes | |
|
|
34
|
+
| `--pack-destination <pack-destination>` | 7.18.0 or later | Yes | No | No | Yes | Vite+ creates the directory for npm. |
|
|
35
|
+
| `--pack-gzip-level <pack-gzip-level>` | No | 8.3.0 or later | No | No | Yes | |
|
|
36
|
+
| `--json` | Yes | 9.14.0 or later | Yes | Yes | No | |
|
|
37
|
+
|
|
38
|
+
## Native Options
|
|
39
|
+
|
|
40
|
+
For native options, see [npm pack](https://docs.npmjs.com/cli/v11/commands/npm-pack), [pnpm pack](https://pnpm.io/cli/pack), [Yarn pack](https://yarnpkg.com/cli/pack), [Yarn Classic pack](https://classic.yarnpkg.com/en/docs/cli/pack), and [Bun pm pack](https://bun.com/docs/pm/cli/pm). To pass these options through Vite+, see [Native Arguments](./#native-arguments).
|
|
@@ -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).
|