Skip to content

Update babel monorepo to v8 - #55

Closed
dfalling wants to merge 1 commit into
mainfrom
renovate/major-babel-monorepo
Closed

Update babel monorepo to v8#55
dfalling wants to merge 1 commit into
mainfrom
renovate/major-babel-monorepo

Conversation

@dfalling

@dfalling dfalling commented Jun 17, 2026

Copy link
Copy Markdown
Owner

This PR contains the following updates:

Package Change Age Confidence
@babel/core (source) ^7.25.2^8.0.0 age confidence
@babel/preset-env (source) ^7.25.3^8.0.0 age confidence
@babel/runtime (source) ^7.25.0^8.0.0 age confidence

Release Notes

babel/babel (@​babel/core)

v8.0.1

Compare Source

💥 Breaking Change
  • babel-core, babel-plugin-transform-object-rest-spread, babel-plugin-transform-runtime, babel-preset-env, babel-standalone

v8.0.0

Compare Source

👓 Spec Compliance
💥 Breaking Change
  • babel-cli, babel-node, babel-plugin-proposal-decorators, babel-plugin-transform-classes, babel-plugin-transform-function-name, babel-plugin-transform-modules-commonjs, babel-plugin-transform-object-rest-spread, babel-plugin-transform-parameters, babel-plugin-transform-react-constant-elements, babel-plugin-transform-regenerator, babel-preset-env, babel-register
  • babel-plugin-transform-runtime, babel-runtime-corejs3, babel-runtime
  • babel-parser
🐛 Bug Fix
  • babel-generator
  • babel-plugin-transform-modules-systemjs
📝 Documentation
🏠 Internal
🏃‍♀️ Performance

Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about these updates again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate.

@dfalling

Copy link
Copy Markdown
Owner Author

Closing: Babel 8 can't be adopted while the project is on React Native.

@react-native/babel-preset drives the whole RN transform, and its plugin chain asserts ^7.0.0-0. Under @babel/core 8 it throws before any suite runs:

[BABEL] Requires Babel "^7.0.0-0", but was loaded with "8.0.1".
(While processing: "node_modules/@react-native/babel-preset/src/index.js.overrides[0]$0")

Metro, babel-jest and the RN preset each vendor their own @babel/core 7, so a top-level v8 never actually drives a transform — it only shadows them. There's nothing to gain here until React Native itself moves to Babel 8.

One subtlety worth recording: this only reproduces on a clean install. An incremental bun install can leave a nested @babel/core 7 under @jest/transform that masks it, which is why this PR failed with the different-looking loadPartialConfig expects a callback error instead.

#73 holds @babel/* at <8.0.0 in renovate.json with that rationale, so this won't be reopened until the ceiling is lifted. It also declares @babel/plugin-transform-export-namespace-from explicitly — babel.config.js applies it directly, but it was only ever installed transitively via @babel/preset-env.

@dfalling dfalling closed this Aug 17, 2026
dfalling added a commit that referenced this pull request Aug 17, 2026
Renovate raised react-native 0.87 (#61) and jest 30 (#42) separately, but
neither can land alone: jest 30 needs overrides that only make sense
alongside RN's preset, and RN 0.87 needs the same Android toolchain bump
that jest is indifferent to. Combined so CI can go green on one commit.

react-native 0.87
  - `View`/`TextInput` are function components now, so those names no
    longer double as their instance types. Refs move to the dedicated
    `ViewInstance`/`TextInputInstance` aliases RN 0.87 exports for exactly
    this.
  - AGP 9.2.1 comes with RN 0.87 and wants Gradle >= 9.4.1, so the wrapper
    goes to 9.4.1 — the version RN's own gradle-plugin ships. AGP 9 also
    registers its own `kotlin` extension and rejects the `-dontoptimize`
    default proguard file; both need the opt-outs RN 0.87's template uses.
  - kotlinVersion 2.2.0 matches the Kotlin the RN gradle-plugin is built
    with, which is what lets Gradle 9.4's bundled stdlib be read at all.
  - maplibre-react-native and react-native-screens are moved to their
    latest in-range releases; the pinned ones fail to compile against
    0.87 (`getReactTag()` and a `Bitmap?` nullability error).
  - react/react-test-renderer stay at 19.2.3 — still the renderer version
    bundled in react-native, checked per renovate.json's instructions.
  - view-shot 5.1.1 has no 0.87 support yet and is typechecked from source
    via its "react-native" export condition, so tsc reads its published
    declarations instead. Metro still bundles from src/, so runtime is
    unchanged.

jest 30
  - @react-native/jest-preset 0.87 still asks for jest-environment-node,
    babel-jest and @jest/create-cache-key-function at ^29.7.0. Its
    testEnvironment extends whichever jest-environment-node sits next to
    the preset, so a v29 environment met jest-runtime 30 and every suite
    died on `clearMocksOnScope is not a function`. Overridden to v30.

Babel 8 (#55) is not included: @react-native/babel-preset's plugin chain
asserts `^7.0.0-0`, so under @babel/core 8 it throws before any suite runs.
Metro, babel-jest and the preset each vendor their own @babel/core 7, so a
top-level v8 only shadows them — held at v7 in renovate.json until RN moves.
That also pins @babel/plugin-transform-export-namespace-from, which
babel.config.js applies directly but only had a transitive install.

The Gradle ceiling in renovate.json moves 9.4 -> 9.7 for the same reason it
existed: Gradle 9.7 bundles Kotlin 2.4.0 and RN's 2.2.0 plugin reads
metadata only to 2.3.0. 9.5.1 and 9.6.1 were verified to configure cleanly.

Verified: tsc, biome, 51 tests, clean `assembleDebug`, and a
`--dev false` release bundle.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
@dfalling
dfalling deleted the renovate/major-babel-monorepo branch August 18, 2026 06:14
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