Yarn upgrade-interactive (#5796)
* Add Yarn upgrade-ineractive CLI command
* Remove dots at the end of completions
Diff
1diff --git a/plugins/yarn/yarn.plugin.zsh b/plugins/yarn/yarn.plugin.zsh
2index 939820edb41e4f73b104de229816f985278379b2..eee811b16100a86e9800fabc7d1f3ad8d9dd73f8 100644
3--- a/plugins/yarn/yarn.plugin.zsh
4+++ b/plugins/yarn/yarn.plugin.zsh
5@@ -28,24 +28,30 @@ _yarn ()
6 7 _production=('(--production)--production[Do not install project devDependencies]')
8 9+ _upgrade=(
10+ '(--exact)--exact[Install exact version]'
11+ '(--tilde)--tilde[Install most recent release with the same minor version]'
12+ )
13+
14 _1st_arguments=(
15 'help:Display help information about yarn' \
16- 'init:Initialize for the development of a package.' \
17- 'add:Add a package to use in your current package.' \
18- 'install:Install all the dependencies listed within package.json in the local node_modules folder.' \
19- 'publish:Publish a package to a package manager.' \
20- 'remove:Remove a package that will no longer be used in your current package.' \
21- 'cache:Clear the local cache. It will be populated again the next time yarn or yarn install is run.' \
22- 'clean:Frees up space by removing unnecessary files and folders from dependencies.' \
23- 'check:Verifies that versions of the package dependencies in the current project’s package.json matches that of yarn’s lock file.' \
24- 'ls:List all installed packages.' \
25- 'global:Makes binaries available to use on your operating system.' \
26- 'info:<package> [<field>] - fetch information about a package and return it in a tree format.' \
27- 'outdated:Checks for outdated package dependencies.' \
28- 'run:Runs a defined package script.' \
29- 'self-update:Updates Yarn to the latest version.' \
30- 'upgrade:Upgrades packages to their latest version based on the specified range.' \
31- 'why:<query> - Show information about why a package is installed.'
32+ 'init:Initialize for the development of a package' \
33+ 'add:Add a package to use in your current package' \
34+ 'install:Install all the dependencies listed within package.json in the local node_modules folder' \
35+ 'publish:Publish a package to a package manager' \
36+ 'remove:Remove a package that will no longer be used in your current package' \
37+ 'cache:Clear the local cache. It will be populated again the next time yarn or yarn install is run' \
38+ 'clean:Frees up space by removing unnecessary files and folders from dependencies' \
39+ 'check:Verifies that versions of the package dependencies in the current project’s package.json matches that of yarn’s lock file' \
40+ 'ls:List all installed packages' \
41+ 'global:Makes binaries available to use on your operating system' \
42+ 'info:<package> [<field>] - fetch information about a package and return it in a tree format' \
43+ 'outdated:Checks for outdated package dependencies' \
44+ 'run:Runs a defined package script' \
45+ 'self-update:Updates Yarn to the latest version' \
46+ 'upgrade:Upgrades packages to their latest version based on the specified range' \
47+ 'upgrade-interactive:Selectively upgrades specific packages in a simple way' \
48+ 'why:<query> - Show information about why a package is installed'
49 )
50 _arguments \
51 '*:: :->subcmds' && return 0
52@@ -78,6 +84,10 @@ _yarn ()
53 _arguments \
54 $_dopts
55 ;;
56+ upgrade-interactive)
57+ _arguments \
58+ $_upgrade
59+ ;;
60 *)
61 _arguments \
62 ;;