Skip to content

Conversation

@jasonpraful
Copy link
Member

@jasonpraful jasonpraful commented Sep 2, 2025

Changes

Adds support for React native's new architecture with Backwards compatibility.

New Architecture

  • Android: Split native module into newarch and oldarch with conditional compilation based on the newArchEnabled flag.
  • iOS: Added conditional compilation using RCT_NEW_ARCH_ENABLED macro to switch between TurboModule and Bridge implementation.
  • JS: Added NativeIntercomSpec.ts

Usage

No changes for existing users on old architecture. Enable new architecture with:

  • Android: Set newArchEnabled=true in gradle.properties.
  • iOS: RCT_NEW_ARCH_ENABLED=1 pod install

Testing

  • Create new expo/react native app.
  • Use a local registry (like verdaccio) to build and publish package locally
  • Install package in new app.
  • Follow instructions in README for SDK setup.

Other minor changes

  • Upgraded repo to Node 22.14
  • Migrated to yarn 3.6.1
  • Added proper ESM and CJS dual package exports config.

Next Steps

A follow-up PR will be raised which adds an Expo example app with the new architecture.

References

@socket-security
Copy link

socket-security bot commented Sep 2, 2025

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatednpm/​@​react-native/​gradle-plugin@​0.74.0 ⏵ 0.81.110010046 +197100
Updatednpm/​metro-cache-key@​0.79.1 ⏵ 0.83.110010050 -290100
Addednpm/​aggregate-error@​4.0.1671008451100
Addednpm/​indent-string@​5.0.0671008951100
Updatednpm/​metro-minify-terser@​0.79.1 ⏵ 0.83.110010058 -190100
Addednpm/​unique-slug@​5.0.01001005883100
Updatednpm/​metro-babel-transformer@​0.79.1 ⏵ 0.83.11001006090100
Updatednpm/​ob1@​0.79.1 ⏵ 0.83.110010062 -190100
Addednpm/​unique-filename@​4.0.01001006283100
Addednpm/​is-plain-obj@​1.1.01001006376100
Addednpm/​@​babel/​plugin-transform-strict-mode@​7.27.11001006487100
Addednpm/​arrify@​1.0.11001006476100
Addednpm/​chownr@​3.0.01001006576100
Updatednpm/​metro-transform-worker@​0.79.1 ⏵ 0.83.19910066 +190100
Updatednpm/​metro-cache@​0.79.1 ⏵ 0.83.19910066 +190100
Updatednpm/​metro-runtime@​0.79.1 ⏵ 0.83.11001006790100
Addednpm/​min-indent@​1.0.11001006778100
Updatednpm/​metro-transform-plugins@​0.79.1 ⏵ 0.83.11001006790100
Updatednpm/​metro-symbolicate@​0.79.1 ⏵ 0.83.11001006790100
Addednpm/​@​types/​minimist@​1.2.51001006776100
Updatednpm/​metro-config@​0.79.1 ⏵ 0.83.1991006890100
Addednpm/​is-path-cwd@​3.0.01001006878100
Addednpm/​abbrev@​3.0.11001006984100
Addednpm/​@​ark/​util@​0.47.01001006987100
Updatednpm/​metro-resolver@​0.79.1 ⏵ 0.83.11001006990100
Updatednpm/​metro-source-map@​0.79.1 ⏵ 0.83.11001007090100
Updatednpm/​@​react-native/​assets-registry@​0.74.0 ⏵ 0.81.110010071 +197100
Updatednpm/​@​react-native/​babel-plugin-codegen@​0.74.89 ⏵ 0.81.010010072 +197100
Updatednpm/​hermes-estree@​0.15.0 ⏵ 0.29.110010072 +391100
Updatednpm/​@​types/​semver@​7.7.1 ⏵ 7.7.0100 +11007277100
Addednpm/​undici-types@​7.10.01001007394100
Addednpm/​scheduler@​0.26.01001007397100
Updatednpm/​@​react-native/​normalize-colors@​0.74.1 ⏵ 0.81.110010074 +197100
See 66 more rows in the dashboard

View full report

@socket-security
Copy link

socket-security bot commented Sep 2, 2025

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Action Severity Alert  (click "▶" to expand/collapse)
Warn High
npm/glob@7.1.6 has a License Policy Violation.

License: CC-BY-SA-4.0 (package/LICENSE)

From: yarn.locknpm/glob@7.1.6

ℹ Read more on: This package | This alert | What is a license policy violation?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Find a package that does not violate your license policy or adjust your policy to allow this package's license.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/glob@7.1.6. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

@jasonpraful jasonpraful force-pushed the jason/new-architecture branch from 34c73f0 to 2c576e6 Compare September 2, 2025 22:59
@jasonpraful jasonpraful force-pushed the jason/new-architecture branch from 765d4df to 86cd898 Compare September 2, 2025 23:36
@jasonpraful jasonpraful force-pushed the jason/new-architecture branch from 86cd898 to a3e0223 Compare September 2, 2025 23:49
@jasonpraful jasonpraful marked this pull request as ready for review September 3, 2025 17:40
@uddish
Copy link
Contributor

uddish commented Sep 4, 2025

@jasonpraful
Were you able to test push notifications and deeplinks in the new architecture?

Copy link

@brianpburns brianpburns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice job man! Some good cleanup outside of the arch update as well.

I think completely splitting the new and old architecture versus the inheritance approach I was testing is a much better call. It'll be much easier to deal with going forward.

I see you tackled the event listener updates in a separate PR as well. I figured that would be a breaking change.

I imagine you're going with the opt-in flow for now and it'll likely be an opt-out flow once stable?

@jasonpraful
Copy link
Member Author

I imagine you're going with the opt-in flow for now and it'll likely be an opt-out flow once stable?
Yep, once users have adapted and the consumers from old architecture drops we will remove support for it entirely.

@jasonpraful jasonpraful merged commit 6303535 into main Sep 4, 2025
8 checks passed
@jasonpraful jasonpraful deleted the jason/new-architecture branch September 4, 2025 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants