Skip to content

Enforce yarn version#162610

Merged
joaomoreno merged 2 commits into
microsoft:mainfrom
mrienstra:patch-1
Oct 5, 2022
Merged

Enforce yarn version#162610
joaomoreno merged 2 commits into
microsoft:mainfrom
mrienstra:patch-1

Conversation

@mrienstra

Copy link
Copy Markdown
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