Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: isaacs/minimatch
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v6.2.0
Choose a base ref
...
head repository: isaacs/minimatch
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v7.0.0
Choose a head ref
  • 3 commits
  • 8 files changed
  • 1 contributor

Commits on Feb 20, 2023

  1. Pre-optimize patterns prior to parsing

    Make various equivalent edits to the glob parts array to avoid
    (as much as possible) situations that result in significant
    increases in work required to walk folder trees in node-glob.
    
    BREAKING CHANGES:
    
    In some cases, with very complicated patterns, this actually reduces the
    performance of the full makeRe regular expression.  Also, because `..`
    now swallows any pattern ahead of it (other than globstar, dot,
    double-dot, and empty), this means that a pattern like `a/../b` will
    *not* match the string `a/**/b`, because it shrinks to just `b`.
    
    But it also means that patterns *will* match against `path.join()`'ed
    strings, whereas previously they would not.
    
    It would be possible to handle the second issue in `.match()` by walking
    back on path portions `..`, which is worth considering if this causes
    issues as people who use this in other situations upgrade to the new
    version.
    
    And while the full makeRe pattern is quite a bit longer in the case of
    complicated patterns, having multiple simpler patterns can pretty
    dramatically *improve* performance in the `.match()` method.
    
    Also, duplicate and extraneous patterns are removed from the pattern
    set.  For example, `a/{b,b,*}/c` will be parsed the same as `a/*/c`,
    since `*` can match against `b`, and the two `a/b/c` expansions are
    identical.
    isaacs committed Feb 20, 2023
    Configuration menu
    Copy the full SHA
    297b6c1 View commit details
    Browse the repository at this point in the history
  2. changelog 7.0

    isaacs committed Feb 20, 2023
    Configuration menu
    Copy the full SHA
    8aa00d7 View commit details
    Browse the repository at this point in the history
  3. 7.0.0

    isaacs committed Feb 20, 2023
    Configuration menu
    Copy the full SHA
    ce9e6a4 View commit details
    Browse the repository at this point in the history
Loading