Skip to content

Ecosystem: yarn global packages #48

Description

@trsdn

Follow-up to #47 (pnpm ecosystem support), scoped out on purpose rather than half-verified.

What's different about yarn

Checked for real against the yarn corepack shim (resolves to Yarn Classic 1.22.22 on a real machine): yarn global outdated does not exist as a subcommand at all.

$ yarn global outdated --json
{"type":"error","data":"Invalid subcommand. Try \"add, bin, dir, ls, list, remove, upgrade, upgrade-interactive\""}

So the npm/pnpm pattern (<tool> outdated --global --json → one JSON object with current/wanted/latest) does not carry over. A working YarnEcosystem needs:

  1. yarn global list --json (or similar) to get installed packages + versions — need to verify the real output shape (yarn's --json mode emits newline-delimited {"type":...,"data":...} objects, not a single clean object, based on the error output shape above).
  2. A separate registry lookup per installed package to find its latest version (there's no combined "outdated" command to lean on).
  3. Handling that yarn "global" resolves through Corepack, which may silently swap between Yarn Classic (1.x, what's default here) and Yarn Berry (2+, very different CLI and config model — yarn global doesn't even exist the same way in Berry). Detecting which one is active before choosing a strategy is its own small problem.

Scope

Design + implement YarnEcosystem (or decide it isn't worth the complexity for global CLI tools, which are less commonly yarn-managed than pnpm/npm-managed) — after verifying the real command shapes directly, the same way #47's PnpmEcosystem was.

🤖 Filed by Claude Code during real verification work for #47.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions