diff options
author | claudiahdz <cghr1990@gmail.com> | 2020-06-04 22:36:47 +0300 |
---|---|---|
committer | Claudia Hernández <claudiahdz@github.com> | 2020-06-06 00:42:18 +0300 |
commit | 05e76efe4d4ce6f3ee218a3f501c356036aae57a (patch) | |
tree | 2da6d61ff08a6ce97d50e63e8ed556fd18022ecb | |
parent | ca283136a85a6af742d82d0e1fdedfca72706539 (diff) |
chore: refactor npm outdated export
-rw-r--r-- | lib/outdated.js | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/outdated.js b/lib/outdated.js index dfb3b0cc3..59be36728 100644 --- a/lib/outdated.js +++ b/lib/outdated.js @@ -13,12 +13,14 @@ const Arborist = require('@npmcli/arborist') const npm = require('./npm.js') const output = require('./utils/output.js') +const usageUtil = require('./utils/usage.js') const ansiTrim = require('./utils/ansi-trim.js') -cmd.usage = 'npm outdated [[<@scope>/]<pkg> ...]' -cmd.completion = require('./utils/completion/installed-deep.js') +const usage = usageUtil('outdated', + 'npm outdated [[<@scope>/]<pkg> ...]' +) +const completion = (cb) => cb(null, []) -module.exports = cmd function cmd (args, cb) { outdated(args, cb) .then(() => cb()) @@ -267,3 +269,5 @@ function makeJSON (list, opts) { }) return JSON.stringify(out, null, 2) } + +module.exports = Object.assign(cmd, { completion, usage })
\ No newline at end of file |