Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorEvan You <yyou@google.com>2014-05-14 21:05:14 +0400
committerisaacs <i@izs.me>2014-05-23 05:02:44 +0400
commit05bf3a765b471c9ad3898a51498b10d6c10b250e (patch)
tree26f4b8c910f5936e3337b8ebd162791e86829a0a /lib
parent0c123255398d6e2c9a072e5dba429b826c65ebf9 (diff)
fix `npm ls` labeling issue
Diffstat (limited to 'lib')
-rw-r--r--lib/ls.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/ls.js b/lib/ls.js
index efe503b62..12e4d2edc 100644
--- a/lib/ls.js
+++ b/lib/ls.js
@@ -128,8 +128,7 @@ function getLite (data, noname) {
var dep = data.dependencies[d]
if (typeof dep === "string") {
lite.problems = lite.problems || []
- var p
- if (data.depth >= maxDepth) {
+ if (data.depth > maxDepth) {
p = "max depth reached: "
} else {
p = "missing: "
@@ -223,14 +222,14 @@ function makeArchy (data, long, dir) {
function makeArchy_ (data, long, dir, depth, parent, d) {
var color = npm.color
if (typeof data === "string") {
- if (depth < npm.config.get("depth")) {
+ if (depth -1 <= npm.config.get("depth")) {
// just missing
var p = parent.link || parent.path
var unmet = "UNMET DEPENDENCY"
if (color) {
unmet = "\033[31;40m" + unmet + "\033[0m"
}
- data = unmet + " " + d + " " + data
+ data = unmet + " " + d + "@" + data
} else {
data = d+"@"+ data
}