From 380e0ea17fe4a5d313ea6681dc7ec714dce80005 Mon Sep 17 00:00:00 2001 From: isaacs Date: Mon, 4 Oct 2010 18:37:53 -0700 Subject: Make it easy to see what version of npm/node was used to publish something --- lib/utils/read-json.js | 3 +++ 1 file changed, 3 insertions(+) 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 -- cgit v1.2.3