[Snyk] Upgrade fast-glob from 2.2.6 to 3.2.2 #5
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.
Snyk has created this PR to upgrade fast-glob from 2.2.6 to 3.2.2.
ℹ️ Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.Warning: This is a major version upgrade, and may be a breaking change.
The recommended version fixes:
SNYK-JS-SETVALUE-450213
SNYK-JS-SETVALUE-450213
SNYK-JS-MIXINDEEP-450212
SNYK-JS-KINDOF-537849
Release notes
Package name: fast-glob
🐛 Bug fixes
./…
or.\\…
) (#257)💬 Common
💬 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.🐛 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).
💬 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
💬 Common
onlyFiles
option in the documentation (thanks, @garyking)strictSlashes
option (internal) for the micromatch package. Related to micromatch/picomatch#21.💬
🐛 Bug fixes
markDirectories
option adds extra slashes for every directory in the path with the asynchronous API (#214)🐛 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.💬 Common
import
issue (#206, thanks @zkochan).🌮 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 (#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
Commit messages
Package name: fast-glob
Compare
Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.
For more information:
🧐 View latest project report
🛠 Adjust upgrade PR settings
🔕 Ignore this dependency or unsubscribe from future upgrade PRs