Multiple Globs conflict when using both root-relative and file-relative globs #4
Comments
We could normalize the glob before passing to fast-glob
There is not much complexity to add since |
I will add more tests to cover the usage. I guess |
I see, makes sense. But I think we still need to run E.g. your last commit makes |
Ah, I think it's because of |
Yes, it's because it crawls into
I was wrong, it's not your commit. It's because I removed the |
AFAICT it works out with the latest changes. I see only two problems.
In the future, we can use the common ancestor directory of all glob roots as The best would be to write a patch for |
I guess the common ancestor directory is doable for us and makes sense. Or maybe you can do a |
I further dug into that but it turns out to be not that easy to implement.
Also had a quick look into that, but couldn't find a straightforward way to patch I think the current version is performant enough. But I created a new ticket for it in case |
For example:
This requires two different
fast-glob
runs because./*.js
hascwd: basename(id)
while/*.js
hascwd: config.root
.We can solve this by discriminating globs into two buckets (one bucket per
cwd
value). Then we make onefast-glob
run per bucket.But things can get complex if we want to add support for parent-globbing
import.meta.importGlob('../../*.js')
.I'm wondering if Multiple Globs are worth the added complexity? Are Multiple Globs only about increasing performance by avoiding multiple
fast-glob
runs? Or is there another use case I'm not seeing?Proposal: we drop support for Multiple Globs. But maybe I'm missing something here.
Alternatively, a solution would be:
The text was updated successfully, but these errors were encountered: