Skip to content

Releases: mrmlnc/fast-glob

3.0.2

23 Jun 13:33
Compare
Choose a tag to compare

The fast-glob3.0.0 was released with one known bug. This release fixes it.

🐛 Bug fixes

High memory usage for very big directories (#204)

Highlights

  • Entries: 4 000 000
  • Before: 4.1GB of RAM (37s)
  • After: 0.8GB of RAM (25s)

Explanation

In short, we called 2x replace and startsWith on every entry. Together, that's 12 million calls.

3.0.1

17 Jun 18:41
Compare
Choose a tag to compare

💬 Common

3.0.0

16 Jun 18:13
Compare
Choose a tag to compare

🌮 Thanks

📑 Summary

This release aims to fix architectural issues, increase performance and reduce size of package.

💣 Breaking changes

Since this is a major release, we are introducing a few breaking changes:

  • Support for the fast-glob@2 is ending.
  • Require Node.js 8+. But we recommend using 10.10+ for performance issues.
  • Only forward-slashes in glob expression. Previously, we convert all slashes to the forward-slashes, which did not allow the use of escaping. See pattern syntax section in the README.md file.
  • Removed options: nobrace, noglobstar, noext, nocase, transform.
  • Renamed options:
  • The deep option now accepts only number type and default value now is Infinity instead of true.
  • The async method was removed. Use fg(/* … */) instead.
  • The type of returned object when the stats option is enabled is completely changed.

🐛 Bug fixes

  • After update from micromatch@3 to micromatch@4:
    • Incorrect matching with curly braces and globstar (#159).
    • Inaccurate comparison within a regular expression (#123, #138).
    • A very long initialization time of filters (#92).
  • Now we do not convert slashes in patterns (#173).
  • Previously, the baseNameMatch option never worked (#199).

🚀 Improvements

💬 Common

  • Package size after installation is decreased: 2.47MB0.42MB.
  • Package require time decreased: 534ms78ms.

🌪️ Speed

Wow! The new version is very fast. At least twice as fast as the previous version. Probably this is the fastest solution in the Node.js world. And that's not all! We will work on performance issues in the future 🐢.

  • Speed up between versions for directory with 265k entries: 5x (19s → 4s).
  • Speed up between versions for directory with 4kk entries: 4x (4m → 1m).

Look at the benchmarks section in the README.md file.

⚙️ Flexibility

Also in this release we have worked on simplifying some scenarios.

Now, thanks to the new mechanism, you can get the type of entry without additional costs! Works only on Node.js 10.10+. Look at the objectMode option.

🤕 Known issues in this update

2.2.7

18 May 11:26
Compare
Choose a tag to compare

Another release of bug fixes

📖 Documentation

  • Added description of how to work with UNC paths (#89)
  • The ignore option takes an array (#184 — thanks @lukeis for contributing)
  • Clarify description of the case option.

🐛 Bug Fixes

Paths not resolved in some cases (#157)

Thanks @stevenvachon for issue reporting 🎉

If the user has passed a . or .. and the absolute option is enabled, the paths of the found entries were not absolute (they contained . or `..).

before

fg.sync('/project/temp/../*.js', { absolute: true }); // → ['/project/temp/../something.js']

after

fg.sync('/project/temp/../*.js', { absolute: true }); // → ['/project/something.js']

The case option not work with static patterns (#172)

Thanks @davidmerfield for issue reporting 🎉

For performance reasons with fast-glob@2.1.0 we introduce static patterns (patterns without glob magic).

Unfortunately, then we forgot about supporting the case (nocase) option. Now the case option works fine with static patterns too. We also improved the documentation for this option.

directory/
  - file.txt
  - File.txt

before

fg.sync('file.txt', { case: false }) // → ['file.txt']

after

fg.sync('file.txt', { case: false }) // → ['file.txt', 'File.txt']

Question mark is not recognized as dynamic glob and fails to find files (#174)

Thanks @vladshcherbin for issue reporting and contributing 🎉

This is also related to static patterns.

Previously we mark patterns like assets/?ss.css to static and tried to find such file on file system. Now it will works fine.

before

fg.sync('assets/?ss.css'); // → []

after

fg.sync('assets/?ss.css'); // → ['asserts/css.css']

2.2.6

07 Jan 20:48
Compare
Choose a tag to compare

⚠️ This is a recovery release for #144.

2.2.5

07 Jan 18:42
Compare
Choose a tag to compare

🐛 Bug Fixes

Broken Stream API when errors occur

Thanks @felixbecker for issue reporting 🎉

#140

This package is able to build tasks on the basis of passed patterns for their parallel execution. In some cases there may be multiple. In the Stream API, each task produces its own Node.js Stream. Once the streams are created, we combine them into a single stream using the merge2 package.

Before this fix, if an error occurs anywhere inside one of streams, it did not propagate to the combined stream, causing an unhandled exception.

For example, when a directory is deleted while it is being globbed with the stream API…

After this fix, all errors will be propagated to the combined stream. One exception is ENOENT errors – they will be ignored in all streams.

2.2.4

11 Nov 14:47
Compare
Choose a tag to compare

A big release of bug fixes

💬 Common

Input values validation (#119)

Unfortunately, not everyone uses TypeScript.
Now we are clearly saying that we only accept strings as input.

🐛 Bug Fixes

Absolute negative patterns (#113)

Now we support the absolute negative patterns. You can read more about this in the documentation.

📖 Works only when the absolute option is enabled.

Performance optimizations for non-deep patterns (#120)

We fixed a bug in the mechanism of determining the minimum required depth for reading.

📖 In some cases, we will still read more than we need to, because in the current implementation we cannot accurately determine the depth of the read. But we will work on this further within #53.

For example, the user wrote the following pattern: fixtures/*.

Prior to release of this version, FastGlob could read more directories than it needed:

./fixtures 
└── one 👍
   └── two  👍
      └── three 👍
         └── four ❌
            └── index.js

Right now:

./fixtures 
└── one ❌
   └── two 
      └── three
         └── four
            └── index.js

The markDirectories options does not work when the absolute option is enabled(#121)

Now it works correctly. Thanks @rijnhard for fix it 🎉

The deep options works incorrectly (#129)

Fixed the problem of incorrect depth reading limit when using the deep option.

2.2.3

02 Oct 08:33
Compare
Choose a tag to compare

🐛 Bug Fixes

Fix incorrect grouping of negative patterns to tasks (#118)

Thanks @DudaGod for fix it 🎉

Prior to this fix, not all negative patterns could be applied to tasks. For example:

fg('fixtures/first/**/*.md', {ignore: ['fixtures/**/*.md']}).then(console.log);

Give a task:

{ base: 'fixtures/first',
  dynamic: true,
  patterns: [ 'fixtures/first/**/*.md' ],
  positive: [ 'fixtures/first/**/*.md' ],
  negative: [] } // Here must be a negative pattern 

2.2.2

15 May 19:46
Compare
Choose a tag to compare

💬 Common

  • Now the fast-glob package officially supports Node.js 10.

🔨 Flexibility

@nodelib packages

We started migrating to @nodelib packages, which will allow us to fully control the process of package development and some performance improvements (for example, see @nodelib/scandir where we can filter entries before we get fs.Stats) (#104)

🐛 Bug Fixes

Fix incorrect search in negative patterns group (#107)

Previously, we skipped negative patterns whose base paths did not fully matched with the base path of the positive pattern. For more details about this situation take a look at #107.

Fix Incorrect negative pattern detection (#101)

In some cases, the ! symbol may not mean that we are working with a negative pattern.

The !(a|b|c) pattern is matches anything except one of the given patterns.

2.2.1

22 Apr 17:42
Compare
Choose a tag to compare

🔨 Flexibility

  • Allow to use negative patterns in the «ignore» option (#86).

🐛 Bug Fixes

  • Fix incorrect filter for static patterns (#93).