Socket
Socket
Sign inDemoInstall

fs-extra

Package Overview
Dependencies
15
Maintainers
1
Versions
96
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.20.0 to 0.20.1

lib/empty/index.js

4

CHANGELOG.md

@@ -0,1 +1,5 @@

0.20.1 / 2015-06-23
-------------------
- fixed regression caused by latest jsonfile update: See: https://github.com/jprichardson/node-jsonfile/issues/26
0.20.0 / 2015-06-19

@@ -2,0 +6,0 @@ -------------------

34

lib/index.js

@@ -18,14 +18,6 @@ var assign = require('./util/assign')

assign(fs, require('./move'))
assign(fs, require('./streams'))
assign(fs, require('./empty'))
assign(fs, require('./ensure'))
var create = require('./create')
fs.createFile = create.createFile
fs.createFileSync = create.createFileSync
fs.ensureFile = create.createFile
fs.ensureFileSync = create.createFileSync
var createOutputStream = require('./create-output-stream')
fs.createOutputStream = createOutputStream.createOutputStream
fs.createOutputStreamSync = createOutputStream.createOutputStreamSync
var output = require('./output')

@@ -35,11 +27,15 @@ fs.outputFile = output.outputFile

var empty = require('./empty-dir')
Object.keys(empty).forEach(function (method) {
fs[method] = empty[method]
module.exports = fs
// maintain backwards compatibility for awhile
var jsonfile = {}
Object.defineProperty(jsonfile, 'spaces', {
get: function () {
return fs.spaces // found in ./json
},
set: function (val) {
fs.spaces = val
}
})
module.exports = fs
var jsonFile = require('jsonfile')
jsonFile.spaces = 2 // set to 2
module.exports.jsonfile = jsonFile // so users of fs-extra can modify jsonFile.spaces
module.exports.jsonfile = jsonfile // so users of fs-extra can modify jsonFile.spaces

@@ -17,3 +17,4 @@ var jsonFile = require('jsonfile')

writeJsonSync: jsonFile.writeFileSync,
writeJSONSync: jsonFile.writeFileSync
writeJSONSync: jsonFile.writeFileSync,
spaces: 2 // default in fs-extra
}
{
"name": "fs-extra",
"version": "0.20.0",
"version": "0.20.1",
"description": "fs-extra contains methods that aren't included in the vanilla Node.js fs package. Such as mkdir -p, cp -r, and rm -rf.",

@@ -46,2 +46,3 @@ "homepage": "https://github.com/jprichardson/node-fs-extra",

"secure-random": "^1.1.1",
"semver": "^4.3.6",
"standard": "^3.3.1"

@@ -48,0 +49,0 @@ },

@@ -9,2 +9,4 @@ Node.js: fs-extra

[![npm](https://nodei.co/npm/fs-extra.png?downloads=true&downloadRank=true&stars=true)](npmjs.org/package/fs-extra)
This module adds a few extra file system methods that aren't included in the native `fs` module. It is a drop in replacement for `fs`.

@@ -11,0 +13,0 @@

@@ -6,3 +6,3 @@ var Mocha = require('mocha')

ui: 'bdd',
reporter: 'list',
reporter: 'dot',
timeout: 30000

@@ -9,0 +9,0 @@ })

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc