-
Notifications
You must be signed in to change notification settings - Fork 25
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
Some files are missing when doing glob #28
Comments
Here's the one causing problem https://github.com/terkelg/tiny-glob/blob/master/index.js#L34, I can remove it, and everything works as expected in my case. Also, it won't fail any tests. |
I just put up a failing test here chenxsan@18f54bc |
Hi Sam! Thanks for having a look at the issue. Does it effect the benchmarks when you remove that line? It can also be a problem with the regex coming from globrex. Can you print the regex and file and test them? The idea is that every path segment (aka dir name) is checked before tiny-glob starts crawling that directory. When globrex convert a glob it also break it into smaller regex segments for each folder/path segment. This is done so tiny-glob can check each directory and avoid spending time crawling unnecessary folders that never will result in any matches anyway. I suspect the regex for the glob |
Here's benchmark result after I removed that line:
|
What's going on with the directory names? Can you post the non-escaped strings for some of them? |
@terkelg Thought it's really difficult for you to understand my situation, I just created a new repo here https://github.com/chenxsan/tiny-glob-demo. Please run |
Thanks a lot @chenxsan. I'll have a look at this when I get some spare time. I appreciate the help and information you provided |
Its possible that i have the same problem, but in different form. I prepared repo with test case: Shortcut: Structure:
Code:
Results
|
I have this code:
And I would expect the files for
{post,page}/**/*.{md}
={post}/**/*.{md}
+{page}/**/*.{md}
, but it's not in my case.I have 2 files for
{page}/**/*.{md}
, and 53 files for{post}/**/*.{md}
, but only 33 for{post,page}/**/*.{md}
. Am I doing something wrong here? ThesearchPattern
just works fine under node-glob, fast-glob.The text was updated successfully, but these errors were encountered: