Repository navigation
Conversation
The last start index of each globstar-delimited body section was computed from the non-globstar prefix counts in reverse order. When sections have different lengths, the bound is too tight, so paths such as `a/b/c/d/e` failed to match `**/a/b/c/**/d/**`. This affected `path.matchesGlob()` and `exclude` patterns in `fs.glob()`. Compute the bound from the number of non-globstar parts in the section and every section after it. Signed-off-by: Gürgün Dayıoğlu <hey@gurgun.day>
Collaborator
|
Review requested:
|
Member
Is this a breaking change, since the previous implementation suffered the same issue? Or just a bug fix |
Member
Author
|
I don't have a strong opinion, but this can't be backported anyway right? I think no active release has the C++ port? And previous releases (24, 26) have the bug from minimatch directly |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #66738 +/- ##
=======================================
Coverage 90.48% 90.49%
=======================================
Files 791 791
Lines 277204 277225 +21
Branches 53311 53315 +4
=======================================
+ Hits 250841 250861 +20
+ Misses 16760 16753 -7
- Partials 9603 9611 +8
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The last start index of each globstar-delimited body section was computed from the non-globstar prefix counts in reverse order. When sections have different lengths, the bound is too tight, so paths such as
a/b/c/d/efailed to match**/a/b/c/**/d/**. This affectedpath.matchesGlob()andexcludepatterns infs.glob()Compute the bound from the number of non-globstar parts in the section and every section after it
FYI minimatch has the bug too