filter
function offind()
method now receives alsoabsolutePath
property of each file
- (breaking change) Dropped support for all node.js engines older than v14
- (possibly breaking change)
inspect("some-file", { times: true })
now will return alsobirthTime
of a file - (possibly breaking change) Under the hood switched from
rimraf
library to using node-native recursive files removal
- Fixed
find()
crash when stumbled upon invalid symlink
find()
acceptsfilter
function that allows you to perform more refined filtering of the results
- For
find()
method you don't need to declarematching
property, will default to"*"
when not declared (thanks @gutenye)
- Documentation improvements
findAsync()
is now 5 times faster, andfind()
2 times fasterinspectTree()
now sorts results alphabetically, directories firsts, files second- Refactored internals of methods
find()
,copy()
andinspectTree()
inspectTree()
behaves better in concurrency terms (opens only few files at once)
- Package published to npm registry now contains only the essential files (e.g. no tests are shipped), to make the smallest footprint possible
- Ability to create temporary directories with
tmpDir()
method
move()
can move file or directory between devices (thanks @papb)
- (breaking change)
move()
andrename()
default overwrite behaviour have changed, now by default both methods throw error if destination path already exists.
write()
can acceptmode
as a parameter
inspectTree()
now supportstimes
option.
- Amended TypeScript definitions thanks to @orta
- Use rimraf as internal implementation of
remove()
to fix #80
find()
no longer crashes on ENOENT (e.g. when one of the files has been deleted by other process).- Added check if a parameter
newName
passed torename()
isn't a path.
- Added ignoreCase option to
find()
andcopy()
methods.
- Rename file types.ts -> types.d.ts to fix #72
- From now on the library ships with TypeScript type definitions.
- (breaking change) removed
symlinks
config option offind()
method. Nowfind()
always follows symlinks.
- Fixed bug in
existsAsync()
.
overwrite
function passed tocopyAsync()
can return promise.
- Added symlinks search option to
find()
.
- Parameter
overwrite
ofcopy()
method now supports functions, to allow you individually decide if each file overwrite should happen.
- API declared stable. From now on braking changes will be minimized and whenever possible preceded by deprecation periods.
- Codebase updated to ES6
removeAsync()
retries deletion attempts for errors likeEBUSY
.
- Nested directory creation handles well race condition
- Added lacking promise rejection handler for
copyAsync()
.
- (breaking change) Dropped support for node.js 0.10 and 0.12
- (possibly breaking change) fs-jetpack no longer uses libraries
mkdirp
andrimraf
, those have been replaced with in-house implementations doing the same task. The new implementations are simpler than original libraries, so some edge cases might emerge after upgrading (please file an issue if you stumbled upon such case). - Started using native promises instead of
Q
library
- (breaking change) Changes in
symlinks
option passed toinspect()
. - Added
symlinks
option toinspectTree()
. - Removed controversial edge case behaviour for
exists()
.
- Added input validation for the whole API
- (breaking change) Removed already deprecated option
buf
forread()
method
- Fixed
find()
bug whendirectories
is set totrue
and only negation glob is used.
- Fixed matcher edge cases, improved matcher tests (affects
find()
andcopy()
methods).
- Fixed directory tree traversal bug which was causing problems for
findAsync()
andcopyAsync()
.
- Fixed
console.log(jetpack)
for node v6.6.0 or newer.
- Bugfixed case when
copyAsync()
was leaving open read stream if write stream errored. - Tests ported from jasmine to mocha.
copyAsync()
uses only streams (much more memory efficient).find()
supportsrecursive
option.
- Updated third party dependencies to quell minimatch intallation warnings.
- Bug-fixed
jetpack.read('nonexistent_file', 'json')
.
- (breaking change)
read()
,list()
,inspect()
andinspectTree()
returnsundefined
instead ofnull
if path doesn't exist. - More sane edge cases for
dir()
,file()
andlist()
.
- (breaking change)
find()
now distinguishes between files and directories and by default searches only for files (previously searched for both). - (breaking change)
find()
no longer can be configured withreturnAs
parameter and returns always relative paths (previously returned absolute). - (breaking change)
list()
no longer acceptsuseInspect
as a parameter. To achieve old behaviour usejetpack.list()
withArray.map()
. - (deprecation) Don't do
jetpack.read('sth', 'buf')
, dojetpack.read('sth', 'buffer')
instead. remove()
,list()
andfind()
now can be called without providedpath
, and defaults to CWD in that case.
- Bugfixed
copy()
with symlink overwrite
- Fixed .dotfiles copying
- Updated third party dependencies.
- (breaking change)
matching
option incopy()
andfind()
resolves glob patterns to the folder you want copy or find stuff in (previously CWD was used).
exists()
can handle ENOTDIR error.
- Added support for symbolic links.
- Option
matching
incopy()
andfind()
now accepts patterns anchored to CWD.
- Option
matching
incopy()
andfind()
now accepts negation patterns (e.g.!some/file.txt
).
- Lots of code refactoring
- (breaking change)
dir()
no longer hasexists
option. - (breaking change)
file()
no longer hasexists
andempty
options. - (breaking change)
safe
option forwrite()
renamed toatomic
(and uses new algorithm under the hood). - (breaking change)
safe
option forread()
dropped (atomic
while writing is enough). - (breaking change) In
copy()
optionsonly
andallBut
have been replaced by optionmatching
. - (breaking change) In
remove()
optionsonly
andallBut
have been dropped (to do the same usefind()
, and then remove). - (breaking change) Default jsonIndent changed form 0 to 2.
find()
method added.- More telling errors when
read()
failed while parsing JSON.
inspect()
can return file access/modify/change time and mode.
inspect()
checksum of empty file is nownull
.
cwd()
accepts many arguments as path parts.
- (breaking change) Method
tree()
renamed toinspectTree()
. - (breaking change) Parameters passed to
list()
has changed. - Methods
inspect()
andinspectTree()
can calculate md5 and sha1 checksums. - Added aliases to
fs.createReadStream()
andfs.createWriteStream()
.
copy()
now copies also file permissions on unix systems.append()
can specify file mode if file doesn't exist.- Can indent saved JSON data.
- Changelog starts here.