Skip to content

Fix package builds under hidden directories - #60515

Open
Rabia960 wants to merge 1 commit into
react:mainfrom
Rabia960:fix-dot-folder-package-build
Open

Rabia960 wants to merge 1 commit into
react:mainfrom
Rabia960:fix-dot-folder-package-build

Conversation

@Rabia960

@Rabia960 Rabia960 commented Dec 3, 2026

Copy link
Copy Markdown

Summary:

Fixes #60447.

When the React Native repository is checked out inside a hidden directory (for example, .dot), the root build script and the react-native-codegen build script fail to correctly identify JavaScript and ignored files.

This happens because micromatch is applied to absolute paths, where its default dotfile behavior prevents the patterns from matching as expected.

This change matches paths relative to each package's source directory, ensuring JavaScript files are transformed correctly and ignored test files remain excluded.

Changelog:

[INTERNAL] [FIXED] - Fix package builds when the repository is checked out inside a hidden directory.

Test Plan:

  • Ran the root build regression tests:
    corepack yarn jest scripts/build/__tests__/build-test.js --runInBand
  • Ran the codegen build regression tests:
    corepack yarn jest packages/react-native-codegen/scripts/__tests__/build-test.js --runInBand
  • Ran both test suites together:
    corepack yarn jest scripts/build/__tests__/build-test.js packages/react-native-codegen/scripts/__tests__/build-test.js --runInBand
  • Ran Prettier checks on all four changed files:
    corepack yarn prettier --check scripts/build/build.js scripts/build/__tests__/build-test.js packages/react-native-codegen/scripts/build.js packages/react-native-codegen/scripts/__tests__/build-test.js
  • Verified git diff --check.

All 4 regression tests passed, and all formatting checks passed.

Signed-off-by: Rabia <rabiamustafa.saya@gmail.com>
@Rabia960
Rabia960 force-pushed the fix-dot-folder-package-build branch from 4500dfe to 8a02166 Compare December 3, 2026 16:16

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Package builds copy Flow sources into lib/ and dist/ untransformed when the checkout sits below a dot-folder

1 participant