What version of Bun is running?
1.3.10+30e609e08
What platform is your computer?
Linux 6.17.7-ba28.fc43.x86_64 x86_64 unknown
What steps can reproduce the bug?
mkdir /tmp/glob-test && touch /tmp/glob-test/.hidden /tmp/glob-test/visible
import { glob } from 'node:fs/promises';
for await (const match of glob('/tmp/glob-test/*')) console.log(match);
for await (const match of glob('/tmp/glob-test/.*')) console.log(match);
for await (const match of glob('/tmp/glob-test/.hidden')) console.log(match);
Run with bun run file.ts on Bun 1.3.10.
What is the expected behavior?
Node.js v22 output:
/tmp/glob-test/visible
/tmp/glob-test/.hidden
/tmp/glob-test/.hidden
Wildcard * skipping dot files is expected (standard minimatch behavior).
Explicit patterns .* and .hidden should match.
What do you see instead?
Bun output:
All three patterns produce no results for dot files. Even the literal path .hidden returns nothing.
Additional information
mapOptions in src/js/internal/fs/glob.ts delegates to Bun.Glob.scan() but never sets dot: true in the scan options. Bun.Glob defaults dot to false (in src/bun.js/api/glob.zig), which suppresses dot-file entries at the scanner level before pattern matching occurs.
What version of Bun is running?
1.3.10+30e609e08
What platform is your computer?
Linux 6.17.7-ba28.fc43.x86_64 x86_64 unknown
What steps can reproduce the bug?
mkdir /tmp/glob-test && touch /tmp/glob-test/.hidden /tmp/glob-test/visibleRun with
bun run file.tson Bun 1.3.10.What is the expected behavior?
Node.js v22 output:
Wildcard
*skipping dot files is expected (standard minimatch behavior).Explicit patterns
.*and.hiddenshould match.What do you see instead?
Bun output:
All three patterns produce no results for dot files. Even the literal path
.hiddenreturns nothing.Additional information
mapOptionsinsrc/js/internal/fs/glob.tsdelegates toBun.Glob.scan()but never setsdot: truein the scan options.Bun.Globdefaultsdottofalse(insrc/bun.js/api/glob.zig), which suppresses dot-file entries at the scanner level before pattern matching occurs.