-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Use wax for globbing #5014
Use wax for globbing #5014
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
9 Ignored Deployments
|
✅ This change can build |
🟢 CI successful 🟢Thanks |
872d856
to
d9e1200
Compare
Benchmark failures are from switching to |
These are no longer valid because wax treats ^ as a regular character.
Incomplete character range expressions are all considered invalid.
This is pretty much ready for inclusion. I have split out commits for each class of test case change. I have a single remaining question regarding these tests: @gsoltis we have spoken at length about explicitly handling potentially traversing out of the base path but it seems from these test cases we are expected not to support that? |
Co-authored-by: Greg Soltis <Greg Soltis>
This is a PR against
intregration/globbing
Description
The first implementation of globbing used a library called glob-match. It was chosen due to its large test suite derived from micromatch in the node ecosystem. However:
Wax Deviations From Doublestar / Micromatch
?
) to a grapheme cluster. For example, 🇳🇴, which consists of 🇳 followed by 🇴 does not match.a[!a]b
matchesa/b
(!!!)aa**cc
does not matchaa/bb/cc
, so to match the behaviour you must replace it withaa*/**/*/cc
as well asaa*cc
**/
does match againsta/a
meaning that trailing slashes are ignored*/**
matches againstfoo
(the doublestar matches against nothing, and the slash is collapsed!a
is invalid out of the box since they don’t support!
******and^
{,a}
is invalid (brackets cannot have zero-length matches)a/**/**/b
is not supported (consecutive doublestars are rejected rather than collapsed)a*{*,b}
is rejected because the capture is ambiguous (ie acc could capture a, ac, or acc)test/{foo/**,bar}/baz
← this one is confusing to me/
or*
test/{foo/**,bar}/bazTesting Instructions
The tests in globwalk should be exhaustive.