New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

mock-fs

Package Overview
Dependencies
Maintainers
1
Versions
87
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mock-fs - npm Package Versions

1
9

4.1.0

Diff

Changelog

Source

4.1.0

  • Correctly follow a symlink chain in binding.open() (thanks @vlindhol, see [#195][#195])
tschaub
published 4.0.0 •

Changelog

Source

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:

  • The mock.fs() function has been removed.
  • The object created by fs.stat() and friends is no longer an instance of fs.Stats (though it behaves as one).
  • Lazy require() calls do not work consistently.

Detailed changes:

  • Only override process.binding('fs') ([#182][#182])
  • Expose the root of the mocked filesystem (thanks @ciaranj, see [#194][#194])
tschaub
published 4.0.0-beta.1 •

tschaub
published 3.12.1 •

Changelog

Source

3.12.1

  • Revert the require cache clearing behavior ([#181][#181]).
tschaub
published 3.12.0 •

Changelog

Source

3.12.0

  • Support for Node 7.x (thanks @goliney, see [#174][#174]).
  • Remove calls to printDeprecation ([#175][#175]).
  • Break early when checking version (thanks @isiahmeadows, see [#157][#157]).
  • Add a note about restoring fs (thanks @matheuss, see [#147][#147]).
  • Clear the require cache before overriding fs functions ([#141][#141])
tschaub
published 3.11.0 •

Changelog

Source

3.11.0

  • Make require() calls use the real filesystem ([#139][#139]).
  • Reduce the manual fs module patching ([#140][#140]).
tschaub
published 3.10.0 •

Changelog

Source

3.10.0

  • Fixes for Node 6.3 ([#138][#138]).
  • Fix permissions issues on directories (thanks @as3richa, see [#105][#105]).
tschaub
published 3.9.0 •

Changelog

Source

3.9.0

  • Support for Node 6.x (thanks @tmcw, see [#107][#107]).
tschaub
published 3.8.0 •

Changelog

Source

3.8.0

  • Implement binding.writeBuffers() (see [#94][#94]).
tschaub
published 3.7.0 •

Changelog

Source

3.7.0

  • Add support for fs.access() and fs.accessSync() (thanks @shyiko, see [#78][#78] and [#80][#80]).
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc