summaryrefslogtreecommitdiff
path: root/deps/npm/lib/outdated.js
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2012-06-15 10:00:30 -0700
committerisaacs <i@izs.me>2012-06-15 10:00:30 -0700
commit911b0fddd3483ac58c3a5cec17f4f1b0e533521a (patch)
tree23fdfe46b166bdcb6ebc3e040a14f9c3faf9c441 /deps/npm/lib/outdated.js
parent1e0ce5d1bdf364bf6eca821635e3ae8e65807667 (diff)
downloadnode-new-911b0fddd3483ac58c3a5cec17f4f1b0e533521a.tar.gz
Upgrade npm to 1.1.26
Diffstat (limited to 'deps/npm/lib/outdated.js')
-rw-r--r--deps/npm/lib/outdated.js9
1 files changed, 4 insertions, 5 deletions
diff --git a/deps/npm/lib/outdated.js b/deps/npm/lib/outdated.js
index d87dc9ab6d..787f3c7d65 100644
--- a/deps/npm/lib/outdated.js
+++ b/deps/npm/lib/outdated.js
@@ -20,12 +20,11 @@ outdated.completion = require("./utils/completion/installed-deep.js")
var path = require("path")
, fs = require("graceful-fs")
- , readJson = require("./utils/read-json.js")
+ , readJson = require("read-package-json")
, cache = require("./cache.js")
, asyncMap = require("slide").asyncMap
, npm = require("./npm.js")
, semver = require("semver")
- , relativize = require("./utils/relativize.js")
function outdated (args, silent, cb) {
if (typeof cb !== "function") cb = silent, silent = false
@@ -61,7 +60,7 @@ function makePretty (p) {
}
if (!npm.config.get("global")) {
- dir = relativize(dir, process.cwd()+"/x")
+ dir = path.relative(process.cwd(), dir)
}
return dep + "@" + want + " " + dir
+ " current=" + (has || "MISSING")
@@ -89,8 +88,8 @@ function outdated_ (args, dir, parentHas, cb) {
return next()
}
asyncMap(pkgs, function (pkg, cb) {
- readJson( path.resolve(dir, "node_modules", pkg, "package.json")
- , function (er, d) {
+ var jsonFile = path.resolve(dir, "node_modules", pkg, "package.json")
+ readJson(jsonFile, function (er, d) {
cb(null, er ? [] : [[d.name, d.version]])
})
}, function (er, pvs) {