ISSUE-394: expand patterns with brace expansion to avoid some matching issues #395
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.
What is the purpose of this pull request?
Solves some of the problems with matching patterns containing brace expansion. Primary solves the problem when the pattern has duplicate slashes after it is expanded (#394), or the
micromatch
package does not correctly generate a regular expression (#365).What changes did you make? (Give an overview)
Expand patterns with brace expansions once at the very beginning of pattern processing when generating tasks.
This solution can lead to a slight slowdown in matching in the case of a large set of patterns after expansion. Problems with performance should deal with the issues as they come.
fg.generateTasks
In the future, we can learn to forcibly group patterns into groups if one base directory has 2+ nested directories in adjacent patterns.