Skip to content

Commit

Permalink
chore: refactor npm outdated export
Browse files Browse the repository at this point in the history
  • Loading branch information
claudiahdz committed Jun 5, 2020
1 parent 9a2e938 commit 332830b
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions lib/outdated.js
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down Expand Up @@ -267,3 +269,5 @@ function makeJSON (list, opts) {
})
return JSON.stringify(out, null, 2)
}

module.exports = Object.assign(cmd, { completion, usage })

0 comments on commit 332830b

Please sign in to comment.