When globbing like */package.json or */*/package.json, it runs very slowly as presumably it's crawling more files recursively like node_modules.
import { globSync } from 'tinyglobby'
console.log(globSync('*/package.json', { expandDirectories: false }))
When I try with fast-glob, it worked fast ootb:
import fg from 'fast-glob'
console.log(fg.globSync('*/package.json'))
I'm able to workaround this by adding ignore: ['**/node_modules/**'] but I shouldn't need to in the first place I believe. And IIUC the paths are still crawled recursively pass the first directory depth unnecessarily as I only specified one-level deep with */package.json.
When globbing like
*/package.jsonor*/*/package.json, it runs very slowly as presumably it's crawling more files recursively likenode_modules.When I try with
fast-glob, it worked fast ootb:I'm able to workaround this by adding
ignore: ['**/node_modules/**']but I shouldn't need to in the first place I believe. And IIUC the paths are still crawled recursively pass the first directory depth unnecessarily as I only specified one-level deep with*/package.json.