NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm, #67 most downloaded on npm
fs-extra contains methods that aren't included in the vanilla Node.js fs package. Such as recursive mkdir, copy, and remove.
Latest stable
11.4.1
Last release 2 months ago
22 Sep 2026
Release timing varies
gaps range from 3 weeks to 1.1 years
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
15 years old
105 releases · first in 2011
Drag across the ruler to compare, or tap a release to open it.
Properly handle read errors (e.g. due to permissions) in emptyDir*()
Proper EEXIST error when trying to create a symlink and the dest already exists as a broken symlink (#925, #1076)
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Fix handling of symlinked destination ancestors in copy/move methods (#1071, #1073)
Fix ensureLink*/ensureSymlink* identical file detection on Windows
Fix bug where calling ensureSymlink/ensureSymlinkSync with a relative srcPath would fail if the symlink already existed (#1038, #1064)
Fix copying symlink when destination is a symlink to the same target (#1019, #1060)
Fix spurrious UnhandledPromiseRejectionWarning that could occur when calling .copy() in some cases (#1056, #1058)
Fix case where move/moveSync could incorrectly think files are identical on Windows
move/moveSync could incorrectly think files are identical on Windows (#1050)Add promise support for newer fs methods (#1044, #1045)
Copy directory contents in parallel for better performance
Preserve timestamps when moving files across devices (#992, #994)
Re-add main field to package.json for better TypeScript compatibility (#979, #981)
Don't allow requiring fs-extra/lib/SOMETHING (switched to exports)
Warn if fs.realpath.native does not exist, instead of erroring
Add sideEffects: false to package.json
sideEffects: false to package.json (#941)Require Node.js v12+ (#886, #893, #890, #894, #895)
The following changes, although technically semver-major, will not affect the vast majority of users:
ensureLink*()/ensureSymlink*() (#826, #786, #870)copy*() unknown file type (#880)remove*() (#882)move*(), even on technically case-insensitive filesystems (#759, #801)fs.rm*() for remove*() in environments that support it (#882, #806)emptyDir() performance (#885)copy*()'s filter function is not called more than necessary (#883, #809)move*() raising EPERM error when moving a file to the root of a drive on Windows (#897, #819)Add promise support for fs.rm() (#841, #860)
Requires Node.js version 10 or greater (#725, #751)
ensureDir* to use a fork of https://github.com/sindresorhus/make-dir to make use of native recursive fs.mkdir where possible (#619, #756)atime for copy* with preserveTimestamps option (#633)The following changes, allthough technically breaking, will not affect the vast majority of users:
outputJson now outputs objects as they were when the function was called, even if they are mutated later (#702, #768)null as an options parameter to *Json* methods (#745, #768)fs.writev & fs.opendir (#747)ensureFile (#696, #744)Add support for promisified fs.realpath.native in Node v9.2+ (#650, #682)
Fix bug Maximum call stack size exceeded error in util/stat
Maximum call stack size exceeded error in util/stat (#679)NOTE: Node.js v6 support is deprecated, and will be dropped in the next major release.
NOTE: Node.js v6 support is deprecated, and will be dropped in the next major release.
Fix removeSync() on Windows, in some cases, it would error out with ENOTEMPTY
BREAKING: Refine copy*() handling of symlinks to properly detect symlinks that point to the same file.
Fix fs.promises ExperimentalWarning on Node v10.1.0
fs.promises ExperimentalWarning on Node v10.1.0 (#578)Drop support for Node.js versions 4, 5, & 7
move to use fs.rename where possible (#549)filter (#554)copy*'s behavior when preserveTimestamps is false has been OS-dependent since 5.0.0, but that's now explicitly noted in the docs (#563)copy* & move* (#541)copy* (#568)Significant refactor of copy() & copySync(), including breaking changes. No changes to other functions in this release.
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.
filter option can no longer be a RegExp (must be a function). This was deprecated since fs-extra v1.0.0. #512copy()'s filter option can now be a function that returns a Promise. #518copy() & 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. #505dest's parent if the filter function aborts the copy() operation. #517writeStream not being closed if there was an error in copy(). #516Fix wrong chmod values in fs.remove() #501
Added EOL option to writeJson* & outputJson* (via upgrade to jsonfile v4)
EOL option to writeJson* & outputJson* (via upgrade to jsonfile v4)fs.copyFile() in Node 8.5+.js extension to main field in package.json for better tooling compatibility. #485Previously, ensureFile() & ensureFileSync() would do nothing if the path was a directory. Now, they error out for consistency with ensureDir(). #465,
BREAKING: The promisified versions of fs.read() & fs.write() now return objects. See the docs for details. #436, #449
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 to fs.remove() & fs.removeSync(). #459fs.outputJSONSync() working again; it was broken due to refactoring. #428Also clarified the docs in a few places.
Fix bug in move() & moveSync() when source and destination are the same, and source does not exist. #415
move() & moveSync() when source and destination are the same, and source does not exist. #415pathExists(), a replacement for the deprecated fs.exists. pathExists has a normal error-first callback signature. Also added pathExistsSync, an alias…
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. #406writeJson(), writeJsonSync(), outputJson(), & outputJsonSync(). This was undocumented. #402throws option for readJsonSync(); now does not throw filesystem errors when throws is false.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. #402Buffer.allocUnsafe() instead of new Buffer() in environments that support it. #394removeSync() silently failed on Windows in some cases. Now throws an EBUSY error. #408Weird windows bug that resulted in ensureDir()'s callback being called twice in some cases. This bug may have also affected remove(). See #392, #393
Reverted `5597bd`, this broke compatibility with Node.js versions v4+ but less than v4.5.0.
5597bd, this broke compatibility with Node.js versions v4+ but less than v4.5.0.Buffer.alloc() usage in moveSync().Use Buffer.alloc() instead of deprecated new Buffer() in copySync(). #380 (@manidlou)
Thanks to Mani Maghsoudlou (@manidlou) & Jan Peer Stöcklmair (@JPeer264) for their extraordinary help with this release!
moveSync() See [#309], #381. (@manidlou)copy() and copySync()'s filter option now gets the destination path passed as the second parameter. #366 (@manidlou)Buffer.alloc() instead of deprecated new Buffer() in copySync(). #380 (@manidlou)BREAKING: Removed support for Node v0.12. The Node foundation stopped officially supporting it on Jan 1st, 2017.
v0.12. The Node foundation stopped officially supporting it
on Jan 1st, 2017.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]clobber to overwrite. This affects copy(), copySync(), and move(). [#330], [#333]docs/. [#340]copySync() like in copy(). [#324]copy() can fail. [#326]deprecate copy()/copySync() option filter if it's a RegExp. filter should now be a function.
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!
walkSync()rimaf globbing, wasn't used. [#280]copy()/copySync() option filter if it's a RegExp. filter should now be a function.rimraf. This is temporary and was done because rimraf depended upon the beefy glob which fs-extra does not use. [#300]utimesMillis() [#271]copySync() failed if user didn't own file. [#199], [#301]Brought back Node v0.10 support. I didn't realize there was still demand. Official support will end 2016-10-01.
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
ensureLink()/ensureSymlink(). Node v0.12 is still supported but will be dropped in the near future as well.BREAKING: removed createOutputStream(). Use https://www.npmjs.com/package/create-output-stream. See: [#192][#192]
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]add dereference option to copySync(). [#235][#235]
dereference option to copySync(). [#235][#235]fixed copy() if source and dest are the same. [#230][#230]
copy() if source and dest are the same. [#230][#230]fixed if emptyDir() does not have a callback: [#229][#229]
emptyDir() does not have a callback: [#229][#229]copy() with two arguments (w/o callback) was broken. See: [#215][#215]
copy() with two arguments (w/o callback) was broken. See: [#215][#215]copySync() made preserveTimestamps default consistent with copy() which is false. See: [#208][#208]
copySync() made preserveTimestamps default consistent with copy() which is false. See: [#208][#208]fixed copy() hangup in copying blockDevice / characterDevice / /dev/null. See: [#193][#193]
copy() hangup in copying blockDevice / characterDevice / /dev/null. See: [#193][#193]fixed outputJson{Sync}() spacing adherence to fs.spaces
outputJson{Sync}() spacing adherence to fs.spacesfixed copySync() when clogger=true and the destination is read only. See: [#190][#190]
copySync() when clogger=true and the destination is read only. See: [#190][#190]extracted the walk() function into its own module `klaw`.
walk() function into its own module klaw.- now has a file walker walk()
walk()removed alias delete() and deleteSync(). See: [#171][#171]
delete() and deleteSync(). See: [#171][#171]Better handling of errors for move() when moving across devices. [#170][#170]
move() when moving across devices. [#170][#170]ensureSymlink() and ensureLink() should not throw errors if link exists. [#169][#169]added ensureLink{Sync}() and ensureSymlink{Sync}(). See: [#165][#165]
ensureLink{Sync}() and ensureSymlink{Sync}(). See: [#165][#165]Prevent calling hasMillisResSync() on module load. See: [#149][#149]. Fixes regression that was introduced in 0.21.0.
hasMillisResSync() on module load. See: [#149][#149].
Fixes regression that was introduced in 0.21.0.preserve permissions / ownership in copy(). See: [#54][#54]
copy(). See: [#54][#54]add option to preserve timestamps in copy() and copySync(). See: [#141][#141]
copy() and copySync(). See: [#141][#141]graceful-fs@3.x to 4.x. This brings in features from amazing-graceful-fs (much cleaner code / less hacks)fixed regression caused by latest jsonfile update: See: https://github.com/jprichardson/node-jsonfile/issues/26
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.
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.jsonfile@2.1.0, can now pass JSON revivers/replacers to readJson(), writeJson(), outputJson()fs.copy() had support for Node v0.8, dropped support
fs.copy() had support for Node v0.8, dropped supportOne column per quarter.