Exclude __mocks__ folder from codegen podspec generation

Summary:
We should not be adding files inside Jest's __mocks__ folder inside the generated podspec.
This takes care of it.

Context: https://github.com/reactwg/react-native-new-architecture/discussions/282

Changelog:
[Internal] [Changed] - Exclude __mocks__ folder from codegen podspec generation

Reviewed By: fabriziocucci

Differential Revision: D72318736

fbshipit-source-id: 73a8c3f3cd84794ead9e7ce622f7ac4299d943f1
This commit is contained in:
Nicola Corti
2025-04-03 02:53:49 -07:00
committed by Facebook GitHub Bot
parent e6ae02a6db
commit d13be5723f
@@ -60,7 +60,7 @@ function getInputFiles(appPath, appPkgJSon) {
)[0];
const jsFiles = '-name "Native*.js" -or -name "*NativeComponent.js"';
const tsFiles = '-name "Native*.ts" -or -name "*NativeComponent.ts"';
const findCommand = `find ${path.join(appPath, jsSrcsDir)} -type f \\( ${jsFiles} -or ${tsFiles} \\)`;
const findCommand = `find ${path.join(appPath, jsSrcsDir)} -type f -not -path "*/__mocks__/*" -and \\( ${jsFiles} -or ${tsFiles} \\)`;
const list = String(execSync(findCommand))
.trim()
.split('\n')