Skip to content

chore: update React Native version from 0.82 to 0.87 - #321

Draft
OnestarLee wants to merge 1 commit into
mainfrom
chore/sample-rn-0.87
Draft

OnestarLee wants to merge 1 commit into
mainfrom
chore/sample-rn-0.87

Conversation

@OnestarLee

Copy link
Copy Markdown
Collaborator

For Internal Contributors

[TICKET_ID]

Description Of Changes

Upgrades the sample app and the monorepo's hoisted React Native from 0.82.1 → 0.87.1 (React 19.1.1 → 19.2.3). The monorepo hoists a single RN copy and all sample native path config points at ../../node_modules, so root / packages/* / docs-validation devDeps are bumped together. Peer dependency ranges are unchanged.

Upgrade Helper diff (0.82.1..0.87.1)

  • Android: Gradle 9.4.1 wrapper, compileSdk / buildTools 37, Kotlin 2.2.0, edgeToEdgeEnabled=true, AGP 9 opt-outs (android.builtInKotlin=false, android.newDsl=false), proguard-android-optimize.txt
  • iOS: quoted paths in the bundle script phase, SUPPORTED_PLATFORMS, Gemfile nkf
  • Skipped on purpose: iPad device family / iPad orientations (sample is iPhone-only), TypeScript 6 (separate scope)

Monorepo path / tooling fixes

  • TypeScript: RN 0.87 removed the top-level types field and exposes types only via exports, so moduleResolution: "node" can't see them. Added paths: { "react-native": ["./node_modules/react-native/types"] } (legacy types, same surface as before) to the root tsconfig and each packages/*/tsconfig.build.json. Removed the empty @types/react-native stub, which triggered TS2688. (moduleResolution: "bundler" was tried but breaks @sendbird/chat/lib/__definition deep imports.)
  • Android hermesCommand: hermesc moved from react-native/sdks/hermesc to the hermes-compiler package; path now points at the hoisted copy.
  • Jest: preset / setupFiles → @react-native/jest-preset.
  • Gradle heap 2 GB → 4 GB: Jetifier OOMs on react-android AAR (also reproduces on main from a fresh checkout path).

Dependencies

  • @react-native-documents/picker 10 → 12 (10.1.7 doesn't compile against 0.87's ReactContext.getCurrentActivity(); pick / errorCodes / isErrorWithCode used by UIKit are unchanged)
  • RN-coupled native libs: nitro-modules 0.37, nitro-sound 0.2.20, mmkv 4.3, screens 4.28, safe-area-context 5.10, video 6.19

Sample code

  • Removed StatusBar.setTranslucent (removed in 0.87 → Android startup crash)
  • MMKV v4: delete() → remove() in the sample credential storage

Verification

  • yarn build, yarn test (205 passed), yarn test:build, yarn lint, sample tsc — all green
  • iOS simulator (iPhone 16 Pro) and Android emulator (Pixel 9 Pro, API 36):
    • auto sign-in (MMKV), channel list, image messages, text send on both, cross-device sync
    • Android: file pick & upload via documents picker 12
    • iOS: voice message playback
  • Pre-existing issues found (reproduced identically on main / RN 0.82.1, not caused by this PR):
    • Android 16: message composer is hidden behind the keyboard (enforced edge-to-edge, ChannelInput has no Android keyboard avoidance)
    • Android emulator: voice message playback fails (MediaPlayer -1007)
  • One intermittent iOS startup Uncaught (in promise) TypeError: undefined is not a function was seen 1–2 times and did not reproduce across 8 subsequent reloads; root cause not identified.

Types Of Changes

  • Bugfix
  • New feature
  • Documentation (correction or otherwise)
  • Cosmetics (whitespace, appearance (ex) Prettier)
  • Build configuration
  • Improvement (refactor code)
  • Test

🤖 Generated with Claude Code

- Bump react-native 0.87.1 / react 19.2.3 across root, packages and sample
  (single hoisted copy is required by the monorepo native path config)
- Apply Upgrade Helper diff 0.82.1..0.87.1 to the sample (Gradle 9.4.1,
  compileSdk/buildTools 37, Kotlin 2.2, edge-to-edge, AGP 9 opt-outs,
  quoted Xcode bundle script paths, Gemfile nkf)
- Resolve react-native types via tsconfig paths: RN 0.87 exposes types
  only through package exports; drop the @types/react-native stub
- Point Android hermesCommand to the hoisted hermes-compiler package
- Switch jest preset to @react-native/jest-preset
- Upgrade @react-native-documents/picker to 12 (10.x fails to compile on 0.87)
  and RN-coupled native libs (nitro-modules/sound, mmkv, screens, video, safe-area)
- Sample: remove StatusBar.setTranslucent (removed in 0.87), use MMKV v4 remove(),
  raise Gradle heap to avoid Jetifier OOM

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant