From 1e659dc44e873c867a9fff7f5ed9906b51313de7 Mon Sep 17 00:00:00 2001 From: Riccardo Cipolleschi Date: Mon, 11 Nov 2024 04:55:23 -0800 Subject: [PATCH] Fix Typo and skip generation of app-specific component registration (#47547) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/47547 In [#47176](https://github.com/facebook/react-native/pull/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 --- .../scripts/codegen/generate-artifacts-executor.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/react-native/scripts/codegen/generate-artifacts-executor.js b/packages/react-native/scripts/codegen/generate-artifacts-executor.js index bb47205ae4ac2a..df2d16a57a3a86 100644 --- a/packages/react-native/scripts/codegen/generate-artifacts-executor.js +++ b/packages/react-native/scripts/codegen/generate-artifacts-executor.js @@ -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 @@ -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 ); } @@ -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);