Skip to content

Move global pm commands into a separate vp global command #1667

@liangmiQwQ

Description

@liangmiQwQ

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.

Footnotes

  1. If vp global command is an acceptable solution here, how to process vp [commands] -g there may be worth discussing.**

Metadata

Metadata

Assignees

No one assigned

    Priority

    None yet

    Start date

    None yet

    Target date

    None yet

    Effort

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions