Skip to content

Commit cf5ab03

Browse files
elicwhitefacebook-github-bot
authored andcommitted
Include cxx modules in codegen schema (facebook#48581)
Summary: Pull Request resolved: facebook#48581 Previously the CXX only modules were not being inclued in the schema for these apps, and therefore weren't being caught by the compat check. Reviewed By: cipolleschi Differential Revision: D68000360 fbshipit-source-id: 5d56bc840bd220f3b8b814e5d90eb49d9a2beb0b
1 parent db57080 commit cf5ab03

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

packages/react-native-codegen/src/cli/combine/combine-schemas-cli.js

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,18 @@ for (const file of schemaFiles) {
7171
);
7272
}
7373

74-
if (
75-
module.excludedPlatforms &&
76-
module.excludedPlatforms.indexOf(platform) >= 0
77-
) {
78-
continue;
74+
const excludedPlatforms = module.excludedPlatforms?.map(
75+
excludedPlatform => excludedPlatform.toLowerCase(),
76+
);
77+
78+
if (excludedPlatforms != null) {
79+
const cxxOnlyModule =
80+
excludedPlatforms.includes('ios') &&
81+
excludedPlatforms.includes('android');
82+
83+
if (!cxxOnlyModule && excludedPlatforms.includes(platform)) {
84+
continue;
85+
}
7986
}
8087

8188
modules[specName] = module;

0 commit comments

Comments
 (0)