- Using
..
inside ignore patterns could sometimes make the optimizer ignore parent directories
- The
debug
option now logs skipped directories
I've opened a sponsorships page! Consider sponsoring at https://github.com/sponsors/SuperchupuDev if you'd like to support the development of this project. This is a huge release in a technical aspect that took many months to get right.
-
New optimizer to avoid crawling directories with entries that will never match.
This is a huge performance improvement and it should solve most if not all performance issues in the library.
This has taken many months to figure out and implement and has gotten through three different implementations with the help and/or advice of many people, most from e18e:
-
Other performance improvements, such as early returning without patterns by bluwy and micro-optimizations by Torathion
-
debug
option. Useful for development purposes
- Usage of escaped patterns with a cwd that partially matches the pattern
- Unsupported usages of backslashes making the library really slow. It should be way faster now thanks to the new optimizer
- Re-enabled symlinks resolution. Big thanks to thecodrr for fixing the critical bug upstream
- Processing of absolute negative patterns
- Negative
ignore
patterns are now not processed for consistency withfast-glob
- Temporarily reverted resolution of symbolic links due to a critical bug. See #54 for more info
- Escaped symbols (i.e.
"\\["
) in the inferred common root producing empty matches
- Improved the common root inference algorithm to optimize non-trailing
**
patterns
- Support for providing patterns as a string
followSymbolicLinks
optionescapePath
utility function by @benmccannisDynamicPattern
utility functionconvertPathToPattern
utility function
.
as a pattern now works as expected- Globbing no longer returns an empty string when matching the root directory
- Handling of escaped symbols in patterns
- Relicensed the project to the MIT license
- Disabled source maps on release builds for smaller bundle size
- Improved the common root inference algorithm
- Full support for absolute paths as patterns
caseSensitiveMatch
option
- Using a pattern that doesn't end with special characters with
expandDirectories
disabled no longer produces incorrect matches
- Using a pattern that can't infer a common root with
absolute
enabled no longer produces incorrect matches
- Support for leading
../
in patterns
- A common root is now inferred from the patterns if possible to avoid unnecessary crawling
- Basic handling of absolute patterns
- Adding trailing slashes to the end of patterns no longer returns incorrect results
- Matching directories without
expandDirectories
without a trailing slash now works correctly
- Using an empty array of
patterns
no longer acts as['**/*']
- Windows now uses forward slashes instead of backslashes
- Modified
ignore
behavior to vastly improve performance when ignoring whole directories
The library no longer sets dot
to true
internally by default. It now defaults it to false
, just like globby
and fast-glob
.
You can configure this by using the new dot
option.
- Support for specifying the
patterns
option as the first argument to better approach a drop-inglobby
replacement
await glob(['src/*.ts'], { ignore: ['_secret'] });
// you can still specify it in the options object
await glob({ patterns: ['src/*.ts'], ignore: ['_secret'] });
- Support for non-absolute paths in
cwd
dot
optiondeep
optiononlyFiles
option
onlyDirectories
option
ignore
optionexpandDirectories
option