• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

npm / cli
98%
latest: 97%

Build:
Build:
LAST BUILD BRANCH: nlf/arborist-validation
DEFAULT BRANCH: latest
Repo Added 03 Dec 2019 05:22PM CUT
Files 127
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

LAST BUILD ON BRANCH gar/lifecycle-cmd-refactor
branch: gar/lifecycle-cmd-refactor
CHANGE BRANCH
x
Reset
  • gar/lifecycle-cmd-refactor
  • +nlf/arborist-update
  • 6.4
  • MylesBorins-patch-1
  • PR-3542
  • assapir/redact-password
  • baj-/update-unpublish-docs
  • chore/npm-log
  • chore/reverse-docs-links-fix
  • christoflemke/update-publish-docs
  • darcyclarke-patch-1
  • darcyclarke-patch-2
  • darcyclarke-patch-3
  • darcyclarke-patch-npm-docs
  • darcyclarke-update-readme-with-branding-ref
  • darcyclarke/fix-broken-help-docs-ref
  • darcyclarke/pass-flatoptions-in-ci
  • darcyclarke/remove-extraneous-tough-cookie
  • darcyclarke/update-contribution-guidelines
  • darcyclarke/update-docs
  • darcyclarke/update-reademe
  • debug-npm-registry-fetch-logout-test
  • deps/arborist-2-10-0
  • deps/ci-detect-1-4-0
  • deps/node-gyp-8-3-0
  • deps/pacote-12-0-1
  • docs-npm-team
  • ethomson/docs
  • feature/improve-workspaces-docs
  • feature/test-checkout-v2
  • fetch-patch
  • fix/logs-url
  • fritzy/include-workspace-root
  • fritzy/scriptdocs-uninstall
  • fritzy/workspace-root
  • gar/404-log-http
  • gar/_auth
  • gar/alt-registry-auth
  • gar/always-exit-check
  • gar/audit-level-info
  • gar/bin-install-docs
  • gar/case-sensitive-node-modules
  • gar/changelog-manual-hiccup
  • gar/ci-audit-param
  • gar/ci_ignore_scripts
  • gar/clean-argv
  • gar/completion-refactor
  • gar/config-link
  • gar/config-noproxy
  • gar/config-snapshot
  • gar/config-tests
  • gar/creds-in-error
  • gar/diff-tests
  • gar/diff-workspaces
  • gar/diff-workspaces-refactor
  • gar/docs-lifecycle
  • gar/docs-npm
  • gar/docs-package-config
  • gar/docs-workspaces
  • gar/docs_prefix
  • gar/docs_search
  • gar/docs_shrinkwrap
  • gar/docs_start
  • gar/docs_stop
  • gar/docs_test
  • gar/docs_token
  • gar/docs_uninstall
  • gar/docs_unpublish
  • gar/dym-no-pkg
  • gar/exec-cache
  • gar/exec-output
  • gar/exec-test-fix
  • gar/exit-handler
  • gar/exit-handler-mark-two
  • gar/explicit-production
  • gar/fastest-levenshtein
  • gar/fix-case-sensitive-snafu
  • gar/fix-preinstall
  • gar/flatoptions
  • gar/git-error-cleanup
  • gar/help-search
  • gar/hooks-docs
  • gar/index-js
  • gar/init-cache
  • gar/init-latest
  • gar/install-audit-level
  • gar/install-no-rm
  • gar/install-progress-bar
  • gar/install-save-exact
  • gar/latest-npm-issue-template
  • gar/linting
  • gar/login-scope
  • gar/loglevel-background
  • gar/mock-npm-config
  • gar/more-real-tests
  • gar/no-exit-handler
  • gar/node-12
  • gar/node-gyp-8
  • gar/npm-color
  • gar/npm-engines-check
  • gar/npm-load
  • gar/npm-output
  • gar/npm-pkg-typo
  • gar/npm-references
  • gar/npm-state
  • gar/npm-update-docs
  • gar/outdated-in-range
  • gar/pack-destination
  • gar/pack-name-version
  • gar/pack-workspaces
  • gar/parse-error-path
  • gar/preinstall
  • gar/pretty-bytes
  • gar/promisify
  • gar/publish-docs-fix
  • gar/publish-ignore-scripts
  • gar/publish-test-fix
  • gar/publish-tests
  • gar/publish-workspaces
  • gar/real-npm-mock
  • gar/rebuild-docs
  • gar/refactor-commands
  • gar/save-exact-prefix
  • gar/searchopts
  • gar/security-md
  • gar/silent-run-script
  • gar/stale-timings
  • gar/suggestions-cleanup
  • gar/tap15
  • gar/test-err-consistency
  • gar/test-help-coverage
  • gar/test-time-fix
  • gar/test-usage-snapshot
  • gar/undeprecate
  • gar/unknown-action-item
  • gar/unpublish-workspaces
  • gar/update-notifier-color
  • gar/usage
  • gar/usage-from-config
  • gar/user-agent-ci
  • gar/user-agent-config
  • gar/view-git-fix
  • gar/view-test-cleansnap
  • gar/view-workspaces
  • gar/view-ws-docs
  • gar/windows-open-url
  • gar/workspace-dot
  • gar/workspaces-consolidate-logic
  • gar/workspaces-docs
  • gar/workspaces-version
  • isaacs-gar/coverage-map-update
  • isaacs/2936
  • isaacs/add-env-export-false-flag-for-config-defs
  • isaacs/audit-handle-failed-endpoint
  • isaacs/audit-level-reify-exit-code
  • isaacs/auto-generate-cmd-config-docs-from-params
  • isaacs/auto-generated-docs-comment
  • isaacs/bash-to-sh
  • isaacs/better-script-escaping
  • isaacs/better-view-error-on-invalid-package-json
  • isaacs/broader-istanbul-ignore-in-help-search
  • isaacs/builtin-config-preservation
  • isaacs/ci-rm-timer
  • isaacs/ci-scripts
  • isaacs/cmd-env-fix
  • isaacs/config-refactor
  • isaacs/config-refactor-phase-2
  • isaacs/config-set-multi
  • isaacs/correct-usage-multiples
  • isaacs/default-command
  • isaacs/do-not-clobber-env-run-script
  • isaacs/doc-config-force-peer-deps-override
  • isaacs/docs-2020-12-10
  • isaacs/docs-lockfile
  • isaacs/eresolve-report-on-edge-if-node-missing
  • isaacs/explain-dep-name-missing-bugfix
  • isaacs/faster-make-publish-no-docs-clean
  • isaacs/fix-publish-tag
  • isaacs/fix-windows-shell-bins
  • isaacs/foreground-scripts
  • isaacs/hide-easter-egg-better
  • isaacs/ini-2
  • isaacs/json-errors-to-stderr
  • isaacs/less-noisy-links-in-ls
  • isaacs/link-workspace
  • isaacs/locale-compare-en
  • isaacs/lockfile-version-config
  • isaacs/ls-ignore-missing-optionals
  • isaacs/ls-invalid-helpful-info
  • isaacs/ls-test-update-hidden-lock-file-mtime
  • isaacs/more-docs-human-error-prevention
  • isaacs/no-notifier-for-installing-npm-at-latest
  • isaacs/node-12
  • isaacs/pack-do-not-show-bundled-files
  • isaacs/parallelize-update-notifier
  • isaacs/prefix-over-local-prefix
  • isaacs/process-title
  • isaacs/publish-fail-when-no-registry-no-login
  • isaacs/publish-non-directories
  • isaacs/publishConfig-support-all-keys
  • isaacs/quieter-exec
  • isaacs/reify-workspaces
  • isaacs/release-v7.5.5-arborist-update
  • isaacs/remove-always-auth-config-def
  • isaacs/remove-process-umask
  • isaacs/restore-npm-command-flat-option
  • isaacs/set-node-env-production
  • isaacs/set-npm-command-to-canonical-command
  • isaacs/string-locale-compare
  • isaacs/trim-node-modules
  • isaacs/update-arborist-2.8.0
  • isaacs/use-files-list-in-package.json
  • isaacs/workspace-dot
  • isaacs/workspace-root
  • latest
  • lk/3881
  • lk/3962-shrinkwrap
  • lk/arborist-4.0.3
  • lk/cli-columns
  • lk/config-lockfile-version
  • lk/lint-test-on-command-refactor
  • lk/npmlog
  • lk/revert-workspace-root
  • lk/shrinkwrap-on-command-refactor
  • lk/test-gpg
  • lk/update-arborist
  • nlf/add-token-tests
  • nlf/add-workspaces-to-user-agent
  • nlf/arborist-update
  • nlf/arborist-validation
  • nlf/cache-tests
  • nlf/completion-tests
  • nlf/config-location
  • nlf/config-workspaces
  • nlf/curl-fix
  • nlf/delete-contents-not-dir
  • nlf/deprecate-tests
  • nlf/doctor-tests
  • nlf/dont-publish-more-files
  • nlf/edit-tests
  • nlf/explain-socket-timeout
  • nlf/fix-doctor-tests
  • nlf/fix-empty-scripts
  • nlf/fix-make-release
  • nlf/fix-npx-for-non-interactive-use
  • nlf/fix-proxy-outdated
  • nlf/fix-rebuild
  • nlf/fix-script-args
  • nlf/fix-some-flat-options
  • nlf/help-search-tests
  • nlf/help-tests
  • nlf/hook-tests
  • nlf/more-random-tests
  • nlf/no-error-for-extraneous-deps
  • nlf/no-global-dedupe
  • nlf/no-writefile-in-pack-tests
  • nlf/npx-run-existing-bins
  • nlf/org-tests
  • nlf/pacote-update
  • nlf/pass-publishConfig
  • nlf/remove-metrics
  • nlf/remove-require-from-string
  • nlf/remove-spawn-util
  • nlf/remove-unused-modules
  • nlf/restore-tag-prefix-on-version
  • nlf/restore-user-agent-env
  • nlf/search-opts
  • nlf/set-tests
  • nlf/skip-prompt-in-ci
  • nlf/stop-breaking-linked-packages
  • nlf/update-ci-detect
  • nlf/update-ci-workflow
  • nlf/update-install-script
  • nlf/workspaces-dist-tag
  • nlf/workspaces-set-script
  • olefriis-mistake-6.4
  • release-6.14.9
  • release-next
  • release-v6.14.10
  • release-v6.14.11
  • release/7.0.0
  • release/7.2.1
  • release/7.5.1
  • release/7.5.6
  • release/v6.14.12
  • release/v6.14.13
  • release/v6.14.14
  • release/v6.14.15
  • release/v6.14.16
  • release/v7.0.0
  • release/v7.0.0-rc.3
  • release/v7.0.0-rc.4
  • release/v7.0.0-staging
  • release/v7.0.0-staging-isaacs
  • release/v7.0.1
  • release/v7.0.10
  • release/v7.0.11
  • release/v7.0.12
  • release/v7.0.13
  • release/v7.0.14
  • release/v7.0.15
  • release/v7.0.2
  • release/v7.0.3
  • release/v7.0.4
  • release/v7.0.5
  • release/v7.0.6
  • release/v7.0.7
  • release/v7.0.8
  • release/v7.0.9
  • release/v7.1.0
  • release/v7.1.1
  • release/v7.1.2
  • release/v7.10.0
  • release/v7.11.0
  • release/v7.11.2
  • release/v7.12.0
  • release/v7.12.1
  • release/v7.13.0
  • release/v7.14.0
  • release/v7.15.0
  • release/v7.15.1
  • release/v7.16.0
  • release/v7.17.0
  • release/v7.18.0
  • release/v7.18.1
  • release/v7.19.0
  • release/v7.19.1
  • release/v7.2.0
  • release/v7.20.0
  • release/v7.20.1
  • release/v7.20.2
  • release/v7.20.3
  • release/v7.20.4
  • release/v7.20.5
  • release/v7.20.6
  • release/v7.21.0
  • release/v7.21.1
  • release/v7.22.0
  • release/v7.23.0
  • release/v7.24.0
  • release/v7.24.1
  • release/v7.24.2
  • release/v7.25.0
  • release/v7.3.0
  • release/v7.4.0
  • release/v7.4.1
  • release/v7.4.2
  • release/v7.4.3
  • release/v7.5.0
  • release/v7.5.2
  • release/v7.5.3
  • release/v7.5.4
  • release/v7.5.5
  • release/v7.5.6
  • release/v7.6.0
  • release/v7.6.1
  • release/v7.6.2
  • release/v7.6.3
  • release/v7.7.0
  • release/v7.7.1
  • release/v7.7.2
  • release/v7.7.3
  • release/v7.7.4
  • release/v7.7.5
  • release/v7.7.6
  • release/v7.8.0
  • release/v7.9.0
  • release/v8.0.0
  • release/v8.1.0
  • release/v8.1.1
  • release/v8.1.2
  • ruyadorno/npm-diff
  • ruyadorno/npm-pkg
  • support-virtual-listing
  • unpublished-by-undefined
  • update-policy-urls-v7
  • v6
  • v7
  • voxpelli-patch-1

pending completion
#1319

push

isaacs
chore(refactor): clean up lifecycle-cmds

This is a small incremental step in removing some of the complexity
surrounding the `npm` object in our code.

It moves that object one level up the chain of code, with the end goal
being that we will only require it once in the codebase, ultimately allowing
us to improve our tests.

I also changed the command that it calls to `run-script` because that is the
base command. `run` was an alias, and that is one more layer of hoops a
developer would have to jump through to find what file in `./lib` is even
being referenced here.

PR-URL: https://github.com/npm/cli/pull/2753
Credit: @wraithgar
Close: #2753
Reviewed-by: @isaacs

2885 of 2962 branches covered (97.4%)

Branch coverage included in aggregate %.

11 of 11 new or added lines in 5 files covered. (100.0%)

5046 of 5151 relevant lines covered (97.96%)

20.3 hits per line

Relevant lines Covered
Build:
Build:
5151 RELEVANT LINES 5046 COVERED LINES
20.3 HITS PER LINE
Source Files on gar/lifecycle-cmd-refactor
  • Tree
  • List 118
  • Changed 12
  • Source Changed 10
  • Coverage Changed 10
Loading...
Coverage∆FileLinesRelevantCoveredMissedHits/LineBranch HitsBranch Misses
2.38
lib/search/package-filter.js42 19 1 18 1.0 0 23
4.85
lib/search/format-package-stream.js190 67 5 62 1.0 0 36
24.56
lib/utils/cache-file.js67 39 14 25 1.0 0 18
100.0
lib/access.js186 86 86 0 10.0 56 0
100.0
lib/auth/legacy.js99 45 45 0 4.0 23 0
100.0
lib/auth/oauth.js10 6 6 0 1.0 0 0
100.0
lib/audit.js56 28 28 0 4.0 10 0
100.0
lib/auth/sso.js84 36 36 0 3.0 10 0
100.0
lib/bin.js15 13 13 0 3.0 4 0
100.0
lib/auth/saml.js10 6 6 0 1.0 0 0
Showing 1 to 10 of 118 entries
  • Previous
  • 1
  • 2
  • 3
  • 4
  • 5
  • …
  • 12
  • Next
  • ►
    100.0
    bin/
  • ►
    97.94
    lib/

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
#1319 gar/lifecycle-cmd-refactor chore(refactor): clean up lifecycle-cmds This is a small incremental step in removing some of the complexity surrounding the `npm` object in our code. It moves that object one level up the chain of code, with the end goal being that we will only... push 22 Feb 2021 08:32PM CUT isaacs pending completion  
#1309 gar/lifecycle-cmd-refactor chore(refactor): clean up lifecycle-cmds This is a small incremental step in removing some of the complexity surrounding the `npm` object in our code. It moves that object one level up the chain of code, with the end goal being that we will only... push 22 Feb 2021 05:28PM CUT wraithgar pending completion  
See All Builds (3959)
  • Repo on GitHub
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc