Skip to content

Support Yarn plugin commands in vp pm #1539

Closed

Description

@crusty-voidzero

Describe the feature

vp pm is not currently a full replacement for invoking package managers directly in all cases.

A concrete gap called out in #1309 is support for yarn plugin ... commands. Right now, one reason users still need access to the actual yarn binary is that these plugin-management commands are not available through vp pm.

If the long-term direction is for Vite+ shims or package-manager commands to replace direct yarn/pnpm usage, vp pm needs to cover these workflows too.

Motivation

This came up in the discussion on #1309:

vp pm doesn't support the yarn plugin ... commands, so it's not a full replacement to having access to the correct version of yarn for instance.

Without this support, adding shims alone may still leave gaps for users who rely on Yarn plugin commands.

Suggested direction

  • Add support for yarn plugin ... commands via vp pm
  • Or document the intended alternative if these commands are intentionally out of scope

Reproduction

  1. Use a project/workflow that relies on yarn plugin ...
  2. Try to perform the same action through vp pm
  3. Observe that the workflow is not currently supported

Activity

  1. self-assigned this
    on May 9, 2026
  2. rChaoz commented on May 9, 2026

    @rChaoz
    Contributor

    If vite-plus is to shim PMs in the future, I think it's worth noting that it should maybe bypass unknown commands automatically.

    If yarn ever adds a yarn whatever command, I expect vp pm whatever to simply call yarn directly, without doing anything else. Is there an issue with this approach?

  3. jong-kyung commented on May 9, 2026

    @jong-kyung
    Collaborator

    @rChaoz Same tension I've been wrestling with.

    I was planning explicit mapping — vp pm yarn-plugin <sub> wrapping each yarn plugin command, consistent with Owner / Token / DistTag. Yarn 2+ dispatches; other PMs warn and exit 0.

    But that makes it the first PmCommands variant where 4 of 5 PMs only print a warning.

    @fengmk2 — should vp pm carry single-PM-only commands, or is yarn plugin better left out of scope?

  4. fengmk2 commented on May 9, 2026

    @fengmk2
    Member

    According to the current design, it will be placed under vp pm plugin, and will only take effect under yarn. In pnpm and npm, warning messages will be printed as a reminder, which can refer to the existing pm subcommands.

  5. added a commit that references this issue on May 11, 2026
    adbacfb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions