write-yaml-file
Advanced tools
Comparing version 2.0.0 to 2.1.0
@@ -5,3 +5,3 @@ 'use strict' | ||
const writeFileAtomic = require('write-file-atomic') | ||
const mkdirp = require('mkdirp') | ||
const makeDir = require('make-dir') | ||
const pify = require('pify') | ||
@@ -27,8 +27,8 @@ const YAML = require('js-yaml') | ||
module.exports = (fp, data, opts) => | ||
pify(mkdirp)(path.dirname(fp), { fs }) | ||
makeDir(path.dirname(fp), { fs }) | ||
.then(() => main(pify(writeFileAtomic), fp, data, opts)) | ||
module.exports.sync = (fp, data, opts) => { | ||
mkdirp.sync(path.dirname(fp), { fs }) | ||
makeDir.sync(path.dirname(fp), { fs }) | ||
main(writeFileAtomic.sync, fp, data, opts) | ||
} |
{ | ||
"name": "write-yaml-file", | ||
"version": "2.0.0", | ||
"version": "2.1.0", | ||
"description": "Stringify and write YAML to a file atomically", | ||
@@ -38,5 +38,5 @@ "main": "index.js", | ||
"js-yaml": "^3.8.1", | ||
"mkdirp": "^0.5.1", | ||
"make-dir": "^3.0.0", | ||
"pify": "^4.0.0", | ||
"write-file-atomic": "^2.0.0" | ||
"write-file-atomic": "^3.0.0" | ||
}, | ||
@@ -43,0 +43,0 @@ "devDependencies": { |
@@ -10,3 +10,3 @@ # write-yaml-file | ||
``` | ||
npm i -S write-yaml-file | ||
<npm|yarn|pnpm> add write-yaml-file | ||
``` | ||
@@ -13,0 +13,0 @@ |
Sorry, the diff of this file is not supported yet
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
3979
+ Addedmake-dir@^3.0.0
+ Addedis-typedarray@1.0.0(transitive)
+ Addedmake-dir@3.1.0(transitive)
+ Addedsemver@6.3.1(transitive)
+ Addedtypedarray-to-buffer@3.1.5(transitive)
+ Addedwrite-file-atomic@3.0.3(transitive)
- Removedmkdirp@^0.5.1
- Removedminimist@1.2.8(transitive)
- Removedmkdirp@0.5.6(transitive)
- Removedwrite-file-atomic@2.4.3(transitive)
Updatedwrite-file-atomic@^3.0.0