Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

read-package-json

Package Overview
Dependencies
Maintainers
9
Versions
91
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

read-package-json - npm Package Compare versions

Comparing version 2.1.0 to 2.1.1

10

CHANGELOG.md

@@ -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)

4

package.json
{
"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 +

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc