diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/cli_helper_message/snapshots/cli_helper_message.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/cli_helper_message/snapshots/cli_helper_message.md index 1829c4ad14..0caeeee2a0 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/cli_helper_message/snapshots/cli_helper_message.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/cli_helper_message/snapshots/cli_helper_message.md @@ -132,7 +132,7 @@ Options: --concurrency Number of global package installs to run in parallel (only with -g) -h, --help Print help -Documentation: https://viteplus.dev/guide/package-management +Documentation: https://viteplus.dev/package-management/ ``` ## `vp add -h` @@ -178,7 +178,7 @@ Options: --concurrency Number of global package installs to run in parallel (only with -g) -h, --help Print help -Documentation: https://viteplus.dev/guide/package-management +Documentation: https://viteplus.dev/package-management/ ``` ## `vp remove -h` @@ -207,7 +207,7 @@ Options: --dry-run Preview what would be removed without actually removing (only with -g) -h, --help Print help -Documentation: https://viteplus.dev/guide/package-management +Documentation: https://viteplus.dev/package-management/ ``` ## `vp update -h` @@ -242,7 +242,7 @@ Options: --workspace Only update if package exists in workspace (pnpm-specific) -h, --help Print help -Documentation: https://viteplus.dev/guide/package-management +Documentation: https://viteplus.dev/package-management/ ``` ## `vp link -h` @@ -263,7 +263,7 @@ Arguments: Options: -h, --help Print help -Documentation: https://viteplus.dev/guide/package-management +Documentation: https://viteplus.dev/package-management/ ``` ## `vp unlink -h` @@ -285,7 +285,7 @@ Options: -r, --recursive Unlink in every workspace package -h, --help Print help -Documentation: https://viteplus.dev/guide/package-management +Documentation: https://viteplus.dev/package-management/ ``` ## `vp dedupe -h` @@ -306,7 +306,7 @@ Options: --check Check if deduplication would make changes -h, --help Print help -Documentation: https://viteplus.dev/guide/package-management +Documentation: https://viteplus.dev/package-management/ ``` ## `vp outdated -h` @@ -339,7 +339,7 @@ Options: --concurrency Number of global package checks to run in parallel (only with -g) -h, --help Print help -Documentation: https://viteplus.dev/guide/package-management +Documentation: https://viteplus.dev/package-management/ ``` ## `vp why -h` @@ -372,7 +372,7 @@ Options: --find-by Use a finder function defined in .pnpmfile.cjs -h, --help Print help -Documentation: https://viteplus.dev/guide/package-management +Documentation: https://viteplus.dev/package-management/ ``` ## `vp info -h` @@ -395,7 +395,7 @@ Options: --json Output in JSON format -h, --help Print help -Documentation: https://viteplus.dev/guide/package-management +Documentation: https://viteplus.dev/package-management/ ``` ## `vp pm -h` @@ -442,7 +442,7 @@ Commands: Options: -h, --help Print help -Documentation: https://viteplus.dev/guide/package-management +Documentation: https://viteplus.dev/package-management/ ``` ## `vp pm ci -h` @@ -462,7 +462,7 @@ Arguments: Options: -h, --help Print help -Documentation: https://viteplus.dev/guide/package-management +Documentation: https://viteplus.dev/package-management/ ``` ## `vp env` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_add_bun/snapshots/command_add_bun.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_add_bun/snapshots/command_add_bun.md index 9c924183a5..f988279358 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_add_bun/snapshots/command_add_bun.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_add_bun/snapshots/command_add_bun.md @@ -43,7 +43,7 @@ Options: --concurrency Number of global package installs to run in parallel (only with -g) -h, --help Print help -Documentation: https://viteplus.dev/guide/package-management +Documentation: https://viteplus.dev/package-management/ ``` ## `vp add` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_add_npm10/snapshots/command_add_npm10.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_add_npm10/snapshots/command_add_npm10.md index 16cd196922..6ede5cbb3e 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_add_npm10/snapshots/command_add_npm10.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_add_npm10/snapshots/command_add_npm10.md @@ -43,7 +43,7 @@ Options: --concurrency Number of global package installs to run in parallel (only with -g) -h, --help Print help -Documentation: https://viteplus.dev/guide/package-management +Documentation: https://viteplus.dev/package-management/ ``` ## `vp add testnpm2 -D -- --no-audit` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_add_npm11/snapshots/command_add_npm11.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_add_npm11/snapshots/command_add_npm11.md index 7906d077e9..355ad028fc 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_add_npm11/snapshots/command_add_npm11.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_add_npm11/snapshots/command_add_npm11.md @@ -43,7 +43,7 @@ Options: --concurrency Number of global package installs to run in parallel (only with -g) -h, --help Print help -Documentation: https://viteplus.dev/guide/package-management +Documentation: https://viteplus.dev/package-management/ ``` ## `vp add testnpm2 -D -- --no-audit` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_add_pnpm10/snapshots/command_add_pnpm10.global.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_add_pnpm10/snapshots/command_add_pnpm10.global.md index 47d170e2b8..01342b4d33 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_add_pnpm10/snapshots/command_add_pnpm10.global.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_add_pnpm10/snapshots/command_add_pnpm10.global.md @@ -43,7 +43,7 @@ Options: --concurrency Number of global package installs to run in parallel (only with -g) -h, --help Print help -Documentation: https://viteplus.dev/guide/package-management +Documentation: https://viteplus.dev/package-management/ ``` ## `vp add` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_add_pnpm11/snapshots/command_add_pnpm11.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_add_pnpm11/snapshots/command_add_pnpm11.md index 71ec8fb279..2a01cdc85d 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_add_pnpm11/snapshots/command_add_pnpm11.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_add_pnpm11/snapshots/command_add_pnpm11.md @@ -43,7 +43,7 @@ Options: --concurrency Number of global package installs to run in parallel (only with -g) -h, --help Print help -Documentation: https://viteplus.dev/guide/package-management +Documentation: https://viteplus.dev/package-management/ ``` ## `vp add` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_add_pnpm12/snapshots/command_add_pnpm12.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_add_pnpm12/snapshots/command_add_pnpm12.md index 6f9e954ea5..0ae3ac2bcf 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_add_pnpm12/snapshots/command_add_pnpm12.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_add_pnpm12/snapshots/command_add_pnpm12.md @@ -43,7 +43,7 @@ Options: --concurrency Number of global package installs to run in parallel (only with -g) -h, --help Print help -Documentation: https://viteplus.dev/guide/package-management +Documentation: https://viteplus.dev/package-management/ ``` ## `vp add` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_add_pnpm9/snapshots/command_add_pnpm9.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_add_pnpm9/snapshots/command_add_pnpm9.md index a0e7e921a1..b89e9173a0 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_add_pnpm9/snapshots/command_add_pnpm9.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_add_pnpm9/snapshots/command_add_pnpm9.md @@ -43,7 +43,7 @@ Options: --concurrency Number of global package installs to run in parallel (only with -g) -h, --help Print help -Documentation: https://viteplus.dev/guide/package-management +Documentation: https://viteplus.dev/package-management/ ``` ## `vp add testnpm2 -D` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_add_yarn4/snapshots/command_add_yarn4.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_add_yarn4/snapshots/command_add_yarn4.md index 4f7f3f217f..1f6edd2710 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_add_yarn4/snapshots/command_add_yarn4.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_add_yarn4/snapshots/command_add_yarn4.md @@ -43,7 +43,7 @@ Options: --concurrency Number of global package installs to run in parallel (only with -g) -h, --help Print help -Documentation: https://viteplus.dev/guide/package-management +Documentation: https://viteplus.dev/package-management/ ``` ## `vp add testnpm2 -D` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_cache_bun/snapshots/command_cache_bun.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_cache_bun/snapshots/command_cache_bun.md index 4b51ea5f42..4487fe1f8d 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_cache_bun/snapshots/command_cache_bun.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_cache_bun/snapshots/command_cache_bun.md @@ -18,7 +18,7 @@ Arguments: Options: -h, --help Print help -Documentation: https://viteplus.dev/guide/package-management +Documentation: https://viteplus.dev/package-management/ ``` ## `vp pm cache dir` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_cache_pnpm10/snapshots/command_cache_pnpm10.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_cache_pnpm10/snapshots/command_cache_pnpm10.md index 1cfbec9abe..1ebd89e772 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_cache_pnpm10/snapshots/command_cache_pnpm10.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_cache_pnpm10/snapshots/command_cache_pnpm10.md @@ -18,7 +18,7 @@ Arguments: Options: -h, --help Print help -Documentation: https://viteplus.dev/guide/package-management +Documentation: https://viteplus.dev/package-management/ ``` ## `vp pm cache dir` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_cache_pnpm11/snapshots/command_cache_pnpm11.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_cache_pnpm11/snapshots/command_cache_pnpm11.md index 71b6954b08..da717af779 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_cache_pnpm11/snapshots/command_cache_pnpm11.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_cache_pnpm11/snapshots/command_cache_pnpm11.md @@ -18,7 +18,7 @@ Arguments: Options: -h, --help Print help -Documentation: https://viteplus.dev/guide/package-management +Documentation: https://viteplus.dev/package-management/ ``` ## `vp pm cache dir` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_config_npm10/snapshots/command_config_npm10.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_config_npm10/snapshots/command_config_npm10.md index bda911f79e..63f373854c 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_config_npm10/snapshots/command_config_npm10.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_config_npm10/snapshots/command_config_npm10.md @@ -20,7 +20,7 @@ Commands: Options: -h, --help Print help -Documentation: https://viteplus.dev/guide/package-management +Documentation: https://viteplus.dev/package-management/ ``` ## `vp pm config get vite-plus-pm-config-test-key --location project` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_config_pnpm10/snapshots/command_config_pnpm10.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_config_pnpm10/snapshots/command_config_pnpm10.md index e7b6e2dac7..3911433c45 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_config_pnpm10/snapshots/command_config_pnpm10.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_config_pnpm10/snapshots/command_config_pnpm10.md @@ -20,7 +20,7 @@ Commands: Options: -h, --help Print help -Documentation: https://viteplus.dev/guide/package-management +Documentation: https://viteplus.dev/package-management/ ``` ## `vp pm config list --location project` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_config_pnpm11/snapshots/command_config_pnpm11.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_config_pnpm11/snapshots/command_config_pnpm11.md index f5b968ca1e..cb4dd6f9f1 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_config_pnpm11/snapshots/command_config_pnpm11.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_config_pnpm11/snapshots/command_config_pnpm11.md @@ -20,7 +20,7 @@ Commands: Options: -h, --help Print help -Documentation: https://viteplus.dev/guide/package-management +Documentation: https://viteplus.dev/package-management/ ``` ## `vp pm config list --location project` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_config_yarn1/snapshots/command_config_yarn1.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_config_yarn1/snapshots/command_config_yarn1.md index 2c79bf33ba..fadf0f6f97 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_config_yarn1/snapshots/command_config_yarn1.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_config_yarn1/snapshots/command_config_yarn1.md @@ -20,7 +20,7 @@ Commands: Options: -h, --help Print help -Documentation: https://viteplus.dev/guide/package-management +Documentation: https://viteplus.dev/package-management/ ``` ## `vp pm config set vite-plus-pm-config-test-key test-value --location project` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_config_yarn4/snapshots/command_config_yarn4.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_config_yarn4/snapshots/command_config_yarn4.md index 26cd0fd684..1fe0266fa0 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_config_yarn4/snapshots/command_config_yarn4.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_config_yarn4/snapshots/command_config_yarn4.md @@ -20,7 +20,7 @@ Commands: Options: -h, --help Print help -Documentation: https://viteplus.dev/guide/package-management +Documentation: https://viteplus.dev/package-management/ ``` ## `vp pm config set vite-plus-pm-config-test-key test-value --location project` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_dedupe_pnpm10/snapshots/command_dedupe_pnpm10.global.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_dedupe_pnpm10/snapshots/command_dedupe_pnpm10.global.md index 379a6db326..b0ede5e0d9 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_dedupe_pnpm10/snapshots/command_dedupe_pnpm10.global.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_dedupe_pnpm10/snapshots/command_dedupe_pnpm10.global.md @@ -18,7 +18,7 @@ Options: --check Check if deduplication would make changes -h, --help Print help -Documentation: https://viteplus.dev/guide/package-management +Documentation: https://viteplus.dev/package-management/ ``` ## `vp dedupe` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_dedupe_pnpm11/snapshots/command_dedupe_pnpm11.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_dedupe_pnpm11/snapshots/command_dedupe_pnpm11.md index 5cd107ce5b..b14c0ae860 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_dedupe_pnpm11/snapshots/command_dedupe_pnpm11.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_dedupe_pnpm11/snapshots/command_dedupe_pnpm11.md @@ -18,7 +18,7 @@ Options: --check Check if deduplication would make changes -h, --help Print help -Documentation: https://viteplus.dev/guide/package-management +Documentation: https://viteplus.dev/package-management/ ``` ## `vp dedupe` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_link_pnpm10/snapshots/command_link_pnpm10.global.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_link_pnpm10/snapshots/command_link_pnpm10.global.md index a6d6d10d5e..0c3cb2db7a 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_link_pnpm10/snapshots/command_link_pnpm10.global.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_link_pnpm10/snapshots/command_link_pnpm10.global.md @@ -18,7 +18,7 @@ Arguments: Options: -h, --help Print help -Documentation: https://viteplus.dev/guide/package-management +Documentation: https://viteplus.dev/package-management/ ``` ## `vp install` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_link_pnpm11/snapshots/command_link_pnpm11.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_link_pnpm11/snapshots/command_link_pnpm11.md index 1af89bbd56..7c50aef546 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_link_pnpm11/snapshots/command_link_pnpm11.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_link_pnpm11/snapshots/command_link_pnpm11.md @@ -18,7 +18,7 @@ Arguments: Options: -h, --help Print help -Documentation: https://viteplus.dev/guide/package-management +Documentation: https://viteplus.dev/package-management/ ``` ## `vp install` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_list_bun/snapshots/command_list_bun.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_list_bun/snapshots/command_list_bun.md index 6062bfdda7..32c233b8cf 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_list_bun/snapshots/command_list_bun.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_list_bun/snapshots/command_list_bun.md @@ -47,7 +47,7 @@ Options: -g, --global List global packages -h, --help Print help -Documentation: https://viteplus.dev/guide/package-management +Documentation: https://viteplus.dev/package-management/ ``` ## `vp pm list` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_list_pnpm10/snapshots/command_list_pnpm10.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_list_pnpm10/snapshots/command_list_pnpm10.md index 75f3d6e9a3..9a472a40b3 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_list_pnpm10/snapshots/command_list_pnpm10.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_list_pnpm10/snapshots/command_list_pnpm10.md @@ -48,7 +48,7 @@ Options: -g, --global List global packages -h, --help Print help -Documentation: https://viteplus.dev/guide/package-management +Documentation: https://viteplus.dev/package-management/ ``` ## `vp pm list` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_list_pnpm11/snapshots/command_list_pnpm11.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_list_pnpm11/snapshots/command_list_pnpm11.md index 5ec2fafde4..28017dfe80 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_list_pnpm11/snapshots/command_list_pnpm11.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_list_pnpm11/snapshots/command_list_pnpm11.md @@ -48,7 +48,7 @@ Options: -g, --global List global packages -h, --help Print help -Documentation: https://viteplus.dev/guide/package-management +Documentation: https://viteplus.dev/package-management/ ``` ## `vp pm list` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_outdated_bun/snapshots/command_outdated_bun.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_outdated_bun/snapshots/command_outdated_bun.md index c2fd827a36..ae2b69b7f4 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_outdated_bun/snapshots/command_outdated_bun.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_outdated_bun/snapshots/command_outdated_bun.md @@ -30,7 +30,7 @@ Options: --concurrency Number of global package checks to run in parallel (only with -g) -h, --help Print help -Documentation: https://viteplus.dev/guide/package-management +Documentation: https://viteplus.dev/package-management/ ``` ## `vp install` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_outdated_pnpm10/snapshots/command_outdated_pnpm10.global.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_outdated_pnpm10/snapshots/command_outdated_pnpm10.global.md index 120f1b820c..6232f4c75e 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_outdated_pnpm10/snapshots/command_outdated_pnpm10.global.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_outdated_pnpm10/snapshots/command_outdated_pnpm10.global.md @@ -30,7 +30,7 @@ Options: --concurrency Number of global package checks to run in parallel (only with -g) -h, --help Print help -Documentation: https://viteplus.dev/guide/package-management +Documentation: https://viteplus.dev/package-management/ ``` ## `vp install` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_outdated_pnpm11/snapshots/command_outdated_pnpm11.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_outdated_pnpm11/snapshots/command_outdated_pnpm11.md index 0d783300b7..ebc177a9fb 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_outdated_pnpm11/snapshots/command_outdated_pnpm11.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_outdated_pnpm11/snapshots/command_outdated_pnpm11.md @@ -30,7 +30,7 @@ Options: --concurrency Number of global package checks to run in parallel (only with -g) -h, --help Print help -Documentation: https://viteplus.dev/guide/package-management +Documentation: https://viteplus.dev/package-management/ ``` ## `vp install` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_owner_pnpm10/snapshots/command_owner_pnpm10.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_owner_pnpm10/snapshots/command_owner_pnpm10.md index b0cf0ae5d3..9ebb7ff53e 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_owner_pnpm10/snapshots/command_owner_pnpm10.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_owner_pnpm10/snapshots/command_owner_pnpm10.md @@ -19,7 +19,7 @@ Commands: Options: -h, --help Print help -Documentation: https://viteplus.dev/guide/package-management +Documentation: https://viteplus.dev/package-management/ ``` ## `vp pm owner list testnpm2` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_owner_pnpm11/snapshots/command_owner_pnpm11.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_owner_pnpm11/snapshots/command_owner_pnpm11.md index 895d626c3c..add3804097 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_owner_pnpm11/snapshots/command_owner_pnpm11.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_owner_pnpm11/snapshots/command_owner_pnpm11.md @@ -19,7 +19,7 @@ Commands: Options: -h, --help Print help -Documentation: https://viteplus.dev/guide/package-management +Documentation: https://viteplus.dev/package-management/ ``` ## `vp pm owner list testnpm2` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_pack_pnpm10/snapshots/command_pack_pnpm10.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_pack_pnpm10/snapshots/command_pack_pnpm10.md index f997f0cb06..b9b03e9c3b 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_pack_pnpm10/snapshots/command_pack_pnpm10.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_pack_pnpm10/snapshots/command_pack_pnpm10.md @@ -23,7 +23,7 @@ Options: --json Output in JSON format -h, --help Print help -Documentation: https://viteplus.dev/guide/package-management +Documentation: https://viteplus.dev/package-management/ ``` ## `vp pm pack` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_pack_pnpm11/snapshots/command_pack_pnpm11.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_pack_pnpm11/snapshots/command_pack_pnpm11.md index 39c464a237..ff74c4ae0c 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_pack_pnpm11/snapshots/command_pack_pnpm11.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_pack_pnpm11/snapshots/command_pack_pnpm11.md @@ -23,7 +23,7 @@ Options: --json Output in JSON format -h, --help Print help -Documentation: https://viteplus.dev/guide/package-management +Documentation: https://viteplus.dev/package-management/ ``` ## `vp pm pack` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_pm_approve_builds_bun/snapshots/command_pm_approve_builds_bun.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_pm_approve_builds_bun/snapshots/command_pm_approve_builds_bun.md index 99bb643625..7b312fa7ca 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_pm_approve_builds_bun/snapshots/command_pm_approve_builds_bun.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_pm_approve_builds_bun/snapshots/command_pm_approve_builds_bun.md @@ -19,7 +19,7 @@ Options: --all Approve every package currently pending approval (pnpm >= 10.32.0, npm >= 11.16.0). Mutually exclusive with positional packages -h, --help Print help -Documentation: https://viteplus.dev/guide/package-management +Documentation: https://viteplus.dev/package-management/ ``` ## `vp pm approve-builds` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_pm_approve_builds_npm11/snapshots/command_pm_approve_builds_npm11.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_pm_approve_builds_npm11/snapshots/command_pm_approve_builds_npm11.md index c3b3c17db3..da33b3de5a 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_pm_approve_builds_npm11/snapshots/command_pm_approve_builds_npm11.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_pm_approve_builds_npm11/snapshots/command_pm_approve_builds_npm11.md @@ -19,7 +19,7 @@ Options: --all Approve every package currently pending approval (pnpm >= 10.32.0, npm >= 11.16.0). Mutually exclusive with positional packages -h, --help Print help -Documentation: https://viteplus.dev/guide/package-management +Documentation: https://viteplus.dev/package-management/ ``` ## `vp pm approve-builds` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_pm_stage_pnpm11/snapshots/command_pm_stage_pnpm11.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_pm_stage_pnpm11/snapshots/command_pm_stage_pnpm11.md index 74884f5d4c..ccf5bbca41 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_pm_stage_pnpm11/snapshots/command_pm_stage_pnpm11.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_pm_stage_pnpm11/snapshots/command_pm_stage_pnpm11.md @@ -22,7 +22,7 @@ Commands: Options: -h, --help Print help -Documentation: https://viteplus.dev/guide/package-management +Documentation: https://viteplus.dev/package-management/ ``` ## `vp pm stage publish --help` @@ -52,7 +52,7 @@ Options: --registry Registry URL -h, --help Print help -Documentation: https://viteplus.dev/guide/package-management +Documentation: https://viteplus.dev/package-management/ ``` ## `vp pm stage approve --help` @@ -75,5 +75,5 @@ Options: --registry Registry URL -h, --help Print help -Documentation: https://viteplus.dev/guide/package-management +Documentation: https://viteplus.dev/package-management/ ``` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_prune_npm10/snapshots/command_prune_npm10.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_prune_npm10/snapshots/command_prune_npm10.md index 8f105607cc..8c8c0fa882 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_prune_npm10/snapshots/command_prune_npm10.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_prune_npm10/snapshots/command_prune_npm10.md @@ -31,7 +31,7 @@ Options: --no-optional Remove optional dependencies -h, --help Print help -Documentation: https://viteplus.dev/guide/package-management +Documentation: https://viteplus.dev/package-management/ ``` ## `vp pm prune` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_prune_pnpm10/snapshots/command_prune_pnpm10.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_prune_pnpm10/snapshots/command_prune_pnpm10.md index 269459e728..78b19c66a9 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_prune_pnpm10/snapshots/command_prune_pnpm10.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_prune_pnpm10/snapshots/command_prune_pnpm10.md @@ -38,7 +38,7 @@ Options: --no-optional Remove optional dependencies -h, --help Print help -Documentation: https://viteplus.dev/guide/package-management +Documentation: https://viteplus.dev/package-management/ ``` ## `vp pm prune` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_prune_pnpm11/snapshots/command_prune_pnpm11.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_prune_pnpm11/snapshots/command_prune_pnpm11.md index c349a1dfd8..fd2a3e6b84 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_prune_pnpm11/snapshots/command_prune_pnpm11.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_prune_pnpm11/snapshots/command_prune_pnpm11.md @@ -38,7 +38,7 @@ Options: --no-optional Remove optional dependencies -h, --help Print help -Documentation: https://viteplus.dev/guide/package-management +Documentation: https://viteplus.dev/package-management/ ``` ## `vp pm prune` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_prune_yarn4/snapshots/command_prune_yarn4.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_prune_yarn4/snapshots/command_prune_yarn4.md index 16bdd56b1a..f0917b59b3 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_prune_yarn4/snapshots/command_prune_yarn4.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_prune_yarn4/snapshots/command_prune_yarn4.md @@ -19,7 +19,7 @@ Options: --no-optional Remove optional dependencies -h, --help Print help -Documentation: https://viteplus.dev/guide/package-management +Documentation: https://viteplus.dev/package-management/ ``` ## `vp pm prune` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_publish_bun/snapshots/command_publish_bun.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_publish_bun/snapshots/command_publish_bun.md index f2b77ee2d8..fa87ee22cc 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_publish_bun/snapshots/command_publish_bun.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_publish_bun/snapshots/command_publish_bun.md @@ -30,5 +30,5 @@ Options: --filter Filter packages in monorepo -h, --help Print help -Documentation: https://viteplus.dev/guide/package-management +Documentation: https://viteplus.dev/package-management/ ``` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_publish_npm10/snapshots/command_publish_npm10.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_publish_npm10/snapshots/command_publish_npm10.md index de92bf6d16..a09b0ce31b 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_publish_npm10/snapshots/command_publish_npm10.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_publish_npm10/snapshots/command_publish_npm10.md @@ -30,7 +30,7 @@ Options: --filter Filter packages in monorepo -h, --help Print help -Documentation: https://viteplus.dev/guide/package-management +Documentation: https://viteplus.dev/package-management/ ``` ## `vp pm publish --dry-run -- --loglevel error` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_publish_pnpm10/snapshots/command_publish_pnpm10.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_publish_pnpm10/snapshots/command_publish_pnpm10.md index d01879179e..0a42b206b3 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_publish_pnpm10/snapshots/command_publish_pnpm10.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_publish_pnpm10/snapshots/command_publish_pnpm10.md @@ -30,7 +30,7 @@ Options: --filter Filter packages in monorepo -h, --help Print help -Documentation: https://viteplus.dev/guide/package-management +Documentation: https://viteplus.dev/package-management/ ``` ## `vp pm publish --dry-run -- --loglevel error` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_publish_pnpm11/snapshots/command_publish_pnpm11.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_publish_pnpm11/snapshots/command_publish_pnpm11.md index 4439e77175..6be5309d1c 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_publish_pnpm11/snapshots/command_publish_pnpm11.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_publish_pnpm11/snapshots/command_publish_pnpm11.md @@ -30,7 +30,7 @@ Options: --filter Filter packages in monorepo -h, --help Print help -Documentation: https://viteplus.dev/guide/package-management +Documentation: https://viteplus.dev/package-management/ ``` ## `vp pm publish --dry-run -- --loglevel error` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_publish_yarn1/snapshots/command_publish_yarn1.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_publish_yarn1/snapshots/command_publish_yarn1.md index bb9e183958..ee67f8bcfe 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_publish_yarn1/snapshots/command_publish_yarn1.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_publish_yarn1/snapshots/command_publish_yarn1.md @@ -30,7 +30,7 @@ Options: --filter Filter packages in monorepo -h, --help Print help -Documentation: https://viteplus.dev/guide/package-management +Documentation: https://viteplus.dev/package-management/ ``` ## `vp pm publish --dry-run` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_publish_yarn4/snapshots/command_publish_yarn4.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_publish_yarn4/snapshots/command_publish_yarn4.md index be4d9f68cb..f78d38ef93 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_publish_yarn4/snapshots/command_publish_yarn4.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_publish_yarn4/snapshots/command_publish_yarn4.md @@ -30,7 +30,7 @@ Options: --filter Filter packages in monorepo -h, --help Print help -Documentation: https://viteplus.dev/guide/package-management +Documentation: https://viteplus.dev/package-management/ ``` ## `vp install` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_rebuild_pnpm11/snapshots/command_rebuild_pnpm11.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_rebuild_pnpm11/snapshots/command_rebuild_pnpm11.md index 617e4ebae6..41404bec10 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_rebuild_pnpm11/snapshots/command_rebuild_pnpm11.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_rebuild_pnpm11/snapshots/command_rebuild_pnpm11.md @@ -18,7 +18,7 @@ Arguments: Options: -h, --help Print help -Documentation: https://viteplus.dev/guide/package-management +Documentation: https://viteplus.dev/package-management/ ``` ## `vp install` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_remove_bun/snapshots/command_remove_bun.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_remove_bun/snapshots/command_remove_bun.md index 6fab4f3490..1b61eb3b90 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_remove_bun/snapshots/command_remove_bun.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_remove_bun/snapshots/command_remove_bun.md @@ -26,7 +26,7 @@ Options: --dry-run Preview what would be removed without actually removing (only with -g) -h, --help Print help -Documentation: https://viteplus.dev/guide/package-management +Documentation: https://viteplus.dev/package-management/ ``` ## `vp remove` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_remove_pnpm10/snapshots/command_remove_pnpm10.global.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_remove_pnpm10/snapshots/command_remove_pnpm10.global.md index 481bebe82b..145c9bf4a7 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_remove_pnpm10/snapshots/command_remove_pnpm10.global.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_remove_pnpm10/snapshots/command_remove_pnpm10.global.md @@ -26,7 +26,7 @@ Options: --dry-run Preview what would be removed without actually removing (only with -g) -h, --help Print help -Documentation: https://viteplus.dev/guide/package-management +Documentation: https://viteplus.dev/package-management/ ``` ## `vp remove` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_remove_pnpm11/snapshots/command_remove_pnpm11.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_remove_pnpm11/snapshots/command_remove_pnpm11.md index 79fb6183b2..91923ffdda 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_remove_pnpm11/snapshots/command_remove_pnpm11.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_remove_pnpm11/snapshots/command_remove_pnpm11.md @@ -26,7 +26,7 @@ Options: --dry-run Preview what would be removed without actually removing (only with -g) -h, --help Print help -Documentation: https://viteplus.dev/guide/package-management +Documentation: https://viteplus.dev/package-management/ ``` ## `vp remove` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_unlink_pnpm10/snapshots/command_unlink_pnpm10.global.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_unlink_pnpm10/snapshots/command_unlink_pnpm10.global.md index cb5588670e..583131b9ba 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_unlink_pnpm10/snapshots/command_unlink_pnpm10.global.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_unlink_pnpm10/snapshots/command_unlink_pnpm10.global.md @@ -19,7 +19,7 @@ Options: -r, --recursive Unlink in every workspace package -h, --help Print help -Documentation: https://viteplus.dev/guide/package-management +Documentation: https://viteplus.dev/package-management/ ``` ## `vpt mkdir -p ../unlink-test-lib` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_unlink_pnpm11/snapshots/command_unlink_pnpm11.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_unlink_pnpm11/snapshots/command_unlink_pnpm11.md index d53feca5d7..57001aa2a5 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_unlink_pnpm11/snapshots/command_unlink_pnpm11.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_unlink_pnpm11/snapshots/command_unlink_pnpm11.md @@ -19,7 +19,7 @@ Options: -r, --recursive Unlink in every workspace package -h, --help Print help -Documentation: https://viteplus.dev/guide/package-management +Documentation: https://viteplus.dev/package-management/ ``` ## `vpt mkdir -p ../unlink-test-lib` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_update_bun/snapshots/command_update_bun.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_update_bun/snapshots/command_update_bun.md index 705ae9d795..12b35f2d46 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_update_bun/snapshots/command_update_bun.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_update_bun/snapshots/command_update_bun.md @@ -32,7 +32,7 @@ Options: --workspace Only update if package exists in workspace (pnpm-specific) -h, --help Print help -Documentation: https://viteplus.dev/guide/package-management +Documentation: https://viteplus.dev/package-management/ ``` ## `vp update testnpm2 --workspace-root` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_update_pnpm10/snapshots/command_update_pnpm10.global.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_update_pnpm10/snapshots/command_update_pnpm10.global.md index f844913b97..1663b0f118 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_update_pnpm10/snapshots/command_update_pnpm10.global.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_update_pnpm10/snapshots/command_update_pnpm10.global.md @@ -32,7 +32,7 @@ Options: --workspace Only update if package exists in workspace (pnpm-specific) -h, --help Print help -Documentation: https://viteplus.dev/guide/package-management +Documentation: https://viteplus.dev/package-management/ ``` ## `vp update testnpm2` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_update_pnpm11/snapshots/command_update_pnpm11.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_update_pnpm11/snapshots/command_update_pnpm11.md index 12f276b12e..f468394abb 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_update_pnpm11/snapshots/command_update_pnpm11.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_update_pnpm11/snapshots/command_update_pnpm11.md @@ -32,7 +32,7 @@ Options: --workspace Only update if package exists in workspace (pnpm-specific) -h, --help Print help -Documentation: https://viteplus.dev/guide/package-management +Documentation: https://viteplus.dev/package-management/ ``` ## `vp update testnpm2` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_view_bun/snapshots/command_view_bun.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_view_bun/snapshots/command_view_bun.md index 6d8ed2bc19..d0f8406a61 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_view_bun/snapshots/command_view_bun.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_view_bun/snapshots/command_view_bun.md @@ -20,7 +20,7 @@ Options: --json Output in JSON format -h, --help Print help -Documentation: https://viteplus.dev/guide/package-management +Documentation: https://viteplus.dev/package-management/ ``` ## `vp pm view testnpm2` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_view_pnpm10/snapshots/command_view_pnpm10.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_view_pnpm10/snapshots/command_view_pnpm10.md index 0e353ba53b..2491d63775 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_view_pnpm10/snapshots/command_view_pnpm10.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_view_pnpm10/snapshots/command_view_pnpm10.md @@ -20,7 +20,7 @@ Options: --json Output in JSON format -h, --help Print help -Documentation: https://viteplus.dev/guide/package-management +Documentation: https://viteplus.dev/package-management/ ``` ## `vp pm view testnpm2` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_view_pnpm11/snapshots/command_view_pnpm11.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_view_pnpm11/snapshots/command_view_pnpm11.md index 238eb4addd..ecb7cff7ca 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_view_pnpm11/snapshots/command_view_pnpm11.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_view_pnpm11/snapshots/command_view_pnpm11.md @@ -20,7 +20,7 @@ Options: --json Output in JSON format -h, --help Print help -Documentation: https://viteplus.dev/guide/package-management +Documentation: https://viteplus.dev/package-management/ ``` ## `vp pm view testnpm2` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_why_bun/snapshots/command_why_bun.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_why_bun/snapshots/command_why_bun.md index c88115ad51..958b3d19be 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_why_bun/snapshots/command_why_bun.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_why_bun/snapshots/command_why_bun.md @@ -30,7 +30,7 @@ Options: --find-by Use a finder function defined in .pnpmfile.cjs -h, --help Print help -Documentation: https://viteplus.dev/guide/package-management +Documentation: https://viteplus.dev/package-management/ ``` ## `vp install` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_why_pnpm10/snapshots/command_why_pnpm10.global.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_why_pnpm10/snapshots/command_why_pnpm10.global.md index d67398c145..f01c0ae983 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_why_pnpm10/snapshots/command_why_pnpm10.global.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_why_pnpm10/snapshots/command_why_pnpm10.global.md @@ -30,7 +30,7 @@ Options: --find-by Use a finder function defined in .pnpmfile.cjs -h, --help Print help -Documentation: https://viteplus.dev/guide/package-management +Documentation: https://viteplus.dev/package-management/ ``` ## `vp install` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_why_pnpm11/snapshots/command_why_pnpm11.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_why_pnpm11/snapshots/command_why_pnpm11.md index 94c8888a1f..cf236ae490 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_why_pnpm11/snapshots/command_why_pnpm11.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_why_pnpm11/snapshots/command_why_pnpm11.md @@ -30,7 +30,7 @@ Options: --find-by Use a finder function defined in .pnpmfile.cjs -h, --help Print help -Documentation: https://viteplus.dev/guide/package-management +Documentation: https://viteplus.dev/package-management/ ``` ## `vp install` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/pm_licenses/snapshots/pm_licenses_unsupported.global.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/pm_licenses/snapshots/pm_licenses_unsupported.global.md index a44febcbdb..1fdaea290f 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/pm_licenses/snapshots/pm_licenses_unsupported.global.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/pm_licenses/snapshots/pm_licenses_unsupported.global.md @@ -15,7 +15,7 @@ Commands: Options: -h, --help Print help -Documentation: https://viteplus.dev/guide/package-management +Documentation: https://viteplus.dev/package-management/ ``` ## `vp pm licenses list --help` @@ -34,7 +34,7 @@ Options: --json Output in the package manager's native JSON format -h, --help Print help -Documentation: https://viteplus.dev/guide/package-management +Documentation: https://viteplus.dev/package-management/ ``` ## `vp pm licenses list` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/pm_team/snapshots/pm_team_npm.global.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/pm_team/snapshots/pm_team_npm.global.md index 43795989c0..d9a7318b6b 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/pm_team/snapshots/pm_team_npm.global.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/pm_team/snapshots/pm_team_npm.global.md @@ -19,7 +19,7 @@ Commands: Options: -h, --help Print help -Documentation: https://viteplus.dev/guide/package-management +Documentation: https://viteplus.dev/package-management/ ``` ## `vp pm team add --help` @@ -42,7 +42,7 @@ Options: --registry Registry URL -h, --help Print help -Documentation: https://viteplus.dev/guide/package-management +Documentation: https://viteplus.dev/package-management/ ``` ## `vp pm team ls @org -- --version` diff --git a/crates/vp_global_cli/src/help.rs b/crates/vp_global_cli/src/help.rs index c0dadeb24e..f5404aea85 100644 --- a/crates/vp_global_cli/src/help.rs +++ b/crates/vp_global_cli/src/help.rs @@ -25,7 +25,7 @@ fn documentation_url_for_command_path(command_path: &[&str]) -> Option { "install" | "add" | "remove" | "update" | "dedupe" | "outdated" | "list" | "ls" | "why" | "info" | "view" | "show" | "link" | "unlink" | "rebuild" | "pm", .., - ] => "/guide/package-management", + ] => "/package-management/", ["dlx"] => "/guide/vpx", ["env", ..] => "/guide/env", ["toolchain" | "upgrade"] => "/guide/upgrade", @@ -725,7 +725,7 @@ Options: fn docs_url_is_mapped_for_grouped_commands() { assert_eq!( documentation_url_for_command_path(&["add"]), - Some(vp_shared::documentation_url("/guide/package-management")) + Some(vp_shared::documentation_url("/package-management/")) ); assert_eq!( documentation_url_for_command_path(&["env", "list"]), diff --git a/docs/.vitepress/config.mts b/docs/.vitepress/config.mts index 2f61ce4809..2372b6bbf7 100644 --- a/docs/.vitepress/config.mts +++ b/docs/.vitepress/config.mts @@ -52,7 +52,7 @@ const guideSidebar = [ ], }, { text: 'Update Vite+', link: '/guide/upgrade-project' }, - { text: 'Package Management', link: '/guide/package-management' }, + { text: 'Package Management', link: '/package-management/' }, ], }, { @@ -112,6 +112,85 @@ const guideSidebar = [ }, ]; +const packageManagementSidebar = [ + { + text: 'Getting Started', + items: [ + { text: 'Overview', link: '/package-management/' }, + { text: 'Package Manager Selection', link: '/package-management/package-manager-selection' }, + { text: 'Global Packages', link: '/package-management/global-packages' }, + ], + }, + { + text: 'Dependency Management', + items: [ + { text: 'install', link: '/package-management/install' }, + { text: 'add', link: '/package-management/add' }, + { text: 'remove', link: '/package-management/remove' }, + { text: 'update', link: '/package-management/update' }, + { text: 'dedupe', link: '/package-management/dedupe' }, + { text: 'ci', link: '/package-management/ci' }, + { text: 'prune', link: '/package-management/prune' }, + ], + }, + { + text: 'Inspection and Diagnostics', + items: [ + { text: 'list', link: '/package-management/list' }, + { text: 'why', link: '/package-management/why' }, + { text: 'info', link: '/package-management/info' }, + { text: 'outdated', link: '/package-management/outdated' }, + { text: 'licenses', link: '/package-management/licenses' }, + { text: 'search', link: '/package-management/search' }, + { text: 'audit', link: '/package-management/audit' }, + { text: 'fund', link: '/package-management/fund' }, + { text: 'ping', link: '/package-management/ping' }, + ], + }, + { + text: 'Local Development', + items: [ + { text: 'link', link: '/package-management/link' }, + { text: 'unlink', link: '/package-management/unlink' }, + { text: 'rebuild', link: '/package-management/rebuild' }, + { text: 'approve-builds', link: '/package-management/approve-builds' }, + { text: 'patch', link: '/package-management/patch' }, + { text: 'patch-commit', link: '/package-management/patch-commit' }, + { text: 'dlx', link: '/package-management/dlx' }, + ], + }, + { + text: 'Publishing', + items: [ + { text: 'pack', link: '/package-management/pack' }, + { text: 'version', link: '/package-management/version' }, + { text: 'publish', link: '/package-management/publish' }, + { text: 'stage', link: '/package-management/stage' }, + { text: 'dist-tag', link: '/package-management/dist-tag' }, + { text: 'deprecate', link: '/package-management/deprecate' }, + ], + }, + { + text: 'Registry and Accounts', + items: [ + { text: 'login', link: '/package-management/login' }, + { text: 'logout', link: '/package-management/logout' }, + { text: 'whoami', link: '/package-management/whoami' }, + { text: 'token', link: '/package-management/token' }, + { text: 'owner', link: '/package-management/owner' }, + { text: 'team', link: '/package-management/team' }, + ], + }, + { + text: 'Configuration and Maintenance', + items: [ + { text: 'config', link: '/package-management/config' }, + { text: 'pkg', link: '/package-management/pkg' }, + { text: 'cache', link: '/package-management/cache' }, + ], + }, +]; + export default extendConfig( withMermaid( defineConfig({ @@ -174,6 +253,11 @@ export default extendConfig( link: '/guide/', activeMatch: '^/guide/', }, + { + text: 'Package Management', + link: '/package-management/', + activeMatch: '^/package-management/', + }, { text: 'Config', link: '/config/', @@ -198,6 +282,7 @@ export default extendConfig( ], sidebar: { '/guide/': guideSidebar, + '/package-management/': packageManagementSidebar, '/config/': [ { text: 'Configuration', diff --git a/docs/guide/global-cli.md b/docs/guide/global-cli.md index 82946e851d..270fd31e9b 100644 --- a/docs/guide/global-cli.md +++ b/docs/guide/global-cli.md @@ -448,7 +448,7 @@ To see which toolchain is selected for your current project, run `vp toolchain`. ## Next Steps - [Environment](/guide/env) covers Node.js and package-manager selection, pinning, shims, and managed installations. -- [Package Management](/guide/package-management) covers pnpm, npm, Yarn, and Bun workflows. +- [Package Management](/package-management/) covers pnpm, npm, Yarn, and Bun workflows. - [Run](/guide/run) covers package scripts and cached workspace tasks. - [Upgrading Vite+](/guide/upgrade) explains global CLI upgrades. See [Update Vite+](/guide/upgrade-project) for project-local upgrades. - [Removing Vite+](/guide/implode) removes the global binary and its managed data. diff --git a/docs/guide/index.md b/docs/guide/index.md index 18dbdbd793..c223a2f00c 100644 --- a/docs/guide/index.md +++ b/docs/guide/index.md @@ -100,9 +100,9 @@ Vite+ covers the full frontend development cycle, from starting a project throug - [`vp create`](/guide/create) creates new apps, packages, and monorepos. - [`vp migrate`](/guide/migrate) moves existing projects onto Vite+. -- [`vp install`](/guide/package-management) installs dependencies with the right package manager. -- [`vp add`](/guide/package-management), [`vp remove`](/guide/package-management), [`vp update`](/guide/package-management), [`vp dedupe`](/guide/package-management), [`vp outdated`](/guide/package-management), [`vp list`](/guide/package-management), [`vp why`](/guide/package-management), and [`vp info`](/guide/package-management) cover the rest of the package-management workflow. -- [`vp link`](/guide/package-management), [`vp unlink`](/guide/package-management), [`vp rebuild`](/guide/package-management), and [`vp pm `](/guide/package-management) provide lower-level package-manager operations. +- [`vp install`](/package-management/install) installs dependencies with the right package manager. +- [`vp add`](/package-management/add), [`vp remove`](/package-management/remove), [`vp update`](/package-management/update), [`vp dedupe`](/package-management/dedupe), [`vp outdated`](/package-management/outdated), [`vp list`](/package-management/list), [`vp why`](/package-management/why), and [`vp info`](/package-management/info) cover the rest of the package-management workflow. +- [`vp link`](/package-management/link), [`vp unlink`](/package-management/unlink), [`vp rebuild`](/package-management/rebuild), and [`vp pm `](/package-management/) provide lower-level package-manager operations. ### Project Toolchain diff --git a/docs/guide/local-cli.md b/docs/guide/local-cli.md index f08818016a..209705b1da 100644 --- a/docs/guide/local-cli.md +++ b/docs/guide/local-cli.md @@ -127,7 +127,7 @@ The project-local CLI can be used independently for: - [`vp pack`](/guide/pack) with tsdown - [`vp toolchain`](/guide/upgrade#show-the-toolchain) for inspecting the versions bundled with the project-local package - [`vp run`](/guide/run) and task caching across workspaces -- [package-manager commands](/guide/package-management) using the Node.js runtime already active in your shell +- [package-manager commands](/package-management/) using the Node.js runtime already active in your shell - [`vp create`](/guide/create), [`vp migrate`](/guide/migrate), and project configuration commands The local package cannot manage the machine-level Vite+ installation. The `vp env`, `vp upgrade`, and `vp implode` commands require the [global CLI](/guide/global-cli). Upgrade or remove a local-only installation through your package manager. diff --git a/docs/guide/package-management.md b/docs/guide/package-management.md deleted file mode 100644 index ce4b399650..0000000000 --- a/docs/guide/package-management.md +++ /dev/null @@ -1,269 +0,0 @@ -# Package Management - -`vp` detects and runs the current workspace's package manager. These commands are available from both the [global CLI](/guide/global-cli) and the [project-local CLI](/guide/local-cli). - -## Overview - -Use Vite+ to manage dependencies across pnpm, npm, Yarn, and Bun. Instead of switching between `pnpm install`, `npm install`, `yarn install`, and `bun install`, you can keep using `vp install`, `vp add`, `vp remove`, and the rest of the Vite+ package-management commands. - -Vite+ detects the package manager from the workspace root in this order: - -1. `packageManager` in `package.json` -2. `devEngines.packageManager` in `package.json` -3. `pnpm-workspace.yaml` -4. `pnpm-lock.yaml` -5. `yarn.lock` or `.yarnrc.yml` -6. `package-lock.json` -7. `bun.lock` or `bun.lockb` -8. `.pnpmfile.cjs` or `pnpmfile.cjs` -9. `bunfig.toml` -10. `yarn.config.cjs` - -If none of those files are present, `vp` falls back to `pnpm` by default. Vite+ automatically downloads the matching package manager and uses it for the command you ran, but package-manager detection never rewrites `package.json`. Use `vp env pin @` when the project should declare an exact version explicitly. - -The [`devEngines.packageManager`](https://docs.npmjs.com/cli/v11/configuring-npm/package-json#devengines) field accepts a single object or an array of objects, and its `version` may be a semver range: - -```json -{ - "devEngines": { - "packageManager": { - "name": "pnpm", - "version": "^11.0.0", - "onFail": "download" - } - } -} -``` - -A range resolves to an already-downloaded satisfying version when possible, otherwise to the latest satisfying version from the npm registry. The range itself stays the source of truth; Vite+ never freezes it into an exact `packageManager` pin. When both `packageManager` and `devEngines.packageManager` are declared, the `packageManager` field drives selection and Vite+ warns when it does not satisfy the devEngines constraint (`vp env doctor` shows details). - -Vite+ currently downloads the declared package manager (the `onFail: "download"` behavior); the other `onFail` values are accepted but not yet differentiated. - -The explicit `packageManager` field (or the `devEngines.packageManager` declaration) also affects matching package-manager shims. If a project has `packageManager: "npm@10.9.4"`, `npm` and `npx` use npm 10.9.4. Other generated aliases behave the same way: `pnpm`/`pnpx`/`pn`/`pnx`, `yarn`/`yarnpkg`, and `bun`/`bunx`. Mismatched tools are not translated; `npm` in a `pnpm` project still resolves as npm. - -## Usage - -```bash -vp install -``` - -Common install flows: - -```bash -vp install -vp install --frozen-lockfile -vp install --lockfile-only -vp install --filter web -vp install -w -``` - -`vp install` maps to the correct underlying install behavior for the detected package manager, including the right lockfile flags for pnpm, npm, Yarn, and Bun. - -## Global Packages - -::: info -Global package operations with `-g` require the [global CLI](/guide/global-cli). -::: - -Use the `-g` flag for installing, updating or removing globally installed packages: - -- `vp install -g ` installs a package globally -- `vp install -g --node ` installs a package globally with a specific Node.js version -- `vp uninstall -g ` removes a global package -- `vp update -g [pkg]` updates one global package or all of them -- `vp list -g [pkg]` lists global packages -- `vp outdated -g [pkg]` prints outdated packages - -Without `--node`, `vp install -g` uses the Node.js version resolved for the current directory, so a project's pin takes precedence over `vp env default`. See [Node.js Selection](/guide/env#node-js-selection). - -Updates keep the version spec a package was installed with: a package installed from a dist-tag (e.g. `vp install -g some-pkg@nightly`) updates to the newest version of that tag, and a version range stays within the range. Reinstall with a different spec (e.g. `vp update -g some-pkg@latest`) to switch, or pass `--latest` to `vp update -g` to move packages to the `latest` tag and clear their recorded specs. `vp outdated -g` reports both the newest version matching the recorded spec (`Wanted`) and the newest version on the `latest` tag. - -::: warning -These commands do **NOT** interact with the underlying package manager's global installation directory. - -Instead, Vite+ stores its global packages in `packages/` under the resolved data directory. These packages remain available across different Node.js versions. - -As a result, commands such as `vp link` do not affect Vite+'s global packages and will not appear in `vp list -g`. -::: - -## Managing Dependencies - -Vite+ provides all the familiar package management commands: - -- `vp install` installs the current dependency graph for the project -- `vp add ` adds packages to `dependencies`, use `-D` for `devDependencies` -- `vp remove ` removes packages -- `vp update` updates dependencies -- `vp dedupe` reduces duplicate dependency entries where the package manager supports it -- `vp outdated` shows available updates -- `vp list` shows installed packages -- `vp why ` explains why a package is present -- `vp info ` shows registry metadata for a package -- `vp rebuild` rebuilds native modules (e.g. after switching Node.js versions) -- `vp link` and `vp unlink` manage local package links -- `vp dlx ` runs a package binary without adding it to the project -- `vp pm ` provides additional package-management commands adapted to the detected package manager - -::: info -The `vp list` and `vp rebuild` shortcuts are available only in the global CLI. With the [project-local CLI](/guide/local-cli), use `vp pm list` and `vp pm rebuild`. -::: - -### Command Guide - -#### Install - -Use `vp install` when you want to install exactly what the current `package.json` and lockfile describe. - -- `vp install` is the standard install command -- `vp install --frozen-lockfile` fails if the lockfile would need changes -- `vp install --no-frozen-lockfile` allows lockfile updates explicitly -- `vp install --lockfile-only` updates the lockfile without performing a full install -- `vp install --prefer-offline` and `vp install --offline` prefer or require cached packages -- `vp install --ignore-scripts` skips lifecycle scripts -- `vp install --filter ` scopes install work in monorepos -- `vp install -w` installs in the workspace root - -::: info -Option support depends on the detected package manager and its version. Unsupported options cause `vp` to exit with an error before running the package-manager command. -::: - -##### Git and remote tarball dependencies (npm v12+) - -npm v12 stops resolving git dependencies (`github:`, `git+https:`) and remote tarball URLs by default; such installs fail with `EALLOWGIT` / `EALLOWREMOTE`. Opt back in per project with npm's `allow-git` / `allow-remote` config. - -#### Global Install - -Use these commands when you want package-manager-managed tools available outside a single project. - -- `vp install -g typescript` -- `vp uninstall -g typescript` -- `vp update -g` -- `vp list -g` -- `vp outdated -g` - -#### Add and Remove - -Use `vp add` and `vp remove` for day-to-day dependency edits instead of editing `package.json` by hand. - -- `vp add react` -- `vp add -D typescript vitest` -- `vp add -O fsevents` -- `vp add --save-peer react` -- `vp add react --ignore-scripts` -- `vp remove react` -- `vp remove --filter web react` - -#### Update, Dedupe, and Outdated - -Use these commands to maintain the dependency graph over time. - -- `vp update` refreshes packages to newer versions -- `vp outdated` shows which packages have newer versions available -- `vp dedupe` asks the package manager to collapse duplicates where possible - -#### Inspect - -Use these when you need to understand the current state of dependencies. - -- `vp list` shows installed packages -- `vp why react` explains why `react` is installed -- `vp info react` shows registry metadata such as versions and dist-tags - -These commands show the packages that the package manager installed. They do not show tools that Vite+ bundles or compiles. Run `vp toolchain [tool]` to show these tools, including Vite, Rolldown, and Oxc. For readable output, `vp why` shows a hint when Vite+ also provides the package. - -#### Rebuild - -Use `vp rebuild` when native modules need to be recompiled, for example after switching Node.js versions or when a C/C++ addon fails to load. - -- `vp rebuild` rebuilds all native modules -- `vp rebuild ` rebuilds the listed packages only -- `vp rebuild -- ` passes extra arguments to the underlying package manager - -```bash -vp rebuild -vp rebuild better-sqlite3 sharp -vp rebuild -- --update-binary -``` - -`vp rebuild` is a shorthand for `vp pm rebuild`. - -With pnpm v10+, bare `vp rebuild` only rebuilds packages whose build scripts are listed in `onlyBuiltDependencies` (or approved via `pnpm approve-builds`); name the package explicitly to force a rebuild that bypasses the approval gate. - -#### Dependency build scripts (npm v12+) - -npm v12 skips dependency install scripts (`preinstall` / `install` / `postinstall`, including implicit `node-gyp` builds) unless the `allowScripts` field in package.json covers them; the install succeeds and npm warns about what it skipped. `vp pm approve-builds` manages that allowlist: - -- `vp pm approve-builds ` approves the named packages (`npm approve-scripts`) -- `vp pm approve-builds !` denies them (`npm deny-scripts`) -- `vp pm approve-builds --all` approves everything currently pending -- `vp pm approve-builds` lists the packages whose scripts are not yet covered - -Approval only records the allowlist: scripts an earlier install skipped do not run until you run `vp rebuild `. With npm 11.16 - 11.x the same commands work, but npm treats the allowlist as advisory and still runs scripts. - -#### Advanced - -Use these when you need lower-level package-manager behavior. - -- `vp link` and `vp unlink` manage local development links -- `vp dlx create-vite` runs a package binary without saving it as a dependency -- `vp pm ` provides additional package-management commands adapted to the detected package manager. - - - **Dependencies**: `ci`, `prune`, `list`, `rebuild`, `approve-builds` - - **Patching**: `patch`, `patch-commit` - - **Packaging and publishing**: `pack`, `version`, `publish`, `stage`, `dist-tag`, `deprecate` - - **Inspection**: `view`, `search`, `licenses`, `audit`, `fund`, `ping` - - **Authentication and access**: `login`, `logout`, `whoami`, `token`, `owner`, `team` - - **Configuration**: `config`, `cache` - - **Package manifest**: `pkg get`, `pkg set`, `pkg delete`, `pkg fix` - - Command support depends on the package manager and its version. Run `vp pm --help` to list commands or `vp pm --help` for available options. - -Examples: - -```bash -vp pm config get registry -vp pm cache clean -- --force -vp pm audit --json -``` - -#### Package manifest - -`vp pm pkg` reads and updates fields in `package.json` using the detected package manager. - -```bash -vp pm pkg get name -vp pm pkg set scripts.build="vite build" -vp pm pkg set private=true --json -vp pm pkg delete scripts.build -vp pm pkg fix -``` - -npm supports `get`, `set`, and `delete` from 7.20.0 and `fix` from 9.8.0. pnpm supports all four commands from 11.3.0, and Bun supports them through `bun pm pkg` from 1.2.19. Yarn and unsupported versions print a warning and exit successfully without changing the manifest, matching `vp pm patch`. - -Native behavior is preserved. For example, npm returns JSON from `get`, while pnpm prints a single string value without quotes by default. Use `--json` to request JSON output or to parse values passed to `set` as JSON. Additional native options can be passed after `--`. The corrections made by `fix` depend on the package manager. - -#### Staged publishing - -`vp pm stage` exposes [npm's staged publishing](https://docs.npmjs.com/staged-publishing) workflow: a build is uploaded to a staging area (no 2FA, CI-friendly), then a maintainer approves or rejects it from a trusted device (2FA). It adapts to the detected package manager. - -```bash -vp pm stage publish # upload the package to staging (no 2FA) -vp pm stage list # list staged versions -vp pm stage view # inspect a staged version -vp pm stage download # download the staged tarball -vp pm stage approve # promote to the live registry (2FA) -vp pm stage reject # discard a staged version (2FA) -``` - -- pnpm (`pnpm stage`, requires pnpm ≥ 11.3) and npm (`npm stage`, requires npm ≥ 11.15 and Node ≥ 22.14) pass through directly. -- Yarn 4.16.0 and later uses its npm plugin (`yarn npm publish --staged`, `yarn npm stage …`). The `view` and `download` subcommands, and `publish` with an explicit tarball or folder target, fall back to `npm stage`. -- Yarn versions earlier than 4.16.0 and Bun fall back to `npm stage`. - -## Package-Manager Integrity Verification - -A `packageManager` pin can carry an integrity hash (`yarn@4.17.1+sha512.…`). `corepack use` writes that hash. Vite+ hashes the same artifact as Corepack: - -- the extracted CLI binary (`bin/yarn.js`) for Yarn 2 and later -- the npm package tarball for npm, pnpm, and Yarn Classic - -Vite+ hashes the CLI once, when it installs Yarn, and records the pin it verified. A later command compares its own pin against that record. A pin that does not match the record fails the check, and the command stops. Corepack keeps the same kind of record for its own cache. diff --git a/docs/guide/vpx.md b/docs/guide/vpx.md index 278b4aea81..d61e8345ce 100644 --- a/docs/guide/vpx.md +++ b/docs/guide/vpx.md @@ -52,7 +52,7 @@ vp exec tsc --noEmit ## `vp dlx` -Use `vp dlx` for one-off package execution without adding the package to your project dependencies. +Use `vp dlx` for one-off package execution without adding the package to your project dependencies. See the [dlx command reference](/package-management/dlx) for options and package-manager compatibility. ```bash vp dlx [args...] diff --git a/docs/package-management/add.md b/docs/package-management/add.md new file mode 100644 index 0000000000..cd0a7a0607 --- /dev/null +++ b/docs/package-management/add.md @@ -0,0 +1,84 @@ +# vp add + +Add packages to the project and update its manifest and lockfile. + +```bash +vp add react +vp add -D typescript +vp add --save-peer react +vp add --filter web react +``` + +## Options + +Choose one dependency target at a time. Peer dependencies follow the native manager's behavior, including whether it also records a development dependency. + +| Option | Description | Notes | +| ---------------------------- | ------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `-P, --save-prod` | Save to dependencies, the default target. | Choose one dependency target. | +| `-D, --save-dev` | Save to devDependencies. | Choose one dependency target. | +| `--save-peer` | Request the manager's peer-dependency save behavior. | Choose one dependency target. | +| `-O, --save-optional` | Save to optionalDependencies. | Choose one dependency target. | +| `-E, --save-exact` | Save an exact dependency version. | | +| `--save-catalog-name ` | Save the dependency to a named catalog. | | +| `--save-catalog` | Save the dependency to the default catalog. | | +| `--allow-build ` | Allow the named packages to run postinstall scripts. | | +| `--ignore-scripts` | Do not run lifecycle scripts. | | +| `--no-optional` | Do not install optionalDependencies. | Cannot be combined with --global. | +| `--frozen-lockfile` | Prevent lockfile changes. | Cannot be combined with --global. Overrides an earlier `--no-frozen-lockfile`. | +| `--no-frozen-lockfile` | Explicitly allow lockfile updates. | Cannot be combined with --global. Overrides an earlier `--frozen-lockfile`. | +| `--lockfile-only` | Update the lockfile without a full install. | Cannot be combined with --global. | +| `--prefer-offline` | Use cached packages when available. | Cannot be combined with --global. | +| `--offline` | Only use packages already in cache. | Cannot be combined with --global. | +| `-f, --force` | Request a forced reinstall. | Cannot be combined with --global. | +| `--no-lockfile` | Skip reading or generating a lockfile. | Cannot be combined with --global. | +| `--shamefully-hoist` | Create a flat `node_modules` layout. | Cannot be combined with --global. | +| `--silent` | Suppress Vite+ output and request native quiet output. | Cannot be combined with --global. | +| `--filter ` | Select workspaces by pattern. | Can be repeated. | +| `-w, --workspace-root` | Add to workspace root. | | +| `--workspace` | Require the dependency to exist in the workspace. | | +| `-g, --global` | Install globally. | Requires the global CLI. Uses the [global package store](./global-packages). | +| `--node ` | Node.js version to use for global installation. | Requires --global. | +| `--concurrency ` | Number of global package installs to run in parallel. | Requires --global. Must be a positive integer. | + +## Compatibility + +The commands below describe project operations. Global mode is described under [Options](#options). + +- **npm:** `npm install`. +- **pnpm:** `pnpm add`. +- **Yarn Classic:** `yarn add`. +- **Yarn Modern:** `yarn add`. +- **Bun:** `bun add`. + +| Option | npm | pnpm | Yarn Classic | Yarn Modern | Bun | Notes | +| ---------------------------- | --------------- | ---------------- | ------------ | ----------- | -------------- | -------------------------------------------------- | +| `-P, --save-prod` | Yes | Yes | Yes | Yes | Yes | | +| `-D, --save-dev` | Yes | Yes | Yes | Yes | Yes | | +| `--save-peer` | Yes | Yes | Yes | Yes | Yes | | +| `-O, --save-optional` | Yes | Yes | Yes | Yes | Yes | | +| `-E, --save-exact` | Yes | Yes | Yes | Yes | Yes | | +| `--save-catalog-name ` | No | 10.12.0 or later | No | No | 1.4 or later | | +| `--save-catalog` | No | 10.12.0 or later | No | No | 1.4 or later | | +| `--allow-build ` | No | 10.4.0 or later | No | No | No | | +| `--ignore-scripts` | Yes | Yes | Yes | 3 or later | Yes | On Yarn Modern, lockfile-only mode takes priority. | +| `--no-optional` | Yes | Yes | Yes | No | Yes | | +| `--frozen-lockfile` | No | No | Yes | No | Yes | | +| `--no-frozen-lockfile` | No | No | No | No | Yes | | +| `--lockfile-only` | Yes | Yes | No | 3 or later | Yes | | +| `--prefer-offline` | Yes | Yes | Yes | No | 1.4.1 or later | | +| `--offline` | Yes | Yes | Yes | No | 1.4.1 or later | | +| `-f, --force` | Yes | Yes | Yes | No | Yes | | +| `--no-lockfile` | Yes | Yes | Yes | No | No | | +| `--shamefully-hoist` | No | Yes | No | No | No | | +| `--silent` | Yes | Yes | Yes | No | Yes | | +| `--filter ` | 7.14.0 or later | Yes | No | Yes | 1.4 or later | | +| `-w, --workspace-root` | 8.1.0 or later | Yes | Yes | No | No | | +| `--workspace` | No | Yes | No | No | No | | +| `-g, --global` | Yes | Yes | Yes | Yes | Yes | | +| `--node ` | Yes | Yes | Yes | Yes | Yes | | +| `--concurrency ` | Yes | Yes | Yes | Yes | Yes | | + +## Native Options + +For native options, see [npm install](https://docs.npmjs.com/cli/v11/commands/npm-install), [pnpm add](https://pnpm.io/cli/add), [Yarn add](https://yarnpkg.com/cli/add), [Yarn Classic add](https://classic.yarnpkg.com/en/docs/cli/add), and [Bun add](https://bun.com/docs/pm/cli/add). To pass these options through Vite+, see [Native Arguments](./#native-arguments). diff --git a/docs/package-management/approve-builds.md b/docs/package-management/approve-builds.md new file mode 100644 index 0000000000..473851e107 --- /dev/null +++ b/docs/package-management/approve-builds.md @@ -0,0 +1,48 @@ +# vp pm approve-builds + +Approve dependency lifecycle scripts using the selected manager's trust policy. Approve only packages whose install scripts you intend to execute. + +```bash +vp pm approve-builds +vp pm approve-builds sharp +vp pm approve-builds '!untrusted-package' +vp pm approve-builds --all +``` + +## Options + +Supply packages to approve, or prefix a name with `!` to request denial where supported. Quote denial arguments to avoid shell history expansion. + +| Option | Description | Notes | +| ------- | --------------------------------------------------- | ------------------------------------------------------------------ | +| `--all` | Approve all packages pending build-script approval. | Cannot be combined with package names, including names after `--`. | + +## Compatibility + +- **npm:** 11.16 or later: `npm approve-scripts`. Earlier versions warn and skip. Denials use `npm deny-scripts`. +- **pnpm:** 10.1 or later: `pnpm approve-builds`. +- **Yarn Classic:** No command. Warns and exits successfully without performing the operation. +- **Yarn Modern:** No command. Warns and exits successfully without performing the operation. +- **Bun:** `bun pm trust` for named packages or `--all`. + +| Option | npm | pnpm | Yarn Classic | Yarn Modern | Bun | Notes | +| ------- | ---------------- | ---------------- | ------------ | ----------- | --- | ----- | +| `--all` | 11.16.0 or later | 10.32.0 or later | No | No | Yes | | + +With no package names, pnpm opens its interactive flow and npm lists pending packages with `--allow-scripts-pending`. Bun does not open an interactive selector; inspect pending packages with `bun pm untrusted` and then name the packages to trust. + +Denial arguments prefixed with `!` require pnpm 11 or later or npm 11.16 or later. npm requires separate approval and denial invocations. Bun skips denial entries with a warning because it uses `trustedDependencies` rather than a denylist. + +For Yarn Modern, configure `enableScripts: false` and explicitly allow trusted packages through `dependenciesMeta`. + +### npm Build-Script Policy + +npm 12 enforces `allowScripts` in `package.json`. Dependency install scripts not covered by the policy are skipped, including implicit native builds. Approval updates policy but does not run scripts skipped earlier. Follow it with [`vp pm rebuild `](./rebuild). + +In npm 11.16 through 11.x, this policy is advisory. Scripts still run and npm warns about unreviewed packages. + +## Native Options + +For native options, see [npm approve-scripts](https://docs.npmjs.com/cli/v11/commands/npm-approve-scripts), [npm deny-scripts](https://docs.npmjs.com/cli/v11/commands/npm-deny-scripts), [pnpm approve-builds](https://pnpm.io/cli/approve-builds), [Bun pm trust](https://bun.com/docs/pm/cli/pm), and [Bun pm untrusted](https://bun.com/docs/pm/cli/pm). To pass these options through Vite+, see [Native Arguments](./#native-arguments). + +For script policy configuration, see [npm package.json](https://docs.npmjs.com/cli/v11/configuring-npm/package-json), [Yarn enableScripts](https://yarnpkg.com/configuration/yarnrc#enableScripts), and [Bun lifecycle scripts](https://bun.com/docs/pm/lifecycle). diff --git a/docs/package-management/audit.md b/docs/package-management/audit.md new file mode 100644 index 0000000000..ea0d462bf8 --- /dev/null +++ b/docs/package-management/audit.md @@ -0,0 +1,39 @@ +# vp pm audit + +Audit dependencies for known vulnerabilities. + +```bash +vp pm audit +vp pm audit --json +vp pm audit --production --level high +``` + +## Options + +| Option | Description | Notes | +| ----------------- | -------------------------------------------- | --------------------------------- | +| `--fix` | Request automatic vulnerability remediation. | | +| `--json` | Request native JSON output. | Output retains the native schema. | +| `--level ` | Minimum vulnerability level to report. | | +| `--production` | Only audit production dependencies. | | + +## Compatibility + +- **npm:** `npm audit` or `npm audit fix`. +- **pnpm:** `pnpm audit`. +- **Yarn Classic:** `yarn audit`. +- **Yarn Modern:** `yarn npm audit`. +- **Bun:** `bun audit` or `bun audit fix`. + +| Option | npm | pnpm | Yarn Classic | Yarn Modern | Bun | Notes | +| ----------------- | --- | ---- | ------------ | ----------- | --------------- | ----- | +| `--fix` | Yes | Yes | No | No | 1.4 or later | | +| `--json` | Yes | Yes | Yes | Yes | Yes | | +| `--level ` | Yes | Yes | Yes | Yes | Yes | | +| `--production` | Yes | Yes | Yes | Yes | 1.2.21 or later | | + +Vulnerability output and failure thresholds retain the native manager's semantics. + +## Native Options + +For native options, see [npm audit](https://docs.npmjs.com/cli/v11/commands/npm-audit), [pnpm audit](https://pnpm.io/cli/audit), [Yarn npm audit](https://yarnpkg.com/cli/npm/audit), [Yarn Classic audit](https://classic.yarnpkg.com/en/docs/cli/audit), and [Bun audit](https://bun.com/docs/pm/cli/audit). To pass these options through Vite+, see [Native Arguments](./#native-arguments). diff --git a/docs/package-management/cache.md b/docs/package-management/cache.md new file mode 100644 index 0000000000..223c74a858 --- /dev/null +++ b/docs/package-management/cache.md @@ -0,0 +1,53 @@ +# vp pm cache + +Inspect or clean the package manager's download cache or store. This is distinct from [`vp cache`](/guide/cache), which manages task results. + +```bash +vp pm cache dir +vp pm cache clean +``` + +## Options + +- `dir` and `path` print the cache or store location. +- `clean` requests native cache cleanup. + +Other subcommands warn and exit successfully without running a command. There are no additional Vite+ options. + +### `dir` + +Print the cache or store location. Alias: `path`. There are no command-specific options. + +### `clean` + +Request native cache cleanup. There are no command-specific options. + +## Compatibility + +### `dir` + +- **npm:** `npm config get cache`. +- **pnpm:** `pnpm store path`. +- **Yarn Classic:** `yarn cache dir`. +- **Yarn Modern:** `yarn config get cacheFolder`. +- **Bun:** `bun pm cache`. + +### `clean` + +- **npm:** `npm cache clean`. +- **pnpm:** `pnpm store prune`. Prunes the store rather than deleting all content. +- **Yarn Classic:** `yarn cache clean`. +- **Yarn Modern:** `yarn cache clean`. +- **Bun:** `bun pm cache rm`. + +npm normally requires an explicit native `--force` for cache deletion: + +```bash +vp pm cache clean -- --force +``` + +That example is npm-specific. Vite+ does not expose a separate `vp pm store` command. + +## Native Options + +For native options, see [npm config](https://docs.npmjs.com/cli/v11/commands/npm-config), [npm cache](https://docs.npmjs.com/cli/v11/commands/npm-cache), [pnpm store](https://pnpm.io/cli/store), [Yarn config get](https://yarnpkg.com/cli/config/get), [Yarn cache clean](https://yarnpkg.com/cli/cache/clean), [Yarn Classic cache](https://classic.yarnpkg.com/en/docs/cli/cache), and [Bun pm cache](https://bun.com/docs/pm/cli/pm). To pass these options through Vite+, see [Native Arguments](./#native-arguments). diff --git a/docs/package-management/ci.md b/docs/package-management/ci.md new file mode 100644 index 0000000000..a8ddc10746 --- /dev/null +++ b/docs/package-management/ci.md @@ -0,0 +1,28 @@ +# vp pm ci + +Install dependencies with a frozen lockfile for CI. + +```bash +vp pm ci +vp pm ci -- --ignore-scripts +``` + +## Options + +This command has no additional Vite+ options. For translated Vite+ options, use [`vp install --frozen-lockfile`](./install). + +There are no command-specific options. + +## Compatibility + +- **npm:** `npm ci`. +- **pnpm:** `pnpm install --frozen-lockfile`. +- **Yarn Classic:** `yarn install --frozen-lockfile`. +- **Yarn Modern:** `yarn install --immutable`. +- **Bun:** `bun install --frozen-lockfile`. + +The native manager determines installation cleanup and lockfile validation. This command does not make all managers behave like `npm ci` beyond the frozen-lockfile request. + +## Native Options + +For native options, see [npm ci](https://docs.npmjs.com/cli/v11/commands/npm-ci), [pnpm install](https://pnpm.io/cli/install), [Yarn install](https://yarnpkg.com/cli/install), [Yarn Classic install](https://classic.yarnpkg.com/en/docs/cli/install), and [Bun install](https://bun.com/docs/pm/cli/install). To pass these options through Vite+, see [Native Arguments](./#native-arguments). For CI setup, see the [CI guide](/guide/ci). diff --git a/docs/package-management/config.md b/docs/package-management/config.md new file mode 100644 index 0000000000..29a8c0ac9a --- /dev/null +++ b/docs/package-management/config.md @@ -0,0 +1,119 @@ +# vp pm config + +Read and write package-manager configuration. Alias: `vp pm c`. This is distinct from `vp config`, which configures project tooling. + +```bash +vp pm config list +vp pm config get registry +vp pm config set registry https://registry.npmjs.org --location project +vp pm config delete registry --location project +``` + +Configuration keys are manager-specific. The registry examples use npm or pnpm keys, not Yarn 2 configuration keys. + +## Options + +- `list` displays configuration. +- `get ` reads a value. +- `set ` writes a value. +- `delete ` removes a value. + +Here `--global` selects configuration scope, not Vite+'s global package store. + +These subcommands do not accept additional native arguments after `--`. + +### `list` + +| Option | Description | Notes | +| ------------------------------------ | ------------------------------- | --------------------------------- | +| `--json` | Request native JSON output. | Output retains the native schema. | +| `-g, --global` | Use global config. | Overrides `--location`. | +| `--location ` | Choose the configuration scope. | | + +### `get` + +| Option | Description | Notes | +| ------------------------------------ | ------------------------------- | --------------------------------- | +| `--json` | Request native JSON output. | Output retains the native schema. | +| `-g, --global` | Use global config. | Overrides `--location`. | +| `--location ` | Choose the configuration scope. | | + +### `set` + +| Option | Description | Notes | +| ------------------------------------ | ------------------------------- | --------------------------------- | +| `--json` | Request native JSON output. | Output retains the native schema. | +| `-g, --global` | Use global config. | Overrides `--location`. | +| `--location ` | Choose the configuration scope. | | + +### `delete` + +| Option | Description | Notes | +| ------------------------------------ | ------------------------------- | ----------------------- | +| `-g, --global` | Use global config. | Overrides `--location`. | +| `--location ` | Choose the configuration scope. | | + +## Compatibility + +### `list` + +- **npm:** `npm config list`. +- **pnpm:** `pnpm config list`. +- **Yarn Classic:** `yarn config list`. +- **Yarn Modern:** `yarn config`. +- **Bun:** Fallback: `npm config list`. Uses npm configuration, not `bunfig.toml`. + +| Option | npm | pnpm | Yarn Classic | Yarn Modern | Bun | Notes | +| ------------------------------------ | --------------------- | --------------------- | ------------ | --------------------- | --------------------- | ---------------------------------- | +| `--json` | Yes | Yes | Yes | Yes | Yes | | +| `-g, --global` | Yes | Yes | Yes | Yes | Yes | | +| `--location ` | project, user, global | project, user, global | user, global | project, user, global | project, user, global | Reads retain merged configuration. | + +### `get` + +- **npm:** `npm config get`. +- **pnpm:** `pnpm config get`. +- **Yarn Classic:** `yarn config get`. +- **Yarn Modern:** `yarn config get`. +- **Bun:** Fallback: `npm config get`. Uses npm configuration, not `bunfig.toml`. + +| Option | npm | pnpm | Yarn Classic | Yarn Modern | Bun | Notes | +| ------------------------------------ | --------------------- | --------------------- | ------------ | --------------------- | --------------------- | ---------------------------------- | +| `--json` | Yes | Yes | Yes | Yes | Yes | | +| `-g, --global` | Yes | Yes | Yes | Yes | Yes | | +| `--location ` | project, user, global | project, user, global | user, global | project, user, global | project, user, global | Reads retain merged configuration. | + +### `set` + +- **npm:** `npm config set`. +- **pnpm:** `pnpm config set`. +- **Yarn Classic:** `yarn config set`. +- **Yarn Modern:** `yarn config set`. +- **Bun:** Fallback: `npm config set`. Uses npm configuration, not `bunfig.toml`. + +| Option | npm | pnpm | Yarn Classic | Yarn Modern | Bun | Notes | +| ------------------------------------ | --------------------- | --------------------- | ------------ | --------------------- | --------------------- | ----- | +| `--json` | Yes | Yes | Yes | Yes | Yes | | +| `-g, --global` | Yes | Yes | Yes | Yes | Yes | | +| `--location ` | project, user, global | project, user, global | user, global | project, user, global | project, user, global | | + +### `delete` + +- **npm:** `npm config delete`. +- **pnpm:** `pnpm config delete`. +- **Yarn Classic:** `yarn config delete`. +- **Yarn Modern:** `yarn config unset`. +- **Bun:** Fallback: `npm config delete`. Uses npm configuration, not `bunfig.toml`. + +| Option | npm | pnpm | Yarn Classic | Yarn Modern | Bun | Notes | +| ------------------------------------ | --------------------- | --------------------- | ------------ | --------------------- | --------------------- | ----- | +| `-g, --global` | Yes | Yes | Yes | Yes | Yes | | +| `--location ` | project, user, global | project, user, global | user, global | project, user, global | project, user, global | | + +Yarn Classic user writes use native defaults. + +## Native Options + +For native options, see [npm config](https://docs.npmjs.com/cli/v11/commands/npm-config), [pnpm config](https://pnpm.io/cli/config), [Yarn config](https://yarnpkg.com/cli/config), [Yarn config get](https://yarnpkg.com/cli/config/get), [Yarn config set](https://yarnpkg.com/cli/config/set), [Yarn config unset](https://yarnpkg.com/cli/config/unset), and [Yarn Classic config](https://classic.yarnpkg.com/en/docs/cli/config). Native options outside this interface require the native command. + +For `bunfig.toml` settings, see [Bun configuration](https://bun.com/docs/runtime/bunfig). diff --git a/docs/package-management/dedupe.md b/docs/package-management/dedupe.md new file mode 100644 index 0000000000..5d23779bfb --- /dev/null +++ b/docs/package-management/dedupe.md @@ -0,0 +1,32 @@ +# vp dedupe + +Reduce duplicate dependency entries using the selected package manager. + +```bash +vp dedupe +vp dedupe --check +``` + +## Options + +| Option | Description | Notes | +| --------- | ------------------------------------------ | ----- | +| `--check` | Check if deduplication would make changes. | | + +## Compatibility + +- **npm:** `npm dedupe`. +- **pnpm:** `pnpm dedupe`. +- **Yarn Classic:** Fallback: `yarn install`. +- **Yarn Modern:** `yarn dedupe`. +- **Bun:** 1.4 or later: `bun dedupe`. Earlier versions use `bun install` as a fallback. + +| Option | npm | pnpm | Yarn Classic | Yarn Modern | Bun | Notes | +| --------- | --- | ---- | ------------ | ----------- | ------------ | ----- | +| `--check` | Yes | Yes | No | Yes | 1.4 or later | | + +A fallback install is not a read-only check. Unsupported `--check` requests fail before the fallback runs. + +## Native Options + +For native options, see [npm dedupe](https://docs.npmjs.com/cli/v11/commands/npm-dedupe), [pnpm dedupe](https://pnpm.io/cli/dedupe), [Yarn dedupe](https://yarnpkg.com/cli/dedupe), [Yarn Classic install](https://classic.yarnpkg.com/en/docs/cli/install), and [Bun dedupe](https://bun.com/docs/pm/cli/dedupe). For the Bun fallback, see [Bun install](https://bun.com/docs/pm/cli/install). To pass these options through Vite+, see [Native Arguments](./#native-arguments). diff --git a/docs/package-management/deprecate.md b/docs/package-management/deprecate.md new file mode 100644 index 0000000000..5824a32cfa --- /dev/null +++ b/docs/package-management/deprecate.md @@ -0,0 +1,39 @@ +# vp pm deprecate + +Set a deprecation message for a published package version or version range. + +```bash +vp pm deprecate 'my-package@<2.0.0' 'Upgrade to version 2 or later' +``` + +## Options + +A package specification and a message are required. + +Deprecation warns consumers; it does not unpublish the package. + +| Option | Description | Notes | +| ------------------ | --------------------------- | ----- | +| `--otp ` | Supply a one-time password. | | +| `--registry ` | Select the registry. | | + +## Compatibility + +- **npm:** `npm deprecate`. +- **pnpm:** 11 or later: `pnpm deprecate`. Earlier versions use `npm deprecate` as a fallback. +- **Yarn Classic:** Fallback: `npm deprecate`. +- **Yarn Modern:** Fallback: `npm deprecate`. +- **Bun:** Fallback: `npm deprecate`. + +| Option | npm | pnpm | Yarn Classic | Yarn Modern | Bun | Notes | +| ------------------ | --- | ---- | ------------ | ----------- | --- | ----- | +| `--otp ` | Yes | Yes | Yes | Yes | Yes | | +| `--registry ` | Yes | Yes | Yes | Yes | Yes | | + +Bun emits a fallback warning. Registry configuration and authentication follow the command that runs. + +An empty message is forwarded unchanged. Native pnpm rejects it; Vite+ does not translate it to `undeprecate`. + +## Native Options + +For native options, see [npm deprecate](https://docs.npmjs.com/cli/v11/commands/npm-deprecate) and [pnpm deprecate](https://pnpm.io/cli/deprecate). To pass these options through Vite+, see [Native Arguments](./#native-arguments). diff --git a/docs/package-management/dist-tag.md b/docs/package-management/dist-tag.md new file mode 100644 index 0000000000..4d9cd5eb6f --- /dev/null +++ b/docs/package-management/dist-tag.md @@ -0,0 +1,61 @@ +# vp pm dist-tag + +Manage the tags that map package names such as `my-package@next` to a published version. + +```bash +vp pm dist-tag list my-package +vp pm dist-tag add my-package@2.0.0 next +vp pm dist-tag rm my-package next +``` + +## Options + +- `list [package]` lists tags. Alias: `ls`. +- `add ` assigns a tag. +- `rm ` removes a tag. + +There are no additional Vite+ options or native pass-through arguments on these subcommands. Changing a tag changes what future installs of that tag resolve to; it does not delete the published version. + +### `list` + +There are no command-specific options. + +### `add` + +There are no command-specific options. + +### `rm` + +There are no command-specific options. + +## Compatibility + +### `list` + +- **npm:** `npm dist-tag list`. +- **pnpm:** 11 or later: `pnpm dist-tag list`. Earlier versions use `npm dist-tag list` as a fallback. +- **Yarn Classic:** `yarn tag list`. +- **Yarn Modern:** `yarn npm tag list`. +- **Bun:** Fallback: `npm dist-tag list`. + +### `add` + +- **npm:** `npm dist-tag add`. +- **pnpm:** 11 or later: `pnpm dist-tag add`. Earlier versions use `npm dist-tag add` as a fallback. +- **Yarn Classic:** `yarn tag add`. +- **Yarn Modern:** `yarn npm tag add`. +- **Bun:** Fallback: `npm dist-tag add`. + +### `rm` + +- **npm:** `npm dist-tag rm`. +- **pnpm:** 11 or later: `pnpm dist-tag rm`. Earlier versions use `npm dist-tag rm` as a fallback. +- **Yarn Classic:** `yarn tag rm`. +- **Yarn Modern:** `yarn npm tag rm`. +- **Bun:** Fallback: `npm dist-tag rm`. + +On the native pnpm path, Vite+ does not fill in a missing package for `list`, resolve version ranges for `add`, or bypass restrictions on removing `latest`. pnpm validates these requests and returns its own errors. + +## Native Options + +For native options, see [npm dist-tag](https://docs.npmjs.com/cli/v11/commands/npm-dist-tag), [pnpm dist-tag](https://pnpm.io/cli/dist-tag), [Yarn npm tag list](https://yarnpkg.com/cli/npm/tag/list), [Yarn npm tag add](https://yarnpkg.com/cli/npm/tag/add), [Yarn npm tag remove](https://yarnpkg.com/cli/npm/tag/remove), and [Yarn Classic tag](https://classic.yarnpkg.com/en/docs/cli/tag). The upstream commands may expose additional options not accepted by this Vite+ interface. diff --git a/docs/package-management/dlx.md b/docs/package-management/dlx.md new file mode 100644 index 0000000000..b062768e08 --- /dev/null +++ b/docs/package-management/dlx.md @@ -0,0 +1,40 @@ +# vp dlx + +Download and run a package without adding it to the project's dependencies. + +```bash +vp dlx create-vite my-app +vp dlx --silent create-vite my-app +``` + +## Options + +Put Vite+ options before the package or command: + +Arguments after the command are passed to the executed program, not parsed as Vite+ options. Shell mode interprets shell syntax; use it only with trusted command strings. + +| Option | Description | Notes | +| ---------------------- | ---------------------------------------------------------------------- | ---------------- | +| `-p, --package ` | Make the selected package available to the executed command. | Can be repeated. | +| `-c, --shell-mode` | Execute within a shell environment. | | +| `-s, --silent` | Suppress Vite+ output and request native quiet output where available. | | + +## Compatibility + +- **npm:** `npm exec --yes`. +- **pnpm:** `pnpm dlx`. +- **Yarn Classic:** Fallback: `npx --yes`. +- **Yarn Modern:** `yarn dlx`. +- **Bun:** `bun x`. + +| Option | npm | pnpm | Yarn Classic | Yarn Modern | Bun | Notes | +| ---------------------- | --- | ---- | ------------ | ----------- | --- | --------------------------------- | +| `-p, --package ` | Yes | Yes | Yes | Yes | Yes | | +| `-c, --shell-mode` | Yes | Yes | Yes | No | No | | +| `-s, --silent` | Yes | Yes | Yes | Yes | Yes | Bun only suppresses Vite+ output. | + +For installed project binaries, use `vp exec` or `vpx` instead. See [Running Binaries](/guide/vpx) for those workflows. + +## Native Options + +For native options, see [npm exec](https://docs.npmjs.com/cli/v11/commands/npm-exec), [pnpm dlx](https://pnpm.io/cli/dlx), [Yarn dlx](https://yarnpkg.com/cli/dlx), and [Bun x](https://bun.com/docs/pm/bunx). For the Yarn Classic fallback, see [npx](https://docs.npmjs.com/cli/v11/commands/npx). For argument handling, see [Native Arguments](./#native-arguments). diff --git a/docs/package-management/fund.md b/docs/package-management/fund.md new file mode 100644 index 0000000000..916da14fbc --- /dev/null +++ b/docs/package-management/fund.md @@ -0,0 +1,32 @@ +# vp pm fund + +Show funding information for installed dependencies. + +```bash +vp pm fund +vp pm fund --json +``` + +## Options + +| Option | Description | Notes | +| -------- | --------------------------- | --------------------------------- | +| `--json` | Request native JSON output. | Output retains the native schema. | + +## Compatibility + +- **npm:** `npm fund`. +- **pnpm:** Fallback: `npm fund`. +- **Yarn Classic:** Fallback: `npm fund`. +- **Yarn Modern:** Fallback: `npm fund`. +- **Bun:** Fallback: `npm fund`. + +| Option | npm | pnpm | Yarn Classic | Yarn Modern | Bun | Notes | +| -------- | --- | ---- | ------------ | ----------- | --- | ----- | +| `--json` | Yes | Yes | Yes | Yes | Yes | | + +Bun emits a fallback warning. Results follow npm's view of the installed dependencies. + +## Native Options + +For native options, see [npm fund](https://docs.npmjs.com/cli/v11/commands/npm-fund), which Vite+ uses for all package managers. To pass these options through Vite+, see [Native Arguments](./#native-arguments). diff --git a/docs/package-management/global-packages.md b/docs/package-management/global-packages.md new file mode 100644 index 0000000000..c24736e343 --- /dev/null +++ b/docs/package-management/global-packages.md @@ -0,0 +1,32 @@ +# Global Packages + +Global package operations require the [global CLI](/guide/global-cli). Use `-g` to manage tools independently of a project's dependencies: + +```bash +vp install -g typescript +vp install -g --node 22 typescript +vp uninstall -g typescript +vp update -g +vp list -g +vp outdated -g +``` + +## Storage and Node.js + +Vite+ stores global packages in `packages/` under its resolved data directory, not in the underlying package manager's global installation directory. + +Without `--node`, a global install uses the Node.js version resolved for the current directory. A project's pin therefore takes precedence over `vp env default`. See [Node.js Selection](/guide/env#node-js-selection). + +`vp link` uses native package-manager links. It does not modify Vite+'s global package store, and those links do not appear in `vp list -g`. + +## Updating Packages + +Updates preserve the version specification recorded at installation. A package installed with `some-pkg@nightly` updates to the newest version of that tag. A version range stays within the range. + +```bash +vp update -g some-pkg +vp update -g some-pkg@latest +vp update -g --latest +``` + +With --latest, future updates follow the latest tag instead of the original tag or version range. diff --git a/docs/package-management/index.md b/docs/package-management/index.md new file mode 100644 index 0000000000..cd51214870 --- /dev/null +++ b/docs/package-management/index.md @@ -0,0 +1,87 @@ +# Package Management + +Vite+ provides one command interface for npm, pnpm, Yarn, and Bun. `vp` detects the workspace's package manager, downloads the selected version when needed, and translates commands and supported options for it. + +```bash +vp install +vp add react +vp add -D typescript +vp remove react +vp update +``` + +## Getting Started + +- [Package Manager Selection](./package-manager-selection) explains detection, version ranges, and package-manager shims. +- [Global Packages](./global-packages) explains the separate Vite+ global package store. + +## Commands + +Common dependency operations are top-level commands such as `vp install`, `vp add`, and `vp why`. Additional operations use `vp pm`, such as `vp pm audit` and `vp pm publish`. The command reference groups them by purpose rather than by prefix. + +```bash +vp install --help +vp pm --help +vp pm audit --help +``` + +Package-management commands are available in the [global CLI](/guide/global-cli) and the [project-local CLI](/guide/local-cli). The `vp list` and `vp rebuild` shortcuts require the global CLI. Use `vp pm list` and `vp pm rebuild` with either CLI. Global package operations with `-g` also require the global CLI. + +## Native Arguments + +Where supported, put additional native arguments after `--`: + +```bash +vp install -- --registry=https://registry.npmjs.org +``` + +These arguments go directly to the native command without translation or Vite+'s unsupported-option checks. Their behavior depends on the package manager and version. + +For `vp dlx`, arguments after the command belong to the executed program. See [Running Binaries](/guide/vpx). + +## Command Reference + +- **Dependency management** + - [install](./install) + - [add](./add) + - [remove](./remove) + - [update](./update) + - [dedupe](./dedupe) + - [ci](./ci) + - [prune](./prune) +- **Inspection and diagnostics** + - [list](./list) + - [why](./why) + - [info](./info) + - [outdated](./outdated) + - [licenses](./licenses) + - [search](./search) + - [audit](./audit) + - [fund](./fund) + - [ping](./ping) +- **Local development** + - [link](./link) + - [unlink](./unlink) + - [rebuild](./rebuild) + - [approve-builds](./approve-builds) + - [patch](./patch) + - [patch-commit](./patch-commit) + - [dlx](./dlx) +- **Publishing** + - [pack](./pack) + - [version](./version) + - [publish](./publish) + - [stage](./stage) + - [dist-tag](./dist-tag) + - [deprecate](./deprecate) +- **Registry and accounts** + - [login](./login) + - [logout](./logout) + - [whoami](./whoami) + - [token](./token) + - [owner](./owner) + - [team](./team) +- **Configuration and maintenance** + - [config](./config) + - [pkg](./pkg) + - [cache](./cache) diff --git a/docs/package-management/info.md b/docs/package-management/info.md new file mode 100644 index 0000000000..569c36673e --- /dev/null +++ b/docs/package-management/info.md @@ -0,0 +1,35 @@ +# vp info + +Read package metadata from the registry. Aliases: `vp view`, `vp show`, `vp pm view`, `vp pm info`, and `vp pm show`. + +```bash +vp info react +vp info react versions --json +vp info react@19 dist.tarball +``` + +## Options + +Supply a package name with an optional version, followed by an optional field name. + +| Option | Description | Notes | +| -------- | --------------------------- | --------------------------------- | +| `--json` | Request native JSON output. | Output retains the native schema. | + +## Compatibility + +- **npm:** `npm view`. +- **pnpm:** `pnpm view`. +- **Yarn Classic:** `yarn info`. +- **Yarn Modern:** `yarn npm info`. A requested field is passed as `--fields`. +- **Bun:** `bun info`. + +| Option | npm | pnpm | Yarn Classic | Yarn Modern | Bun | Notes | +| -------- | --- | ---- | ------------ | ----------- | --- | ----- | +| `--json` | Yes | Yes | Yes | Yes | Yes | | + +This command queries registry metadata, not the local dependency tree. Use [list](./list) or [why](./why) to inspect installed packages. + +## Native Options + +For native options, see [npm view](https://docs.npmjs.com/cli/v11/commands/npm-view), [pnpm view](https://pnpm.io/cli/view), [Yarn npm info](https://yarnpkg.com/cli/npm/info), [Yarn Classic info](https://classic.yarnpkg.com/en/docs/cli/info), and [Bun info](https://bun.com/docs/pm/cli/info). To pass these options through Vite+, see [Native Arguments](./#native-arguments). diff --git a/docs/package-management/install.md b/docs/package-management/install.md new file mode 100644 index 0000000000..b51e9edf68 --- /dev/null +++ b/docs/package-management/install.md @@ -0,0 +1,89 @@ +# vp install + +Install the dependencies declared by the project. Alias: `vp i`. Supplying package names switches to [add](./add) behavior. + +```bash +vp install +vp install --frozen-lockfile +vp install --lockfile-only +vp install --filter web +vp install react +``` + +## Options + +| Option | Description | Notes | +| ------------------------ | --------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `-P, --prod` | Select production dependencies or save added packages to dependencies. | | +| `-D, --dev` | Include development dependencies or save added packages to devDependencies. | | +| `--no-optional` | Do not install optionalDependencies. | | +| `--frozen-lockfile` | Prevent lockfile changes. | Overrides an earlier `--no-frozen-lockfile`. | +| `--no-frozen-lockfile` | Explicitly allow lockfile updates. | Overrides an earlier `--frozen-lockfile`. | +| `--lockfile-only` | Update the lockfile without a full install. | | +| `--prefer-offline` | Use cached packages when available. | | +| `--offline` | Only use packages already in cache. | | +| `-f, --force` | Request a forced reinstall. | | +| `--ignore-scripts` | Do not run lifecycle scripts. | | +| `--no-lockfile` | Skip reading or generating a lockfile. | | +| `--fix-lockfile` | Repair lockfile entries. | Cannot be combined with package names. | +| `--shamefully-hoist` | Create a flat `node_modules` layout. | | +| `--resolution-only` | Re-run dependency resolution for analysis. | Cannot be combined with package names. | +| `--silent` | Suppress Vite+ output and request native quiet output. | | +| `--filter ` | Select workspaces by pattern. | Can be repeated. | +| `-w, --workspace-root` | Select the workspace root. | | +| `-E, --save-exact` | Save an exact dependency version. | Requires package names. | +| `--save-peer` | Request the manager's peer-dependency save behavior. | Requires package names. | +| `-O, --save-optional` | Save to optionalDependencies. | Requires package names. | +| `--save-catalog` | Save the dependency to the default catalog. | Requires package names. | +| `-g, --global` | Install globally. | Requires the global CLI. Uses the [global package store](./global-packages). Requires package names. | +| `--node ` | Node.js version to use for global installation. | Requires --global. | +| `--concurrency ` | Number of global package installs to run in parallel. | Requires --global. Must be a positive integer. | + +## Compatibility + +The commands below describe project operations. Global mode is described under [Options](#options). + +- **npm:** `npm install`, or `npm ci` with `--frozen-lockfile` and no package names. With package names: `npm install`. +- **pnpm:** `pnpm install`. With package names: `pnpm add`. +- **Yarn Classic:** `yarn install`. With package names: `yarn add`. +- **Yarn Modern:** `yarn install`. With package names: `yarn add`. +- **Bun:** `bun install`. With package names: `bun add`. + +| Option | npm | pnpm | Yarn Classic | Yarn Modern | Bun | Notes | +| ------------------------ | ------------------------- | --------------------- | --------------------- | --------------------- | -------------------------------- | -------------------------------------------------- | +| `-P, --prod` | Yes | Yes | Yes | With package names | Yes | Yarn Modern only warns in install mode. | +| `-D, --dev` | Yes | Yes | Yes | With package names | Yes | | +| `--no-optional` | Yes | Yes | Yes | No | Yes | | +| `--frozen-lockfile` | Without package names | Without package names | Yes | Without package names | Yes | | +| `--no-frozen-lockfile` | Without package names | Without package names | Without package names | Without package names | Yes | | +| `--lockfile-only` | Without --frozen-lockfile | Yes | No | 3 or later | Yes | npm ignores this in CI mode. | +| `--prefer-offline` | Yes | Yes | Yes | No | 1.4.1 or later | | +| `--offline` | Yes | Yes | Yes | No | 1.4.1 or later | | +| `-f, --force` | Without --frozen-lockfile | Yes | Yes | No | Yes | npm ignores this in CI mode. | +| `--ignore-scripts` | Yes | Yes | Yes | 2.4 or later | Yes | On Yarn Modern, lockfile-only mode takes priority. | +| `--no-lockfile` | Without --frozen-lockfile | Yes | Yes | No | No | npm ignores this in CI mode. | +| `--fix-lockfile` | No | Yes | No | 4 or later | No | | +| `--shamefully-hoist` | No | Yes | No | No | No | | +| `--resolution-only` | No | Yes | No | No | No | | +| `--silent` | Yes | Yes | Yes | No | Yes | | +| `--filter ` | 7.14.0 or later | Yes | No | Yes | Install: Yes. Add: 1.4 or later. | | +| `-w, --workspace-root` | 8.1.0 or later | Yes | With package names | No | No | | +| `-E, --save-exact` | Yes | Yes | Yes | Yes | Yes | | +| `--save-peer` | Yes | Yes | Yes | Yes | Yes | | +| `-O, --save-optional` | Yes | Yes | Yes | Yes | Yes | | +| `--save-catalog` | No | 10.12.0 or later | No | No | 1.4 or later | | +| `-g, --global` | Yes | Yes | Yes | Yes | Yes | | +| `--node ` | Yes | Yes | Yes | Yes | Yes | | +| `--concurrency ` | Yes | Yes | Yes | Yes | Yes | | + +With package names, [add](./add) compatibility rules apply. + +### Git and Remote Tarball Dependencies + +npm 12 disables git dependencies and remote tarball URLs by default. Installs can fail with `EALLOWGIT` or `EALLOWREMOTE`. Opt in through npm's project `allow-git` or `allow-remote` configuration only when those sources are intended. + +For dependency build-script approval, see [approve-builds](./approve-builds). + +## Native Options + +For native options, see [npm install](https://docs.npmjs.com/cli/v11/commands/npm-install), [pnpm install](https://pnpm.io/cli/install), [Yarn install](https://yarnpkg.com/cli/install), [Yarn Classic install](https://classic.yarnpkg.com/en/docs/cli/install), and [Bun install](https://bun.com/docs/pm/cli/install). To pass these options through Vite+, see [Native Arguments](./#native-arguments). diff --git a/docs/package-management/licenses.md b/docs/package-management/licenses.md new file mode 100644 index 0000000000..50b96fa910 --- /dev/null +++ b/docs/package-management/licenses.md @@ -0,0 +1,42 @@ +# vp pm licenses + +List licenses reported for installed dependencies. + +```bash +vp pm licenses list +vp pm licenses list --json +``` + +## Options + +`list`, also spelled `ls`, is the supported subcommand. `--json` requests the package manager's native JSON output. Vite+ does not normalize the output into a shared schema. + +### `list` + +| Option | Description | Notes | +| -------- | --------------------------- | --------------------------------- | +| `--json` | Request native JSON output. | Output retains the native schema. | + +## Compatibility + +### `list` + +- **npm:** No command. Warns and exits successfully without performing the operation. +- **pnpm:** 7.17.0 or later: `pnpm licenses list`. Earlier versions warn and skip. +- **Yarn Classic:** `yarn licenses list`. +- **Yarn Modern:** No command. Warns and exits successfully without performing the operation. +- **Bun:** 1.4.0 or later: `bun pm licenses`. Earlier versions warn and skip. + +| Option | npm | pnpm | Yarn Classic | Yarn Modern | Bun | Notes | +| -------- | --- | --------------- | ------------ | ----------- | -------------- | ----- | +| `--json` | No | 7.17.0 or later | Yes | No | 1.4.0 or later | | + +## Native Options + +For example, a pnpm project can use: + +```bash +vp pm licenses list -- --prod --long +``` + +For native options, see [pnpm licenses](https://pnpm.io/cli/licenses), [Yarn Classic licenses](https://classic.yarnpkg.com/en/docs/cli/licenses), and [Bun pm licenses](https://bun.com/docs/pm/cli/pm). To pass these options through Vite+, see [Native Arguments](./#native-arguments). diff --git a/docs/package-management/link.md b/docs/package-management/link.md new file mode 100644 index 0000000000..db4f31023b --- /dev/null +++ b/docs/package-management/link.md @@ -0,0 +1,29 @@ +# vp link + +Create local development links through the selected package manager. Alias: `vp ln`. + +```bash +vp link ../my-library +``` + +## Options + +An optional package name or directory is passed to the manager. + +There are no command-specific options. + +## Compatibility + +- **npm:** `npm link`. +- **pnpm:** `pnpm link`. +- **Yarn Classic:** `yarn link`. +- **Yarn Modern:** `yarn link`. +- **Bun:** `bun link`. + +The meaning of a directory, package name, or omitted argument follows that manager's native linking workflow. In particular, Yarn 2 and later link projects differently from Yarn Classic's package registration workflow. + +These links do not use Vite+'s [global package store](./global-packages) and do not appear in `vp list -g`. Use [unlink](./unlink) to remove native links. + +## Native Options + +For native options, see [npm link](https://docs.npmjs.com/cli/v11/commands/npm-link), [pnpm link](https://pnpm.io/cli/link), [Yarn link](https://yarnpkg.com/cli/link), [Yarn Classic link](https://classic.yarnpkg.com/en/docs/cli/link), and [Bun link](https://bun.com/docs/pm/cli/link). To pass these options through Vite+, see [Native Arguments](./#native-arguments). diff --git a/docs/package-management/list.md b/docs/package-management/list.md new file mode 100644 index 0000000000..0cbcb4a8bb --- /dev/null +++ b/docs/package-management/list.md @@ -0,0 +1,60 @@ +# vp pm list + +List installed dependencies. Alias: `vp pm ls`. The global CLI also accepts `vp list` and `vp ls`. + +```bash +vp pm list +vp pm list react --depth 2 +vp pm list --json +vp list -g +``` + +## Options + +| Option | Description | Notes | +| ------------------------- | --------------------------------- | ---------------------------------------------------------------------------- | +| `--depth ` | Maximum depth of dependency tree. | | +| `--json` | Request native JSON output. | Output retains the native schema. | +| `--long` | Show extended information. | | +| `--parseable` | Parseable output format. | | +| `-P, --prod` | Only production dependencies. | | +| `-D, --dev` | Include dev dependencies. | | +| `--no-optional` | Exclude optional dependencies. | | +| `--exclude-peers` | Exclude peer dependencies. | | +| `--only-projects` | Show only project packages. | | +| `--find-by ` | Use a finder function. | | +| `-r, --recursive` | List across all workspaces. | | +| `--filter ` | Select workspaces by pattern. | Can be repeated. | +| `-g, --global` | List global packages. | Requires the global CLI. Uses the [global package store](./global-packages). | + +## Compatibility + +The commands below describe project operations. Global mode is described under [Options](#options). + +- **npm:** `npm list`. +- **pnpm:** `pnpm list`. +- **Yarn Classic:** `yarn list`. +- **Yarn Modern:** No command. Warns and exits successfully without performing the operation. +- **Bun:** `bun pm ls`. + +| Option | npm | pnpm | Yarn Classic | Yarn Modern | Bun | Notes | +| ------------------------- | --------------- | ---------------- | ------------ | ----------- | --- | ----- | +| `--depth ` | Yes | Yes | Yes | No | No | | +| `--json` | Yes | Yes | Yes | No | No | | +| `--long` | Yes | Yes | No | No | No | | +| `--parseable` | Yes | Yes | No | No | No | | +| `-P, --prod` | Yes | Yes | Yes | No | No | | +| `-D, --dev` | Yes | Yes | Yes | No | No | | +| `--no-optional` | Yes | Yes | No | No | No | | +| `--exclude-peers` | Yes | Yes | No | No | No | | +| `--only-projects` | No | Yes | No | No | No | | +| `--find-by ` | No | 10.16.0 or later | No | No | No | | +| `-r, --recursive` | 7.14.0 or later | Yes | No | No | No | | +| `--filter ` | 7.14.0 or later | Yes | No | No | No | | +| `-g, --global` | Yes | Yes | Yes | Yes | Yes | | + +These results describe installed packages, not Vite+'s bundled tools. Use `vp toolchain [tool]` to inspect bundled Vite, Rolldown, Oxc, and other tool versions. + +## Native Options + +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). diff --git a/docs/package-management/login.md b/docs/package-management/login.md new file mode 100644 index 0000000000..0f91ad1d7e --- /dev/null +++ b/docs/package-management/login.md @@ -0,0 +1,34 @@ +# vp pm login + +Authenticate with a package registry. Alias: `vp pm adduser`. + +```bash +vp pm login +vp pm login --scope @my-org +``` + +## Options + +| Option | Description | Notes | +| ------------------ | -------------------- | ----- | +| `--registry ` | Select the registry. | | +| `--scope ` | Scope for the login. | | + +## Compatibility + +- **npm:** `npm login`. +- **pnpm:** 11 or later: `pnpm login`. Earlier versions use `npm login` as a fallback. +- **Yarn Classic:** `yarn login`. +- **Yarn Modern:** `yarn npm login`. +- **Bun:** Fallback: `npm login`. + +| Option | npm | pnpm | Yarn Classic | Yarn Modern | Bun | Notes | +| ------------------ | --- | -------------------------- | ------------ | ----------- | --- | ---------------------------------------- | +| `--registry ` | Yes | Yes | No | No | Yes | Configure the registry in Yarn settings. | +| `--scope ` | Yes | Before 11 or 11.2 or later | No | Yes | Yes | | + +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. + +## Native Options + +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). diff --git a/docs/package-management/logout.md b/docs/package-management/logout.md new file mode 100644 index 0000000000..fab0e01e77 --- /dev/null +++ b/docs/package-management/logout.md @@ -0,0 +1,34 @@ +# vp pm logout + +Log out from a package registry. + +```bash +vp pm logout +vp pm logout --scope @my-org +``` + +## Options + +| Option | Description | Notes | +| ------------------ | --------------------- | ----- | +| `--registry ` | Select the registry. | | +| `--scope ` | Scope for the logout. | | + +## Compatibility + +- **npm:** `npm logout`. +- **pnpm:** 11 or later: `pnpm logout`. Earlier versions use `npm logout` as a fallback. +- **Yarn Classic:** `yarn logout`. +- **Yarn Modern:** `yarn npm logout`. +- **Bun:** Fallback: `npm logout`. + +| Option | npm | pnpm | Yarn Classic | Yarn Modern | Bun | Notes | +| ------------------ | --- | --------- | ------------ | ----------- | --- | ---------------------------------------- | +| `--registry ` | Yes | Yes | No | No | Yes | Configure the registry in Yarn settings. | +| `--scope ` | Yes | Before 11 | No | Yes | Yes | | + +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. + +## Native Options + +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). diff --git a/docs/package-management/outdated.md b/docs/package-management/outdated.md new file mode 100644 index 0000000000..ca8fabe8fe --- /dev/null +++ b/docs/package-management/outdated.md @@ -0,0 +1,60 @@ +# vp outdated + +Check which dependencies have newer versions available. + +```bash +vp outdated +vp outdated react +vp outdated --format json +vp outdated -g +``` + +## Options + +| Option | Description | Notes | +| ------------------------------ | --------------------------------------------------- | ---------------------------------------------------------------------------- | +| `--long` | Show extended information. | | +| `--format ` | Select the output format. | | +| `-r, --recursive` | Check recursively across all workspaces. | | +| `--filter ` | Select workspaces by pattern. | Can be repeated. | +| `-w, --workspace-root` | Include workspace root. | | +| `-P, --prod` | Only production and optional dependencies. | | +| `-D, --dev` | Include dev dependencies. | | +| `--no-optional` | Exclude optional dependencies. | | +| `--compatible` | Show only versions within compatible ranges. | | +| `--sort-by ` | Sort results by field. | | +| `-g, --global` | Check globally installed packages. | Requires the global CLI. Uses the [global package store](./global-packages). | +| `--concurrency ` | Number of global package checks to run in parallel. | Requires --global. Must be a positive integer. | + +## Compatibility + +The commands below describe project operations. Global mode is described under [Options](#options). + +- **npm:** `npm outdated`. +- **pnpm:** `pnpm outdated`. +- **Yarn Classic:** `yarn outdated`. +- **Yarn Modern:** Alternative: `yarn upgrade-interactive`. +- **Bun:** `bun outdated`. + +| Option | npm | pnpm | Yarn Classic | Yarn Modern | Bun | Notes | +| ------------------------------ | ----------------- | ----------------- | ------------ | ----------- | --- | ----- | +| `--long` | Yes | Yes | No | No | No | | +| `--format ` | table, list, json | table, list, json | table, json | No | No | | +| `-r, --recursive` | Yes | Yes | No | No | Yes | | +| `--filter ` | 7.14.0 or later | Yes | No | No | Yes | | +| `-w, --workspace-root` | 8.1.0 or later | Yes | No | No | No | | +| `-P, --prod` | Yes | Yes | No | No | Yes | | +| `-D, --dev` | Yes | Yes | No | No | No | | +| `--no-optional` | Yes | Yes | No | No | Yes | | +| `--compatible` | No | Yes | No | No | No | | +| `--sort-by ` | No | Yes | No | No | No | | +| `-g, --global` | Yes | Yes | Yes | Yes | Yes | | +| `--concurrency ` | Yes | Yes | Yes | Yes | Yes | | + +Yarn Modern does not forward positional package names. Its interactive updater can change dependencies, unlike a read-only outdated query. + +Native output and exit codes differ. A nonzero exit can indicate outdated dependencies rather than a failure to query the registry. + +## Native Options + +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). diff --git a/docs/package-management/owner.md b/docs/package-management/owner.md new file mode 100644 index 0000000000..a5cfed3c4d --- /dev/null +++ b/docs/package-management/owner.md @@ -0,0 +1,79 @@ +# vp pm owner + +Manage package owners. Alias: `vp pm author`. + +```bash +vp pm owner list my-package +vp pm owner add alice my-package +vp pm owner rm alice my-package +``` + +## Options + +- `list ` lists owners. Alias: `ls`. +- `add ` grants ownership. +- `rm ` removes ownership. + +Each subcommand accepts `--otp `. These subcommands do not accept additional native arguments after `--`. Ownership changes affect registry permissions, not the local manifest's author field. + +### `list` + +| Option | Description | Notes | +| ------------- | --------------------------- | ----- | +| `--otp ` | Supply a one-time password. | | + +### `add` + +| Option | Description | Notes | +| ------------- | --------------------------- | ----- | +| `--otp ` | Supply a one-time password. | | + +### `rm` + +| Option | Description | Notes | +| ------------- | --------------------------- | ----- | +| `--otp ` | Supply a one-time password. | | + +## Compatibility + +### `list` + +- **npm:** `npm owner list`. +- **pnpm:** 11.1 or later: `pnpm owner list`. Earlier versions use `npm owner list` as a fallback. +- **Yarn Classic:** `yarn owner list`. +- **Yarn Modern:** Fallback: `npm owner list`. +- **Bun:** Fallback: `npm owner list`. + +| Option | npm | pnpm | Yarn Classic | Yarn Modern | Bun | Notes | +| ------------- | --- | ---- | --------------- | ----------- | --- | ----- | +| `--otp ` | Yes | Yes | 1.12.1 or later | Yes | Yes | | + +### `add` + +- **npm:** `npm owner add`. +- **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. +- **Yarn Classic:** `yarn owner add`. Keeps the user before the package. +- **Yarn Modern:** Fallback: `npm owner add`. +- **Bun:** Fallback: `npm owner add`. + +| Option | npm | pnpm | Yarn Classic | Yarn Modern | Bun | Notes | +| ------------- | --- | ---- | --------------- | ----------- | --- | ----- | +| `--otp ` | Yes | Yes | 1.12.1 or later | Yes | Yes | | + +### `rm` + +- **npm:** `npm owner rm`. +- **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. +- **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. +- **Yarn Modern:** Fallback: `npm owner rm`. +- **Bun:** Fallback: `npm owner rm`. + +| Option | npm | pnpm | Yarn Classic | Yarn Modern | Bun | Notes | +| ------------- | --- | ---- | --------------- | ----------- | --- | ----- | +| `--otp ` | Yes | Yes | 1.12.1 or later | Yes | Yes | | + +Registry credentials and authorization follow the command that runs. + +## Native Options + +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. diff --git a/docs/package-management/pack.md b/docs/package-management/pack.md new file mode 100644 index 0000000000..3a9f1752e0 --- /dev/null +++ b/docs/package-management/pack.md @@ -0,0 +1,40 @@ +# vp pm pack + +Create a package tarball from the project. This is different from [`vp pack`](/guide/pack), which builds libraries with tsdown. + +```bash +vp pm pack +vp pm pack --pack-destination ./artifacts +``` + +## Options + +| Option | Description | Notes | +| --------------------------------------- | -------------------------------------------------- | --------------------------------- | +| `-r, --recursive` | Pack all workspace packages. | | +| `--filter ` | Select workspaces by pattern. | Can be repeated. | +| `--out ` | Choose the tarball output path. | | +| `--pack-destination ` | Choose the tarball output directory. | | +| `--pack-gzip-level ` | Request a gzip compression level from 0 through 9. | | +| `--json` | Request native JSON output. | Output retains the native schema. | + +## Compatibility + +- **npm:** `npm pack`. +- **pnpm:** `pnpm pack`. +- **Yarn Classic:** `yarn pack`. +- **Yarn Modern:** `yarn pack`. +- **Bun:** `bun pm pack`. + +| Option | npm | pnpm | Yarn Classic | Yarn Modern | Bun | Notes | +| --------------------------------------- | --------------- | ---------------- | ------------ | ----------- | --- | ------------------------------------ | +| `-r, --recursive` | 7.9.0 or later | 10.11.0 or later | No | Yes | No | | +| `--filter ` | 7.9.0 or later | 10.11.0 or later | No | Yes | No | | +| `--out ` | No | Yes | Yes | Yes | Yes | | +| `--pack-destination ` | 7.18.0 or later | Yes | No | No | Yes | Vite+ creates the directory for npm. | +| `--pack-gzip-level ` | No | Yes | No | No | Yes | | +| `--json` | Yes | Yes | Yes | Yes | No | | + +## Native Options + +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). diff --git a/docs/package-management/package-manager-selection.md b/docs/package-management/package-manager-selection.md new file mode 100644 index 0000000000..9c957360c5 --- /dev/null +++ b/docs/package-management/package-manager-selection.md @@ -0,0 +1,60 @@ +# Package Manager Selection + +`vp` detects the package manager at the workspace root in this order: + +1. `packageManager` in `package.json` +2. `devEngines.packageManager` in `package.json` +3. `pnpm-workspace.yaml` +4. `pnpm-lock.yaml` +5. `yarn.lock` or `.yarnrc.yml` +6. `package-lock.json` +7. `bun.lock` or `bun.lockb` +8. `.pnpmfile.cjs` or `pnpmfile.cjs` +9. `bunfig.toml` +10. `yarn.config.cjs` + +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`. + +Yarn Classic is Yarn 1. Yarn Modern is Yarn 2 or later. + +## Pinning a Version + +Use [`vp env pin`](/guide/env) to declare an exact package-manager version: + +```bash +vp env pin pnpm@11.3.0 +``` + +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. + +## Version Ranges + +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: + +```json +{ + "devEngines": { + "packageManager": { + "name": "pnpm", + "version": "^11.0.0", + "onFail": "download" + } + } +} +``` + +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. + +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. + +## Package-Manager Shims + +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. + +The same applies to the generated aliases for each manager: + +- pnpm: `pnpm`, `pnpx`, `pn`, and `pnx`. +- Yarn: `yarn` and `yarnpkg`. +- Bun: `bun` and `bunx`. + +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. diff --git a/docs/package-management/patch-commit.md b/docs/package-management/patch-commit.md new file mode 100644 index 0000000000..869e4778eb --- /dev/null +++ b/docs/package-management/patch-commit.md @@ -0,0 +1,27 @@ +# vp pm patch-commit + +Save edits prepared with [patch](./patch) as a dependency patch. + +```bash +vp pm patch-commit /path/to/edited-package +``` + +## Options + +Supply the edit directory from the manager's patch workflow. There are no additional Vite+ options. + +There are no command-specific options. + +## Compatibility + +- **npm:** 12 or later: `npm patch commit`. Earlier versions warn and skip. +- **pnpm:** `pnpm patch-commit`. +- **Yarn Classic:** No command. Warns and exits successfully without performing the operation. +- **Yarn Modern:** `yarn patch-commit --save`. +- **Bun:** `bun patch --commit`. + +Review and commit the patch and any manifest or lockfile changes produced by the manager. + +## Native Options + +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). diff --git a/docs/package-management/patch.md b/docs/package-management/patch.md new file mode 100644 index 0000000000..8d5a6b0c17 --- /dev/null +++ b/docs/package-management/patch.md @@ -0,0 +1,29 @@ +# vp pm patch + +Prepare an installed dependency for local patching. + +```bash +vp pm patch my-dependency@1.0.0 +``` + +Edit the package in the location reported by the native manager, then save the patch with [patch-commit](./patch-commit). + +## Options + +A package specification is required. There are no additional Vite+ options. + +There are no command-specific options. + +## Compatibility + +- **npm:** 12 or later: `npm patch add`. Earlier versions warn and skip. +- **pnpm:** `pnpm patch`. +- **Yarn Classic:** No command. Warns and exits successfully without performing the operation. +- **Yarn Modern:** `yarn patch`. +- **Bun:** `bun patch`. + +The edit location and patch storage format are native-manager details. Vite+ does not convert patches between managers. + +## Native Options + +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). diff --git a/docs/package-management/ping.md b/docs/package-management/ping.md new file mode 100644 index 0000000000..daf3b6aecd --- /dev/null +++ b/docs/package-management/ping.md @@ -0,0 +1,32 @@ +# vp pm ping + +Check connectivity to a package registry. + +```bash +vp pm ping +vp pm ping --registry https://registry.npmjs.org +``` + +## Options + +| Option | Description | Notes | +| ------------------ | -------------------- | ----- | +| `--registry ` | Select the registry. | | + +## Compatibility + +- **npm:** `npm ping`. +- **pnpm:** 11 or later: `pnpm ping`. Earlier versions use `npm ping` as a fallback. +- **Yarn Classic:** Fallback: `npm ping`. +- **Yarn Modern:** Fallback: `npm ping`. +- **Bun:** Fallback: `npm ping`. + +| Option | npm | pnpm | Yarn Classic | Yarn Modern | Bun | Notes | +| ------------------ | --- | ---- | ------------ | ----------- | --- | ----- | +| `--registry ` | Yes | Yes | Yes | Yes | Yes | | + +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. + +## Native Options + +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). diff --git a/docs/package-management/pkg.md b/docs/package-management/pkg.md new file mode 100644 index 0000000000..9f8ab70804 --- /dev/null +++ b/docs/package-management/pkg.md @@ -0,0 +1,88 @@ +# vp pm pkg + +Read and update `package.json` fields without editing the manifest by hand. + +```bash +vp pm pkg get name version +vp pm pkg set scripts.check='vp check' +vp pm pkg set private=true --json +vp pm pkg delete scripts.old +vp pm pkg fix +``` + +## Options + +- `get [key...]` reads fields, or the entire manifest if no keys are supplied. `--json` requests native JSON output. +- `set ` writes fields. `--json` parses values as JSON so booleans, numbers, arrays, and objects are not saved as strings. +- `delete ` removes fields. +- `fix` asks the manager to correct common manifest errors. + +Field paths and normalization follow the native manager. Quote paths with brackets or shell-sensitive characters. + +### `get` + +| Option | Description | Notes | +| -------- | ---------------------- | --------------------------------- | +| `--json` | Output in JSON format. | Output retains the native schema. | + +### `set` + +| Option | Description | Notes | +| -------- | ------------------------------------ | ------------------------------------------------------------------------- | +| `--json` | Parse values as JSON before writing. | Parses booleans, numbers, arrays, and objects rather than saving strings. | + +### `delete` + +There are no command-specific options. + +### `fix` + +There are no command-specific options. + +## Compatibility + +### `get` + +- **npm:** 7.20.0 or later: `npm pkg get`. Earlier versions warn and skip. +- **pnpm:** 11.3.0 or later: `pnpm pkg get`. Earlier versions warn and skip. +- **Yarn Classic:** No command. Warns and exits successfully without performing the operation. +- **Yarn Modern:** No command. Warns and exits successfully without performing the operation. +- **Bun:** 1.2.19 or later: `bun pm pkg get`. Earlier versions warn and skip. + +| Option | npm | pnpm | Yarn Classic | Yarn Modern | Bun | Notes | +| -------- | --------------- | --------------- | ------------ | ----------- | --------------- | ----- | +| `--json` | 7.20.0 or later | 11.3.0 or later | No | No | 1.2.19 or later | | + +### `set` + +- **npm:** 7.20.0 or later: `npm pkg set`. Earlier versions warn and skip. +- **pnpm:** 11.3.0 or later: `pnpm pkg set`. Earlier versions warn and skip. +- **Yarn Classic:** No command. Warns and exits successfully without performing the operation. +- **Yarn Modern:** No command. Warns and exits successfully without performing the operation. +- **Bun:** 1.2.19 or later: `bun pm pkg set`. Earlier versions warn and skip. + +| Option | npm | pnpm | Yarn Classic | Yarn Modern | Bun | Notes | +| -------- | --------------- | --------------- | ------------ | ----------- | --------------- | ----- | +| `--json` | 7.20.0 or later | 11.3.0 or later | No | No | 1.2.19 or later | | + +### `delete` + +- **npm:** 7.20.0 or later: `npm pkg delete`. Earlier versions warn and skip. +- **pnpm:** 11.3.0 or later: `pnpm pkg delete`. Earlier versions warn and skip. +- **Yarn Classic:** No command. Warns and exits successfully without performing the operation. +- **Yarn Modern:** No command. Warns and exits successfully without performing the operation. +- **Bun:** 1.2.19 or later: `bun pm pkg delete`. Earlier versions warn and skip. + +### `fix` + +- **npm:** 9.8.0 or later: `npm pkg fix`. Earlier versions warn and skip. +- **pnpm:** 11.3.0 or later: `pnpm pkg fix`. Earlier versions warn and skip. +- **Yarn Classic:** No command. Warns and exits successfully without performing the operation. +- **Yarn Modern:** No command. Warns and exits successfully without performing the operation. +- **Bun:** 1.2.19 or later: `bun pm pkg fix`. Earlier versions warn and skip. + +Versions below the stated requirements warn and exit successfully without running the operation. There is no npm fallback for unsupported managers or versions. + +## Native Options + +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). diff --git a/docs/package-management/prune.md b/docs/package-management/prune.md new file mode 100644 index 0000000000..1a9ef95721 --- /dev/null +++ b/docs/package-management/prune.md @@ -0,0 +1,34 @@ +# vp pm prune + +Remove unnecessary installed packages. + +```bash +vp pm prune +vp pm prune --prod +``` + +## Options + +| Option | Description | Notes | +| --------------- | ----------------------------- | ----- | +| `--prod` | Remove devDependencies. | | +| `--no-optional` | Remove optional dependencies. | | + +## Compatibility + +- **npm:** `npm prune`. +- **pnpm:** `pnpm prune`. +- **Yarn Classic:** No command. Warns and exits successfully without performing the operation. +- **Yarn Modern:** No command. Warns and exits successfully without performing the operation. +- **Bun:** 1.4 or later: `bun prune`. Earlier versions warn and skip. + +| Option | npm | pnpm | Yarn Classic | Yarn Modern | Bun | Notes | +| --------------- | --- | ---- | ------------ | ----------- | ------------ | ----- | +| `--prod` | Yes | Yes | No | No | 1.4 or later | | +| `--no-optional` | Yes | Yes | No | No | 1.4 or later | | + +npm translates selection flags to `--omit=dev` and `--omit=optional`. Bun translates `--prod` to `--production`. Yarn and older Bun remove extraneous packages during installation instead of providing a native prune command. + +## Native Options + +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). diff --git a/docs/package-management/publish.md b/docs/package-management/publish.md new file mode 100644 index 0000000000..8104bceb4b --- /dev/null +++ b/docs/package-management/publish.md @@ -0,0 +1,61 @@ +# vp pm publish + +Publish a package to a registry. Supported targets and preview options depend on the package manager: + +```bash +vp pm publish --dry-run +vp pm publish --access public --tag next +vp pm publish ./package.tgz +``` + +## Options + +| Option | Description | Notes | +| ------------------------------- | -------------------------------------------- | --------------------------------------------- | +| `--dry-run` | Preview without publishing. | | +| `--tag ` | Select a distribution tag. | | +| `--access ` | Request public or restricted package access. | | +| `--otp ` | Supply a one-time password. | | +| `--no-git-checks` | Skip git checks. | | +| `--publish-branch ` | Set the branch name to publish from. | | +| `--report-summary` | Save publish summary. | | +| `--provenance` | Publish with provenance. | Requires a compatible publishing environment. | +| `--force` | Request native forced publishing. | | +| `--json` | Request native JSON output. | Output retains the native schema. | +| `-r, --recursive` | Publish all workspace packages. | | +| `--filter ` | Select workspaces by pattern. | Can be repeated. | + +## Compatibility + +- **npm:** `npm publish`. +- **pnpm:** `pnpm publish`. +- **Yarn Classic:** `yarn publish`. +- **Yarn Modern:** `yarn npm publish` for the active workspace. Explicit tarball or folder targets are rejected. +- **Bun:** `bun publish`. + +| Option | npm | pnpm | Yarn Classic | Yarn Modern | Bun | Notes | +| ------------------------------- | --------------- | --------------------------------- | --------------- | -------------- | --- | ----- | +| `--dry-run` | 5.10.0 or later | Yes | No | 4.9.3 or later | Yes | | +| `--tag ` | Yes | Yes | Yes | Yes | Yes | | +| `--access ` | Yes | Yes | Yes | Yes | Yes | | +| `--otp ` | Yes | Yes | 1.12.1 or later | 3.2.0 or later | Yes | | +| `--no-git-checks` | No | Yes | No | No | No | | +| `--publish-branch ` | No | Yes | No | No | No | | +| `--report-summary` | No | Yes | No | No | No | | +| `--provenance` | 9.5.0 or later | Yes | No | 4.9.0 or later | No | | +| `--force` | Yes | Yes | No | No | No | | +| `--json` | Yes | Before 11.0.0 or 11.0.7 and later | Yes | 4.9.3 or later | No | | +| `-r, --recursive` | 7.13.0 or later | Yes | No | No | No | | +| `--filter ` | 7.13.0 or later | Yes | No | No | No | | + +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. + +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. + +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. + +For a workflow that separates CI uploads from maintainer approval, use [stage](./stage). + +## Native Options + +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). diff --git a/docs/package-management/rebuild.md b/docs/package-management/rebuild.md new file mode 100644 index 0000000000..d681b339f3 --- /dev/null +++ b/docs/package-management/rebuild.md @@ -0,0 +1,31 @@ +# vp pm rebuild + +Rebuild installed packages, for example after switching Node.js versions or when a native addon needs recompilation. Alias: `vp pm rb`. The global CLI also accepts `vp rebuild`. + +```bash +vp pm rebuild +vp pm rebuild better-sqlite3 sharp +vp pm rebuild -- --update-binary +``` + +## Options + +Supply package names to rebuild only those packages. Omit them to request a full rebuild. There are no additional Vite+ options. + +There are no command-specific options. + +## Compatibility + +- **npm:** `npm rebuild`. +- **pnpm:** `pnpm rebuild`. +- **Yarn Classic:** No command. Warns and exits successfully without performing the operation. +- **Yarn Modern:** `yarn rebuild`. +- **Bun:** No command. Warns and exits successfully without performing the operation. + +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. + +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. + +## Native Options + +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). diff --git a/docs/package-management/remove.md b/docs/package-management/remove.md new file mode 100644 index 0000000000..13f9e2f650 --- /dev/null +++ b/docs/package-management/remove.md @@ -0,0 +1,47 @@ +# vp remove + +Remove dependencies from the project. Aliases: `vp rm`, `vp un`, and `vp uninstall`. + +```bash +vp remove react +vp remove --filter web react +vp remove -g --dry-run typescript +``` + +## Options + +| Option | Description | Notes | +| ---------------------- | -------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `-D, --save-dev` | Remove from devDependencies. | | +| `-O, --save-optional` | Remove from optionalDependencies. | | +| `-P, --save-prod` | Remove from dependencies. | | +| `--filter ` | Select workspaces by pattern. | Can be repeated. | +| `-w, --workspace-root` | Remove from workspace root. | | +| `-r, --recursive` | Remove recursively from all workspace packages. | | +| `-g, --global` | Remove global packages. | Requires the global CLI. Uses the [global package store](./global-packages). | +| `--dry-run` | Preview what would be removed without actually removing. | Requires --global. | + +## Compatibility + +The commands below describe project operations. Global mode is described under [Options](#options). + +- **npm:** `npm uninstall`. +- **pnpm:** `pnpm remove`. +- **Yarn Classic:** `yarn remove`. +- **Yarn Modern:** `yarn remove`. +- **Bun:** `bun remove`. + +| Option | npm | pnpm | Yarn Classic | Yarn Modern | Bun | Notes | +| ---------------------- | --------------- | ---- | ------------ | ----------- | ------------ | -------------------------------- | +| `-D, --save-dev` | Yes | Yes | No | No | No | | +| `-O, --save-optional` | Yes | Yes | No | No | No | | +| `-P, --save-prod` | Yes | Yes | No | No | No | | +| `--filter ` | 7.14.0 or later | Yes | One filter | Yes | 1.4 or later | | +| `-w, --workspace-root` | 8.1.0 or later | Yes | No | No | No | | +| `-r, --recursive` | 8.1.0 or later | Yes | No | Yes | No | npm includes the workspace root. | +| `-g, --global` | Yes | Yes | Yes | Yes | Yes | | +| `--dry-run` | Yes | Yes | Yes | Yes | Yes | | + +## Native Options + +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). diff --git a/docs/package-management/search.md b/docs/package-management/search.md new file mode 100644 index 0000000000..07e85312a3 --- /dev/null +++ b/docs/package-management/search.md @@ -0,0 +1,38 @@ +# vp pm search + +Search the package registry. + +```bash +vp pm search vite plugin +vp pm search typescript --json +``` + +## Options + +At least one search term is required. + +| Option | Description | Notes | +| ------------------ | --------------------------- | --------------------------------- | +| `--json` | Request native JSON output. | Output retains the native schema. | +| `--long` | Show extended information. | | +| `--registry ` | Select the registry. | | + +## Compatibility + +- **npm:** `npm search`. +- **pnpm:** 11 or later: `pnpm search`. Earlier versions use `npm search` as a fallback. +- **Yarn Classic:** Fallback: `npm search`. +- **Yarn Modern:** Fallback: `npm search`. +- **Bun:** Fallback: `npm search`. + +| Option | npm | pnpm | Yarn Classic | Yarn Modern | Bun | Notes | +| ------------------ | --- | --------- | ------------ | ----------- | --- | ----- | +| `--json` | Yes | Yes | Yes | Yes | Yes | | +| `--long` | Yes | Before 11 | Yes | Yes | Yes | | +| `--registry ` | Yes | Yes | Yes | Yes | Yes | | + +Registry settings and output follow the command that runs. + +## Native Options + +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). diff --git a/docs/package-management/stage.md b/docs/package-management/stage.md new file mode 100644 index 0000000000..60ca317ad0 --- /dev/null +++ b/docs/package-management/stage.md @@ -0,0 +1,175 @@ +# vp pm stage + +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. + +```bash +vp pm stage publish --dry-run +vp pm stage publish +vp pm stage list +vp pm stage view +vp pm stage download +vp pm stage approve +vp pm stage reject +``` + +## Options + +Use the subcommands below to upload, inspect, approve, or reject staged versions. + +### `publish` + +Upload a package. Accepts an optional tarball or folder target. + +| Option | Description | Notes | +| ------------------------------- | -------------------------------------------- | --------------------------------------------- | +| `--tag ` | Publish tag. | | +| `--access ` | Request public or restricted package access. | | +| `--otp ` | Supply a one-time password. | | +| `--dry-run` | Preview without staging. | | +| `--json` | Request native JSON output. | Output retains the native schema. | +| `-r, --recursive` | Stage all publishable workspace packages. | | +| `--filter ` | Select workspaces by pattern. | Can be repeated. | +| `--provenance` | Stage with provenance. | Requires a compatible publishing environment. | +| `--registry ` | Select the registry. | | + +### `list` + +List staged versions. Accepts an optional package specification. Alias: `ls`. + +| Option | Description | Notes | +| ------------------ | --------------------------- | --------------------------------- | +| `--json` | Request native JSON output. | Output retains the native schema. | +| `--registry ` | Select the registry. | | + +### `view` + +Inspect a staged version. Requires a stage ID. + +| Option | Description | Notes | +| ------------------ | --------------------------- | --------------------------------- | +| `--json` | Request native JSON output. | Output retains the native schema. | +| `--registry ` | Select the registry. | | + +### `download` + +Download a staged tarball. Requires a stage ID. + +| Option | Description | Notes | +| ------------------ | -------------------- | ----- | +| `--registry ` | Select the registry. | | + +### `approve` + +Promote a staged version to the live registry. Requires a stage ID. + +| Option | Description | Notes | +| ------------------ | --------------------------- | ----- | +| `--otp ` | Supply a one-time password. | | +| `--registry ` | Select the registry. | | + +### `reject` + +Discard a staged version. Requires a stage ID. + +| Option | Description | Notes | +| ------------------ | --------------------------- | ----- | +| `--otp ` | Supply a one-time password. | | +| `--registry ` | Select the registry. | | + +## Compatibility + +All npm paths, including fallbacks, require npm 11.15 or later and Node.js 22.14 or later. + +### `publish` + +- **npm:** 11.15 or later: `npm stage publish`. +- **pnpm:** 11.3 or later: `pnpm stage publish`. +- **Yarn Classic:** Fallback: `npm stage publish`. +- **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. +- **Bun:** Fallback: `npm stage publish`. + +| Option | npm | pnpm | Yarn Classic | Yarn Modern | Bun | Notes | +| ------------------------------- | ----------------------- | ---- | ----------------------- | ----------------------------------------- | ----------------------- | ------------------------------------------------ | +| `--tag ` | Yes | Yes | Yes | Yes | Yes | | +| `--access ` | Yes | Yes | Yes | Yes | Yes | | +| `--otp ` | Yes | Yes | Yes | Yes | Yes | | +| `--dry-run` | Yes | Yes | Yes | Yes | Yes | | +| `--json` | Yes | Yes | Yes | Yes | Yes | | +| `-r, --recursive` | No target or target `.` | Yes | No target or target `.` | Before 4.16 with no target, or target `.` | No target or target `.` | | +| `--filter ` | No target or target `.` | Yes | No target or target `.` | Before 4.16 with no target, or target `.` | No target or target `.` | | +| `--provenance` | Yes | Yes | Yes | Yes | Yes | | +| `--registry ` | Yes | Yes | Yes | Before 4.16, or an explicit target | Yes | Use Yarn registry settings on native Yarn paths. | + +### `list` + +- **npm:** 11.15 or later: `npm stage list`. +- **pnpm:** 11.3 or later: `pnpm stage list`. +- **Yarn Classic:** Fallback: `npm stage list`. +- **Yarn Modern:** 4.16.0 or later: `yarn npm stage list`. Earlier versions use `npm stage list` as a fallback. +- **Bun:** Fallback: `npm stage list`. + +| Option | npm | pnpm | Yarn Classic | Yarn Modern | Bun | Notes | +| ------------------ | --- | ---- | ------------ | ------------- | --- | ------------------------------------------------ | +| `--json` | Yes | Yes | Yes | Yes | Yes | | +| `--registry ` | Yes | Yes | Yes | Before 4.16.0 | Yes | Use Yarn registry settings on native Yarn paths. | + +### `view` + +- **npm:** 11.15 or later: `npm stage view`. +- **pnpm:** 11.3 or later: `pnpm stage view`. +- **Yarn Classic:** Fallback: `npm stage view`. +- **Yarn Modern:** Fallback: `npm stage view`. +- **Bun:** Fallback: `npm stage view`. + +| Option | npm | pnpm | Yarn Classic | Yarn Modern | Bun | Notes | +| ------------------ | --- | ---- | ------------ | ----------- | --- | ----- | +| `--json` | Yes | Yes | Yes | Yes | Yes | | +| `--registry ` | Yes | Yes | Yes | Yes | Yes | | + +### `download` + +- **npm:** 11.15 or later: `npm stage download`. +- **pnpm:** 11.3 or later: `pnpm stage download`. +- **Yarn Classic:** Fallback: `npm stage download`. +- **Yarn Modern:** Fallback: `npm stage download`. +- **Bun:** Fallback: `npm stage download`. + +| Option | npm | pnpm | Yarn Classic | Yarn Modern | Bun | Notes | +| ------------------ | --- | ---- | ------------ | ----------- | --- | ----- | +| `--registry ` | Yes | Yes | Yes | Yes | Yes | | + +### `approve` + +- **npm:** 11.15 or later: `npm stage approve`. +- **pnpm:** 11.3 or later: `pnpm stage approve`. +- **Yarn Classic:** Fallback: `npm stage approve`. +- **Yarn Modern:** 4.16.0 or later: `yarn npm stage approve`. Earlier versions use `npm stage approve` as a fallback. +- **Bun:** Fallback: `npm stage approve`. + +| Option | npm | pnpm | Yarn Classic | Yarn Modern | Bun | Notes | +| ------------------ | --- | ---- | ------------ | ------------- | --- | ------------------------------------------------ | +| `--otp ` | Yes | Yes | Yes | Yes | Yes | | +| `--registry ` | Yes | Yes | Yes | Before 4.16.0 | Yes | Use Yarn registry settings on native Yarn paths. | + +### `reject` + +- **npm:** 11.15 or later: `npm stage reject`. +- **pnpm:** 11.3 or later: `pnpm stage reject`. +- **Yarn Classic:** Fallback: `npm stage reject`. +- **Yarn Modern:** 4.16.0 or later: `yarn npm stage reject`. Earlier versions use `npm stage reject` as a fallback. +- **Bun:** Fallback: `npm stage reject`. + +| Option | npm | pnpm | Yarn Classic | Yarn Modern | Bun | Notes | +| ------------------ | --- | ---- | ------------ | ------------- | --- | ------------------------------------------------ | +| `--otp ` | Yes | Yes | Yes | Yes | Yes | | +| `--registry ` | Yes | Yes | Yes | Before 4.16.0 | Yes | Use Yarn registry settings on native Yarn paths. | + +Yarn fallback paths and Bun warn before invoking npm. + +This command is unrelated to Yarn's version-control staging command or Vite+'s staged-file checks. + +## Native Options + +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). + +For the registry workflow, see [npm staged publishing](https://docs.npmjs.com/staged-publishing). diff --git a/docs/package-management/team.md b/docs/package-management/team.md new file mode 100644 index 0000000000..f32bef338c --- /dev/null +++ b/docs/package-management/team.md @@ -0,0 +1,140 @@ +# vp pm team + +Manage registry organization teams and their membership. + +```bash +vp pm team list my-org +vp pm team list my-org:developers --json +vp pm team create my-org:developers +vp pm team add my-org:developers alice +vp pm team rm my-org:developers alice +vp pm team destroy my-org:developers +``` + +## Options + +- `create ` creates a team. +- `destroy ` deletes a team. +- `add ` adds a member. +- `rm ` removes a member. Alias: `remove`. +- `list ` lists an organization's teams or a team's members. Alias: `ls`. + +All subcommands accept `--registry `, `--otp `, and `--json`. JSON output retains the native manager's schema. Registry permissions determine which changes the authenticated account may make. + +### `create` + +| Option | Description | Notes | +| ------------------ | --------------------------- | --------------------------------- | +| `--otp ` | Supply a one-time password. | | +| `--json` | Request native JSON output. | Output retains the native schema. | +| `--registry ` | Select the registry. | | + +### `destroy` + +| Option | Description | Notes | +| ------------------ | --------------------------- | --------------------------------- | +| `--otp ` | Supply a one-time password. | | +| `--json` | Request native JSON output. | Output retains the native schema. | +| `--registry ` | Select the registry. | | + +### `add` + +| Option | Description | Notes | +| ------------------ | --------------------------- | --------------------------------- | +| `--otp ` | Supply a one-time password. | | +| `--json` | Request native JSON output. | Output retains the native schema. | +| `--registry ` | Select the registry. | | + +### `rm` + +| Option | Description | Notes | +| ------------------ | --------------------------- | --------------------------------- | +| `--otp ` | Supply a one-time password. | | +| `--json` | Request native JSON output. | Output retains the native schema. | +| `--registry ` | Select the registry. | | + +### `list` + +| Option | Description | Notes | +| ------------------ | --------------------------- | --------------------------------- | +| `--otp ` | Supply a one-time password. | | +| `--json` | Request native JSON output. | Output retains the native schema. | +| `--registry ` | Select the registry. | | + +## Compatibility + +Fallbacks to npm emit warnings. + +### `create` + +- **npm:** `npm team create`. +- **pnpm:** 11.13.0 or later: `pnpm team create`. Earlier versions use `npm team create` as a fallback. +- **Yarn Classic:** `yarn team create`. +- **Yarn Modern:** No command. Warns and exits successfully without performing the operation. +- **Bun:** Fallback: `npm team create`. + +| Option | npm | pnpm | Yarn Classic | Yarn Modern | Bun | Notes | +| ------------------ | --- | ---- | --------------- | ----------- | --- | --------------------------------------------------------------------------- | +| `--otp ` | Yes | Yes | 1.12.1 or later | No | Yes | Older Yarn Classic can ignore --otp. Vite+ does not check its version here. | +| `--json` | Yes | Yes | Yes | No | Yes | | +| `--registry ` | Yes | Yes | Yes | No | Yes | | + +### `destroy` + +- **npm:** `npm team destroy`. +- **pnpm:** 11.13.0 or later: `pnpm team destroy`. Earlier versions use `npm team destroy` as a fallback. +- **Yarn Classic:** `yarn team destroy`. +- **Yarn Modern:** No command. Warns and exits successfully without performing the operation. +- **Bun:** Fallback: `npm team destroy`. + +| Option | npm | pnpm | Yarn Classic | Yarn Modern | Bun | Notes | +| ------------------ | --- | ---- | --------------- | ----------- | --- | --------------------------------------------------------------------------- | +| `--otp ` | Yes | Yes | 1.12.1 or later | No | Yes | Older Yarn Classic can ignore --otp. Vite+ does not check its version here. | +| `--json` | Yes | Yes | Yes | No | Yes | | +| `--registry ` | Yes | Yes | Yes | No | Yes | | + +### `add` + +- **npm:** `npm team add`. +- **pnpm:** 11.13.0 or later: `pnpm team add`. Earlier versions use `npm team add` as a fallback. +- **Yarn Classic:** `yarn team add`. +- **Yarn Modern:** No command. Warns and exits successfully without performing the operation. +- **Bun:** Fallback: `npm team add`. + +| Option | npm | pnpm | Yarn Classic | Yarn Modern | Bun | Notes | +| ------------------ | --- | ---- | --------------- | ----------- | --- | --------------------------------------------------------------------------- | +| `--otp ` | Yes | Yes | 1.12.1 or later | No | Yes | Older Yarn Classic can ignore --otp. Vite+ does not check its version here. | +| `--json` | Yes | Yes | Yes | No | Yes | | +| `--registry ` | Yes | Yes | Yes | No | Yes | | + +### `rm` + +- **npm:** `npm team rm`. +- **pnpm:** 11.13.0 or later: `pnpm team rm`. Earlier versions use `npm team rm` as a fallback. +- **Yarn Classic:** `yarn team remove`. +- **Yarn Modern:** No command. Warns and exits successfully without performing the operation. +- **Bun:** Fallback: `npm team rm`. + +| Option | npm | pnpm | Yarn Classic | Yarn Modern | Bun | Notes | +| ------------------ | --- | ---- | --------------- | ----------- | --- | --------------------------------------------------------------------------- | +| `--otp ` | Yes | Yes | 1.12.1 or later | No | Yes | Older Yarn Classic can ignore --otp. Vite+ does not check its version here. | +| `--json` | Yes | Yes | Yes | No | Yes | | +| `--registry ` | Yes | Yes | Yes | No | Yes | | + +### `list` + +- **npm:** `npm team ls`. +- **pnpm:** 11.13.0 or later: `pnpm team ls`. Earlier versions use `npm team ls` as a fallback. +- **Yarn Classic:** `yarn team list`. +- **Yarn Modern:** No command. Warns and exits successfully without performing the operation. +- **Bun:** Fallback: `npm team ls`. + +| Option | npm | pnpm | Yarn Classic | Yarn Modern | Bun | Notes | +| ------------------ | --- | ---- | --------------- | ----------- | --- | --------------------------------------------------------------------------- | +| `--otp ` | Yes | Yes | 1.12.1 or later | No | Yes | Older Yarn Classic can ignore --otp. Vite+ does not check its version here. | +| `--json` | Yes | Yes | Yes | No | Yes | | +| `--registry ` | Yes | Yes | Yes | No | Yes | | + +## Native Options + +For native options, see [npm team](https://docs.npmjs.com/cli/v11/commands/npm-team), [pnpm team](https://pnpm.io/cli/team), and [Yarn Classic team](https://classic.yarnpkg.com/en/docs/cli/team). To pass these options through Vite+, see [Native Arguments](./#native-arguments). diff --git a/docs/package-management/token.md b/docs/package-management/token.md new file mode 100644 index 0000000000..9d8fdcfdb6 --- /dev/null +++ b/docs/package-management/token.md @@ -0,0 +1,87 @@ +# vp pm token + +Manage registry authentication tokens. + +```bash +vp pm token list +vp pm token list --json +vp pm token revoke +``` + +## Options + +- `list`, also spelled `ls`, lists tokens. Supports `--json` and `--registry `. +- `create` requests a new token. Supports `--json`, `--registry `, `--readonly`, and repeatable `--cidr ` restrictions. +- `revoke ` revokes a token. Supports `--registry `. + +Treat tokens as secrets. Prefer a token ID for revocation rather than placing a raw token in shell history. Token creation and supported token types depend on the registry's current policy and the native package manager version; exposing `create` does not guarantee that a registry permits CLI token creation. + +### `list` + +| Option | Description | Notes | +| ------------------ | --------------------------- | --------------------------------- | +| `--json` | Request native JSON output. | Output retains the native schema. | +| `--registry ` | Select the registry. | | + +### `create` + +| Option | Description | Notes | +| ------------------ | ------------------------------------- | --------------------------------- | +| `--json` | Request native JSON output. | Output retains the native schema. | +| `--registry ` | Select the registry. | | +| `--cidr ` | CIDR ranges to restrict the token to. | Can be repeated. | +| `--readonly` | Create a read-only token. | | + +### `revoke` + +| Option | Description | Notes | +| ------------------ | -------------------- | ----- | +| `--registry ` | Select the registry. | | + +## Compatibility + +### `list` + +- **npm:** `npm token list`. +- **pnpm:** 12.13 or later: `pnpm token list`. Earlier versions use `npm token list` as a fallback. +- **Yarn Classic:** Fallback: `npm token list`. +- **Yarn Modern:** Fallback: `npm token list`. +- **Bun:** Fallback: `npm token list`. + +| Option | npm | pnpm | Yarn Classic | Yarn Modern | Bun | Notes | +| ------------------ | --- | ---- | ------------ | ----------- | --- | ----- | +| `--json` | Yes | Yes | Yes | Yes | Yes | | +| `--registry ` | Yes | Yes | Yes | Yes | Yes | | + +### `create` + +- **npm:** `npm token create`. +- **pnpm:** 12.13 or later: `pnpm token create`. Earlier versions use `npm token create` as a fallback. +- **Yarn Classic:** Fallback: `npm token create`. +- **Yarn Modern:** Fallback: `npm token create`. +- **Bun:** Fallback: `npm token create`. + +| Option | npm | pnpm | Yarn Classic | Yarn Modern | Bun | Notes | +| ------------------ | --- | ---- | ------------ | ----------- | --- | ----- | +| `--json` | Yes | Yes | Yes | Yes | Yes | | +| `--registry ` | Yes | Yes | Yes | Yes | Yes | | +| `--cidr ` | Yes | Yes | Yes | Yes | Yes | | +| `--readonly` | Yes | Yes | Yes | Yes | Yes | | + +### `revoke` + +- **npm:** `npm token revoke`. +- **pnpm:** 12.13 or later: `pnpm token revoke`. Earlier versions use `npm token revoke` as a fallback. +- **Yarn Classic:** Fallback: `npm token revoke`. +- **Yarn Modern:** Fallback: `npm token revoke`. +- **Bun:** Fallback: `npm token revoke`. + +| Option | npm | pnpm | Yarn Classic | Yarn Modern | Bun | Notes | +| ------------------ | --- | ---- | ------------ | ----------- | --- | ----- | +| `--registry ` | Yes | Yes | Yes | Yes | Yes | | + +`revoke` accepts one token or ID. Authentication, password prompts, and token resolution follow the native command. Vite+ does not normalize token types or output schemas. + +## Native Options + +For native options, see [npm token](https://docs.npmjs.com/cli/v11/commands/npm-token) and [pnpm token](https://pnpm.io/cli/token). To pass these options through Vite+, see [Native Arguments](./#native-arguments). diff --git a/docs/package-management/unlink.md b/docs/package-management/unlink.md new file mode 100644 index 0000000000..33480e8763 --- /dev/null +++ b/docs/package-management/unlink.md @@ -0,0 +1,33 @@ +# vp unlink + +Remove native package-manager links created for local development. + +```bash +vp unlink my-library +``` + +## Options + +An optional package name or directory is forwarded to the manager. `-r, --recursive` requests unlinking across workspaces where supported. + +| Option | Description | Notes | +| ----------------- | ---------------------------------- | ----- | +| `-r, --recursive` | Unlink in every workspace package. | | + +## Compatibility + +- **npm:** `npm unlink`. +- **pnpm:** `pnpm unlink`. +- **Yarn Classic:** `yarn unlink`. +- **Yarn Modern:** 3 or later: `yarn unlink`. Yarn 2 fails natively. +- **Bun:** `bun unlink`. + +| Option | npm | pnpm | Yarn Classic | Yarn Modern | Bun | Notes | +| ----------------- | -------------- | ---- | ------------ | ----------- | --- | -------------------------------- | +| `-r, --recursive` | 8.1.0 or later | Yes | No | 3 or later | No | npm includes the workspace root. | + +Vite+ forwards a basic unlink request to the selected manager, so unsupported native versions can fail. Operand and manifest-update behavior follow the native manager. This does not remove packages from Vite+'s [global store](./global-packages). + +## Native Options + +For native options, see [npm unlink](https://docs.npmjs.com/cli/v11/commands/npm-uninstall), [pnpm unlink](https://pnpm.io/cli/unlink), [Yarn unlink](https://yarnpkg.com/cli/unlink), [Yarn Classic unlink](https://classic.yarnpkg.com/en/docs/cli/unlink), and [Bun unlink](https://bun.com/docs/pm/cli/link). To pass these options through Vite+, see [Native Arguments](./#native-arguments). diff --git a/docs/package-management/update.md b/docs/package-management/update.md new file mode 100644 index 0000000000..44de542f7c --- /dev/null +++ b/docs/package-management/update.md @@ -0,0 +1,62 @@ +# vp update + +Update project dependencies using the selected manager's update rules. Alias: `vp up`. + +```bash +vp update +vp update react +vp update --latest +vp update -g +``` + +## Options + +| Option | Description | Notes | +| --------------------------- | -------------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `-L, --latest` | Update to latest version (ignore semver range). | Global mode clears recorded version ranges. | +| `-g, --global` | Update global packages. | Requires the global CLI. Uses the [global package store](./global-packages). | +| `--concurrency ` | Number of global package updates to run in parallel. | Requires --global. Must be a positive integer. | +| `--reinstall-node-mismatch` | Reinstall up-to-date global packages installed with a different Node.js version. | Requires --global. | +| `--ignore-node-mismatch` | Skip up-to-date global packages installed with a different Node.js version. | Requires --global. | +| `-r, --recursive` | Update recursively in all workspace packages. | | +| `--filter ` | Select workspaces by pattern. | Can be repeated. | +| `-w, --workspace-root` | Include workspace root. | | +| `-D, --dev` | Select development dependencies. | | +| `-P, --prod` | Select production dependencies. | | +| `-i, --interactive` | Interactive mode. | | +| `--no-optional` | Exclude optionalDependencies. | | +| `--no-save` | Request native no-save behavior. | | +| `--workspace` | Update only dependencies available in the workspace. | | + +## Compatibility + +The commands below describe project operations. Global mode is described under [Options](#options). + +- **npm:** `npm update`. +- **pnpm:** `pnpm update`. +- **Yarn Classic:** `yarn upgrade` or `yarn upgrade-interactive`. +- **Yarn Modern:** `yarn up`. +- **Bun:** `bun update`. + +| Option | npm | pnpm | Yarn Classic | Yarn Modern | Bun | Notes | +| --------------------------- | ---------------- | ---- | ------------ | ---------------------------- | ------------ | ----- | +| `-L, --latest` | Global mode only | Yes | Yes | Yes | Yes | | +| `-g, --global` | Yes | Yes | Yes | Yes | Yes | | +| `--concurrency ` | Yes | Yes | Yes | Yes | Yes | | +| `--reinstall-node-mismatch` | Yes | Yes | Yes | Yes | Yes | | +| `--ignore-node-mismatch` | Yes | Yes | Yes | Yes | Yes | | +| `-r, --recursive` | 8.1.0 or later | Yes | No | Yes | 1.4 or later | | +| `--filter ` | 7.14.0 or later | Yes | One filter | No | 1.4 or later | | +| `-w, --workspace-root` | 8.1.0 or later | Yes | No | No | No | | +| `-D, --dev` | Yes | Yes | No | No | 1.4 or later | | +| `-P, --prod` | Yes | Yes | Yes | No | 1.4 or later | | +| `-i, --interactive` | No | Yes | Yes | Yes | Yes | | +| `--no-optional` | Yes | Yes | Yes | No | 1.4 or later | | +| `--no-save` | Yes | Yes | No | --recursive without --latest | Yes | | +| `--workspace` | No | Yes | No | No | No | | + +To change a dependency's declared range on npm, use [add](./add) with a new version specification. Yarn Modern follows project-wide update semantics. Recursive mode without `--latest` re-resolves existing ranges without rewriting manifests; combining it with `--latest` uses ordinary `yarn up`. + +## Native Options + +For native options, see [npm update](https://docs.npmjs.com/cli/v11/commands/npm-update), [pnpm update](https://pnpm.io/cli/update), [Yarn up](https://yarnpkg.com/cli/up), [Yarn Classic upgrade](https://classic.yarnpkg.com/en/docs/cli/upgrade), [Yarn Classic upgrade-interactive](https://classic.yarnpkg.com/en/docs/cli/upgrade-interactive), and [Bun update](https://bun.com/docs/pm/cli/update). To pass these options through Vite+, see [Native Arguments](./#native-arguments). diff --git a/docs/package-management/version.md b/docs/package-management/version.md new file mode 100644 index 0000000000..cecf09fc58 --- /dev/null +++ b/docs/package-management/version.md @@ -0,0 +1,36 @@ +# vp pm version + +Run the package manager's version command. This manages package versions, not the Vite+ version displayed by `vp --version`. + +```bash +vp pm version patch +vp pm version 2.0.0 +``` + +## Options + +Supply a version or increment strategy such as `major`, `minor`, or `patch`. Omitting it retains the manager's native behavior, which may display information, prompt, or require a strategy. + +| Option | Description | Notes | +| -------- | --------------------------- | --------------------------------- | +| `--json` | Request native JSON output. | Output retains the native schema. | + +## Compatibility + +- **npm:** `npm version`. +- **pnpm:** `pnpm version`. +- **Yarn Classic:** `yarn version`. +- **Yarn Modern:** `yarn version`. +- **Bun:** 1.2.18 or later: `bun pm version`. Earlier versions warn before the command is invoked. + +| Option | npm | pnpm | Yarn Classic | Yarn Modern | Bun | Notes | +| -------- | --- | ---- | ------------ | ----------- | --- | ----- | +| `--json` | Yes | Yes | Yes | No | No | | + +Yarn Classic converts increment strategies to flags such as `--patch`. An explicit version becomes `--new-version `. Other managers retain their native operand syntax. + +Version commands can modify manifests and lockfiles and may create Git commits or tags. Vite+ preserves the selected manager's behavior. + +## Native Options + +For native options, see [npm version](https://docs.npmjs.com/cli/v11/commands/npm-version), [pnpm version](https://pnpm.io/cli/version), [Yarn version](https://yarnpkg.com/cli/version), [Yarn Classic version](https://classic.yarnpkg.com/en/docs/cli/version), and [Bun pm version](https://bun.com/docs/pm/cli/pm). To pass these options through Vite+, see [Native Arguments](./#native-arguments). diff --git a/docs/package-management/whoami.md b/docs/package-management/whoami.md new file mode 100644 index 0000000000..adc7442cc0 --- /dev/null +++ b/docs/package-management/whoami.md @@ -0,0 +1,30 @@ +# vp pm whoami + +Show the account authenticated with the registry. + +```bash +vp pm whoami +vp pm whoami --registry https://registry.npmjs.org +``` + +## Options + +| Option | Description | Notes | +| ------------------ | -------------------- | ----- | +| `--registry ` | Select the registry. | | + +## Compatibility + +- **npm:** `npm whoami`. +- **pnpm:** 11 or later: `pnpm whoami`. Earlier versions use `npm whoami` as a fallback. +- **Yarn Classic:** No command. Warns and exits successfully without performing the operation. +- **Yarn Modern:** `yarn npm whoami`. +- **Bun:** `bun pm whoami`. + +| Option | npm | pnpm | Yarn Classic | Yarn Modern | Bun | Notes | +| ------------------ | --- | ---- | ------------ | ----------- | --- | ----------------------------------------------- | +| `--registry ` | Yes | Yes | No | No | Yes | Configure the registry in Yarn Modern settings. | + +## Native Options + +For native options, see [npm whoami](https://docs.npmjs.com/cli/v11/commands/npm-whoami), [pnpm whoami](https://pnpm.io/cli/whoami), [Yarn npm whoami](https://yarnpkg.com/cli/npm/whoami), and [Bun pm whoami](https://bun.com/docs/pm/cli/pm). To pass these options through Vite+, see [Native Arguments](./#native-arguments). diff --git a/docs/package-management/why.md b/docs/package-management/why.md new file mode 100644 index 0000000000..a8e1b4bafb --- /dev/null +++ b/docs/package-management/why.md @@ -0,0 +1,55 @@ +# vp why + +Explain why a dependency is installed. Alias: `vp explain`. + +```bash +vp why react +vp why react --json +vp why react --filter web +``` + +## Options + +| Option | Description | Notes | +| ------------------------- | ----------------------------------------------- | --------------------------------- | +| `--json` | Request native JSON output. | Output retains the native schema. | +| `--long` | Show extended information. | | +| `--parseable` | Show parseable output. | | +| `-r, --recursive` | Check recursively across all workspaces. | | +| `--filter ` | Select workspaces by pattern. | Can be repeated. | +| `-w, --workspace-root` | Check in workspace root. | | +| `-P, --prod` | Only production dependencies. | | +| `-D, --dev` | Only dev dependencies. | | +| `--depth ` | Limit tree depth. | | +| `--no-optional` | Exclude optional dependencies. | | +| `--exclude-peers` | Exclude peer dependencies. | | +| `--find-by ` | Use a finder function defined in .pnpmfile.cjs. | | + +## Compatibility + +- **npm:** `npm explain`. +- **pnpm:** `pnpm why`. +- **Yarn Classic:** `yarn why`. With multiple package names, warns and checks only the first. +- **Yarn Modern:** `yarn why`. With multiple package names, warns and checks only the first. +- **Bun:** `bun why`. + +| Option | npm | pnpm | Yarn Classic | Yarn Modern | Bun | Notes | +| ------------------------- | --------------- | ---------------- | ------------ | ----------- | --- | -------------------------------------- | +| `--json` | Yes | Yes | Yes | Yes | No | | +| `--long` | No | Yes | No | No | No | | +| `--parseable` | No | Yes | No | No | No | | +| `-r, --recursive` | 7.14.0 or later | Yes | No | Yes | No | | +| `--filter ` | 7.14.0 or later | Yes | No | No | No | | +| `-w, --workspace-root` | No | Yes | No | No | No | | +| `-P, --prod` | No | Yes | No | No | No | | +| `-D, --dev` | No | Yes | No | No | No | | +| `--depth ` | No | Yes | No | No | Yes | | +| `--no-optional` | No | Yes | No | No | No | | +| `--exclude-peers` | No | Yes | No | Yes | No | Yarn Modern includes peers by default. | +| `--find-by ` | No | 10.16.0 or later | No | No | No | | + +The dependency graph does not include tools Vite+ bundles or compiles. For readable output, Vite+ shows a hint when it also provides the requested package. Use `vp toolchain [tool]` to inspect bundled tools. + +## Native Options + +For native options, see [npm explain](https://docs.npmjs.com/cli/v11/commands/npm-explain), [pnpm why](https://pnpm.io/cli/why), [Yarn why](https://yarnpkg.com/cli/why), [Yarn Classic why](https://classic.yarnpkg.com/en/docs/cli/why), and [Bun why](https://bun.com/docs/pm/cli/why). To pass these options through Vite+, see [Native Arguments](./#native-arguments). diff --git a/docs/public/_redirects b/docs/public/_redirects index 8b5c09d772..91073c3213 100644 --- a/docs/public/_redirects +++ b/docs/public/_redirects @@ -1,6 +1,9 @@ /vp-setup https://setup.viteplus.dev 302 -/guide/install /guide/package-management 301 -/guide/install.html /guide/package-management 301 -/guide/install.md /guide/package-management.md 301 +/guide/install /package-management/install 301 +/guide/install.html /package-management/install 301 +/guide/install.md /package-management/install.md 301 /guide/installer-env-vars /guide/global-cli 301 /guide/installer-env-vars.html /guide/global-cli 301 +/guide/package-management /package-management/ 301 +/guide/package-management.html /package-management/ 301 +/guide/package-management.md /package-management/ 301