dualfroz e246fef883 fix: use the basename as the entry name for static patterns
The static reader built the entry from the pattern as is, so `name` and
`dirent.name` were the whole pattern, while the dynamic reader returns
the basename. The same `objectMode: true` option therefore produced a
different entry shape depending on whether the pattern was static:

  globSync('fixtures/file.md', { objectMode: true })
  // name: 'fixtures/file.md', path: 'fixtures/file.md'

  globSync('fixtures/*.md', { objectMode: true })
  // name: 'file.md', path: 'fixtures/file.md'

Note that `path` already agreed between the two readers, only `name`
diverged. Use the basename for the entry name and for the dirent built
from the stats, which matches both the dynamic reader and the entry
builder the tests already use.

Fixes #487
2026-09-03 14:37:27 +02:00
S
Description
My contributions to mrmlnc/fast-glob: 2 commits
36 KiB
0 Stars 1 Watchers 0 Forks
Languages
TypeScript 100%