-
Notifications
You must be signed in to change notification settings - Fork 12
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
improve exclude optimizer #76
base: main
Are you sure you want to change the base?
Conversation
commit: |
Co-authored-by: Joachim Viide <[email protected]>
67d9549
to
1aa688f
Compare
while the tests do pass now thanks to the new fdir version fixing excluding symlinks, this implementation doesn't handle patterns that have test('dynamic patterns that include slashes inside parts', async () => {
const files = await glob({ patterns: ['{.a/a,a}/a.txt'], cwd });
// files ends up being []
assert.deepEqual(files.sort(), ['a/a.txt', '.a/a/a.txt']);
}); it's easy to see why it fails but hard to properly fix. |
Would it help to have |
maybe but i'm not sure if it's optimal |
didn't want to do this, but this pr is important and a release is being delayed too much. thankfully, it seems like almost no one uses patterns like that. any optimizations here are welcome
shorter and probably faster implementation 🎉 also improves optimization for patterns that end with
**
needs some work, this implementation (and the previous one) don't work well with patterns that wrapdisabled optimizations in those cases for now/
in things like*(src/index.ts)
. see #76 (comment)also closes #79 once the above is solved, and makes tests from #80 work :-)