Skip to content

chore: migrate to yarn berry#1326

Merged
aws-cdk-automation merged 2 commits intomainfrom
mrgrain/chore/yarn-berry
Apr 10, 2026
Merged

chore: migrate to yarn berry#1326
aws-cdk-automation merged 2 commits intomainfrom
mrgrain/chore/yarn-berry

Conversation

@mrgrain
Copy link
Copy Markdown
Contributor

@mrgrain mrgrain commented Apr 10, 2026

This migrates the monorepo from Yarn Classic to Yarn Berry by enabling the yarnBerry projen option and re-synthesizing the project.

Yarn Classic (v1) has been in maintenance mode for years and Yarn Berry provides better dependency resolution, improved performance, and stricter dependency management. This is a necessary step to keep the toolchain current and benefit from ongoing improvements in the Yarn ecosystem.

The manual changes in .projenrc.ts enable the yarnBerry: true flag on the monorepo and introduce a consistentVersions configuration. The consistent versions list ensures that shared tooling dependencies like typescript, eslint and its plugins, prettier, and jest-junit are pinned to the same version across all packages in the monorepo. This avoids subtle issues from version mismatches between packages, which Yarn Berry is more strict about enforcing. A few dependencies are marked with @todo comments where consistent versioning still needs to be worked out.

Additionally, ts-node is added as a dev dependency to the aws-cdk CLI package. Yarn Berry resolves peer dependencies more strictly than Classic, so transitive availability of ts-node can no longer be relied upon and it needs to be declared explicitly.

All other file changes (workflows, package.json files, lockfile, .yarnrc.yml, yarn.config.cjs, etc.) are auto-generated by running projen synthesis after these manual changes.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@aws-cdk-automation aws-cdk-automation requested a review from a team April 10, 2026 11:06
@github-actions github-actions bot added the p2 label Apr 10, 2026
@mrgrain mrgrain added the pr/exempt-integ-test Skips the integ test steps if set. label Apr 10, 2026
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 10, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.28%. Comparing base (c716037) to head (27ef2c3).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1326      +/-   ##
==========================================
+ Coverage   88.20%   88.28%   +0.07%     
==========================================
  Files          73       73              
  Lines       10386    10386              
  Branches     1409     1415       +6     
==========================================
+ Hits         9161     9169       +8     
+ Misses       1198     1190       -8     
  Partials       27       27              
Flag Coverage Δ
suite.unit 88.28% <ø> (+0.07%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mrgrain mrgrain force-pushed the mrgrain/chore/yarn-berry branch from 479359a to 181c4a1 Compare April 10, 2026 11:49
@mrgrain mrgrain force-pushed the mrgrain/chore/yarn-berry branch from 181c4a1 to 27ef2c3 Compare April 10, 2026 11:56
@aws-cdk-automation aws-cdk-automation added this pull request to the merge queue Apr 10, 2026
Merged via the queue into main with commit 1219943 Apr 10, 2026
16 checks passed
@aws-cdk-automation aws-cdk-automation deleted the mrgrain/chore/yarn-berry branch April 10, 2026 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

p2 pr/exempt-integ-test Skips the integ test steps if set.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants