Closed jonschlinkert closed 8 years ago
Looks great — esp since all tests pass.
Didn't really review the diff, but your description of the new behavior looks awesome - especially compared with the earlier brute-force approaches you illustrated.
I assume that when not using makeRe
it still expands to the full array of values like before, right?
I assume that when not using makeRe it still expands to the full array of values like before, right?
exactly, it will still create the full arrays. thanks for the feedback!
855,000 generated tests pass in <300 ms lol. (fwiw minimatch freezes on most of those)
The main goal of this refactor was to improve conversions to regex-compatible strings. For example:
fill-range v2.2.x (current)
This is how ranges currently expand in fill-range (as would typically be expected):
fill-range is used in micromatch, here is how
minimatch
andmicromatch
handle these ranges currently:fill-range v3.0.0
Here is how fill-range handles ranges in 3.0 when
options.makeRe
is enabled:Which will result in more speed improvements in micromatch by reducing ranges to the following:
Breaking changes
Support for special
step
characters has been removed. The same thing can be accomplished by passing a function as the last argument.cc @doowb @es128 @paulmillr I'll leave this for a day or so in case anyone wants to review or provide feedback before I merge. thx