chore: replace micromatch with picomatch - #208
Conversation
🦋 Changeset detectedLatest commit: dba1e03 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
I believe the reason why we switched to
I see the tests are passing with picomatch, which is interesting. I played around a bit with it and it seems like the most interesting use cases of braces (e. g. different extensions like |
|
I changed this PRs base to be the |
illright
left a comment
There was a problem hiding this comment.
Code-wise I think it's great!
|
|
||
| const positiveExclusionPatterns = | ||
| (thereAreExclusions && exclusions.filter((pattern) => !isNegatedGlob(pattern))) || [] | ||
| const negativeExclusionPatterns = |
There was a problem hiding this comment.
suggestion (non-blocking): since "positive exclusion" and "negative exclusion" aren't commonly understood terms, hence they require some time to understand, perhaps we could instead have "positive exclusion" and "re-inclusion"?
| const negativeExclusionPatterns = | |
| const reInclusionPatterns = |
020d12d to
03ebcf0
Compare
03ebcf0 to
dba2c54
Compare
dba2c54 to
95c6164
Compare
illright
left a comment
There was a problem hiding this comment.
Thanks! The regression in the lilconfig migration made me a bit worried, could you add some extra tests to packages/steiger/src/shared/globs/create-filter-according-to-globs.spec.ts relating to brace expansion? Currently there's only one, and it only tests brace expansion in exclusions, I'd like to make sure it also works in inclusions and negated patterns.
Ok, thanks for the review. I'll add more tests later this week. |
Improve glob filtering performance by replacing micromatch with picomatch and decrease node_modules size
234kb vs 83kb
https://node-modules.dev/grid/depth#install=picomatch
https://node-modules.dev/grid/depth#install=micromatch