-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unique option causes static pattern to fail #268
Comments
See https://github.com/plumdog/fast-glob-issue-268 for replication using Github Actions. I thought this was telling me that is was a problem specific to using Edit: I was unable to replicate the |
Thank you for the detailed description of the issue. Looks like a bug when using static and dynamic patterns. Related to the As workaround you can use |
My duplicate issue: avajs/ava#2509. I found that it behaved differently when ran in an Ava test. To reproduce: https://github.com/adam-lynch/ava-fast-glob-issue |
I was able to find some free time to study this issue. The problem is that in the filter we add to the index any entry that passes the uniqueness check. We can easily fix the problem by adding to the index only the entries that have passed all filter checks. fast-glob/src/providers/filters/entry.ts Lines 17 to 24 in a5595b7
It will probably, fixing this issue may reduce memory consumption on very large samples. |
Shipped with |
My replication repo agrees that 3.2.3 fixes this - https://github.com/plumdog/fast-glob-issue-268/runs/775833545. @mrmlnc many thanks. |
Environment
Actual behavior
When globbing for 3 patterns, if one of the first two has a *, the third is incorrectly unused, but only under Typescript.
Expected behavior
Running the same code under Typescript or plain Node should do the same thing and use all 3 patterns.
Steps to reproduce
So I think this is telling me that something was introduced in 3.0.0 that meant that behaviour under typescript is different. Which is really strange and I don't understand why that would be. I sort of assume this is some oddity of my machine/node/typescript/other, so I'm happy to create a repo that demonstrates this a bit more tidily than the above. If someone could look over the above and point out something that I'm doing wrong, or attempt to replicate, that would be wonderful.
The text was updated successfully, but these errors were encountered: