Thanks to visit codestin.com
Credit goes to github.com

Skip to content

v6.5.0

Latest

Choose a tag to compare

@thecodrr thecodrr released this 14 Aug 17:09
· 5 commits to master since this release

This release brings a lot of cool stuff:

ESM support

fdir now includes esm builds in addition to the commonjs build.

Thanks to @TheAlexLichter in #147

Node v12 support (is back!)

fdir v6.4.6 broke Node v12 & v14 compatibility as it made use of AbortController. We have now replaced AbortController with an in-house solution that should bring back support for Node v12.

Additionally, fdir now has the engines field set to >=12 to make it super clear what versions of Node we support.

Thanks to @SuperchupuDev & @benmccann for bringing this up and helping me test this!

Custom FS

Huge thanks to @43081j for adding support for this. You can now pass a custom FS module and fdir will make use of it instead of the Node.js fs module.

You can use it like so:

    const api = new fdir({
      fs: fakeFs,
    }).crawl("node_modules");

The fs property expects the following methods:

export type FSLike = {
  readdir: typeof nativeFs.readdir;
  readdirSync: typeof nativeFs.readdirSync;
  realpath: typeof nativeFs.realpath;
  realpathSync: typeof nativeFs.realpathSync;
  stat: typeof nativeFs.stat;
  statSync: typeof nativeFs.statSync;
};

Other changes

New Contributors

Full Changelog: v6.4.6...v6.5.0