Skip to content
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

Use packageManager defined in package.json when yarn-version is not specified in yarn action #11

Merged
merged 2 commits into from
May 21, 2024

Conversation

lzm0
Copy link
Contributor

@lzm0 lzm0 commented May 21, 2024

Every package manager needs a package manager to manage it's own version, which is why corepack exists.
It looks for the packageManager field in package.json and make the yarn command point to that version.
So instead of hard-coding yarn-version to 3.6.4 in action.yml, we let corepack to decide which version to use.
Note that if the yarn version is not specified in the action input nor in package.json, yarn classic (v1.22.22) will be used.

Copy link
Contributor

@jsoref jsoref left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems ok to me...

@lzm0 lzm0 force-pushed the yarn-upgrade branch 3 times, most recently from 942ccdd to e4a08e3 Compare May 21, 2024 18:30
@lzm0 lzm0 merged commit d933fd8 into main May 21, 2024
7 checks passed
@lzm0 lzm0 deleted the yarn-upgrade branch May 21, 2024 18:59
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 this pull request may close these issues.

None yet

3 participants