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

Enforce yarn version #162610

Merged
merged 2 commits into from
Oct 5, 2022
Merged

Enforce yarn version #162610

merged 2 commits into from
Oct 5, 2022

Conversation

mrienstra
Copy link
Contributor

Closes #162609.

Actually requires >=1.10.1 and <2, but was only enforcing >= 1 or >= x.10. Granted, there is no yarn v3.10 yet, but there may be someday. And if it actually requires >=1.10.1 (and not just >=1.10.0) as the error states, it should enforce that as well.

I initially mimicked the node.js version checking code, which only gives a warning if node.js >= 17, but now I'm not sure that makes sense, as yarn >= 2 will always fail without changes to support it. For example, build/lib/dependencies.ts relies on yarn list, which is not in yarn >=2, it would need to detect this and support the usage of yarn info as a substitute. (I'm sure there are many more changes that would be needed, that's just an example, I didn't dig too deep)

I pushed a 2nd commit to instead error on yarn >= 2.

Actually require >=1.10.1 and <2
@mjbvz mjbvz assigned joaomoreno and unassigned mjbvz Oct 3, 2022
@joaomoreno joaomoreno added this to the October 2022 milestone Oct 5, 2022
@joaomoreno joaomoreno merged commit 625fec9 into microsoft:main Oct 5, 2022
@mrienstra mrienstra deleted the patch-1 branch October 5, 2022 22:31
@github-actions github-actions bot locked and limited conversation to collaborators Nov 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

build/npm/preinstall.js doesn't enforce required yarn version properly
4 participants