Changelog
4.1.0
binding.open()
(thanks @vlindhol, see [#195][#195])Changelog
4.0.0
In earlier versions of mock-fs
, a monkey-patched version of the fs
module was used to provide an in-memory filesystem. With each major release of Node, the mock-fs
package needed to include a modified copy of the fs
module. With the mock-fs@4
release, this package no longer includes a modified copy of the fs
module. Instead, this package overrides process.binding('fs')
. While this is not part of Node's stable API, it has proven to be a more stable interface than the fs
module itself (based on experience implementing it with Node 0.8 through 7.0).
Upgrading from 3.x to 4.0 should be straightforward for most applications. There are several breaking changes that may be restored in future releases:
mock.fs()
function has been removed.fs.stat()
and friends is no longer an instance of fs.Stats
(though it behaves as one).require()
calls do not work consistently.Detailed changes:
process.binding('fs')
([#182][#182])Changelog
3.12.0
printDeprecation
([#175][#175]).fs
(thanks @matheuss, see [#147][#147]).Changelog
3.11.0
require()
calls use the real filesystem ([#139][#139]).fs
module patching ([#140][#140]).Changelog
3.10.0