Open mfazekas opened 1 month ago
As for fix, either the cli would need to invoke the codegen, or at lease use the same rules as codegen.
/^(Native.+|.+NativeComponent)/
- see https://github.com/facebook/react-native/blob/65a3259f039416394d2b945ec10565d38b3cad9e/packages/react-native-codegen/src/cli/combine/combine-utils.js#L29-L43 and https://github.com/reactwg/react-native-new-architecture/blob/main/docs/fabric-native-components.md#2-javascript-specification and https://github.com/reactwg/react-native-new-architecture/blob/main/docs/turbo-modules.md#2-javascript-specification
Environment
Description
react-native 0.75-rc.4 uses
npx @react-native-community/cli config
to get components needed to autolink. Hovewer it just scans for all the folders for all source files, so it can find false positives. And it's hard to understand/troubleshoot what's going on.I've faced it when I've moved a non finished spec out of the folders I've specified , yet autolink was still referred to it. I thought that there was some cached state that caused the component to be searched for.
In the reproducer the cli will find and adds https://github.com/mfazekas/rn-075-autolink/blob/autolink-wrong-files/RTNCenteredText/temp/Playgroud.ts to autolink.
Reproducible Demo