Update babel monorepo to v8 - #55
Conversation
04164fb to
7d30b05
Compare
|
Closing: Babel 8 can't be adopted while the project is on React Native.
Metro, babel-jest and the RN preset each vendor their own One subtlety worth recording: this only reproduces on a clean install. An incremental #73 holds |
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>
This PR contains the following updates:
^7.25.2→^8.0.0^7.25.3→^8.0.0^7.25.0→^8.0.0Release Notes
babel/babel (@babel/core)
v8.0.1Compare Source
💥 Breaking Change
babel-core,babel-plugin-transform-object-rest-spread,babel-plugin-transform-runtime,babel-preset-env,babel-standalonepreset-env'suseBuiltIns(@nicolo-ribaudo)v8.0.0Compare Source
👓 Spec Compliance
babel-core💥 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-registermodules: auto(@nicolo-ribaudo)babel-plugin-transform-runtime,babel-runtime-corejs3,babel-runtime@babe/runtime-corejs3(@liuxingbaoyu)babel-parserlocations: "packed"(@liuxingbaoyu)🐛 Bug Fix
babel-generatorbabel-plugin-transform-modules-systemjs📝 Documentation
🏠 Internal
🏃♀️ Performance
babel-coreConfiguration
📅 Schedule: (UTC)
🚦 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.
This PR has been generated by Mend Renovate.