read-package-json-fast
Advanced tools
Comparing version 1.1.0 to 1.1.1
19
index.js
@@ -11,2 +11,3 @@ const {promisify} = require('util') | ||
}) | ||
const normalizePackageBin = require('npm-normalize-package-bin') | ||
@@ -19,3 +20,3 @@ const normalize = data => { | ||
fixFunding(data) | ||
fixBin(data) | ||
normalizePackageBin(data) | ||
return data | ||
@@ -43,18 +44,2 @@ } | ||
const fixBin = data => { | ||
if (typeof data.bin === 'string') { | ||
if (data.name) | ||
data.bin = { [data.name]: data.bin } | ||
else | ||
delete data.bin | ||
} else if (typeof data.bin !== 'object' || !data.bin) | ||
delete data.bin | ||
else | ||
for (const [name, bin] of Object.entries(data.bin)) { | ||
if (typeof bin !== 'string') | ||
delete data.bin[name] | ||
} | ||
return data | ||
} | ||
const fixBundled = data => { | ||
@@ -61,0 +46,0 @@ const bdd = data.bundledDependencies |
{ | ||
"name": "read-package-json-fast", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "Like read-package-json, but faster", | ||
@@ -21,4 +21,5 @@ "author": "Isaac Z. Schlueter <i@izs.me> (https://izs.me)", | ||
"dependencies": { | ||
"json-parse-even-better-errors": "^2.0.1" | ||
"json-parse-even-better-errors": "^2.0.1", | ||
"npm-normalize-package-bin": "^1.0.1" | ||
} | ||
} |
Sorry, the diff of this file is too big to display
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
133473
2
3826
+ Addednpm-normalize-package-bin@1.0.1(transitive)