Skip to content

Commit

Permalink
wip: make coverage mapping a bit better
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacs committed Jun 24, 2021
1 parent 12c5507 commit f42508a
Show file tree
Hide file tree
Showing 66 changed files with 10 additions and 214 deletions.
1 change: 0 additions & 1 deletion lib/access.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ class Access extends BaseCommand {
return 'access'
}

/* istanbul ignore next - see test/lib/load-all-commands.js */
static get params () {
return [
'registry',
Expand Down
4 changes: 0 additions & 4 deletions lib/audit.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,14 @@ const auditError = require('./utils/audit-error.js')
const ArboristWorkspaceCmd = require('./workspaces/arborist-cmd.js')

class Audit extends ArboristWorkspaceCmd {
/* istanbul ignore next - see test/lib/load-all-commands.js */
static get description () {
return 'Run a security audit'
}

/* istanbul ignore next - see test/lib/load-all-commands.js */
static get name () {
return 'audit'
}

/* istanbul ignore next - see test/lib/load-all-commands.js */
static get params () {
return [
'audit-level',
Expand All @@ -28,7 +25,6 @@ class Audit extends ArboristWorkspaceCmd {
]
}

/* istanbul ignore next - see test/lib/load-all-commands.js */
static get usage () {
return ['[fix]']
}
Expand Down
1 change: 0 additions & 1 deletion lib/bugs.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ class Bugs extends BaseCommand {
return ['[<pkgname>]']
}

/* istanbul ignore next - see test/lib/load-all-commands.js */
static get params () {
return ['browser', 'registry']
}
Expand Down
3 changes: 0 additions & 3 deletions lib/cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,14 @@ class Cache extends BaseCommand {
return 'Manipulates packages cache'
}

/* istanbul ignore next - see test/lib/load-all-commands.js */
static get name () {
return 'cache'
}

/* istanbul ignore next - see test/lib/load-all-commands.js */
static get params () {
return ['cache']
}

/* istanbul ignore next - see test/lib/load-all-commands.js */
static get usage () {
return [
'add <tarball file>',
Expand Down
3 changes: 0 additions & 3 deletions lib/ci.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,14 @@ const removeNodeModules = async where => {
const ArboristWorkspaceCmd = require('./workspaces/arborist-cmd.js')

class CI extends ArboristWorkspaceCmd {
/* istanbul ignore next - see test/lib/load-all-commands.js */
static get description () {
return 'Install a project with a clean slate'
}

/* istanbul ignore next - see test/lib/load-all-commands.js */
static get name () {
return 'ci'
}

/* istanbul ignore next - see test/lib/load-all-commands.js */
static get params () {
return [
'ignore-scripts',
Expand Down
2 changes: 0 additions & 2 deletions lib/completion.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,10 @@ const { promisify } = require('util')
const BaseCommand = require('./base-command.js')

class Completion extends BaseCommand {
/* istanbul ignore next - see test/lib/load-all-commands.js */
static get description () {
return 'Tab Completion for npm'
}

/* istanbul ignore next - see test/lib/load-all-commands.js */
static get name () {
return 'completion'
}
Expand Down
3 changes: 0 additions & 3 deletions lib/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,10 @@ class Config extends BaseCommand {
return 'Manage the npm configuration files'
}

/* istanbul ignore next - see test/lib/load-all-commands.js */
static get name () {
return 'config'
}

/* istanbul ignore next - see test/lib/load-all-commands.js */
static get usage () {
return [
'set <key>=<value> [<key>=<value> ...]',
Expand All @@ -50,7 +48,6 @@ class Config extends BaseCommand {
]
}

/* istanbul ignore next - see test/lib/load-all-commands.js */
static get params () {
return [
'json',
Expand Down
3 changes: 0 additions & 3 deletions lib/dedupe.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,14 @@ const reifyFinish = require('./utils/reify-finish.js')
const ArboristWorkspaceCmd = require('./workspaces/arborist-cmd.js')

class Dedupe extends ArboristWorkspaceCmd {
/* istanbul ignore next - see test/lib/load-all-commands.js */
static get description () {
return 'Reduce duplication in the package tree'
}

/* istanbul ignore next - see test/lib/load-all-commands.js */
static get name () {
return 'dedupe'
}

/* istanbul ignore next - see test/lib/load-all-commands.js */
static get params () {
return [
'global-style',
Expand Down
3 changes: 0 additions & 3 deletions lib/deprecate.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,14 @@ class Deprecate extends BaseCommand {
return 'Deprecate a version of a package'
}

/* istanbul ignore next - see test/lib/load-all-commands.js */
static get name () {
return 'deprecate'
}

/* istanbul ignore next - see test/lib/load-all-commands.js */
static get usage () {
return ['<pkg>[@<version>] <message>']
}

/* istanbul ignore next - see test/lib/load-all-commands.js */
static get params () {
return [
'registry',
Expand Down
3 changes: 0 additions & 3 deletions lib/diff.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,16 @@ class Diff extends BaseCommand {
return 'The registry diff command'
}

/* istanbul ignore next - see test/lib/load-all-commands.js */
static get name () {
return 'diff'
}

/* istanbul ignore next - see test/lib/load-all-commands.js */
static get usage () {
return [
'[...<paths>]',
]
}

/* istanbul ignore next - see test/lib/load-all-commands.js */
static get params () {
return [
'diff',
Expand Down
3 changes: 0 additions & 3 deletions lib/dist-tag.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,14 @@ class DistTag extends BaseCommand {
return 'Modify package distribution tags'
}

/* istanbul ignore next - see test/lib/load-all-commands.js */
static get params () {
return ['workspace', 'workspaces']
}

/* istanbul ignore next - see test/lib/load-all-commands.js */
static get name () {
return 'dist-tag'
}

/* istanbul ignore next - see test/lib/load-all-commands.js */
static get usage () {
return [
'add <pkg>@<version> [<tag>]',
Expand Down
4 changes: 0 additions & 4 deletions lib/docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,18 @@ const hostedFromMani = require('./utils/hosted-git-info-from-manifest.js')

const BaseCommand = require('./base-command.js')
class Docs extends BaseCommand {
/* istanbul ignore next - see test/lib/load-all-commands.js */
static get description () {
return 'Open documentation for a package in a web browser'
}

/* istanbul ignore next - see test/lib/load-all-commands.js */
static get name () {
return 'docs'
}

/* istanbul ignore next - see test/lib/load-all-commands.js */
static get params () {
return ['browser', 'registry', 'workspace', 'workspaces']
}

/* istanbul ignore next - see test/lib/load-all-commands.js */
static get usage () {
return ['[<pkgname> [<pkgname> ...]]']
}
Expand Down
3 changes: 0 additions & 3 deletions lib/doctor.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,14 @@ const maskLabel = mask => {

const BaseCommand = require('./base-command.js')
class Doctor extends BaseCommand {
/* istanbul ignore next - see test/lib/load-all-commands.js */
static get description () {
return 'Check your npm environment'
}

/* istanbul ignore next - see test/lib/load-all-commands.js */
static get name () {
return 'doctor'
}

/* istanbul ignore next - see test/lib/load-all-commands.js */
static get params () {
return ['registry']
}
Expand Down
4 changes: 0 additions & 4 deletions lib/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,18 @@ class Edit extends BaseCommand {
return 'Edit an installed package'
}

/* istanbul ignore next - see test/lib/load-all-commands.js */
static get name () {
return 'edit'
}

/* istanbul ignore next - see test/lib/load-all-commands.js */
static get usage () {
return ['<pkg>[/<subpkg>...]']
}

/* istanbul ignore next - see test/lib/load-all-commands.js */
static get params () {
return ['editor']
}

/* istanbul ignore next - see test/lib/load-all-commands.js */
async completion (opts) {
return completion(this.npm, opts)
}
Expand Down
4 changes: 0 additions & 4 deletions lib/exec.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,22 +28,18 @@ const getLocationMsg = require('./exec/get-workspace-location-msg.js')
// process.env.npm_lifecycle_event = 'npx'

class Exec extends BaseCommand {
/* istanbul ignore next - see test/lib/load-all-commands.js */
static get description () {
return 'Run a command from a local or remote npm package'
}

/* istanbul ignore next - see test/lib/load-all-commands.js */
static get params () {
return ['package', 'call', 'workspace', 'workspaces']
}

/* istanbul ignore next - see test/lib/load-all-commands.js */
static get name () {
return 'exec'
}

/* istanbul ignore next - see test/lib/load-all-commands.js */
static get usage () {
return [
'-- <pkg>[@<version>] [args...]',
Expand Down
4 changes: 0 additions & 4 deletions lib/explain.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,21 @@ class Explain extends ArboristWorkspaceCmd {
return 'Explain installed packages'
}

/* istanbul ignore next - see test/lib/load-all-commands.js */
static get name () {
return 'explain'
}

/* istanbul ignore next - see test/lib/load-all-commands.js */
static get usage () {
return ['<folder | specifier>']
}

/* istanbul ignore next - see test/lib/load-all-commands.js */
static get params () {
return [
'json',
'workspace',
]
}

/* istanbul ignore next - see test/lib/load-all-commands.js */
async completion (opts) {
return completion(this.npm, opts)
}
Expand Down
4 changes: 0 additions & 4 deletions lib/explore.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,18 @@ class Explore extends BaseCommand {
return 'Browse an installed package'
}

/* istanbul ignore next - see test/lib/load-all-commands.js */
static get name () {
return 'explore'
}

/* istanbul ignore next - see test/lib/load-all-commands.js */
static get usage () {
return ['<pkg> [ -- <command>]']
}

/* istanbul ignore next - see test/lib/load-all-commands.js */
static get params () {
return ['shell']
}

/* istanbul ignore next - see test/lib/load-all-commands.js */
async completion (opts) {
return completion(this.npm, opts)
}
Expand Down
3 changes: 0 additions & 3 deletions lib/find-dupes.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,14 @@
const ArboristWorkspaceCmd = require('./workspaces/arborist-cmd.js')

class FindDupes extends ArboristWorkspaceCmd {
/* istanbul ignore next - see test/lib/load-all-commands.js */
static get description () {
return 'Find duplication in the package tree'
}

/* istanbul ignore next - see test/lib/load-all-commands.js */
static get name () {
return 'find-dupes'
}

/* istanbul ignore next - see test/lib/load-all-commands.js */
static get params () {
return [
'global-style',
Expand Down
5 changes: 0 additions & 5 deletions lib/fund.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,14 @@ const getPrintableName = ({ name, version }) => {
}

class Fund extends ArboristWorkspaceCmd {
/* istanbul ignore next - see test/lib/load-all-commands.js */
static get description () {
return 'Retrieve funding information'
}

/* istanbul ignore next - see test/lib/load-all-commands.js */
static get name () {
return 'fund'
}

/* istanbul ignore next - see test/lib/load-all-commands.js */
static get params () {
return [
'json',
Expand All @@ -42,12 +39,10 @@ class Fund extends ArboristWorkspaceCmd {
]
}

/* istanbul ignore next - see test/lib/load-all-commands.js */
static get usage () {
return ['[[<@scope>/]<pkg>]']
}

/* istanbul ignore next - see test/lib/load-all-commands.js */
async completion (opts) {
return completion(this.npm, opts)
}
Expand Down
4 changes: 0 additions & 4 deletions lib/get.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,18 @@
const BaseCommand = require('./base-command.js')

class Get extends BaseCommand {
/* istanbul ignore next - see test/lib/load-all-commands.js */
static get description () {
return 'Get a value from the npm configuration'
}

/* istanbul ignore next - see test/lib/load-all-commands.js */
static get name () {
return 'get'
}

/* istanbul ignore next - see test/lib/load-all-commands.js */
static get usage () {
return ['[<key> ...] (See `npm config`)']
}

/* istanbul ignore next - see test/lib/load-all-commands.js */
async completion (opts) {
return this.npm.commands.config.completion(opts)
}
Expand Down
Loading

0 comments on commit f42508a

Please sign in to comment.