Description
Vite+ has an own global package management logic, it's designed mainly for global binaries to deal with different node versions.
Now, It uses vp [pm] -g as the entry, but considering vp [pm] without -g delegates commands to underlying package manager, it sometimes makes users confused.
For example, in #1644, the reason why vp link linked package does not appear in the vp list -g output is just related to the problems above.
Suggested solution
Yarn's global package management might be a model worth learning from. Different from most pms, yarn does not -g flag such as yarn install -g vue to mark global installation; instead, it implemented a separate yarn global update/install command.
For Vite+, we can also use this command style. Make vp global used to manage Vite+'s global packages, and keep vp [commands] -g using underlying package managers with a confirm prompt / warn1.
Additional context
This issue is reference from #1644 (comment) and #1644 (comment). It can also help decide #1621 as it makes vp global a separate concept.
Description
Vite+ has an own global package management logic, it's designed mainly for global binaries to deal with different node versions.
Now, It uses
vp [pm] -gas the entry, but consideringvp [pm]without-gdelegates commands to underlying package manager, it sometimes makes users confused.For example, in #1644, the reason why
vp linklinked package does not appear in thevp list -g outputis just related to the problems above.Suggested solution
Yarn's global package management might be a model worth learning from. Different from most pms, yarn does not
-gflag such asyarn install -g vueto mark global installation; instead, it implemented a separateyarn global update/installcommand.For Vite+, we can also use this command style. Make
vp globalused to manage Vite+'s global packages, and keepvp [commands] -gusing underlying package managers with a confirm prompt / warn1.Additional context
This issue is reference from #1644 (comment) and #1644 (comment). It can also help decide #1621 as it makes
vp globala separate concept.Footnotes
If
vp globalcommand is an acceptable solution here, how to processvp [commands] -gthere may be worth discussing.** ↩