mirror of
https://github.com/oven-sh/bun
synced 2026-02-02 15:08:46 +00:00
## Summary - Fixed a typo in `makeComponent` that incorrectly identified 2-character patterns starting with `.` (like `.*`) as `..` (DotBack) patterns - The condition checked `pattern[component.start] == '.'` twice instead of checking both characters at positions 0 and 1 - This caused patterns like `.*/*` to be parsed as `../` + `*`, making the glob walker traverse into parent directories Fixes #24936 ## Test plan - [x] Added tests in `test/js/bun/glob/scan.test.ts` that verify patterns like `.*/*` and `.*/**/*.ts` don't escape the cwd boundary - [x] Tests fail with system bun (bug reproduced) and pass with the fix - [x] All existing glob tests pass (169 tests) 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Bot <claude-bot@bun.sh> Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>