Skip to content

Remove New Arch interop checks - New Arch only#456

Open
kieran-osgood-shopify wants to merge 4 commits intocx-rn-new-arch-planfrom
kieran-osgood/03-30-featreplaceinteropwithnewarchcode
Open

Remove New Arch interop checks - New Arch only#456
kieran-osgood-shopify wants to merge 4 commits intocx-rn-new-arch-planfrom
kieran-osgood/03-30-featreplaceinteropwithnewarchcode

Conversation

@kieran-osgood-shopify
Copy link
Copy Markdown
Contributor

@kieran-osgood-shopify kieran-osgood-shopify commented Mar 30, 2026

What changes are you making?

Following on from the introduction of turbo specs in #449 this PR removes the existing fabric conditionals leaving only the new architecture enabled going forwards


PR Checklist

Important

Releasing a new version of the kit?


Tip

See the Contributing documentation for instructions on how to publish a new version of the library.

Copy link
Copy Markdown
Contributor Author

kieran-osgood-shopify commented Mar 30, 2026

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 30, 2026

Coverage Report

Lines Statements Branches Functions
Coverage: 98%
97.34% (220/226) 92.53% (124/134) 100% (63/63)

@kieran-osgood-shopify kieran-osgood-shopify force-pushed the kieran-osgood/03-30-featreplaceinteropwithnewarchcode branch from b78d8d1 to ead781e Compare April 16, 2026 16:21
@kieran-osgood-shopify kieran-osgood-shopify marked this pull request as ready for review April 16, 2026 17:06
@kieran-osgood-shopify kieran-osgood-shopify requested a review from a team as a code owner April 16, 2026 17:06
kieran-osgood-shopify and others added 2 commits April 17, 2026 09:22
Now that we're on TurboModules, the four promise-based methods (getConfig,
configureAcceleratedCheckouts, isAcceleratedCheckoutAvailable,
isApplePayAvailable) can use synchronous JSI dispatch. Their native
implementations are pure in-memory reads or state writes, so the Promise
wrapper was boilerplate that blocked readable call sites.

BREAKING CHANGE: Consumers must drop `await` from these calls.

- Spec: return ConfigurationResultSpec / boolean directly instead of Promise
- iOS Swift: remove resolve/reject, return NSDictionary / NSNumber
- Android: annotate with isBlockingSynchronousMethod = true, return directly
- Consumer API in src/index.ts and src/context.tsx: drop async / await
- Tests: replace mockResolvedValue with mockReturnValue, drop awaits
- Sample app: drop awaits in Cart and SettingsScreen

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The codegen spec returns colorScheme and logLevel as `string`, but the
consumer-facing Configuration type uses typed enums. Replace the previous
`as Configuration` cast with a parser that:

- Validates colorScheme/logLevel against known enum values, falling back
  to the safest default when the native side returns an unrecognised value
- Re-shapes the flat iOS color fields into the nested `colors.ios` shape
  so a round trip through setConfig preserves user overrides
- Omits undefined fields so consumers don't see spurious `title: undefined`

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@kieran-osgood-shopify kieran-osgood-shopify changed the title feat: replace interop with new arch code Remove New Arch interop checks - New Arch only Apr 17, 2026
Swift tests were still calling the four converted methods with
resolve/reject callbacks. Update them to call the sync API directly
and compare against the returned NSNumber/NSDictionary.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

1 participant