Skip to content

Commit 91d0345

Browse files
kirill3333facebook-github-bot
authored andcommitted
Allow the .pnpm folder to be discovered during code generation (facebook#49983)
Summary: This PR (facebook#48182) introduced skipping hidden folders during Codegen generation. However, when using pnpm, all files are stored in the `.pnpm` folder (see explanation here: https://pnpm.io/symlinked-node-modules-structure). As a result, some libraries that support the new architecture but lack the `ios.codegenConfig.componentProvider` field - like [FlashList](https://github.com/Shopify/flash-list/blob/main/package.json) - will be skipped during Codegen generation. This PR explicitly includes `.pnpm` to prevent this issue. ## Changelog: [iOS][Fixed] - Check .pnpm folder when looking for third-party components. Pull Request resolved: facebook#49983 Test Plan: Tested on: RN 0.78.0 PNPM: 10 Flashlist: 1.7.3 Reviewed By: cipolleschi Differential Revision: D71047936 Pulled By: cortinico fbshipit-source-id: fa9caab23dea8c92ef5f23c997812d348eb19e08
1 parent 0f2a53d commit 91d0345

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

packages/react-native/scripts/codegen/generate-artifacts-executor.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -833,8 +833,11 @@ function findFilesWithExtension(filePath, extension) {
833833
return null;
834834
}
835835

836-
// Skip hidden folders, that starts with `.`
837-
if (absolutePath.includes(`${path.sep}.`)) {
836+
// Skip hidden folders, that starts with `.` but allow `.pnpm`
837+
if (
838+
absolutePath.includes(`${path.sep}.`) &&
839+
!absolutePath.includes(`${path.sep}.pnpm`)
840+
) {
838841
return null;
839842
}
840843

0 commit comments

Comments
 (0)