Skip to content

stack/2 turbomodule core - #693

Merged
al-af merged 15 commits into
developmentfrom
stack/2-turbomodule-core
Aug 6, 2026
Merged

stack/2 turbomodule core#693
al-af merged 15 commits into
developmentfrom
stack/2-turbomodule-core

Conversation

@al-af

@al-af al-af commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

Stack created with GitHub Stacks CLIGive Feedback 💬

al-af added 10 commits July 23, 2026 17:34
Unrelated tooling addition, not part of the RPC rewrite.
Adds MIGRATION.md and documents the new executeRpc bridge contract.
Removes vendored per-feature ObjC headers/RNAppsFlyer.m in favor of RNAppsFlyer.mm dispatching to RNAppsFlyerImpl.swift.
Converts RNAppsFlyerModule/Package to Kotlin, adds RpcInitGate to buffer listener registration until init resolves, and vendors the plugin_bridge + af-android-sdk aars.
index.js now routes every native call through callRpc/callRpcVoid/callRpcWithCallback -> NativeAppsFlyer.executeRpc.
…nd Kotlin, drop legacy Buck/bundle scaffolding

Removes vendored main.jsbundle and BUCK build files that predate autolinking; migrates AppDelegate/MainActivity/MainApplication to Swift/Kotlin to match the New Architecture bridge.
@al-af al-af mentioned this pull request Aug 4, 2026
Comment thread android/src/main/java/com/appsflyer/reactnative/RpcInitGate.kt Outdated
Comment thread android/src/main/java/com/appsflyer/reactnative/RNAppsFlyerModule.kt Outdated
Comment thread ios/RNAppsFlyerImpl.swift Outdated
Comment thread ios/RNAppsFlyerImpl.swift Outdated
…llback

Addresses PR #693 review comments (pazlavi).

- Delete RpcInitGate.kt + RpcInitGateTest.kt; RNAppsFlyerModule.kt's
  executeRpc dispatches every RPC immediately, no gate/queue
- Remove RNAppsFlyerImpl.swift's initCompleted/pendingRegistrations buffer;
  executeRpc dispatches immediately
- Remove Android's scheduleSessionReadyFallback (synthesized onSessionReady
  after a timeout) -- per review, a callback that never fires is a native
  bug to investigate, not something to paper over; this fallback had
  already caused a double-fire race
- android/build.gradle: failOnNoDiscoveredTests = false (module has zero
  unit tests left now that it's a pure passthrough)
- Update bridge-patterns.md §4, native-android.md, native-ios.md §4,
  testing.md, CLAUDE.md to document the removal and stop contradicting it

Verified: ./gradlew :react-native-appsflyer:test green, npm test JS suite
green (92/92 in index.test.js)
al-af added a commit that referenced this pull request Aug 5, 2026
Adds an invalidate() override that shuts down rpcExecutor so it doesn't
leak past TurboModule teardown (bridge/context invalidation, multi-instance
RN hosts). Originally bundled with a session-ready exactly-once delivery
guard (AtomicBoolean + sessionReadyScheduler shutdown) that is now moot --
the session-ready fallback timer this guarded against was removed in the
prior commit, per PR #693 review.
Comment thread pr-review-comments.md
al-af added a commit that referenced this pull request Aug 5, 2026
…p deeplinkPath

Addresses PR #695 review comments (pazlavi):

- ConversionData collapsed to `{ [key: string]: any }` -- native hands back an
  untyped Map<String, Object>, not a fixed shape, so stop pretending otherwise.
- UnifiedDeepLinkData renamed to DeepLinkResult, matching the native type name.
  Shape unchanged (already verified against native source).
- GenerateInviteLinkParams.deeplinkPath removed outright, along with its dead
  console.warn branch in generateInviteLink -- it never shipped, so there's no
  deprecation window to honor.
- onInstallConversionData/onInstallConversionFailure/onDeepLink renamed to
  onConversionDataSuccess/onConversionDataFail/onDeepLinking, matching the
  native SDK's own event names exactly. Since 7.0.0/7.0.1 have no git tag yet,
  this lands as one rename within the same unreleased major, not a second
  breaking change stacked on top of it.

Propagated the rename across index.ts (impl, AppsFlyerApi interface, RPC event
demux, listener buckets), all four Jest test files, example/src/App.tsx, both
demo apps, and living docs (MIGRATION.md, CHANGELOG.md, Docs/RN_API.md and
friends, .claude/rules/*, CLAUDE.md). Also updated .af-e2e/test-plan.json and
.af-smoke/rc-test-plan.json's log-pattern matchers, which depend on the exact
callback name logged by example/src/App.tsx and would have silently stopped
matching otherwise.

Also fixed two stale "native buffers registrations until init completes"
comments (MIGRATION.md, Docs/RN_API.md, example/src/App.tsx) left over from
PR #693's RpcInitGate removal -- that buffer no longer exists, so the claim
was already false before this change.

Left known-issues-kb.md, specs/, Docs/plans/, schemas/ untouched -- historical
incident log and gitignored point-in-time planning artifacts, not living docs.

Verified: npx tsc --noEmit clean, npm test 311/311, npm run lint clean.
al-af added 2 commits August 6, 2026 10:53
Updates the `blockDir` regex in `metro.config.js` to prevent ReDoS vulnerabilities through improved escaping.
Forces an upgrade of `brace-expansion` via `overrides` to mitigate known transitive dependency vulnerabilities.
Removes the `react-doctor` dependency as it is no longer required for
TurboModule core development.
al-af added a commit that referenced this pull request Aug 6, 2026
Adds an invalidate() override that shuts down rpcExecutor so it doesn't
leak past TurboModule teardown (bridge/context invalidation, multi-instance
RN hosts). Originally bundled with a session-ready exactly-once delivery
guard (AtomicBoolean + sessionReadyScheduler shutdown) that is now moot --
the session-ready fallback timer this guarded against was removed in the
prior commit, per PR #693 review.
al-af added a commit that referenced this pull request Aug 6, 2026
…p deeplinkPath

Addresses PR #695 review comments (pazlavi):

- ConversionData collapsed to `{ [key: string]: any }` -- native hands back an
  untyped Map<String, Object>, not a fixed shape, so stop pretending otherwise.
- UnifiedDeepLinkData renamed to DeepLinkResult, matching the native type name.
  Shape unchanged (already verified against native source).
- GenerateInviteLinkParams.deeplinkPath removed outright, along with its dead
  console.warn branch in generateInviteLink -- it never shipped, so there's no
  deprecation window to honor.
- onInstallConversionData/onInstallConversionFailure/onDeepLink renamed to
  onConversionDataSuccess/onConversionDataFail/onDeepLinking, matching the
  native SDK's own event names exactly. Since 7.0.0/7.0.1 have no git tag yet,
  this lands as one rename within the same unreleased major, not a second
  breaking change stacked on top of it.

Propagated the rename across index.ts (impl, AppsFlyerApi interface, RPC event
demux, listener buckets), all four Jest test files, example/src/App.tsx, both
demo apps, and living docs (MIGRATION.md, CHANGELOG.md, Docs/RN_API.md and
friends, .claude/rules/*, CLAUDE.md). Also updated .af-e2e/test-plan.json and
.af-smoke/rc-test-plan.json's log-pattern matchers, which depend on the exact
callback name logged by example/src/App.tsx and would have silently stopped
matching otherwise.

Also fixed two stale "native buffers registrations until init completes"
comments (MIGRATION.md, Docs/RN_API.md, example/src/App.tsx) left over from
PR #693's RpcInitGate removal -- that buffer no longer exists, so the claim
was already false before this change.

Left known-issues-kb.md, specs/, Docs/plans/, schemas/ untouched -- historical
incident log and gitignored point-in-time planning artifacts, not living docs.

Verified: npx tsc --noEmit clean, npm test 311/311, npm run lint clean.
al-af added 2 commits August 6, 2026 11:21
Updates the `blockDir` regex in `metro.config.js` files to prevent ReDoS
vulnerabilities through improved escaping and anchoring.
Forces an upgrade of `fast-uri` via `overrides` to mitigate known
transitive dependency vulnerabilities.
Relocates the `fast-uri` override from the root `package.json` to the
`demos/appsflyer-expo-app/package.json`. This ensures the override is
applied only where specifically needed by the demo app, preventing
potential unintended side effects on other packages in the monorepo.
al-af added a commit that referenced this pull request Aug 6, 2026
Adds an invalidate() override that shuts down rpcExecutor so it doesn't
leak past TurboModule teardown (bridge/context invalidation, multi-instance
RN hosts). Originally bundled with a session-ready exactly-once delivery
guard (AtomicBoolean + sessionReadyScheduler shutdown) that is now moot --
the session-ready fallback timer this guarded against was removed in the
prior commit, per PR #693 review.
al-af added a commit that referenced this pull request Aug 6, 2026
…p deeplinkPath

Addresses PR #695 review comments (pazlavi):

- ConversionData collapsed to `{ [key: string]: any }` -- native hands back an
  untyped Map<String, Object>, not a fixed shape, so stop pretending otherwise.
- UnifiedDeepLinkData renamed to DeepLinkResult, matching the native type name.
  Shape unchanged (already verified against native source).
- GenerateInviteLinkParams.deeplinkPath removed outright, along with its dead
  console.warn branch in generateInviteLink -- it never shipped, so there's no
  deprecation window to honor.
- onInstallConversionData/onInstallConversionFailure/onDeepLink renamed to
  onConversionDataSuccess/onConversionDataFail/onDeepLinking, matching the
  native SDK's own event names exactly. Since 7.0.0/7.0.1 have no git tag yet,
  this lands as one rename within the same unreleased major, not a second
  breaking change stacked on top of it.

Propagated the rename across index.ts (impl, AppsFlyerApi interface, RPC event
demux, listener buckets), all four Jest test files, example/src/App.tsx, both
demo apps, and living docs (MIGRATION.md, CHANGELOG.md, Docs/RN_API.md and
friends, .claude/rules/*, CLAUDE.md). Also updated .af-e2e/test-plan.json and
.af-smoke/rc-test-plan.json's log-pattern matchers, which depend on the exact
callback name logged by example/src/App.tsx and would have silently stopped
matching otherwise.

Also fixed two stale "native buffers registrations until init completes"
comments (MIGRATION.md, Docs/RN_API.md, example/src/App.tsx) left over from
PR #693's RpcInitGate removal -- that buffer no longer exists, so the claim
was already false before this change.

Left known-issues-kb.md, specs/, Docs/plans/, schemas/ untouched -- historical
incident log and gitignored point-in-time planning artifacts, not living docs.

Verified: npx tsc --noEmit clean, npm test 311/311, npm run lint clean.
@al-af
al-af merged commit 3a97f72 into development Aug 6, 2026
5 checks passed
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