Skip to content

vp why -g and vp outdated -g should check global packages managed by Vite+ #1656

Closed

Description

@liangmiQwQ

Describe the bug

Ideally, all global pm commands in Vite+ like vp outdated -g, vp update -g, vp install -g, vp uninstall -g should be used to control packages inside ~/.vite-plus/packages.

However, vp outdated -g and vp why -g here just delegate the command to npm with a --global field, makes it show packages managed by the corresponding pm, not Vite+'s global packages.

It needs Vite+ to implement vp outdated -g and vp why -g here.

Reproduction

https://github.com/liang-demos/vp-global-outdated.git

Steps to reproduce

vp outdated -g

Validations

Activity

  1. added theissue type on May 21, 2026
  2. fengmk2 commented on May 21, 2026

    @fengmk2
    Member

    @liangmiQwQ Are you willing to continue fixing such problems?

  3. liangmiQwQ commented on May 21, 2026

    @liangmiQwQ
    CollaboratorAuthor

    Yeah

  4. liangmiQwQ commented on May 23, 2026

    @liangmiQwQ
    CollaboratorAuthor

    vp outdated -g is implemented in #1659.

    However, I am a little hesitate about whether to add vp why -g. Semantically speaking, Vite+'s global packages are isolated under $VP_HOME/packages, means they won't share dependency graph. why normally explains why a dependency exists in a workspace or shared structure.

    What's more, I found that npm itself does not support global why commands, and neither does yarn. This can help reflect why -g doesn't seem to have much meaning. The missing npm why -g also makes implementation more difficult (we have to direct to package's node_module and let npm to analyze it as a workspace, then merge and modify npm's result into a big json and finally print it in a certain struct.)

    Based on that, I personally would prefer just remove vp why -g, or add a unsupported flag.

    What do you think of it? @fengmk2

  5. liangmiQwQ commented on May 30, 2026

    @liangmiQwQ
    CollaboratorAuthor

    vp outdated -g is implemented in #1659.

    However, I am a little hesitate about whether to add vp why -g. Semantically speaking, Vite+'s global packages are isolated under $VP_HOME/packages, means they won't share dependency graph. why normally explains why a dependency exists in a workspace or shared structure.

    What's more, I found that npm itself does not support global why commands, and neither does yarn. This can help reflect why -g doesn't seem to have much meaning. The missing npm why -g also makes implementation more difficult (we have to direct to package's node_module and let npm to analyze it as a workspace, then merge and modify npm's result into a big json and finally print it in a certain struct.)

    Based on that, I personally would prefer just remove vp why -g, or add a unsupported flag.

    What do you think of it? @fengmk2

    @fengmk2 Sorry for pinging, but please take a look there when you are free, thanks a lot.

  6. fengmk2 commented on May 30, 2026

    @fengmk2
    Member

    @liangmiQwQ Agreed, vp why doesn't need to support the -g flag.

  7. added this to the Beta milestone on May 30, 2026
  8. added a commit that references this issue on May 31, 2026
    d64f82f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

Fields

Priority

None yet

Effort

None yet

Target date

None yet

Start date

None yet

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions