Skip to content

Commit

Permalink
Fix Typo and skip generation of app-specific component registration (#…
Browse files Browse the repository at this point in the history
…47547)

Summary:
Pull Request resolved: #47547

In [#47176](#47176) we disabled the generation of the component registration for app specific components as it was creating a circular dependency between the app and React Native.

However, we made a couple of typos that make it not work as expected and users picked up those typos soon.

This change fixes them for good.

## Changelog
[iOS][Fixed] - Properly stop generating component registration for components defined in app.

Reviewed By: blakef

Differential Revision: D65750433

fbshipit-source-id: 1a879c5be014905558b9fd05e6f16ac36b784ed6
  • Loading branch information
cipolleschi authored and blakef committed Nov 12, 2024
1 parent 9f65442 commit 1e659dc
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ function rootCodegenTargetNeedsThirdPartyComponentProvider(pkgJson, platform) {
function dependencyNeedsThirdPartyComponentProvider(
schemaInfo,
platform,
appCondegenConfigSpec,
appCodegenConfigSpec,
) {
// Filter the react native core library out.
// In the future, core library and third party library should
Expand All @@ -503,7 +503,7 @@ function dependencyNeedsThirdPartyComponentProvider(
// the symbols defined in the app.
return (
!isReactNativeCoreLibrary(schemaInfo.library.config.name, platform) &&
schemaInfo.library.config.name !== appCondegenConfigSpec
schemaInfo.library.config.name !== appCodegenConfigSpec
);
}

Expand Down Expand Up @@ -719,7 +719,7 @@ function execute(projectRoot, targetPlatform, baseOutputPath) {
dependencyNeedsThirdPartyComponentProvider(
schemaInfo,
platform,
pkgJson.codegenConfig?.appCondegenConfigSpec,
pkgJson.codegenConfig?.name,
),
);
const schemas = filteredSchemas.map(schemaInfo => schemaInfo.schema);
Expand Down

0 comments on commit 1e659dc

Please sign in to comment.