feat(deps)!: upgrade babel to v8 - #7238
Merged
Merged
Conversation
Bumps @babel/core, @babel/preset-env, @babel/preset-react, and @babel/preset-typescript from 7.28.x to 8.x. Two peer-dependency overrides are needed since neither has shipped a Babel-8-compatible peer range yet: - @rollup/plugin-babel@7.0.0 declares peer @babel/core@^7.0.0, but a maintainer-confirmed community test (rollup/plugins#2010) shows it works fine against Babel 8's transform API unchanged. Upstream fix is in flight (rollup/plugins#2021), unmerged. - ts-jest@29.4.12 declares an *optional* peer capping @babel/core at <8, unused unless ts-jest's babel-based transform is configured (it isn't here). babel.config.js also needed a fix: Babel 8's preset-typescript removed the isTSX/allExtensions options in favor of automatic per-file-extension JSX detection, which conflicts with preset-react being applied to every file unconditionally. This broke parsing of plain .ts files using the ambiguous generic-arrow syntax (e.g. src/utilities/sample.ts's `<T>(xs: T[]) =>`), which got misread as JSX. Scoped preset-react to .jsx/.tsx via `overrides`. BREAKING CHANGE: requires @babel/core@^8 throughout the toolchain. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
moda-automation-devops
pushed a commit
that referenced
this pull request
Sep 17, 2026
# [22.0.0](21.14.0...22.0.0) (2026-09-17) * feat(deps)!: upgrade babel to v8 ([#7238](#7238)) ([25c808e](25c808e)), closes [rollup/plugins#2010](rollup/plugins#2010) [rollup/plugins#2021](rollup/plugins#2021) ### BREAKING CHANGES * requires @babel/core@^8 throughout the toolchain. Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
Contributor
|
🎉 This PR is included in version 22.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
There was a problem hiding this comment.
🔵 Needs a closer look
The major compiler upgrade relies on forced compatibility with integrations that do not officially support Babel 8 yet.
Pull request overview
Upgrades the build pipeline to Babel 8 while retaining compatibility with existing Rollup and Jest tooling.
Changes:
- Upgrades Babel core and presets to v8.
- Overrides stale peer constraints.
- Restricts React transforms to JSX/TSX files.
File summaries
| File | Description |
|---|---|
package.json |
Upgrades Babel dependencies and adds peer overrides. |
babel.config.js |
Applies the React preset only to JSX/TSX files. |
Review details
- Files reviewed: 2/3 changed files
- Comments generated: 0
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
2 tasks
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
The individual dependabot PR bumping just
@babel/coreto 8.x (#7235) can't pass CI:npm cihard-fails on ERESOLVE because@rollup/plugin-babelandts-jestboth still declare peer ranges capped at Babel 7, and@babel/preset-envstays on 7.x in that PR.This PR bumps
@babel/core,@babel/preset-env,@babel/preset-react, and@babel/preset-typescriptto 8.x together and adds twooverridesentries to work around stale peer ranges upstream:@rollup/plugin-babel@7.0.0→ peer@babel/core@^7.0.0. A maintainer-adjacent community test in rollup/plugins#2010 confirms it runs fine against Babel 8 unchanged — a real fix is in flight (rollup/plugins#2021) but unmerged, so this unblocks us without waiting on it.ts-jest@29.4.12→ optional peer capping@babel/coreat<8, unused here since ts-jest's babel-based transform isn't configured in this repo.Also fixed
babel.config.js: Babel 8'spreset-typescriptremovedisTSX/allExtensionsin favor of automatic per-file-extension JSX detection. Sincepreset-reactwas applied to every file unconditionally, this broke parsing of ambiguous TS generic-arrow syntax in plain.tsfiles (e.g.src/utilities/sample.ts's<T>(xs: T[]) =>was misread as JSX). Scopedpreset-reactto.jsx/.tsxviaoverrides.This is a breaking change — bumps the package major version.
Test plan
npm ci --include=devinstalls cleannpm run build(rollup compile + tsc types)npm run lintnpm run test— 40 suites / 88 tests passci/circleci: test) — pending🤖 Generated with Claude Code