Comparing version 4.0.0 to 4.0.1
@@ -7,2 +7,8 @@ # Changelog | ||
## [4.0.1] - 2020-05-10 | ||
### Fixed | ||
- Empty file content throws error | ||
## [4.0.0] - 2020-03-20 | ||
@@ -9,0 +15,0 @@ |
{ | ||
"name": "fsify", | ||
"version": "4.0.0", | ||
"version": "4.0.1", | ||
"authors": [ | ||
@@ -35,10 +35,12 @@ "Tobias Reich <tobias@electerious.com>" | ||
"coveralls": "nyc report --reporter=text-lcov | coveralls", | ||
"test": "nyc node_modules/mocha/bin/_mocha" | ||
"test": "nyc node_modules/mocha/bin/_mocha", | ||
"lint": "eslint '{src,test}/**/*.js'" | ||
}, | ||
"devDependencies": { | ||
"@electerious/eslint-config": "^1.3.2", | ||
"chai": "^4.2.0", | ||
"coveralls": "^3.0.4", | ||
"mocha": "^7.0.1", | ||
"nyc": "^15.0.0", | ||
"uuid": "^7.0.0" | ||
"coveralls": "^3.1.0", | ||
"mocha": "^7.1.2", | ||
"nyc": "^15.0.1", | ||
"uuid": "^8.0.0" | ||
}, | ||
@@ -45,0 +47,0 @@ "dependencies": { |
'use strict' | ||
const util = require('util') | ||
const fs = require('fs') | ||
const fs = require('fs').promises | ||
@@ -16,5 +15,5 @@ /** | ||
return util.promisify(fs.mkdir)(path, mode) | ||
return fs.mkdir(path, mode) | ||
.catch((err) => { if (err.code !== 'EEXIST') throw err }) | ||
} |
'use strict' | ||
const util = require('util') | ||
const fs = require('fs') | ||
const fs = require('fs').promises | ||
@@ -16,5 +15,5 @@ /** | ||
*/ | ||
module.exports = function(path, data, encoding, mode, flag) { | ||
module.exports = function(path, data = '', encoding, mode, flag) { | ||
return util.promisify(fs.writeFile)(path, data, { | ||
return fs.writeFile(path, data, { | ||
encoding, | ||
@@ -21,0 +20,0 @@ mode, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
25103
6
319