Significant refactor of copy() & copySync(), including breaking changes. No changes to other functions in this release.
Huge thanks to @manidlou for doing most of the work on this release.
The filter option can no longer be a RegExp (must be a function). This was deprecated since fs-extra v1.0.0. #512
copy()'s filter option can now be a function that returns a Promise. #518
copy() & copySync() now use fs.copyFile()/fs.copyFileSync() in environments that support it (currently Node 8.5.0+). Older Node versions still get the old implementation. #505
Previously, ensureFile() & ensureFileSync() would do nothing if the path was a directory. Now, they error out for consistency with ensureDir(). #465, #466, #470
BREAKING: Added Promise support. All asynchronous native fs methods and fs-extra methods now return a promise if the callback is not passed. #403
pathExists(), a replacement for the deprecated fs.exists. pathExists has a normal error-first callback signature. Also added pathExistsSync, an alias to fs.existsSync, for completeness. #406
Removed
BREAKING: Removed support for setting the default spaces for writeJson(), writeJsonSync(), outputJson(), & outputJsonSync(). This was undocumented. #402
Changed
Upgraded jsonfile dependency to v3.0.0:
BREAKING: Changed behavior of throws option for readJsonSync(); now does not throw filesystem errors when throws is false.
BREAKING:writeJson(), writeJsonSync(), outputJson(), & outputJsonSync() now output minified JSON by default for consistency with JSON.stringify(); set the spaces option to 2 to override this new behavior. #402
Use Buffer.allocUnsafe() instead of new Buffer() in environments that support it. #394
Fixed
removeSync() silently failed on Windows in some cases. Now throws an EBUSY error. #408
BREAKING: Removed support for Node v0.12. The Node foundation stopped officially supporting it
on Jan 1st, 2017.
BREAKING: Remove walk() and walkSync(). walkSync() was only part of fs-extra for a little
over two months. Use klaw instead of walk(), in fact, walk() was just
an alias to klaw. For walkSync() use klaw-sync. See: [#338], [#339]
Changed
BREAKING: Renamed clobber to overwrite. This affects copy(), copySync(), and move(). [#330], [#333]
Moved docs, to docs/. [#340]
Fixed
Apply filters to directories in copySync() like in copy(). [#324]
A specific condition when disk is under heavy use, copy() can fail. [#326]
BREAKING: removed support for Node v0.10. If you still want to use Node v0.10, everything should work except for ensureLink()/ensureSymlink(). Node v0.12 is still supported but will be dropped in the near future as well.
removed jsonfile aliases with File in the name, they weren't documented and probably weren't in use e.g.
this package had both fs.readJsonFile and fs.readJson that were aliases to each other, now use fs.readJson.
preliminary walker created. Intentionally not documented. If you use it, it will almost certainly change and break your code.
started moving tests inline
upgraded to jsonfile@2.1.0, can now pass JSON revivers/replacers to readJson(), writeJson(), outputJson()
copySync added clobber option (before always would clobber, now if clobber is false it throws an error if the destination exists). Only works with files at the moment.
This Pull Request updates devDependency
fs-extra
(source) fromv0.11.1
tov7.0.0
Release Notes
v7.0.0
Compare Source
copy*()
handling of symlinks to properly detect symlinks that point to the same file. (#582)fs.lchmod()
(#596)engines
field topackage.json
(#580)v6.0.1
Compare Source
fs.promises
ExperimentalWarning
on Node v10.1.0 (#578)v6.0.0
Compare Source
move
to usefs.rename
where possible (#549)filter
(#554)copy*
's behavior whenpreserveTimestamps
isfalse
has been OS-dependent since 5.0.0, but that's now explicitly noted in the docs (#563)copy*
&move*
(#541)copy*
(#568)v5.0.0
Compare Source
Significant refactor of
copy()
©Sync()
, including breaking changes. No changes to other functions in this release.Huge thanks to @manidlou for doing most of the work on this release.
filter
option can no longer be a RegExp (must be a function). This was deprecated since fs-extra v1.0.0. #512copy()
'sfilter
option can now be a function that returns a Promise. #518copy()
©Sync()
now usefs.copyFile()
/fs.copyFileSync()
in environments that support it (currently Node 8.5.0+). Older Node versions still get the old implementation. #505dest
's parent if thefilter
function aborts thecopy()
operation. #517writeStream
not being closed if there was an error incopy()
. #516v4.0.3
Compare Source
chmod
values infs.remove()
#501TypeError
on systems that don't have somefs
operations likelchown
#520v4.0.2
Compare Source
EOL
option towriteJson*
&outputJson*
(via upgrade to jsonfile v4)fs.copyFile()
in Node 8.5+.js
extension tomain
field inpackage.json
for better tooling compatibility. #485v4.0.1
Compare Source
Fixed
ensureFile()
&ensureFileSync()
would do nothing if the path was a directory. Now, they error out for consistency withensureDir()
. #465, #466, #470v4.0.0
Compare Source
Changed
fs.read()
&fs.write()
now return objects. See the docs for details. #436, #449fs.move()
now errors out when destination is a subdirectory of source. #458rimraf
tofs.remove()
&fs.removeSync()
. #459Fixed
fs.outputJSONSync()
working again; it was broken due to refactoring. #428Also clarified the docs in a few places.
v3.0.1
Compare Source
move()
&moveSync()
when source and destination are the same, and source does not exist. #415v3.0.0
Compare Source
Added
pathExists()
, a replacement for the deprecatedfs.exists
.pathExists
has a normal error-first callback signature. Also addedpathExistsSync
, an alias tofs.existsSync
, for completeness. #406Removed
writeJson()
,writeJsonSync()
,outputJson()
, &outputJsonSync()
. This was undocumented. #402Changed
throws
option forreadJsonSync()
; now does not throw filesystem errors whenthrows
isfalse
.writeJson()
,writeJsonSync()
,outputJson()
, &outputJsonSync()
now output minified JSON by default for consistency withJSON.stringify()
; set thespaces
option to2
to override this new behavior. #402Buffer.allocUnsafe()
instead ofnew Buffer()
in environments that support it. #394Fixed
removeSync()
silently failed on Windows in some cases. Now throws anEBUSY
error. #408v2.1.2
Compare Source
Fixed
ensureDir()
's callback being called twice in some cases. This bug may have also affectedremove()
. See #392, #393v2.1.1
Compare Source
Fixed
5597bd
, this broke compatibility with Node.js versions v4+ but less thanv4.5.0
.Buffer.alloc()
usage inmoveSync()
.v2.1.0
Compare Source
Thanks to Mani Maghsoudlou (@manidlou) & Jan Peer Stöcklmair (@JPeer264) for their extraordinary help with this release!
Added
moveSync()
See [#309], #381. (@manidlou)copy()
andcopySync()
'sfilter
option now gets the destination path passed as the second parameter. #366 (@manidlou)Changed
Buffer.alloc()
instead of deprecatednew Buffer()
incopySync()
. #380 (@manidlou)Fixed
move()
shouldn't error out when source and dest are the same. #377, #378 (@jdalton)v2.0.0
Compare Source
Removed
v0.12
. The Node foundation stopped officially supporting iton Jan 1st, 2017.
walk()
andwalkSync()
.walkSync()
was only part offs-extra
for a littleover two months. Use klaw instead of
walk()
, in fact,walk()
was justan alias to klaw. For
walkSync()
use klaw-sync. See: [#338], [#339]Changed
clobber
tooverwrite
. This affectscopy()
,copySync()
, andmove()
. [#330], [#333]docs/
. [#340]Fixed
copySync()
like incopy()
. [#324]copy()
can fail. [#326]v1.0.0
Compare Source
After five years of development, we finally have reach the 1.0.0 milestone! Big thanks goes
to Ryan Zim for leading the charge on this release!
Added
walkSync()
Changed
rimaf
globbing, wasn't used. [#280]copy()/copySync()
optionfilter
if it's aRegExp
.filter
should now be a function.rimraf
. This is temporary and was done becauserimraf
depended upon the beefyglob
whichfs-extra
does not use. [#300]Fixed
utimesMillis()
[#271]copySync()
failed if user didn't own file. [#199], [#301]v0.30.0
Compare Source
v0.29.0
Compare Source
ensureLink()/ensureSymlink()
. Node v0.12 is still supported but will be dropped in the near future as well.v0.28.0
Compare Source
createOutputStream()
. Use https://www.npmjs.com/package/create-output-stream. See: [#192][#192]mkdirs()/mkdirsSync()
check for invalid win32 path chars. See: [#209][#209], [#237][#237]mkdirs()/mkdirsSync()
if drive not mounted, error. See: [#93][#93]v0.27.0
Compare Source
dereference
option tocopySync()
. [#235][#235]v0.26.7
Compare Source
copy()
if source and dest are the same. [#230][#230]v0.26.6
Compare Source
emptyDir()
does not have a callback: [#229][#229]v0.26.5
Compare Source
copy()
with two arguments (w/o callback) was broken. See: [#215][#215]v0.26.4
Compare Source
copySync()
madepreserveTimestamps
default consistent withcopy()
which isfalse
. See: [#208][#208]v0.26.3
Compare Source
copy()
hangup in copying blockDevice / characterDevice //dev/null
. See: [#193][#193]v0.26.2
Compare Source
outputJson{Sync}()
spacing adherence tofs.spaces
v0.26.1
Compare Source
copySync()
whenclogger=true
and the destination is read only. See: [#190][#190]v0.26.0
Compare Source
walk()
function into its own moduleklaw
.v0.25.0
Compare Source
walk()
v0.24.0
Compare Source
delete()
anddeleteSync()
. See: [#171][#171]v0.23.1
Compare Source
move()
when moving across devices. [#170][#170]ensureSymlink()
andensureLink()
should not throw errors if link exists. [#169][#169]v0.23.0
Compare Source
ensureLink{Sync}()
andensureSymlink{Sync}()
. See: [#165][#165]v0.22.1
Compare Source
hasMillisResSync()
on module load. See: [#149][#149].Fixes regression that was introduced in
0.21.0
.v0.22.0
Compare Source
copy()
. See: [#54][#54]v0.21.0
Compare Source
copy()
andcopySync()
. See: [#141][#141]graceful-fs@3.x
to4.x
. This brings in features fromamazing-graceful-fs
(much cleaner code / less hacks)v0.20.1
Compare Source
v0.20.0
Compare Source
jsonfile
aliases withFile
in the name, they weren't documented and probably weren't in use e.g.this package had both
fs.readJsonFile
andfs.readJson
that were aliases to each other, now usefs.readJson
.jsonfile@2.1.0
, can now pass JSON revivers/replacers toreadJson()
,writeJson()
,outputJson()
v0.19.0
Compare Source
fs.copy()
had support for Node v0.8, dropped supportv0.18.4
Compare Source
v0.18.3
Compare Source
EEXIST
when clobbering on some Linux systems. [#134][#134]v0.18.2
Compare Source
F_OK
([#120][#120])v0.18.1
Compare Source
move()
a bit.9283898
v0.18.0
Compare Source
emptyDir()
andemptyDirSync()
v0.17.0
Compare Source
copySync
addedclobber
option (before always would clobber, now ifclobber
isfalse
it throws an error if the destination exists).Only works with files at the moment.
createOutputStream()
added. See: [#118][#118]v0.16.5
Compare Source
fs.move
whenclobber
istrue
and destination is a directory, it should clobber. [#114][#114]v0.16.4
Compare Source
fs.mkdirs
fix infinite loop on Windows. See: See substack/node-mkdirp#74 and substack/node-mkdirp#66v0.16.3
Compare Source
1ee77c8
v0.16.2
Compare Source
fs.copy
for Node v0.8 (support is temporary and will be removed in the near future)v0.16.1
Compare Source
setImmediate
is not available, fall back toprocess.nextTick
v0.16.0
Compare Source
fs.move()
into itself. Closes [#104]fs.move()
moving directory across device. Closes [#108]fs.copy()
bug. Closes [#98]v0.15.0
Compare Source
ncp
, imported code inio.js
graceful-fs
is now a dependencyv0.14.0
Compare Source
copy
/copySync
fromfs.copy(src, dest, [filters], callback)
tofs.copy(src, dest, [options], callback)
[#100][#100]v0.13.0
Compare Source
touch
andtouchSync
methods (they didn't handle permissions like UNIX touch)"ncp": "^0.6.0"
to"ncp": "^1.0.1"
mkdirp
=>minimist
andmkdirp
are no longer dependences, should now appease people who wantedmkdirp
to be--use_strict
safe. See #59v0.12.0
Compare Source
copySync()
[#85][#85]This PR has been generated by Renovate Bot.