fix: correctly install Yarn 1 dependencies in CI when Yarn 4 is available globally - #77
Conversation
…able globally Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Code Review Summary This PR fixes CI dependency installation for the reusable Issues Found No blocking issues. The logic is sound and I verified the key assumptions against the repo:
🟢 Suggestion — cache path only covers Yarn 1 (Classic). The install step deliberately supports Yarn 2/3/4 (Berry), but the cache 🟢 Suggestion — redundant Corepack enable. Areas Reviewed
Questions for Author
Overall this looks good to merge once the CI run confirms the Corepack activation path. |
This PR updates the
setup-and-installaction that runs in therun-danger-yarnworkflow so that it correctly installs dependencies with Yarn 1, even though the CI environment has Yarn 4 available globally.This is done by explicitly activating the correct Yarn version via Corepack before installing, so the project's Yarn 1 is used rather than the globally installed Yarn 4.
There are also 2 other optimizations made in this PR:
run it.
The motivation for this change was receiving the following failure in the
run-danger-yarnworkflow after upgrading danger to 13.0.10 in #76:Setup Node and Install Dependencies
This shows that CI is using Yarn 4 despite the project being configured for Yarn 1, and Yarn 4 refusing to resolve packages from a Yarn 1 lockfile."
🤖 Generated with Claude Code