-
Notifications
You must be signed in to change notification settings - Fork 175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Why do transparent
commands use hardcoded versions?
#202
Comments
That sounds like a bug to me. Would you like to send a PR to fix that? |
Context for this issue: yarnpkg/berry#4850 (comment)
Indeed, ideally it should only do that if the version it would have used doesn't support |
Working on it! |
const fallbackReference = isTransparentCommand
? definition.transparent.default ?? defaultVersion
: defaultVersion; When E.g. if: ( Running This code gives the desired result: const fallbackReference = defaultVersion ?? definition.transparent.default; Now, running I'm a little confused about why this was written the way it was in #19 (what problems were being solved), I'm guessing Maybe the intended behavior was:
Oh, and only What's the thinking behind defaulting to Yarn v1 (classic)? Given that Yarn v2 was released over 2.5 years ago, and Yarn v1 entered maintenance mode at the same time. Granted, from |
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
to3.2.4
usingcorepack prepare [email protected] --activate
(orcorepack prepare yarn@stable --activate
) would result inyarn dlx
usingyarn
3.2.4
, so I was a bit surprised to hear that this is not the case.Edit: Work around, as per Corepack docs:
The text was updated successfully, but these errors were encountered: