write-json5-file
Advanced tools
Comparing version 3.0.1 to 3.1.0
# write-json5-file | ||
## 3.1.0 | ||
### Minor Changes | ||
- bba9985: graceful-fs and mz removed from dependencies. | ||
## 3.0.1 | ||
@@ -4,0 +10,0 @@ |
'use strict' | ||
const path = require('path') | ||
const fs = require('graceful-fs') | ||
const { promisify } = require('util') | ||
const fs = require('fs') | ||
const writeFileAtomic = require('write-file-atomic') | ||
@@ -9,4 +8,2 @@ const sortKeys = require('sort-keys') | ||
const mkdir = promisify(fs.mkdir) | ||
const main = (fn, fp, data, opts) => { | ||
@@ -39,3 +36,3 @@ if (!fp) { | ||
module.exports = async (fp, data, opts) => { | ||
await mkdir(path.dirname(fp), { recursive: true }) | ||
await fs.promises.mkdir(path.dirname(fp), { recursive: true }) | ||
return main(writeFileAtomic, fp, data, opts) | ||
@@ -42,0 +39,0 @@ } |
{ | ||
"name": "write-json5-file", | ||
"version": "3.0.1", | ||
"version": "3.1.0", | ||
"description": "Stringify and write JSON to a file atomically", | ||
@@ -44,5 +44,4 @@ "main": "index.js", | ||
"dependencies": { | ||
"graceful-fs": "^4.2.4", | ||
"json5": "^2.1.3", | ||
"sort-keys": "^4.1.0", | ||
"json5": "^2.2.0", | ||
"sort-keys": "^4.2.0", | ||
"write-file-atomic": "^3.0.3" | ||
@@ -53,6 +52,6 @@ }, | ||
"mos-plugin-readme": "^1.0.4", | ||
"standard": "^16.0.1", | ||
"tape": "^5.0.1", | ||
"standard": "^16.0.3", | ||
"tape": "^5.1.1", | ||
"tempfile": "^3.0.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
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
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
3
6695
93
2
- Removedgraceful-fs@^4.2.4
- Removedgraceful-fs@4.2.11(transitive)
Updatedjson5@^2.2.0
Updatedsort-keys@^4.2.0