3.0.0
🌮 Thanks
- Node.js team (@bengl) for the
withFileTypes
option in thefs.readdir
method. - Jon Schlinkert (@jonschlinkert) for the new version of the micromatch package.
- Community for using my package.
- Special thanks for the issues and pull requests.
📑 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:
extension
→extglob
followSymlinkedDirectories
→followSymbolicLinks
case
→caseSensitiveMatch
brace
→braceExpansion
matchBase
→baseNameMatch
- The
deep
option now accepts onlynumber
type and default value now isInfinity
instead oftrue
. - The
async
method was removed. Usefg(/* … */)
instead. - The type of returned object when the
stats
option is enabled is completely changed.
🐛 Bug fixes
- After update from
micromatch@3
tomicromatch@4
: - 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.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.