diff options
author | isaacs <i@izs.me> | 2021-05-11 01:10:25 +0300 |
---|---|---|
committer | isaacs <i@izs.me> | 2021-05-20 19:35:28 +0300 |
commit | 0d1a9d78779dc015242fc03d2dad2039004fa2df (patch) | |
tree | 73258681bc9df2a7ef16819c8590c32c1dd12603 /lib/ci.js | |
parent | 41099d3958d08f166313b7eb69b76458f8f9224c (diff) |
Add workspaces support to reify/rebuild commands
This adds `--workspace` support to:
- audit (including audit fix)
- ci
- dedupe
- find-dupes
- install
- install-ci-test
- install-test
- prune
- rebuild
- uninstall
- update
Also addresses missing error handling case, identified by @timoxley.
https://github.com/npm/cli/pull/3227#discussion_r631024491
PR-URL: https://github.com/npm/cli/pull/3227
Credit: @isaacs
Close: #3227
Reviewed-by: @ruyadorno
Diffstat (limited to 'lib/ci.js')
-rw-r--r-- | lib/ci.js | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -17,9 +17,9 @@ const removeNodeModules = async where => { await Promise.all(entries.map(f => rimraf(`${path}/${f}`, rimrafOpts))) process.emit('timeEnd', 'npm-ci:rm') } -const BaseCommand = require('./base-command.js') +const ArboristWorkspaceCmd = require('./workspaces/arborist-cmd.js') -class CI extends BaseCommand { +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' @@ -55,6 +55,7 @@ class CI extends BaseCommand { path: where, log: this.npm.log, save: false, // npm ci should never modify the lockfile or package.json + workspaces: this.workspaces, } const arb = new Arborist(opts) |