diff options
Diffstat (limited to 'lib/ls.js')
-rw-r--r-- | lib/ls.js | 16 |
1 files changed, 7 insertions, 9 deletions
@@ -7,7 +7,6 @@ const Arborist = require('@npmcli/arborist') const { breadth } = require('treeverse') const npa = require('npm-package-arg') -const usageUtil = require('./utils/usage.js') const completion = require('./utils/completion/installed-deep.js') const _depth = Symbol('depth') @@ -21,18 +20,17 @@ const _parent = Symbol('parent') const _problems = Symbol('problems') const _required = Symbol('required') const _type = Symbol('type') +const BaseCommand = require('./base-command.js') -class LS { - constructor (npm) { - this.npm = npm +class LS extends BaseCommand { + /* istanbul ignore next - see test/lib/load-all-commands.js */ + static get name () { + return 'ls' } /* istanbul ignore next - see test/lib/load-all-commands.js */ - get usage () { - return usageUtil( - 'ls', - 'npm ls [[<@scope>/]<pkg> ...]' - ) + static get usage () { + return ['npm ls [[<@scope>/]<pkg> ...]'] } /* istanbul ignore next - see test/lib/load-all-commands.js */ |