Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^2.2.0
->^3.0.0
Release Notes
mrmlnc/fast-glob (fast-glob)
v3.3.2
Compare Source
๐ Bug fixes
v3.3.1
Compare Source
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
๐ 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, anasync
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
baseNameMatch
option was enabled, which went against the documented behavior. (#โ312)micromatch
package does not correctly generate a regular expression (#โ365).dot
option enabled when matching paths. Previously, the!**/*
patterns did not exclude hidden files (start with a dot). (#โ343)['./file.md', 'file.md', '*']
will now only includefile.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
๐ฅ New Contributors
v3.2.12
Compare Source
๐ 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:
After fix:
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:
v3.2.11
Compare Source
๐ 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
๐ Bug fixes
3.2.8
when the{a,b,c}
pattern no longer considered a dynamic pattern (thanks @โamitdahan, #โ347).๐ฅ New Contributors
v3.2.9
Compare Source
๐ Bug fixes
3.2.8
with invalid regular expression on older node.js versions (#โ345).v3.2.8
Compare Source
๐ Bug fixes
Fix directory matching with trailing slashes (#โ290)
Previously the
src/*/
pattern did not work as expected (likesrc/*
).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)
๐ 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
๐ Documentation
followSymbolicLinks
option.โ๏ธ Infrastructure
glob-parent
package has been updated to fix vulnerabilities. (#โ304)micromatch
package has been updated to eliminate dependency on thepicomatch
package from this package. (#โ256)tiny-glob
package has been added to the synchronous product benchmarks. (#โ323)fdir
package has been added to synchronous and asynchronous product benchmarks. The latest launch. (#โ322).npmignore
file has been replaced by thefiles
field in thepackage.json
file. (#โ321)v3.2.5
Compare Source
๐ Bug fixes
/*
,/tmp/*
,//?/C:/*
.๐ Documentation
markDirectories
option (#โ287, thanks @โyarastqt).โ๏ธ Infrastructure
v3.2.4
Compare Source
๐ Bug fixes
3.2.3
when thecaseSensitiveMatch
option is disabled (#โ276)v3.2.3
Compare Source
๐ Bug fixes
unique
option led to incorrect results when mixing static and dynamic patterns (#โ268)v3.2.2
Compare Source
๐ Bug fixes
./โฆ
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:
Now we apply positive patterns.
Synthetic benchmark
More benchmarks can be found here.
{fixtures,out}/{first,second}/*
{fixtures,out}/**
Real world benchmark
{blocks-*,construct}/**/*.styl
(a very large project) 13s โ 0.16sKnown issues
{a..z}
(or similar) may introduce some slowdown.fast-glob
is 2 times slower thannode-glob
in this scenario.We will work on this in the future.
๐ Thanks
scan
method inpicomatch
that returns parts of the pattern.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()
orfor await...of
.Most likely, in future releases, we will improve integration with streams (#โ243).
v3.1.0
: 3.1.0Compare Source
๐ฌ Common
isDynamicPattern
as an alternative toglob.hasMagic
(#โ105)escapePath
for escaping parts of the paths of the pattern (#โ158)๐ Documentation
generateTasks
helper.dot
option.๐ Bug Fixes
.
in{dot: false}
mode (#โ226)โ๏ธ Infrastructure
v3.0.4
Compare Source
๐ฌ Common
onlyFiles
option in the documentation (thanks, @โgaryking)strictSlashes
option (internal) for the micromatch package. Related to https://github.com/micromatch/picomatch/issues/21.v3.0.3
Compare Source
๐ฌ
๐ Bug fixes
markDirectories
option adds extra slashes for every directory in the path with the asynchronous API (#โ214)v3.0.2
Compare Source
๐ Bug fixes
High memory usage for very big directories (#โ204)
Highlights
4 000 000
4.1GB
of RAM (37s
)0.8GB
of RAM (25s
)Explanation
In short, we called 2x
replace
andstartsWith
on every entry. Together, that's 12 million calls.v3.0.1
Compare Source
๐ฌ Common
import
issue (https://github.com/mrmlnc/fast-glob/pull/206, thanks @โzkochan).v3.0.0
Compare Source
๐ฎ Thanks
withFileTypes
option in thefs.readdir
method.๐ 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:
fast-glob@2
is ending.README.md
file.nobrace
,noglobstar
,noext
,nocase
,transform
.extension
โextglob
followSymlinkedDirectories
โfollowSymbolicLinks
case
โcaseSensitiveMatch
brace
โbraceExpansion
matchBase
โbaseNameMatch
deep
option now accepts onlynumber
type and default value now isInfinity
instead oftrue
.async
method was removed. Usefg(/* โฆ */)
instead.stats
option is enabled is completely changed.๐ Bug fixes
micromatch@3
tomicromatch@4
:baseNameMatch
option never worked (https://github.com/mrmlnc/fast-glob/issues/199).๐ Improvements
๐ฌ Common
2.47MB
โ0.42MB
.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 ๐ข.
Look at the benchmarks section in the
README.md
file.โ๏ธ Flexibility
Also in this release we have worked on simplifying some scenarios.
concurrency
fs
suppressErrors
throwErrorOnBrokenSymbolicLink
objectMode
๐ค Known issues in this update
v2.2.7
Compare Source
Another release of bug fixes
๐ Documentation
ignore
option takes an array (#โ184 โ thanks @โlukeis for contributing)case
option.๐ Bug Fixes
Paths not resolved in some cases (#โ157)
If the user has passed a
.
or..
and theabsolute
option is enabled, the paths of the found entries were not absolute (they contained.
or `..).before
after
The
case
option not work with static patterns (#โ172)For performance reasons with
fast-glob@2.1.0
we introducestatic patterns
(patterns without glob magic).Unfortunately, then we forgot about supporting the
case
(nocase
) option. Now thecase
option works fine with static patterns too. We also improved the documentation for this option.before
after
Question mark is not recognized as dynamic glob and fails to find files (#โ174)
This is also related to
static patterns
.Previously we mark patterns like
assets/?ss.css
tostatic
and tried to find such file on file system. Now it will works fine.before
after
v2.2.6
Compare Source
v2.2.5
Compare Source
๐ Bug Fixes
Broken Stream API when errors occur
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.
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.
Performance optimizations for non-deep patterns (#โ120)
We fixed a bug in the mechanism of determining the minimum required depth for reading.
For example, the user wrote the following pattern:
fixtures/*
.Prior to release of this version, FastGlob could read more directories than it needed:
Right now:
The
markDirectories
options does not work when theabsolute
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)
Prior to this fix, not all negative patterns could be applied to tasks. For example:
Give a task:
v2.2.2
Compare Source
๐ฌ Common
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 getfs.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.v2.2.1
Compare Source
๐จ Flexibility
๐ Bug Fixes
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.
This PR has been generated by Mend Renovate. View repository job log here.