Skip to content

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

Merged
OnestarLee merged 3 commits into
mainfrom
chore/sample-rn-0.87
Oct 8, 2026
Merged

OnestarLee merged 3 commits into
mainfrom
chore/sample-rn-0.87

Conversation

@OnestarLee

@OnestarLee OnestarLee commented Sep 28, 2026 •

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.)
  • docs-validation: same react-native type paths in its tsconfig.build.json, and native dependency ranges aligned with root/sample so no stale nested copies (picker 10, video 6.17, …) conflict with UIKit's types.
  • 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.
  • CI Node 20 → 24: RN 0.87 packages require Node >= 22.13 (yarn install failed on the Node 20 runners). ci.yml, publish-sample.yml and .nvmrc now match release-workflow.yml, which already uses Node 24.
  • 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>
@OnestarLee
OnestarLee force-pushed the chore/sample-rn-0.87 branch from 558700a to 0e88f77 Compare October 8, 2026 00:53
React Native 0.87 packages (e.g. @react-native/jest-preset) require
Node >= 22.13, so `yarn install` fails on the Node 20 runners.
Align ci.yml, publish-sample.yml and .nvmrc with release-workflow.yml,
which already uses Node 24.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov-commenter

codecov-commenter commented Oct 8, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 12.31%. Comparing base (c2ccff7) to head (75a990d).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #321   +/-   ##
=======================================
  Coverage   12.31%   12.31%           
=======================================
  Files         361      361           
  Lines        9108     9108           
  Branches     2563     2563           
=======================================
  Hits         1122     1122           
  Misses       7985     7985           
  Partials        1        1           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

- Resolve react-native types via tsconfig paths in docs-validation's
  build config, as in packages/*; without it TextStyle became `any` and
  FontAttributes required every property
- Match docs-validation's native dependency ranges to the root/sample
  (documents picker 12, video 6.19, nitro, mmkv, safe-area) so no stale
  nested copies conflict with the types UIKit is built against

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@OnestarLee
OnestarLee marked this pull request as ready for review October 8, 2026 01:11
@OnestarLee
OnestarLee requested a review from danney-chun October 8, 2026 02:06
@OnestarLee
OnestarLee added this pull request to the merge queue Oct 8, 2026
Merged via the queue into main with commit b13c82e Oct 8, 2026
8 checks passed
@OnestarLee
OnestarLee deleted the chore/sample-rn-0.87 branch October 8, 2026 02:34
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.

3 participants