v5.0.0
版本发布时间: 2021-01-13 01:41:03
thecodrr/fdir最新发布版本:v6.3.0(2024-08-25 21:58:51)
Note: fdir follows semantic versoning hence this release is not backward compatible with any previous release.
Breaking Changes
- Filters applied using
new fdir().filter()
are now joined via AND instead of OR. (#35)
Features
- There is now a brand new
onlyDirs
builder function that allows you to grab (and filter) only directories ignoring all files. (#43)
const crawler = new fdir().onlyDirs();
- As a result, filters now work with directories as well and include
isDirectory
as second parameter to.filter()
function:
const crawler = new fdir()
.filter((path, isDirectory) => path.startsWith("."))
.filter((path, isDirectory) => path.endsWith(".js"));
- Full path of the directory is now sent to the
excludeFn
of.exclude(excludeFn)
: (#46)
const crawler = new fdir().exclude((dirName, dirPath) =>
dirName.startsWith(".")
);
Fixes
- Use
\0
instead of nothing to separate cached glob patterns (#42) - Resolved all concurrency issues that made the configuration of multiple concurrent instances of fdir to collide (#47)
- Node was exiting whenever an error (like
ENOENT
) occured. (#48)
Thank you @papb for your help and PR #45!