npm fast-glob 3.2.0

latest releases: 3.3.2, 3.3.1, 3.3.0...
4 years ago

💬 Common

  • An empty pattern now causes an error (#247)

🚀 Improvements

In the #156 issue we've redesigned the deep filter, which controls the reading of directories in depth.

Previously, this filter did not use positive patterns directly (only their maximum depth). The example below shows how many extra directories we read:

{src,fixtures}/**

src → read
fixtures → read
out → read
node_modules → read

Now we apply positive patterns.

{src,fixtures}/**

src → read
fixtures → read
out → skip
node_modules → skip

Synthetic benchmark

More benchmarks can be found here.

{fixtures,out}/{first,second}/*

sync, ms async, ms stream, ms
3.x.x 13 22 20
3.2.0 5 9 8

{fixtures,out}/**

sync, ms async, ms stream, ms
3.x.x 37 49 52
3.2.0 6 10 12

Real world benchmark

  • Globby
  • Prettier
  • {blocks-*,construct}/**/*.styl (a very large project) 13s → 0.16s

Known issues

  • For some cases, there is a noticeable slowdown of 3-6%.
  • Patterns containing {a..z} (or similar) may introduce some slowdown.
  • Actually, fast-glob is 2 times slower than node-glob in this scenario.

We will work on this in the future.

🎉 Thanks

  • @jonschlinkert for the scan method in picomatch that returns parts of the pattern.
  • @fisker for early beta feedback.

Don't miss a new fast-glob release

NewReleases is sending notifications on new releases.