Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโ€™ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependency fast-glob to v3 #16

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

renovate[bot]
Copy link

@renovate renovate bot commented Jun 19, 2019

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
fast-glob ^2.2.0 -> ^3.0.0 age adoption passing confidence

Release Notes

mrmlnc/fast-glob (fast-glob)

v3.3.2

Compare Source

Full Changelog: mrmlnc/fast-glob@3.3.1...3.3.2

๐Ÿ› Bug fixes

  • Handle square brackets as a special character on Windows in escape functions (#โ€‹425)
  • Keep escaping after brace expansion (#โ€‹422)

v3.3.1

Compare Source

Full Changelog: mrmlnc/fast-glob@3.3.0...3.3.1

This release fixes a regression for cases where the ignore option is used with a string (#โ€‹403, #โ€‹404).

The public interface of this package does not support a string as the value for the ignore option since 2018 year (release).

So, in the next major release, we will reintroduce method implementations that do not involve strings in the ignore option.

v3.3.0

Compare Source

Full Changelog: mrmlnc/fast-glob@3.2.12...3.3.0

๐Ÿš€ Improvements

Method aliases

New methods (glob, globSync, globStream) have been added in addition to the current methods (default import, sync, stream), which eliminate the need to rename the method when importing. In addition, an async alias has been added for the default import, which makes it possible to use this packet with ESM.

Method to convert paths to globs

A new method (convertPathToPattern) has been added in this release to convert a path to a pattern. The primary goal is to enable users to avoid processing Windows paths in each location where this package is used by utilities from third-party packages.

See more details in the pull request.

๐Ÿ› Bug fixes

  • In the past, we mishandled patterns that contained slashes when the baseNameMatch option was enabled, which went against the documented behavior. (#โ€‹312)
  • Several problems with matching patterns that contain brace expansion have been resolved. The primary issue solved is when the pattern has duplicate slashes after it is expanded (#โ€‹394), or the micromatch package does not correctly generate a regular expression (#โ€‹365).
  • All negative patterns will now have the dot option enabled when matching paths. Previously, the !**/* patterns did not exclude hidden files (start with a dot). (#โ€‹343)
  • The issue that led to duplicates in the results when overlapping or duplicate patterns were present among the patterns has been fixed. At the moment, we are only talking about leading dot. Other cases are not included. For example, running with the patterns ['./file.md', 'file.md', '*'] will now only include file.md once in the results. (#โ€‹190)

๐Ÿ“– Documentation

A clarifying note has been added for the concurrency option, which provides more detailed information about the Thread Pool utilization.

โš™๏ธ Infrastructure

  • The benchmark in CI is now running on Node.js 20.
  • The benchmark now uses the public package bencho instead of an in-house implementation. You may want to try this solution for your packages and provide feedback.

๐Ÿฅ‡ New Contributors

v3.2.12

Compare Source

Full Changelog: mrmlnc/fast-glob@3.2.11...3.2.12

๐Ÿ› Bug fixes

Fixed an issue introduced in 3.2.7 related to incorrect application of patterns to entries with a trailing slash when the entry is not a directory.

Before changes:

fg.sync('**/!(*.md)')
// ['file.md', 'a/file.md', 'a/file.txt']

After fix:

fg.sync('**/!(*.md)')
// ['a/file.txt']

Thanks @โ€‹AgentEnder for the issue (#โ€‹357).

๐Ÿš€ Improvements

This release includes performance improvements for the asynchronous method. For this method we now use an asynchronous directory traversal interface instead of using a streaming interface. This gives up to 15% acceleration for medium and large directories. The result depends a lot on hardware.

You can find the benchmark results for this release in CI here.

Here are a few of measurements on my laptop:

===> Benchmark pattern "*" with 100 launches (regression, async)
===> Max stdev: 7 | Retries: 3 | Options: {}

Name                   Time, ms  Time stdev, %  Memory, MB  Memory stdev, %  Entries  Errors  Retries
---------------------  --------  -------------  ----------  ---------------  -------  ------  -------
fast-glob-current.js   4.390     0.252          6.253       0.015            4        0       1
fast-glob-previous.js  5.653     0.633          6.051       0.056            4        0       1

===> Benchmark pattern "**" with 100 launches (regression, async)
===> Max stdev: 7 | Retries: 3 | Options: {}

Name                   Time, ms  Time stdev, %  Memory, MB  Memory stdev, %  Entries  Errors  Retries
---------------------  --------  -------------  ----------  ---------------  -------  ------  -------
fast-glob-current.js   34.587    1.287          10.654      0.607            11835    0       1
fast-glob-previous.js  41.972    2.086          10.236      1.224            11835    0       1

v3.2.11

Compare Source

Full Changelog: mrmlnc/fast-glob@3.2.10...3.2.11

๐Ÿ› Bug fixes

Yeap, this is another release aimed at fixing problems with detecting brace expansions in patterns. This time, patterns like abc/{a.txt,b.js} was not marked as a dynamic pattern. So, now the regex has been rewritten to a generalized solution as a function to avoid future problems due to the complexity of the regular expression.

Thanks @โ€‹MurzNN for the report of this problem (#โ€‹351).

v3.2.10

Compare Source

Full Changelog: mrmlnc/fast-glob@3.2.9...3.2.10

๐Ÿ› Bug fixes

๐Ÿฅ‡ New Contributors

v3.2.9

Compare Source

Full Changelog: mrmlnc/fast-glob@3.2.8...3.2.9

๐Ÿ› Bug fixes

  • Fixed a regression in 3.2.8 with invalid regular expression on older node.js versions (#โ€‹345).

v3.2.8

Compare Source

Full Changelog: mrmlnc/fast-glob@3.2.7...3.2.8

๐Ÿ› Bug fixes

Fix directory matching with trailing slashes (#โ€‹290)

Thanks @โ€‹Trott for investigating the problem and the detailed description.

Previously the src/*/ pattern did not work as expected (like src/*).

Double-slash in the middle of the pattern is not collapsed (#โ€‹330)

Starting from this release, patterns like src//* will work like similar patterns without duplicate slashes. This was done for continuity with other solutions (glob, ls src//*, python, golang, โ€ฆ).

Adjust inefficient regular expressions (#โ€‹336, #โ€‹342, #โ€‹344)

Thanks @โ€‹Trott for fixing bugs and @โ€‹XhmikosR for adding the CodeQL action to CI pipeline.

๐Ÿ“– Documentation

โš™๏ธ Infrastructure

๐Ÿฅ‡ New Contributors

v3.2.7

Compare Source

๐Ÿ› Bug fixes

The previous release (3.2.6) introduced a regression, which makes negative patterns were not applied to patterns outside the current directory.

This release fixes the issue.

v3.2.6

Compare Source

๐Ÿ› 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)

v3.2.5

Compare Source

๐Ÿ› Bug fixes
๐Ÿ“– Documentation
โš™๏ธ Infrastructure
  • Use the latest versions of OS in CI (#โ€‹279).
  • Move from Azure Pipelines to GitHub Actions (#โ€‹299).

v3.2.4

Compare Source

๐Ÿ› Bug fixes

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

v3.2.3

Compare Source

๐Ÿ› 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)

v3.2.2

Compare Source

๐Ÿ› Bug fixes

  • Fix a problem with patterns with leading dot segment (like ./โ€ฆ or .\\โ€ฆ) (#โ€‹257)

v3.2.1

Compare Source

๐Ÿ’ฌ Common

v3.2.0

Compare Source

๐Ÿ’ฌ Common

๐Ÿš€ 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

v3.1.1

Compare Source

๐Ÿ› 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).

v3.1.0: 3.1.0

Compare Source

๐Ÿ’ฌ 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

v3.0.4

Compare Source

This is a maintenance release.

๐Ÿ’ฌ Common

v3.0.3

Compare Source

๐Ÿ’ฌ

  • Correct method for the Stream API in the documentation (#โ€‹217, thanks @โ€‹bluelovers)
  • We have divided the benchmark into two types:
    • The product benchmark is a comparison of performance relative to competitors.
    • The regression benchmark is a comparison of performance relative to the previous version.
  • We added a launch of both types of benchmark in CI. Automatically starts only when the master branch is built.
  • Now the smoke tests are run for all API's (sync, async, stream).

๐Ÿ› Bug fixes

  • Non-existing directories in the globbing pattern throw an error with the asynchronous API (#โ€‹211)
  • The markDirectories option adds extra slashes for every directory in the path with the asynchronous API (#โ€‹214)

v3.0.2

Compare Source

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.

v3.0.1

Compare Source

๐Ÿ’ฌ Common

v3.0.0

Compare Source

๐ŸŒฎ 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

๐Ÿš€ Improvements

๐Ÿ’ฌ Common
  • Package size after installation is decreased: 2.47MB โ†’ 0.42MB.
  • Package require time decreased: 534ms โ†’ 78ms.
๐ŸŒช๏ธ 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

v2.2.7

Compare Source

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']

v2.2.6

Compare Source

โš ๏ธ This is a recovery release for https://github.com/mrmlnc/fast-glob/issues/144.

v2.2.5

Compare Source

๐Ÿ› 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.

v2.2.4

Compare Source

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.

v2.2.3

Compare Source

๐Ÿ› 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 

v2.2.2

Compare Source

๐Ÿ’ฌ 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.

v2.2.1

Compare Source

๐Ÿ”จ Flexibility

  • Allow to use negative patterns in the ยซignoreยป option (#โ€‹86).

๐Ÿ› Bug Fixes

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

Configuration

๐Ÿ“… Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

๐Ÿšฆ Automerge: Disabled by config. Please merge this manually once you are satisfied.

โ™ป Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

๐Ÿ”• Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

0 participants