Socket
Socket
Sign inDemoInstall

fs-extra

Package Overview
Dependencies
3
Maintainers
2
Versions
96
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.0.1 to 4.0.2

7

CHANGELOG.md

@@ -0,1 +1,8 @@

4.0.2 / 2017-09-12
------------------
- Added `EOL` option to `writeJson*` & `outputJson*` (via upgrade to jsonfile v4)
- Added promise support to [`fs.copyFile()`](https://nodejs.org/api/fs.html#fs_fs_copyfile_src_dest_flags_callback) in Node 8.5+
- Added `.js` extension to `main` field in `package.json` for better tooling compatibility. [#485](https://github.com/jprichardson/node-fs-extra/pull/485)
4.0.1 / 2017-07-31

@@ -2,0 +9,0 @@ ------------------

1

docs/outputJson-sync.md

@@ -11,2 +11,3 @@ # outputJsonSync(file, object, [options])

- `spaces` `<Number|String>` Number of spaces to indent; or a string to use for indentation (i.e. pass `'\t'` for tab indentation). See [the docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#The_space_argument) for more info.
- `EOL` `<String>` Set EOL character. Default is `\n`.
- `replacer` [JSON replacer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#The_replacer_parameter)

@@ -13,0 +14,0 @@ - Also accepts [`fs.writeFileSync` options](https://nodejs.org/api/fs.html#fs_fs_writefilesync_file_data_options)

@@ -11,2 +11,3 @@ # outputJson(file, object, [options, callback])

- `spaces` `<Number|String>` Number of spaces to indent; or a string to use for indentation (i.e. pass `'\t'` for tab indentation). See [the docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#The_space_argument) for more info.
- `EOL` `<String>` Set EOL character. Default is `\n`.
- `replacer` [JSON replacer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#The_replacer_parameter)

@@ -13,0 +14,0 @@ - Also accepts [`fs.writeFile` options](https://nodejs.org/api/fs.html#fs_fs_writefile_file_data_options_callback)

@@ -11,2 +11,3 @@ # writeJsonSync(file, object, [options])

- `spaces` `<Number|String>` Number of spaces to indent; or a string to use for indentation (i.e. pass `'\t'` for tab indentation). See [the docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#The_space_argument) for more info.
- `EOL` `<String>` Set EOL character. Default is `\n`.
- `replacer` [JSON replacer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#The_replacer_parameter)

@@ -13,0 +14,0 @@ - Also accepts [`fs.writeFileSync` options](https://nodejs.org/api/fs.html#fs_fs_writefilesync_file_data_options)

@@ -11,2 +11,3 @@ # writeJson(file, object, [options, callback])

- `spaces` `<Number|String>` Number of spaces to indent; or a string to use for indentation (i.e. pass `'\t'` for tab indentation). See [the docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#The_space_argument) for more info.
- `EOL` `<String>` Set EOL character. Default is `\n`.
- `replacer` [JSON replacer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#The_replacer_parameter)

@@ -13,0 +14,0 @@ - Also accepts [`fs.writeFile` options](https://nodejs.org/api/fs.html#fs_fs_writefile_file_data_options_callback)

5

lib/fs/index.js

@@ -37,3 +37,6 @@ // This is adapted from https://github.com/normalize/mz

]
// fs.mkdtemp() was added in Node.js v5.10.0, so check if it exists
// Add methods that are only in some Node.js versions
// fs.copyFile was added in Node.js v8.5.0
typeof fs.copyFile === 'function' && api.push('copyFile')
// fs.mkdtemp() was added in Node.js v5.10.0
typeof fs.mkdtemp === 'function' && api.push('mkdtemp')

@@ -40,0 +43,0 @@

{
"name": "fs-extra",
"version": "4.0.1",
"version": "4.0.2",
"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.",

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

"graceful-fs": "^4.1.2",
"jsonfile": "^3.0.0",
"jsonfile": "^4.0.0",
"universalify": "^0.1.0"

@@ -56,6 +56,6 @@ },

},
"main": "./lib/index",
"main": "./lib/index.js",
"scripts": {
"coverage": "istanbul cover -i 'lib/**' -x '**/__tests__/**' test.js",
"coveralls": "npm run coverage && coveralls < coverage/lcov.info",
"coveralls": "coveralls < coverage/lcov.info",
"lint": "standard && standard-markdown",

@@ -62,0 +62,0 @@ "test-find": "find ./lib/**/__tests__ -name *.test.js | xargs mocha",

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