globby
globby copied to clipboard
fast-glob option suppressErrors is not (entirely) respected
Summary
globby does not entirely respect fast-glob's supressErrors option
Example
require('globby')(['validFile.txt', 'validFile.txt/**/*.txt'], { suppressErrors: true })
Expected output
['validFile.txt']
Actual output
Error: ENOTDIR: not a directory, stat 'validFile.txt/**/*.txt'
This appears to be due to globby's wrapper logic that adds (on top of fast-glob) a call to dir-glob, without obeying the supressErrors option. I realize that this option is part of fast-glob, not dir-glob, but globby's docs specify that fast-glob's options are valid globby options, and, anyway, it'd be nice to do so, I think!
Pull request welcome :)