Files
react-native/packages/react-native-codegen
Arushi Kesarwani 6104ccdc6e Correct the excludePlatforms logic in combining schema step of Codegen (#51910)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51910

**Changelog:**
[Android] [Fixed] - Fix combining schema in Codegen process to exclude platforms correctly

Discovered an issue with how we are excluding platforms in processing codegen schema.

`excludedPlatforms` is a field on `OptionsShape` part of `ComponentShape` not Module

https://www.internalfb.com/code/fbsource/[153d78d4cd5d0fa652e5a0919bcdb26f32d0945e]/xplat/js/react-native-github/packages/react-native-codegen/src/CodegenSchema.js?lines=112

Hence for components modifying the script to iterate over component and for then exclude accordingly based on `platform`.

Reviewed By: cipolleschi

Differential Revision: D76158851

fbshipit-source-id: 791ec12d068794e36f34da7419082887483ce6c5
2025-06-09 16:13:46 -07:00
..

@react-native/codegen

Version

Installation

yarn add --dev @react-native/codegen

Note: We're using yarn to install deps. Feel free to change commands to use npm 3+ and npx if you like

Testing

To run the tests in this package, run the following commands from the React Native root folder:

  1. yarn to install the dependencies. You just need to run this once
  2. yarn jest packages/react-native-codegen.