diff options
author | Gareth Jones <Jones258@Gmail.com> | 2019-08-25 10:37:13 +0300 |
---|---|---|
committer | claudiahdz <cghr1990@gmail.com> | 2019-08-31 01:06:54 +0300 |
commit | 235ed1d2838ef302bb995e183980209d16c51b9b (patch) | |
tree | 1aef48a02a1b6eee0527481383ca310225caeb09 /lib/outdated.js | |
parent | bd6e5d24b77f664cd4a7736fca7c031d9ad133a9 (diff) |
Don't override user specified depth in outdated
Restores ability to update packages using `--depth` as suggested by `npm audit`.
i.e `npm update eslint-utils --depth 2`.
PR-URL: https://github.com/npm/cli/pull/239
Credit: @G-Rath
Close: #239
Reviewed-by: @claudiahdz
Diffstat (limited to 'lib/outdated.js')
-rw-r--r-- | lib/outdated.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/outdated.js b/lib/outdated.js index 794197cfc..5b84ae355 100644 --- a/lib/outdated.js +++ b/lib/outdated.js @@ -91,7 +91,7 @@ function outdated (args, silent, cb) { var dir = path.resolve(npm.dir, '..') // default depth for `outdated` is 0 (cf. `ls`) - if (opts.depth) opts = opts.concat({depth: 0}) + if (opts.depth === Infinity) opts = opts.concat({depth: 0}) readPackageTree(dir, andComputeMetadata(function (er, tree) { if (!tree) return cb(er) |