Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib/ci.js
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2021-05-11 01:10:25 +0300
committerisaacs <i@izs.me>2021-05-20 19:35:28 +0300
commit0d1a9d78779dc015242fc03d2dad2039004fa2df (patch)
tree73258681bc9df2a7ef16819c8590c32c1dd12603 /lib/ci.js
parent41099d3958d08f166313b7eb69b76458f8f9224c (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.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/ci.js b/lib/ci.js
index d2a27059c..3a2a2b316 100644
--- a/lib/ci.js
+++ b/lib/ci.js
@@ -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)