Skip to content

Corepack use should allow omitting version #298

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

Open
rotu opened this issue Sep 3, 2023 · 2 comments · May be fixed by #300
Open

Corepack use should allow omitting version #298

rotu opened this issue Sep 3, 2023 · 2 comments · May be fixed by #300

Comments

@rotu
Copy link

rotu commented Sep 3, 2023

The command corepack use requires specifying a version.

e.g. corepack use 'yarn@*'

This command should allow simply corepack use yarn.

@aduh95
Copy link
Contributor

aduh95 commented Sep 3, 2023

That sounds reasonable. Would you like to send a PR?

@rotu
Copy link
Author

rotu commented Sep 3, 2023

I can try a PR.

I'm very confused about what corepack's "pattern" even means and how it should or shouldn't align with the related concept of a "package spec":

npm exec --package yarn -c 'yarn --version'
1.22.19
npm exec --package 'yarn@*' -c 'yarn --version'
1.22.19
yarn dlx --package 'yarn' yarn --version
1.22.19
yarn dlx --package 'yarn@*' yarn --version
2.4.3

None of these match the current behavior (yarn@*=4.0.0-rc.50), and none of the yarn dist-tags (yarn@berry, @latest, @legacy, @rc) seem to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants