Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

read-package-json@1.1.6

  • Loading branch information...
commit 909cccf0614d07e74783f5a15ec16fbfe628a5cc 1 parent a3891b6
@isaacs isaacs authored
View
10 node_modules/read-package-json/package.json
@@ -1,6 +1,6 @@
{
"name": "read-package-json",
- "version": "1.1.5",
+ "version": "1.1.6",
"author": {
"name": "Isaac Z. Schlueter",
"email": "i@izs.me",
@@ -34,6 +34,10 @@
"url": "https://github.com/isaacs/read-package-json/issues"
},
"homepage": "https://github.com/isaacs/read-package-json",
- "_id": "read-package-json@1.1.5",
- "_from": "read-package-json@latest"
+ "_id": "read-package-json@1.1.6",
+ "dist": {
+ "shasum": "a851dbbaca48ff78a87f890f0a9fdf43b1759d5a"
+ },
+ "_from": "read-package-json@1.1.6",
+ "_resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-1.1.6.tgz"
}
View
9 node_modules/read-package-json/read-json.js
@@ -111,6 +111,7 @@ function extras (file, data, log_, strict_, cb_) {
else if (typeof arguments[i] === 'function')
log = arguments[i]
}
+ if (!log) log = function () {};
cb = arguments[i]
var set = readJson.extraSet
var n = set.length
@@ -134,6 +135,9 @@ function scriptpath (file, data, cb) {
}
function scriptpath_(key) {
s = this[key]
+ // This is never allowed, and only causes problems
+ if (typeof s !== 'string')
+ return delete this[key]
var spre = /^(\.[\/\\])?node_modules[\/\\].bin[\\\/]/
if (s.match(spre))
this[key] = this[key].replace(spre, '')
@@ -332,9 +336,10 @@ function final (file, data, log, strict, cb) {
}
function makePackageId (data) {
- return cleanString(data.name) + "@" + cleanString(data.version)
+ var name = cleanString(data.name)
+ var ver = cleanString(data.version)
+ return name + "@" + ver
}
-
function cleanString(str) {
return (!str || typeof(str) !== "string") ? "" : str.trim()
}
View
2  package.json
@@ -58,7 +58,7 @@
"npmlog": "0.0.6",
"ansi": "~0.2.1",
"npm-registry-client": "~0.3.3",
- "read-package-json": "~1.1.5",
+ "read-package-json": "~1.1.6",
"read-installed": "~0.2.2",
"glob": "~3.2.6",
"init-package-json": "0.0.14",
Please sign in to comment.
Something went wrong with that request. Please try again.