MyGit

v5.0.0

thecodrr/fdir

版本发布时间: 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

  1. Filters applied using new fdir().filter() are now joined via AND instead of OR. (#35)

Features

  1. 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();
  1. 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"));
  1. 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

  1. Use \0 instead of nothing to separate cached glob patterns (#42)
  2. Resolved all concurrency issues that made the configuration of multiple concurrent instances of fdir to collide (#47)
  3. Node was exiting whenever an error (like ENOENT) occured. (#48)

Thank you @papb for your help and PR #45!

相关地址:原始地址 下载(tar) 下载(zip)

查看:2021-01-13发行的版本