From 92a3dff58ab062acf4cd5eefaba8ac67a835cbc2 Mon Sep 17 00:00:00 2001 From: Kevin Gozali Date: Tue, 25 Aug 2020 10:34:41 -0700 Subject: [PATCH] Codegen: ignore NativeUIManager.js when producing schema given a JavaScript directory Summary: When crawling a provided JS directory to find all .js files for NativeModules and native components, ignore `NativeUIManager.js` for now, because it will be replaced with the Fabric UIManager in the future. The existing NativeUIManagerSpec.java won't be produced by the codegen, but stays manually checked in just in case: https://github.com/facebook/react-native/blob/0199a0392c65fa72d9599262ba1b4f8e14c0fc04/ReactAndroid/src/main/java/com/facebook/fbreact/specs/NativeUIManagerSpec.java Changelog: [Internal] Reviewed By: mdvacca Differential Revision: D23312859 fbshipit-source-id: 7d554fefa651732c13e478b8ec94566348ed3142 --- .../src/cli/combine/combine-js-to-schema-cli.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/react-native-codegen/src/cli/combine/combine-js-to-schema-cli.js b/packages/react-native-codegen/src/cli/combine/combine-js-to-schema-cli.js index 7de7a602b34..f9a0a07d8c9 100644 --- a/packages/react-native-codegen/src/cli/combine/combine-js-to-schema-cli.js +++ b/packages/react-native-codegen/src/cli/combine/combine-js-to-schema-cli.js @@ -29,6 +29,9 @@ fileList.forEach(file => { .filter( f => /^(Native.+|.+NativeComponent)/.test(path.basename(f)) && + // NativeUIManager will be deprecated by Fabric UIManager. + // For now, ignore this spec completely because the types are not fully supported. + !f.endsWith('NativeUIManager.js') && !f.includes('__tests'), ); allFiles.push(...dirFiles);