v6.0.2
版本发布时间: 2023-08-01 05:27:58
thecodrr/fdir最新发布版本:v6.3.0(2024-08-25 21:58:51)
More reliable globbing
This release contains a lot of fixes for glob
making it much more reliable. (thanks to @bglw for reporting a reproducible test case #92)
For example, doing this would return an empty array:
const crawler = new fdir().withBasePath().glob("**/*.txt");
const files = await crawler.crawl(".").withPromise();
This was because picomatch
and other globbing libraries don't deal too well with paths that start with .
or ./
. Starting from this version, fdir
tries very hard to not include ./
or .
at the beginning of the paths.
The end result is that fdir
should now work similar to fast-glob
and other globbing libraries.
Node v20 support
Starting from this version, fdir
now officially supports Node v20 with all its tests running on it.
Other fixes
-
fdir
now automatically fallbacks to crawling the current working directory if you pass an empty string as crawl root. - Using
withRelativePaths
with./
as root path will now have no effect.