Skip to content

fix: resolve build globs relative to the source directory - #2890

Open
vivekjm wants to merge 1 commit into
react-native-community:mainfrom
vivekjm:fix/build-glob-path
Open

vivekjm wants to merge 1 commit into
react-native-community:mainfrom
vivekjm:fix/build-glob-path

Conversation

@vivekjm

@vivekjm vivekjm commented Nov 12, 2026

Copy link
Copy Markdown

Summary

Fixes #2888. The package build passed an absolute checkout path as part of the fast-glob pattern. Windows path separators were interpreted as escapes, so the build could succeed without emitting JavaScript. Parentheses in a checkout path also caused the same failure on macOS.

Use a relative glob and pass the source directory through cwd. Keep absolute file results for the existing build and source-map logic. Add an integration regression to the unit CI command.

Test Plan

  • The new regression failed with missing JavaScript on the original code and passed with the fix on macOS.
  • yarn build, yarn test:ci:unit --runInBand (325 tests), and yarn lint passed. Lint reported two existing warnings outside the changed files.
  • node packages/cli/build/bin.js --version and --help worked from the built checkout.
  • A Windows host was unavailable for local validation.

Checklist

  • Documentation is up to date.
  • Follows the commit message convention.
  • Linked into a React Native app. The regression exercises the checkout build directly.

@vivekjm
vivekjm requested a review from thymikee as a code owner November 12, 2026 07:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

On Windows, yarn install builds no JavaScript: scripts/build.js passes fast-glob a backslashed pattern that matches no file

1 participant