nodejs / nodejs/corepack

Why do Yarn "transparent" commands use hardcoded versions?

Open
#202 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
3.8k
Forks
279
Avg merge
1h 47m
Merged PRs (30d)
2

Description

And is there any way to override this behavior?

Current transparent commands and associated versions:
npm init 8.19.2
npx 8.19.2
pnpm init 7.12.2
pnpx 7.12.2
pnpm dlx 7.12.2
yarn dlx 3.2.3

I would have guessed that e.g. updating yarn to 3.2.4 using corepack prepare yarn@3.2.4 --activate (or corepack prepare yarn@stable --activate) would result in yarn dlx using yarn 3.2.4, so I was a bit surprised to hear that this is not the case.

Edit: Work around, as per Corepack docs:

corepack yarn@3.2.4 dlx create-astro

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by checking Corepack's transparent-command version handling and the Corepack documentation linked in the issue. Compare the documented corepack yarn@3.2.4 dlx create-astro workaround with the requested override behavior; done means explaining the hardcoded versions and whether an override is supported.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, typescript
Domain
cli, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.