fix: bump Yarn to 4.14.1#244
Merged
Merged
Conversation
…ovedGitRepositories`
`create-platform-release-pr.sh` runs `yarn install` inside `./github-tools/`
while the *consumer* repository's `.yarnrc.yml` (one level up) is also
read by Yarn. Newer consumer repos (e.g. metamask-extension after #42366)
declare `approvedGitRepositories`, which was introduced in Yarn 4.14.
The bundled `yarn-4.10.3.cjs` rejects it as a legacy/unknown setting and
the entire release-automation step exits with:
Usage Error: Unrecognized or legacy configuration settings found:
approvedGitRepositories
This kills the version-bump PR creation that follows the changelog step
(see metamask-extension run 25516421334), and forces the release
manager to open the bump PR by hand.
Aligning every Yarn touchpoint in this repo to 4.14.1 fixes it:
* `.yarn/releases/yarn-4.10.3.cjs` → `.yarn/releases/yarn-4.14.1.cjs`
(the bundle that `yarnPath` actually delegates to)
* `.yarnrc.yml` `yarnPath` updated to match
* `package.json` `packageManager` updated to `yarn@4.14.1`
* `create-platform-release-pr.sh` `corepack prepare yarn@4.5.1` →
`corepack prepare yarn@4.14.1`, with a comment explaining the
invariant so the next bump touches all four together.
After this change, Yarn announces `Yarn 4.14.1` when invoked in
`./github-tools/` even when the parent `.yarnrc.yml` carries
`approvedGitRepositories: []`, and `yarn install` proceeds normally.
Co-authored-by: Cursor <cursoragent@cursor.com>
Yarn 4.14 upgrades lockfile __metadata.version from 8 to 9. CI runs immutable installs (YN0028) so the committed lockfile must match. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Aligns Yarn to Yarn 4.14.1 so that
create-platform-release-pr.shno longer crashes the release-automation when a consumer repo's.yarnrc.ymldeclares Yarn-4.14-only settings such asapprovedGitRepositories.Root cause
After MetaMask/metamask-extension#42366 merged, the file
.yarnrc.ymlnow contains:the setting was introduced in Yarn 4.14. Yarn 4.10.3 rejects it:
https://github.com/MetaMask/metamask-extension/actions/runs/25516421334/job/74896684039
So the workflow "Create Release PR" stops working, the PR bump the yarn version to fix the "Create Release PR" workflow.
Changes
Follow-ups for whoever ships this
Note
Low Risk
Low risk: a single change to the release automation script that only affects the Yarn version used during changelog/test-plan generation.
Overview
Updates
create-platform-release-pr.shto prepare/activate Yarn4.14.1(viacorepack) when installing and runninggen:commitsingithub-tools, preventing release automation failures in consumer repos that rely on newer Yarn config options.Reviewed by Cursor Bugbot for commit b39a776. Bugbot is set up for automated code reviews on this repo. Configure here.