diff options
author | isaacs <i@izs.me> | 2010-10-05 05:37:53 +0400 |
---|---|---|
committer | isaacs <i@izs.me> | 2010-10-05 05:37:53 +0400 |
commit | 380e0ea17fe4a5d313ea6681dc7ec714dce80005 (patch) | |
tree | 0d1b3be494b39547c4bebe4351924459f4058de1 | |
parent | 275acc6ad57c1c68e13d1f4169054f77b612be5c (diff) |
Make it easy to see what version of npm/node was used to publish somethingv0.2.3-4
-rw-r--r-- | lib/utils/read-json.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/utils/read-json.js b/lib/utils/read-json.js index 5c304d8fd..019f3fc65 100644 --- a/lib/utils/read-json.js +++ b/lib/utils/read-json.js @@ -6,6 +6,7 @@ var fs = require("./graceful-fs") , semver = require("./semver") , path = require("path") , log = require("./log") + , npm = require("../../npm") , cache = {} , timers = {} function readJson (jsonFile, opts, cb) { @@ -136,6 +137,8 @@ function processObject (opts, cb) { return function (er, json) { json._id = json.name+"@"+json.version json = testEngine(json) json = parsePeople(json) + json._npmVersion = npm.version + json._nodeVersion = process.version if (opts.file) { log.verbose(opts.file, "caching") cache[opts.file] = json |