Files
react-native/packages
Leevi Aattola a1bad641bc fix: exclusion of selectively disabled libraries from codegen generation (#51838)
Summary:
PR https://github.com/facebook/react-native/issues/51078 Implemented finding disabled libraries but the code (below) didn't actually filter any libraries out because destructured name is `undefined`. This pr adds the name to codegenEnabledLibraries so filtering would work.

```js
const libraries = codegenEnabledLibraries.filter(
  ({name}) => !disabledLibraries.includes(name),
);
```

## Changelog:

[IOS] [FIXED] - Skip codegen for selectively disabled libraries in react-native.config.js

Pull Request resolved: https://github.com/facebook/react-native/pull/51838

Test Plan:
1. Install a library that has the componentProvider field set in the codegen config (for example: react-native-safe-area-context and react-native-screens or see [reproducer](https://github.com/aattola/rn-codegen-exclude))
2. Exclude library with react-native.config.js
3. install pods / run codegen
4. Check that codegen actually excluded the specified dependencies from: `ios/build/generated/ios/RCTThirdPartyComponentsProvider.mm`

Rollback Plan:

Reviewed By: cortinico

Differential Revision: D76044622

Pulled By: cipolleschi

fbshipit-source-id: 9e70c2a263c750edb1ea95305c9e5e178e2ce8d8
2025-06-09 14:00:47 +00:00
..
2025-06-02 16:25:27 +00:00
2025-06-02 16:25:27 +00:00
2025-06-02 16:25:27 +00:00
2025-06-02 16:25:27 +00:00
2025-06-02 16:25:27 +00:00
2025-06-02 16:25:27 +00:00
2025-06-02 16:25:27 +00:00
2025-06-02 16:25:27 +00:00
2025-06-02 16:25:27 +00:00
2025-06-02 16:25:27 +00:00
2025-06-02 16:25:27 +00:00
2025-06-02 16:25:27 +00:00
2025-06-02 16:25:27 +00:00
2025-06-02 16:25:27 +00:00
2025-06-02 16:25:27 +00:00
2025-06-02 16:25:27 +00:00
2025-06-02 17:53:41 +00:00
2025-06-02 16:25:27 +00:00
2025-06-02 16:25:27 +00:00