Skip to content

fix: bump Yarn to 4.14.1#244

Merged
chloeYue merged 3 commits into
mainfrom
fix/bump-yarn-to-4.14.1
May 11, 2026
Merged

fix: bump Yarn to 4.14.1#244
chloeYue merged 3 commits into
mainfrom
fix/bump-yarn-to-4.14.1

Conversation

@chloeYue
Copy link
Copy Markdown
Contributor

@chloeYue chloeYue commented May 11, 2026

Summary

Aligns Yarn to Yarn 4.14.1 so that create-platform-release-pr.sh no longer crashes the release-automation when a consumer repo's .yarnrc.yml declares Yarn-4.14-only settings such as approvedGitRepositories.

Root cause

After MetaMask/metamask-extension#42366 merged, the file .yarnrc.yml now contains:

approvedGitRepositories: []

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

Usage Error: Unrecognized or legacy configuration settings found:
approvedGitRepositories - run "yarn config" to see the list of settings supported in Yarn
 (in .../metamask-extension/.yarnrc.yml, .../metamask-extension/github-tools/.yarnrc.yml)
##[error]Process completed with exit code 1.

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.sh to prepare/activate Yarn 4.14.1 (via corepack) when installing and running gen:commits in github-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.

chloeYue and others added 2 commits May 11, 2026 15:39
…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>
@chloeYue chloeYue changed the title fix: bump Yarn to 4.14.1 so create-platform-release-pr supports approvedGitRepositories fix: bump Yarn to 4.14.1 May 11, 2026
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>
@chloeYue chloeYue requested a review from Gudahtt May 11, 2026 15:41
Copy link
Copy Markdown
Member

@Gudahtt Gudahtt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@chloeYue chloeYue merged commit 906aa36 into main May 11, 2026
10 checks passed
@chloeYue chloeYue deleted the fix/bump-yarn-to-4.14.1 branch May 11, 2026 16:43
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