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

fix: yarn version detection #49

Merged
merged 3 commits into from
Dec 22, 2022

Conversation

rrooding
Copy link
Contributor

Because the Yarn version does not start with a v the first character should not be cut off. This is true for all major yarn versions:

$ yarn -v
1.22.19

$ yarn set version 2
2.4.3

$ yarn set version latest
3.3.0

Because of this the action currently falls back to yarn berry and this means that if you use yarn 1.x, caching does not work:
yarn1

I'm not sure how to write a test for this since the workflow works but only gives a warning in the last step.

@meeroslav meeroslav self-assigned this Dec 16, 2022
Copy link
Collaborator

@meeroslav meeroslav left a comment

Choose a reason for hiding this comment

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

Looks good to me.

Can you also patch the version in https://github.com/nrwl/ci/blob/main/README.md and https://github.com/nrwl/ci/blob/main/package.json to 0.11.1 so this fix is automatically accessible?

@rrooding
Copy link
Contributor Author

Done 👍

Copy link
Collaborator

@JamesHenry JamesHenry left a comment

Choose a reason for hiding this comment

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

Please see comment

.github/workflows/nx-cloud-main.yml Show resolved Hide resolved
@JamesHenry JamesHenry changed the title Yarn version detection always falls back to Yarn Berry fix: yarn version detection Dec 22, 2022
@JamesHenry JamesHenry enabled auto-merge (squash) December 22, 2022 14:59
@JamesHenry JamesHenry merged commit 57e3ef5 into nrwl:main Dec 22, 2022
@JamesHenry
Copy link
Collaborator

Thanks again @rrooding! It's been released

@rrooding rrooding deleted the fix-yarn-version-detection branch December 22, 2022 16:06
sebpalluel pushed a commit to sebpalluel/ci that referenced this pull request Mar 29, 2023
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.

3 participants