Skip to content

6.0.2

Compare
Choose a tag to compare
@thecodrr thecodrr released this 31 Jul 21:27
· 51 commits to master since this release

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

  1. fdir now automatically fallbacks to crawling the current working directory if you pass an empty string as crawl root.
  2. Using withRelativePaths with ./ as root path will now have no effect.