Skip to content

chore: upgrade to 5.1.0-exodus.0 for RN 0.85#9

Open
raxodus wants to merge 5 commits into5.1.0from
exodus-5.1.0
Open

chore: upgrade to 5.1.0-exodus.0 for RN 0.85#9
raxodus wants to merge 5 commits into5.1.0from
exodus-5.1.0

Conversation

@raxodus
Copy link
Copy Markdown

@raxodus raxodus commented Apr 23, 2026

Summary

Rebase of Exodus patches onto upstream react-native-notifications 5.1.0 (from ~4.x-based fork).
Part of the RN 0.85 upgrade: ExodusMovement/exodus-mobile#38221.

Exodus Patches

Commit Type Description
7636a35 chore @exodus/ scoping and version 5.1.0-exodus.0
ea23ba1 chore Re-apply Exodus functional patches (initial notification, tapped verification, background notification)
ad940d1 fix Apply upstream hasActiveReactInstance deprecation fix for FcmToken
f641268 chore Version update and changelog generation

Upstream Changelog (~4.x → 5.1.0)

The upstream delta from the old Exodus fork base (4.4.0-exodus, itself based on 4.3.5) to 5.1.0 is minimal — only 3 substantive upstream commits landed in the 5.x series:

  • 748e219 android-get-initial-notificationRNNotificationsPackage: switch from intent.getExtras() to NotificationIntentAdapter.extractPendingNotificationDataFromIntent(intent) and erase the notification intent after consumption (activity.setIntent(new Intent())) to prevent replay when the app resumes from background. NotificationIntentAdapter: extractPendingNotificationDataFromIntent now falls back to raw extras when the typed bundle key is absent.
  • c29bce6 upgrade-android-33 — bumps androidSdkVersion from 31 → 33 and DEFAULT_COMPILE_SDK_VERSION from 30 → 33 to target Android 13.
  • 980ce21 Fix android build for RN 0.72 — changes deprecated html.enabled true to html.required.set true in test report options; Gradle API compatibility fix only.

Also added: a Docusaurus v2 documentation website (website/) with no runtime impact, and a minor scripts/test-unit.js CI refactor.

Security Audit of Upstream Changes

Prototype Pollution Vectors

No JavaScript object mutation via user-supplied keys. The JS layer (lib/src/) was not modified in this upstream delta. No Object.assign, __proto__, or bracket-keyed property writes were introduced.

Command Injection

scripts/test-unit.js introduces a testTarget(scheme, device, OS) helper that interpolates its parameters into a xcodebuild shell command via template literals. However, all three call sites are hardcoded in source — no values derive from environment variables, CLI args, or external input. This file is a developer CI script, not shipped code. No risk to production.

Network Requests

No new network calls introduced in native (Java/ObjC/Swift) or JS runtime code. The only URLs added are static documentation links in website/docusaurus.config.js and website/package.json. These are build-time documentation assets with zero runtime impact.

Binary Blobs / Non-reproducible Artifacts

No new binary artifacts were introduced. The pre-existing lib/ios/libOCMock.a (test mock library) and Gradle wrapper JARs are unchanged.

ReDoS Patterns

No regular expressions were added or modified in any of the diffed files.

Unsafe Dynamic Code Execution

No eval(), new Function(), require() with dynamic string concatenation, or vm.runInContext() patterns introduced.

New Dependencies

Runtime (dependencies / peerDependencies): No changes — peerDependencies remain react: "*" and react-native: "*" with no new runtime deps added.

Dev dependencies: Identical between 4.4.0-exodus and 5.1.0 in the root package.json.

New website/package.json (dev-only, not shipped): adds @docusaurus/core@2.0.0-alpha.64, @docusaurus/preset-classic@2.0.0-alpha.64, classnames@^2.2.6, react@^16.10.2, react-dom@^16.10.2. These are documentation build tools only, never bundled into the app.

Findings Summary

Category Result Notes
Prototype Pollution ✅ Clean No JS object mutation via dynamic keys
Command Injection ✅ Clean testTarget() args are all hardcoded; CI script only
Network Requests ✅ Clean No new runtime network calls; only static doc URLs
Binary Blobs ✅ Clean No new or changed binary artifacts
ReDoS Patterns ✅ Clean No regex changes
Unsafe Dynamic Code ✅ Clean No eval/dynamic require
New Dependencies ✅ Clean No new runtime deps; website-only dev deps are docs tooling

Test Plan

  • Update src/package.json in exodus-mobile-upgrade worktree
  • yarn ios:base builds
  • yarn android:base builds
  • Push notification receipt works (foreground + background)
  • Initial notification handling works (cold start from tapped notification)
  • FCM token retrieval works on Android

mobile1-internal and others added 4 commits April 23, 2026 16:35
Cherry-picked from upstream master (1b71233) to ensure RN 0.85 compatibility.
Changes hasActiveCatalystInstance to hasActiveReactInstance and adds fallback
to getReactHost().getCurrentReactContext() for RN 0.76+.
Re-applied the following Exodus patches on clean upstream 5.1.0 base:

- fix: hasActiveReactInstance — use hasActiveReactInstance() directly instead of
  try/catch with deprecated hasActiveCatalystInstance() (ReactAppLifecycleFacade)
- fix: get initial notification returning null — use intent.getExtras() directly
  (RNNotificationsPackage)
- chore: update default channel to 'exodus' (PushNotification)
- fix: local notification press reloading the app — use PendingIntent.getActivity
  instead of trampoline branching (NotificationIntentAdapter)
- feat: verify if notification was tapped to set initial value — add
  notificationTapped BOOL to RNNotificationsStore, set on response,
  check in getInitialNotification (iOS)
- feat: add pinpoint UI sending compatibility layer (PushNotification)
- fix: ios background notification — move notificationTapped gate from
  setBridge: to getInitialNotification: (RNCommandsHandler)

Skipped patches:
- All version bumps (will be set separately)
- All cleanup/removal commits (upstream already reorganized)
- @Exodus scoping (will be set separately)
@raxodus raxodus changed the base branch from exodus to 5.1.0 April 23, 2026 15:00
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.

2 participants