Permalink
Browse files

Make it easy to see what version of npm/node was used to publish some…

…thing
  • Loading branch information...
1 parent 275acc6 commit 380e0ea17fe4a5d313ea6681dc7ec714dce80005 @isaacs isaacs committed Oct 5, 2010
Showing with 3 additions and 0 deletions.
  1. +3 −0 lib/utils/read-json.js
View
3 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

0 comments on commit 380e0ea

Please sign in to comment.