Skip to content

Releases: mrmlnc/fast-glob

3.2.6

27 Jun 17:10
Compare
Choose a tag to compare

🐛 Bug fixes

  • Now you can use patterns related to the parent directory along with the regular ones. (#310, #316)
// Patterns inside current directory → ['*', './*.js']
// Patterns outside current directory → ['../*', './../*.js']

// Previously you could specify a patterns outside current directory.
fg.sync(['../*.txt'])  ['../file.txt']

// But when the pattern inside current directory was added to them, the behavior broke down.
fg.sync(['*.md', '../*.txt'])  ['file.md'] // The '../file.txt' file exists

// After this fix you can mix both kinds of patterns.
fg.sync(['*.md', '../*.txt'])  ['file.md', '../file.txt']

// Right now we do not support patterns like '{.,..}/*.md'.

📖 Documentation

  • Added clarifications for the followSymbolicLinks option.

⚙️ Infrastructure

  • The glob-parent package has been updated to fix vulnerabilities. (#304)
  • The micromatch package has been updated to eliminate dependency on the picomatch package from this package. (#256)
  • Node.js 16 has been added to the CI configuration to run tests and benchmarks. Now benchmarks will run only on this version. (#311)
  • The tiny-glob package has been added to the synchronous product benchmarks. (#323)
  • The fdir package has been added to synchronous and asynchronous product benchmarks. The latest launch. (#322)
  • The .npmignore file has been replaced by the files field in the package.json file. (#321)

3.2.5

17 Jan 10:11
Compare
Choose a tag to compare

🐛 Bug fixes

📖 Documentation

  • Fix examples for the markDirectories option (#287, thanks @yarastqt).

⚙️ Infrastructure

  • Use the latest versions of OS in CI (#279).
  • Move from Azure Pipelines to GitHub Actions (#299).

3.2.4

16 Jun 07:17
Compare
Choose a tag to compare

🐛 Bug fixes

  • Fixed a regression in 3.2.3 when the caseSensitiveMatch option is disabled (#276)

3.2.3

15 Jun 16:58
Compare
Choose a tag to compare

🐛 Bug fixes

  • Fixed an issue when the unique option led to incorrect results when mixing static and dynamic patterns (#268)
  • Fixed an issue when the pattern starting with a forward slash (#266)

3.2.2

21 Feb 20:49
Compare
Choose a tag to compare

🐛 Bug fixes

  • Fix a problem with patterns with leading dot segment (like ./… or .\\…) (#257)

3.2.1

20 Feb 18:46
Compare
Choose a tag to compare

💬 Common

  • Temporary fix for #253.

3.2.0

15 Feb 11:20
Compare
Choose a tag to compare

💬 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.

3.1.1

01 Dec 10:35
Compare
Choose a tag to compare

🐛 Bug fixes

Stream is not closed when the receiver is closed (#239)

Previously, we read directories in the stream, even after the receiver is closed. Now we stop reading after closing the receiver by .emit('end'), .destroy() or for await...of.

const fg = require('fast-glob');

(async () => {
    const stream = fg.stream('**');

    for await (const entry of stream) {
        console.log(entry);

        return;
    }
})();

Most likely, in future releases, we will improve integration with streams (#243).

3.1.0

06 Oct 10:01
Compare
Choose a tag to compare

💬 Common

📖 Documentation

🐛 Bug Fixes

  • Matching specific file is not found when pattern contains parentheses (#223)
    • ⚠️ Now we route patterns with escape symbol to dynamic patterns
  • Match subdirectories starting with . in {dot: false} mode (#226)

⚙️ Infrastructure

  • Move from TSLint to ESLint (#233)

3.0.4

05 Jul 19:14
Compare
Choose a tag to compare

This is a maintenance release.

💬 Common

  • Set correct default value for the onlyFiles option in the documentation (thanks, @garyking)
  • Disable the strictSlashes option (internal) for the micromatch package. Related to micromatch/picomatch#21.