Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions packages/cli/snap-tests-global/command-config-npm10/snap.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
> vp pm config --help # should show help
Usage: vp pm config <COMMAND>

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
Expand Down
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
17 changes: 17 additions & 0 deletions packages/cli/snap-tests-global/command-config-yarn1/snap.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
> vp pm config --help # should show help
Usage: vp pm config <COMMAND>

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<semver>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)"
Expand Down
17 changes: 17 additions & 0 deletions packages/cli/snap-tests-global/command-config-yarn4/snap.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
> vp pm config --help # should show help
Usage: vp pm config <COMMAND>

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"

Expand Down
Original file line number Diff line number Diff line change
@@ -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)"
Expand Down
Loading