Skip to content

Use yarn --version to determine if modern yarn#3503

Open
yzhang-stytch wants to merge 2 commits intoexpo:mainfrom
yzhang-stytch:yijiang/update-using-modern-version
Open

Use yarn --version to determine if modern yarn#3503
yzhang-stytch wants to merge 2 commits intoexpo:mainfrom
yzhang-stytch:yijiang/update-using-modern-version

Conversation

@yzhang-stytch
Copy link

Why

eas-cli was failing for us in CI because it was using yarn 1 install command parameters when we are using yarn 4. The logic for determining whether .yarnrc exists should have worked for us, so I'm not entirely sure why the old logic stopped working.

How

On the other hand just asking yarn which version it is would work better than trying to infer it from the presence of an rc file. There's nothing else that tries to read the rc file so I think this should be strictly better.

Test Plan

  • Made sure yarn --version returns just a version string for both classic and berry
  • Add a small test to make sure the output is correct while mocking spawn

@yzhang-stytch yzhang-stytch marked this pull request as ready for review March 16, 2026 18:50
@github-actions
Copy link

Subscribed to pull request

File Patterns Mentions
**/* @douglowder

Generated by CodeMention

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.

2 participants