Skip to content

[NOJIRA] fix: add modulesProvider to packages with TurboModules - #1370

Merged
marco-saia-datadog merged 1 commit into
developfrom
marcosaia/fix/modules-provider-in-package-json
Aug 13, 2026
Merged

[NOJIRA] fix: add modulesProvider to packages with TurboModules#1370
marco-saia-datadog merged 1 commit into
developfrom
marcosaia/fix/modules-provider-in-package-json

Conversation

@marco-saia-datadog

Copy link
Copy Markdown
Member

What does this PR do?

Add codegenConfig.ios.modulesProvider to packages with TurboModules.

Motivation

New Architecture's iOS codegen needs to resolve each TurboModule spec to its concrete Objective-C class. It does this via codegenConfig.ios.modulesProvider in package.json. This is a static, compile-time map from spec name to class name. It replaces the old bridge's runtime NSClassFromString discovery.

See the official docs: https://reactnative.dev/docs/turbo-native-modules-introduction (the modulesProvider field in the codegenConfig.ios example).

Our packages' codegenConfig never declared an ios key. So this mapping was missing, and it seems to cause issues in Expo 57+.

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests
  • Make sure you discussed the feature or bugfix with the maintaining team in an Issue
  • Make sure each commit and the PR mention the Issue number (cf the CONTRIBUTING doc)
  • If this PR is auto-generated, please make sure also to manually update the code related to the change

Copilot AI lite review requested due to automatic review settings August 13, 2026 15:41
@marco-saia-datadog
marco-saia-datadog requested a review from a team as a code owner August 13, 2026 15:41
@marco-saia-datadog marco-saia-datadog changed the title [NOJIRA] fix: add modulesProvider in package.json [NOJIRA] fix: add modulesProvider to packages with TurboModules Aug 13, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates React Native package codegenConfig metadata to support iOS New Architecture codegen by providing an explicit TurboModule spec → Objective‑C class mapping via codegenConfig.ios.modulesProvider.

Changes:

  • Added codegenConfig.ios.modulesProvider to @datadog/mobile-react-native (core) for its TurboModules (DdFlags, DdLogs, DdRum, DdSdk, DdTrace).
  • Added codegenConfig.ios.modulesProvider to @datadog/react-native-session-replay for DdSessionReplay.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
packages/react-native-session-replay/package.json Adds iOS modulesProvider mapping for the Session Replay TurboModule.
packages/core/package.json Adds iOS modulesProvider mapping for core TurboModules used by the SDK.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +117 to +121
"ios": {
"modulesProvider": {
"DdFlags": "DdFlags",
"DdLogs": "DdLogs",
"DdRum": "DdRum",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

May be worth making the change here too

Copilot AI review requested due to automatic review settings August 13, 2026 15:52
@marco-saia-datadog
marco-saia-datadog force-pushed the marcosaia/fix/modules-provider-in-package-json branch from 6153d23 to 255f2fc Compare August 13, 2026 15:52

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

@marco-saia-datadog
marco-saia-datadog merged commit 27ec610 into develop Aug 13, 2026
12 checks passed
@marco-saia-datadog
marco-saia-datadog deleted the marcosaia/fix/modules-provider-in-package-json branch August 13, 2026 19:34
@sbarrio sbarrio mentioned this pull request Aug 14, 2026
4 tasks
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.

3 participants