e246fef883559fabfd1629ad903613588ba7470a
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
Languages
TypeScript
100%