diff --git a/packages/cli/snap-tests-global/command-config-npm10/snap.txt b/packages/cli/snap-tests-global/command-config-npm10/snap.txt index f11ced1d74..1b307114b4 100644 --- a/packages/cli/snap-tests-global/command-config-npm10/snap.txt +++ b/packages/cli/snap-tests-global/command-config-npm10/snap.txt @@ -1,3 +1,20 @@ +> vp pm config --help # should show help +Usage: vp pm config + +Manage package manager configuration + +Commands: + list List all configuration + get Get configuration value + set Set configuration value + delete Delete configuration key + +Options: + -h, --help Print help + +Documentation: https://viteplus.dev/guide/install + + > # vp pm config set vite-plus-pm-config-test-key test-value --location project # npm set will check valid keys start from npm v9, see https://github.com/npm/cli/issues/5852 > vp pm config get vite-plus-pm-config-test-key --location project # should get config value from project scope test-value diff --git a/packages/cli/snap-tests-global/command-config-npm10/steps.json b/packages/cli/snap-tests-global/command-config-npm10/steps.json index 7fcbc21206..32be5ddaf1 100644 --- a/packages/cli/snap-tests-global/command-config-npm10/steps.json +++ b/packages/cli/snap-tests-global/command-config-npm10/steps.json @@ -1,5 +1,6 @@ { "commands": [ + "vp pm config --help # should show help", "# vp pm config set vite-plus-pm-config-test-key test-value --location project # npm set will check valid keys start from npm v9, see https://github.com/npm/cli/issues/5852", "vp pm config get vite-plus-pm-config-test-key --location project # should get config value from project scope", "vp pm config delete vite-plus-pm-config-test-key --location project && cat .npmrc # should delete config key from project scope" diff --git a/packages/cli/snap-tests-global/command-config-yarn1/snap.txt b/packages/cli/snap-tests-global/command-config-yarn1/snap.txt index 089b38aae3..db7218a9e3 100644 --- a/packages/cli/snap-tests-global/command-config-yarn1/snap.txt +++ b/packages/cli/snap-tests-global/command-config-yarn1/snap.txt @@ -1,3 +1,20 @@ +> vp pm config --help # should show help +Usage: vp pm config + +Manage package manager configuration + +Commands: + list List all configuration + get Get configuration value + set Set configuration value + delete Delete configuration key + +Options: + -h, --help Print help + +Documentation: https://viteplus.dev/guide/install + + > vp pm config set vite-plus-pm-config-test-key test-value --location project # should set config value in project scope (shows warning for yarn@1) warn: yarn@1 does not support --location, ignoring flag yarn config v diff --git a/packages/cli/snap-tests-global/command-config-yarn1/steps.json b/packages/cli/snap-tests-global/command-config-yarn1/steps.json index 1dd7b227d5..ce8c38f312 100644 --- a/packages/cli/snap-tests-global/command-config-yarn1/steps.json +++ b/packages/cli/snap-tests-global/command-config-yarn1/steps.json @@ -3,6 +3,7 @@ "NODE_OPTIONS": "--no-deprecation" }, "commands": [ + "vp pm config --help # should show help", "vp pm config set vite-plus-pm-config-test-key test-value --location project # should set config value in project scope (shows warning for yarn@1)", "vp pm config get vite-plus-pm-config-test-key --location project # should get config value from project scope (shows warning for yarn@1)", "vp pm config delete vite-plus-pm-config-test-key --location project # should delete config key from project scope (shows warning for yarn@1)" diff --git a/packages/cli/snap-tests-global/command-config-yarn4/snap.txt b/packages/cli/snap-tests-global/command-config-yarn4/snap.txt index 4653857497..e983fad16e 100644 --- a/packages/cli/snap-tests-global/command-config-yarn4/snap.txt +++ b/packages/cli/snap-tests-global/command-config-yarn4/snap.txt @@ -1,3 +1,20 @@ +> vp pm config --help # should show help +Usage: vp pm config + +Manage package manager configuration + +Commands: + list List all configuration + get Get configuration value + set Set configuration value + delete Delete configuration key + +Options: + -h, --help Print help + +Documentation: https://viteplus.dev/guide/install + + [1]> vp pm config set vite-plus-pm-config-test-key test-value --location project # should set config value in project scope Usage Error: Couldn't find a configuration settings named "vite-plus-pm-config-test-key" diff --git a/packages/cli/snap-tests-global/command-config-yarn4/steps.json b/packages/cli/snap-tests-global/command-config-yarn4/steps.json index 5da176346e..79cecc30c6 100644 --- a/packages/cli/snap-tests-global/command-config-yarn4/steps.json +++ b/packages/cli/snap-tests-global/command-config-yarn4/steps.json @@ -1,5 +1,6 @@ { "commands": [ + "vp pm config --help # should show help", "vp pm config set vite-plus-pm-config-test-key test-value --location project # should set config value in project scope", "vp pm config get vite-plus-pm-config-test-key --location project # should get config value from project scope", "vp pm config delete vite-plus-pm-config-test-key --location project # should delete config key from project scope (uses yarn config unset)"