read-package-json
Advanced tools
Comparing version 2.1.0 to 2.1.1
@@ -5,2 +5,12 @@ # Change Log | ||
<a name="2.1.1"></a> | ||
## [2.1.1](https://github.com/npm/read-package-json/compare/v2.1.0...v2.1.1) (2019-12-09) | ||
### Bug Fixes | ||
* normalize and sanitize pkg bin entries ([b8cb5fa](https://github.com/npm/read-package-json/commit/b8cb5fa)) | ||
<a name="2.1.0"></a> | ||
@@ -7,0 +17,0 @@ # [2.1.0](https://github.com/npm/read-package-json/compare/v2.0.13...v2.1.0) (2019-08-13) |
{ | ||
"name": "read-package-json", | ||
"version": "2.1.0", | ||
"version": "2.1.1", | ||
"author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)", | ||
@@ -22,3 +22,3 @@ "description": "The thing npm uses to read package.json files with semantics and defaults and validation", | ||
"normalize-package-data": "^2.0.0", | ||
"slash": "^1.0.0" | ||
"npm-normalize-package-bin": "^1.0.0" | ||
}, | ||
@@ -25,0 +25,0 @@ "devDependencies": { |
@@ -14,3 +14,3 @@ var fs | ||
var util = require('util') | ||
var slash = require('slash') | ||
var normalizePackageBin = require('npm-normalize-package-bin') | ||
@@ -305,3 +305,3 @@ module.exports = readJson | ||
function bins (file, data, cb) { | ||
if (Array.isArray(data.bin)) return bins_(file, data, data.bin, cb) | ||
data = normalizePackageBin(data) | ||
@@ -323,7 +323,7 @@ var m = data.directories && data.directories.bin | ||
var f = path.basename(mf) | ||
acc[f] = slash(path.join(m, mf)) | ||
acc[f] = path.join(m, mf) | ||
} | ||
return acc | ||
}, {}) | ||
return cb(null, data) | ||
return cb(null, normalizePackageBin(data)) | ||
} | ||
@@ -409,2 +409,3 @@ | ||
var relName = data.bin[key] | ||
/* istanbul ignore if - impossible, bins have been normalized */ | ||
if (typeof relName !== 'string') { | ||
@@ -411,0 +412,0 @@ var msg = 'Bin filename for ' + key + |
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
19171
411
+ Addednpm-normalize-package-bin@1.0.1(transitive)
- Removedslash@^1.0.0
- Removedslash@1.0.0(transitive)