summaryrefslogtreecommitdiff
path: root/deps/npm/lib/outdated.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/lib/outdated.js')
-rw-r--r--deps/npm/lib/outdated.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/deps/npm/lib/outdated.js b/deps/npm/lib/outdated.js
index 9c0623ef12..4963b096ef 100644
--- a/deps/npm/lib/outdated.js
+++ b/deps/npm/lib/outdated.js
@@ -40,6 +40,10 @@ var path = require("path")
function outdated (args, silent, cb) {
if (typeof cb !== "function") cb = silent, silent = false
var dir = path.resolve(npm.dir, "..")
+
+ // default depth for `outdated` is 0 (cf. `ls`)
+ if (npm.config.get("depth") === Infinity) npm.config.set("depth", 0)
+
outdated_(args, dir, {}, 0, function (er, list) {
if (!list) list = []
if (er || silent || list.length === 0) return cb(er, list)