Repository navigation
Conversation
Contributor
Sample app builds 📱Below you will find the list of the latest versions of the sample apps. It's recommended to always download the latest builds of the sample apps to accurately test the pull request. Builds are in progress. This comment will be updated when they finish.
|
The package declared `react-native: "*"` while it already needs 0.77+: it is New Architecture only since 6.0.0, codegen EventEmitter module events need 0.76+, and the Android module applies the Compose compiler plugin with the host's Kotlin version, which needs Kotlin 2.0 (first used by the 0.77 template; 0.76 ships 1.9.x and fails to resolve the plugin). Declare that floor so npm reports it at install time instead of a Gradle failure. BREAKING CHANGE: `react-native` peer dependency is now `>=0.77.0`. npm 7+ fails installs on older React Native, and on React Native prereleases (npm only matches a prerelease against a range naming the same x.y.z) unless run with --legacy-peer-deps. Refs MBL-2389 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Shahroz16
force-pushed
the
feat/react-native-peer-floor
branch
from
October 20, 2026 20:02
bceb327 to
ef559fa
Compare
Contributor
Author
|
Closing: not planned. We're keeping the react-native peer range at |
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.
Not planned under the current support policy — kept as a draft for reference. (Policy: keep minimums as low as actually works and leave
peerDependenciesat*with no enforcement major. The README in #670 documents RN 0.77 as the minimum that works, tested end to end from 0.81.)Blocked on the support decision (MBL-2389) — do not merge.
RN SDK 7.0 candidate. The support matrix recommends 0.81 as the supported floor (stock template, full-app CI), with 0.77–0.80 as a conditional path (module builds only, upgraded Android tooling), enforced only in 7.0. Which number this range carries,
>=0.77.0as drafted or>=0.81.0, is Shahroz's decision.Refs MBL-2389
Change
peerDependencies.react-native:"*"→">=0.77.0"(package.json and the package-lock root entry;npm ci --dry-runis clean).--legacy-peer-depsbypass. The scene E2E host was the only in-repo install on a React Native prerelease (0.88.0-nightly-20260823). ci(e2e): stop pinning the scene E2E simulator model #668 moves it to the released 0.88.0, which satisfies the range. Merge this after ci(e2e): stop pinning the scene E2E simulator model #668.reactstays"*"; nothing here needs a newer React than the one each React Native release pins.Why 0.77
The package already doesn't work below 0.77.
"*"only moves the failure fromnpm installto a native build:android/build.gradleappliesorg.jetbrains.kotlin.plugin.composefromcompose-compiler-gradle-plugin:$kotlinVersion, using the host'skotlinVersion. That plugin exists only for Kotlin 2.0+. The RN 0.76 template shipskotlinVersion = "1.9.24"; RN 0.77 ships"2.0.21".EventEmitter<…>events (NativeCustomerIO,NativeCustomerIOLogging,NativeCustomerIOMessagingInApp). Codegen support starts in RN 0.76.codegenConfig.ios.modulesProvideris only read from RN 0.79 (generate-artifacts-executor.js). But every iOS TurboModule also registers throughRCT_EXPORT_MODULE()+getTurboModule:, so 0.77/0.78 still find them.componentProvideris read from 0.77. The podspec usesmin_ios_version_supported(15.1 on 0.76+).BaseReactPackage, generatedemitOn…,ViewManagerDelegate) all exist by 0.76.Builds (stock templates from
@react-native-community/cli init, packed SDK,:app:assembleDebug)Could not find org.jetbrains.kotlin:compose-compiler-gradle-plugin:1.9.25checkDebugAarMetadata:androidx.core:core(-ktx):1.17.0needs compileSdk 36 and AGP ≥ 8.9.1So 0.77 is the lowest React Native that can work. But since 5.1.0, when native Android 4.13.0 moved to AndroidX Core 1.17, a React Native app also needs compileSdk 36 and AGP 8.9.1+. Stock templates first ship that in 0.81. The docs PR (#670) documents the edits needed on 0.77–0.80.
For MBL-2389:
>=0.77.0lets the conditional 0.77–0.80 path install.>=0.81.0would match the recommended supported floor (builds as generated). Either way, the peer range can't express the compileSdk/AGP requirement.Deep-link scene shim (MBL-2395 add-on): stays dynamic
ios/wrappers/CustomerIOReactNativeDeepLinkRouter.swiftchecks at runtime thatRCTLinkingManagerresponds toscene:openURLContexts:before enabling scene routing. That method first appears inRCTLinkingManager.hin React Native 0.88.0; it's absent in 0.76.0, 0.77.0, 0.78.0, 0.83.10, 0.86.3 and 0.87.1. A 0.77 floor doesn't guarantee it, so the shim stays as is. It could become a direct call only with a 0.88 floor.⚠ Trade-off for MBL-2389: prereleases (why not
>=0.77.0-0)npm only matches a prerelease against a range that names the same
x.y.z. So with any real range, an npm app on a React Native RC or nightly failsnpm installwith ERESOLVE unless it passes--legacy-peer-deps. That includes an Expo canary that pins one.Appending
-0doesn't help.semver.satisfiesresults:>=0.77.0>=0.77.0-00.77.0-rc.10.88.0-rc.60.89.0-nightly-20261020-f1f516e8c0.88.0npm 11 install test: a
>=5.0.0-0peer still rejectstypescript@7.1.0-devwith ERESOLVE. Only"*"accepts prereleases, because npm special-cases it; even plainsemver.satisfiesrejects them for*. No npm range expresses "0.77 or later, including future prereleases".This is npm-specific: Yarn and pnpm match prereleases against peer ranges and only warn on mismatches.
If prerelease installs must keep working on npm, the alternative is to keep
"*"and enforce the floor at build time (a podspec/Gradle check against the host's React Native version, with a readable message).CI note
This PR now changes only
package.jsonand the lockfile, so the scene E2E lane doesn't run on it. The earlier scene failure on this PR was theiPhone 17 Propin fixed by #668.Breaking change
Apps on React Native < 0.77 (already unbuildable on Android) and apps on React Native prereleases get an npm ERESOLVE at install. Ships as a semver-major per
feat!.Codex review
Codex (gpt-6.1-sol, high) reviewed this diff, with nothing actionable on the changed lines:
ios/wrappers/**, the podspecs,android/src/**orsrc/**. That coversRCT_EXPORT_MODULE+getTurboModule(somodulesProviderdoesn't force 0.79),BaseReactPackage,ViewManagerDelegate,UIManagerHelper, deep imports and TurboModule lookup. Keepingreact: "*"is fine. The range and lockfile match.--legacy-peer-depsskips all peer handling for the scene install. The bypass is gone now: the host moves to RN 0.88.0 in ci(e2e): stop pinning the scene E2E simulator model #668.>=0.77.0-0to admit prereleases. Rebutted with the table above: it only admits 0.77.0's own prereleases.🤖 Generated with Claude Code