-
-
Notifications
You must be signed in to change notification settings - Fork 141
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
Leading './' is not included in the glob regex #199
Comments
See the format option. |
It solves the problem for const format = str => str.replace(/^\.\//, '');
const regex = picomatch.makeRe('foo/*.js', { format });
console.log(regex.test('./foo/bar.js')); //=> false but expected true |
Maybe try using the |
Agreed, but I have the same case as described in the issue linked above.
Is it safe to use |
btw thanks for quick response 🙌 |
Ah, I'm sorry for not reading more carefully and if my answer seemed to ignore those details. I didn't mean to be flippant. I see that this is more nuanced. Before I implement something new, let me think about this for a few, it seems like this came up before and I/we had a solution to it.
It's not as performant. I think we should try to make this work with picomatch. I thought the |
Got it, will try the |
FWIW, |
@dawgwe1 you've been blocked |
Minimum necessary steps to reproduce this issue:
What is happening that shouldn't be?
Output
What should be happening instead?
Expected
This issue is the exact duplicate of #110. It was resolved in
nanomatch
long ago. It works correctly usingmakeRe
fromnanomatch
.Should it be fixed in the same way in
micromatch
, probably inpicomatch
that is used under the hood?The text was updated successfully, but these errors were encountered: