Skip to content

Commit

Permalink
Update write-file-atomic dependency (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
coreyfarrell authored and sindresorhus committed May 25, 2019
1 parent 879e140 commit b662204
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions index.js
Expand Up @@ -8,7 +8,6 @@ const makeDir = require('make-dir');
const detectIndent = require('detect-indent');

const readFile = promisify(fs.readFile);
const writeFileAtomicP = promisify(writeFileAtomic);

const init = (fn, filePath, data, options) => {
if (!filePath) {
Expand Down Expand Up @@ -51,7 +50,7 @@ const main = async (filePath, data, options) => {

const json = JSON.stringify(data, options.replacer, indent);

return writeFileAtomicP(filePath, `${json}\n`, {mode: options.mode});
return writeFileAtomic(filePath, `${json}\n`, {mode: options.mode});
};

const mainSync = (filePath, data, options) => {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -38,7 +38,7 @@
"graceful-fs": "^4.1.15",
"make-dir": "^3.0.0",
"sort-keys": "^3.0.0",
"write-file-atomic": "^2.4.2"
"write-file-atomic": "^3.0.0"
},
"devDependencies": {
"ava": "^1.4.1",
Expand Down

0 comments on commit b662204

Please sign in to comment.