Releases: discoveryjs/scan-fs
Releases · discoveryjs/scan-fs
4.0.0
Note: Publishing as a stable version. No changes since
v4.0.0-rc.1
- Allowed to pass a string value as an options, it's equivalent to
{ basedir: <string> }
- Fixed
scanFs()
definition to allow omitting ofoptions
argument - Added
resolveSymlinks
option to enable symlink resolving, a symlink resolving is disabled by default - Added
posixPath
field toFile
andSymlink
interfaces - Added
encoding
option forRule
to specify an encoding for a file content - Changed rule's
test
option to apply to POSIX paths disregarding of operating system used - Changed
include
andexclude
options to take POSIX paths disregarding of operating system used which are supposed to be relative tobasedir
- Changed a returning value of
scanFs()
:- Added
basedir
field - Replaced
stat
object with fieldspathsScanned
andfilesTested
- Return a plain object instead of
File[]
array with additional fields// before const files = await scanFs(...) console.log(files, files.symlinks); // after const { files, symlinks } = await scanFs(...) console.log(files, symlinks);
- Added
- Renamed
NormRule
type intoMatchRule
- Added
ScanResult
type to define returning type ofscanFs()
- Removed output errors to console by default
4.0.0-rc.1
See changes in v4.0.0 release notes
3.0.0
- Added TypeScript typings (rewritten in TypeScript)
- Converted to ES modules. However, CommonJS is supported as well (dual module)
- Changed exporting for main function from
require('@discoveryjs/scan-fs')
intorequire('@discoveryjs/scan-fs').scanFs
- Used
Symlink
internal class for symlinks entries - Allowed
scanFn()
invocation with no options - Fixed path building when
include
option is used
2.0.0
- Boosted performance up to 3-4 times
- Changed bahaviour of
basedir
to use a single include path wheninclude
is not provided - Changed
extract
option for a file rule to not accept an array of functions - Removed exclusion for
node_modules
and.git
paths by default - Added
symlinks
anderrors
fields to result - Removed
size
field in a file entry - Various fixes and improvements