feat(mobile): upgrade RN deps for new-arch readiness (old arch still on)#14505
feat(mobile): upgrade RN deps for new-arch readiness (old arch still on)#14505dylanjeffers wants to merge 4 commits into
Conversation
…crypto Swap two unmaintained native deps for new-arch-ready replacements (old architecture stays on; no behavior change): - react-native-fs (abandoned 2022) -> @dr.pogodin/react-native-fs@2.32.1. Pinned to 2.32.1 because 2.33+ uses a CodegenTypes.EventEmitter spec that RN 0.79's codegen parser rejects; 2.32.1 uses method-callback specs that build on the current RN. API is identical; default import becomes a namespace import since the fork has no default export. - react-native-fast-crypto (old-bridge only) -> @noble/hashes scrypt (pure JS). Verified byte-for-byte output parity against RFC 7914 for the exact params (N=32768,r=8,p=1,dkLen=32) and the existing UTF-8 salt encoding, so derived wallet keys are unchanged. Uses scryptAsync to stay off the JS critical path the way the native module did. Validated with a clean `npm run ios:prod` build. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Both native gradient packages are unmaintained with no new-architecture support, so move them onto react-native-svg (already linked and new-arch ready). Old architecture stays on; no Expo native modules are introduced (this app isn't wired for Expo autolinking, so expo-linear-gradient could not link here). - react-native-linear-gradient -> new harmony-native `LinearGradient` built on react-native-svg. Renders the gradient as an absolutely-positioned SVG behind any children via `objectBoundingBox` units, so it works as both a fill and a container with no layout measurement. All 22 call sites repointed; `useAngle`/`angle` props converted to `start`/`end` via a new `getGradientStartEnd` helper that reproduces the bearing-angle direction. - react-native-radial-gradient -> rewrite harmony-native `RadialGradient` on react-native-svg's `<RadialGradient>` (userSpaceOnUse to keep it circular, matching the old percentage center/radius API). Removed the custom SRSRadialGradient pod from the Podfile. Typecheck and lint clean; validated with a clean `npm run ios:prod`. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
First rung of the RN ladder. New Architecture stays off — pod install baked RCTNewArchEnabled=false into the iOS Info.plists. - react-native 0.79.5 -> 0.80.3, @react-native/* 0.79.5 -> 0.80.3, @react-native-community/cli 18 -> 19.1.2. - React 19.0.0 -> 19.1.8 monorepo-wide (RN 0.80 requires react ^19.1.0). Bumped via the root `overrides` plus every package's declaration so web and mobile stay aligned; @types/react -> 19.1.17, @types/react-dom -> 19.1.11. Reanimated intentionally stays on 3.x (4.x is new-arch only). - Converted the 5 deprecated `react-native/types` deep imports to root `react-native` imports (0.80 deprecation). - Clean pod reinstall to re-resolve the RN 0.80 pod set. Typecheck + lint clean; validated with a clean `npm run ios:prod`. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Final rung of the RN ladder — lands on 0.81, the last version that supports
the legacy architecture. New Architecture stays off (Android
newArchEnabled=false, iOS RCTNewArchEnabled=false). Reanimated stays on 3.x.
- react-native 0.80.3 -> 0.81.6, @react-native/* -> 0.81.6,
@react-native-community/cli 19.1.2 -> 20.1.3. React stays 19.1.8
(satisfies 0.81's react ^19.1.4).
- Fixed two type regressions from RN 0.81's stricter prop types:
- HarmonyTextField: the TextInput blur event type dropped `text`; cast to
read it (still present at runtime) so transformValueOnBlur is unchanged.
- ExternalLink: narrow the forwarded TouchableWithoutFeedback prop spread
to satisfy TextPressable's prop type.
- Clean pod reinstall for the RN 0.81 pod set.
NOTE: validated on iOS only via `npm run ios:prod`. Android gradle config
(API 36 / edge-to-edge that RN 0.81 expects) is NOT updated here and needs a
separate Android-validated pass.
Typecheck + lint clean; validated with a clean `npm run ios:prod`.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
|
Dependency limit exceeded — report not shown. This pull request scan exceeded the 10,000-dependency limit applied to this scan, so the results are incomplete and may be inaccurate. To avoid reporting false positives, Socket has not posted a report. Upgrade your plan to raise the dependency limit and get complete reports, or view the partial scan in the dashboard. Socket is always free for open source. If this is a non-commercial open source project, contact us to request a free Team account. |
Summary
Upgrades the React Native dependency surface for New-Architecture readiness while keeping the old architecture on. Lands the app on RN 0.81.6 — the last version that supports the legacy architecture — and replaces the abandoned/incompatible native gradient + filesystem + crypto libraries with new-arch-ready equivalents. Each step was validated with a clean
npm run ios:prod.What's in here (4 commits)
react-native-fs→@dr.pogodin/react-native-fs@2.32.1andreact-native-fast-crypto→@noble/hashesscrypt.CodegenTypes.EventEmitterspec the current codegen parser rejects; 2.32.1 uses method-callback specs that build cleanly. Default import → namespace import (the fork has no default export).N=32768, r=8, p=1, dkLen=32) and the existing UTF-8 salt encoding, so derived keys are unchanged. UsesscryptAsyncto stay off the JS critical path the way the native module did.Native gradient libs →
react-native-svg(already linked & new-arch ready).LinearGradientbuilt onreact-native-svg(renders an absolutely-positioned SVG behind children viaobjectBoundingBox, so it works as both a fill and a container). All 22 call sites repointed;useAngle/angleprops converted tostart/endvia a newgetGradientStartEndhelper.react-native-radial-gradient→ rewritten on svg's<RadialGradient>; customSRSRadialGradientpod removed.expo-linear-gradient? This app isn't wired for Expo native autolinking (use_expo_modules!absent, ExpoModulesCore not linked,expo@51 is an unused ghost dep mismatched against RN 0.79), so expo-linear-gradient could not link/render here. svg avoids dragging in Expo's native subsystem.RN 0.79.5 → 0.80.3 + React 19.0.0 → 19.1.8 monorepo-wide (RN 0.80 requires
react ^19.1.0; bumped via the rootoverrides+ every package declaration). Converted the 5 deprecatedreact-native/typesdeep imports.RN 0.80.3 → 0.81.6. React stays 19.1.8 (satisfies
^19.1.4). Fixed two RN-0.81 type tightenings (TextInput blur event losttext; narrowed anExternalLinkprop spread).Validation
npm run ios:prod— green at every checkpoint (Group 1, Group 2, RN 0.80, RN 0.81, final).tsc --noEmitclean (0 errors) and fulleslintclean at the final state.newArchEnabled=false, iOSRCTNewArchEnabled=false.overrides), so it changes the web app's React version too. Validated on iOS only — web should be smoke-tested separately. (19.1 is a low-risk minor.)Deferred to a follow-up (Phase B — the actual new-arch flip)
RN 0.82+ (new arch becomes mandatory), Reanimated 4 +
react-native-worklets, gesture-handler 3 / flash-list 2, and the flagged hard libs:react-native-track-playerv5 (commercial license),react-native-collapsible-tab-viewreplacement,react-native-google-castFabric decision, and the wixreact-native-notifications→ notifee + Firebase rewrite (deferred so it can get real push testing).🤖 Generated with Claude Code