diff options
author | isaacs <i@izs.me> | 2014-01-08 23:06:30 +0400 |
---|---|---|
committer | isaacs <i@izs.me> | 2014-01-08 23:06:30 +0400 |
commit | fc45f8e800cede708aeb8e23f414e7983d48dfea (patch) | |
tree | 5f00776b29e95b1abbc906a09ed9ce32ddaa5353 /node_modules/read-package-json | |
parent | 823010b86e16ea3795e41bcbc4d065b7da01478d (diff) |
read-package-json@1.1.5
Diffstat (limited to 'node_modules/read-package-json')
7 files changed, 24 insertions, 6 deletions
diff --git a/node_modules/read-package-json/node_modules/normalize-package-data/lib/typos.json b/node_modules/read-package-json/node_modules/normalize-package-data/lib/typos.json index 6dc59e6a9..73590c0a2 100644 --- a/node_modules/read-package-json/node_modules/normalize-package-data/lib/typos.json +++ b/node_modules/read-package-json/node_modules/normalize-package-data/lib/typos.json @@ -10,6 +10,7 @@ ,"devDepenencies": "devDependencies" ,"devdependencies": "devDependencies" ,"repostitory": "repository" + ,"repo": "repository" ,"prefereGlobal": "preferGlobal" ,"hompage": "homepage" ,"hampage": "homepage" diff --git a/node_modules/read-package-json/node_modules/normalize-package-data/package.json b/node_modules/read-package-json/node_modules/normalize-package-data/package.json index 8c05298c5..1ea36836a 100644 --- a/node_modules/read-package-json/node_modules/normalize-package-data/package.json +++ b/node_modules/read-package-json/node_modules/normalize-package-data/package.json @@ -1,6 +1,6 @@ { "name": "normalize-package-data", - "version": "0.2.7", + "version": "0.2.8", "author": { "name": "Meryn Stol", "email": "merynstol@gmail.com" @@ -44,6 +44,6 @@ "url": "https://github.com/meryn/normalize-package-data/issues" }, "homepage": "https://github.com/meryn/normalize-package-data", - "_id": "normalize-package-data@0.2.7", + "_id": "normalize-package-data@0.2.8", "_from": "normalize-package-data@~0.2.7" } diff --git a/node_modules/read-package-json/node_modules/normalize-package-data/test/typo.js b/node_modules/read-package-json/node_modules/normalize-package-data/test/typo.js index 941d68bfe..3eef829fd 100644 --- a/node_modules/read-package-json/node_modules/normalize-package-data/test/typo.js +++ b/node_modules/read-package-json/node_modules/normalize-package-data/test/typo.js @@ -20,6 +20,7 @@ test('typos', function(t) { 'devDepenencies should probably be devDependencies.', 'devdependencies should probably be devDependencies.', 'repostitory should probably be repository.', + 'repo should probably be repository.', 'prefereGlobal should probably be preferGlobal.', 'hompage should probably be homepage.', 'hampage should probably be homepage.', @@ -38,6 +39,7 @@ test('typos', function(t) { ,"devDepenencies": "devDependencies" ,"devdependencies": "devDependencies" ,"repostitory": "repository" + ,"repo": "repository" ,"prefereGlobal": "preferGlobal" ,"hompage": "homepage" ,"hampage": "homepage" diff --git a/node_modules/read-package-json/package.json b/node_modules/read-package-json/package.json index f2379b671..d1fa33cae 100644 --- a/node_modules/read-package-json/package.json +++ b/node_modules/read-package-json/package.json @@ -1,6 +1,6 @@ { "name": "read-package-json", - "version": "1.1.4", + "version": "1.1.5", "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me", @@ -34,6 +34,6 @@ "url": "https://github.com/isaacs/read-package-json/issues" }, "homepage": "https://github.com/isaacs/read-package-json", - "_id": "read-package-json@1.1.4", + "_id": "read-package-json@1.1.5", "_from": "read-package-json@latest" } diff --git a/node_modules/read-package-json/read-json.js b/node_modules/read-package-json/read-json.js index d9a4610d9..db4072303 100644 --- a/node_modules/read-package-json/read-json.js +++ b/node_modules/read-package-json/read-json.js @@ -19,6 +19,7 @@ var normalizeData = require("normalize-package-data") readJson.extraSet = [ gypfile, serverjs, + scriptpath, authors, readme, mans, @@ -125,6 +126,19 @@ function extras (file, data, log_, strict_, cb_) { } } +function scriptpath (file, data, cb) { + if (!data.scripts) return cb(null, data); + var k = Object.keys(data.scripts) + k.forEach(scriptpath_, data.scripts) + cb(null, data); +} +function scriptpath_(key) { + s = this[key] + var spre = /^(\.[\/\\])?node_modules[\/\\].bin[\\\/]/ + if (s.match(spre)) + this[key] = this[key].replace(spre, '') +} + function gypfile (file, data, cb) { var dir = path.dirname(file) var s = data.scripts || {} diff --git a/node_modules/read-package-json/test/fixtures/not-json.css b/node_modules/read-package-json/test/fixtures/not-json.css index 37163912d..41c91e96a 100644 --- a/node_modules/read-package-json/test/fixtures/not-json.css +++ b/node_modules/read-package-json/test/fixtures/not-json.css @@ -14,7 +14,7 @@ body { }, "main": "read-json.js", "scripts": { - "test": "tap test/*.js" + "test": "./node_modules/.bin/tap test/*.js" }, "dependencies": { "glob": "~3.1.9", diff --git a/node_modules/read-package-json/test/non-json.js b/node_modules/read-package-json/test/non-json.js index 09ee687d5..e8d989b6f 100644 --- a/node_modules/read-package-json/test/non-json.js +++ b/node_modules/read-package-json/test/non-json.js @@ -25,7 +25,8 @@ var expect = npmlog: '0', 'graceful-fs': '~1.1.8' }, devDependencies: { tap: '~0.2.5' }, - optionalDependencies: { npmlog: '0', 'graceful-fs': '~1.1.8' }, + homepage: "https://github.com/isaacs/read-package-json", + optionalDependencies: { npmlog: '0', 'graceful-fs': '~1.1.8' }, _id: 'read-package-json@0.1.1', readme: 'ERROR: No README data found!' } |