Here's a situation that I've come across. There is a directory a that has a single file in it, a/b. The following program shows that globby will return the file twice (once with a leading ./ and once without. However, fast-glob only returns this file once.
const g = require('globby')
const f = require('fast-glob')
console.log(g.sync(['./a','./a/**'])) // [ 'a/b', './a/b' ]
console.log(f.sync(['./a','./a/**'])) // [ './a/b' ]
When this is run without the leading ./ both globby and fast-glob return the file only once. I think fast-glob is the correct behaviour.
Here's a situation that I've come across. There is a directory
a
that has a single file in it,a/b
. The following program shows thatglobby
will return the file twice (once with a leading./
and once without. However,fast-glob
only returns this file once.When this is run without the leading
./
bothglobby
andfast-glob
return the file only once. I thinkfast-glob
is the correct behaviour.Using v11.0.3 of globby. And v3.2.5 of fast-glob.