read-json5-file
Advanced tools
Comparing version 0.0.0 to 1.0.0
'use strict' | ||
const path = require('path') | ||
const fs = require('graceful-fs') | ||
const fs = require('fs') | ||
const stripBom = require('strip-bom') | ||
const JSON5 = require('json5') | ||
const { promisify } = require('util') | ||
const readFile = promisify(fs.readFile) | ||
@@ -12,3 +10,3 @@ const parse = (data, fp) => JSON5.parse(stripBom(data), path.relative('.', fp)) | ||
module.exports = async fp => { | ||
const data = await readFile(fp, 'utf8') | ||
const data = await fs.promises.readFile(fp, 'utf8') | ||
return parse(data, fp) | ||
@@ -15,0 +13,0 @@ } |
{ | ||
"name": "read-json5-file", | ||
"version": "0.0.0", | ||
"version": "1.0.0", | ||
"description": "Read and parse a JSON5 file", | ||
"main": "index.js", | ||
"engines": { | ||
"node": ">=8.15" | ||
"node": ">=10" | ||
}, | ||
@@ -43,12 +43,11 @@ "files": [ | ||
"dependencies": { | ||
"graceful-fs": "^4.1.15", | ||
"json5": "^2.1.0", | ||
"json5": "^2.2.0", | ||
"strip-bom": "^4.0.0" | ||
}, | ||
"devDependencies": { | ||
"mos": "^2.0.0-alpha.3", | ||
"mos": "2.0.0-alpha.3", | ||
"mos-plugin-readme": "^1.0.4", | ||
"standard": "^12.0.1", | ||
"tape": "^4.10.1" | ||
"standard": "^16.0.3", | ||
"tape": "^5.1.1" | ||
} | ||
} |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
3998
2
6
0
16
2
- Removedgraceful-fs@^4.1.15
- Removedgraceful-fs@4.2.11(transitive)
Updatedjson5@^2.2.0