diff --git a/docs/content/using-npm/config.md b/docs/content/using-npm/config.md index 83a385e08344f..0af538fed52bc 100644 --- a/docs/content/using-npm/config.md +++ b/docs/content/using-npm/config.md @@ -1190,6 +1190,8 @@ When package package-locks are disabled, automatic pruning of extraneous modules will also be disabled. To remove extraneous modules with package-locks disabled use `npm prune`. +This configuration does not affect `npm ci`. + diff --git a/lib/commands/ci.js b/lib/commands/ci.js index 2c2f8da866653..16c8bf22f9e85 100644 --- a/lib/commands/ci.js +++ b/lib/commands/ci.js @@ -37,6 +37,7 @@ class CI extends ArboristWorkspaceCmd { const where = this.npm.prefix const opts = { ...this.npm.flatOptions, + packageLock: true, // npm ci should never skip lock files path: where, log, save: false, // npm ci should never modify the lockfile or package.json diff --git a/lib/utils/config/definitions.js b/lib/utils/config/definitions.js index 95d79f0f05325..79222881c9734 100644 --- a/lib/utils/config/definitions.js +++ b/lib/utils/config/definitions.js @@ -1417,6 +1417,8 @@ define('package-lock', { When package package-locks are disabled, automatic pruning of extraneous modules will also be disabled. To remove extraneous modules with package-locks disabled use \`npm prune\`. + + This configuration does not affect \`npm ci\`. `, flatten: (key, obj, flatOptions) => { flatten(key, obj, flatOptions) diff --git a/tap-snapshots/test/lib/utils/config/definitions.js.test.cjs b/tap-snapshots/test/lib/utils/config/definitions.js.test.cjs index 459c5de8dc284..ab706be89b835 100644 --- a/tap-snapshots/test/lib/utils/config/definitions.js.test.cjs +++ b/tap-snapshots/test/lib/utils/config/definitions.js.test.cjs @@ -1271,6 +1271,8 @@ will also prevent _writing_ \`package-lock.json\` if \`save\` is true. When package package-locks are disabled, automatic pruning of extraneous modules will also be disabled. To remove extraneous modules with package-locks disabled use \`npm prune\`. + +This configuration does not affect \`npm ci\`. ` exports[`test/lib/utils/config/definitions.js TAP > config description for package-lock-only 1`] = ` diff --git a/tap-snapshots/test/lib/utils/config/describe-all.js.test.cjs b/tap-snapshots/test/lib/utils/config/describe-all.js.test.cjs index ffa6617328bc6..58958ebdab954 100644 --- a/tap-snapshots/test/lib/utils/config/describe-all.js.test.cjs +++ b/tap-snapshots/test/lib/utils/config/describe-all.js.test.cjs @@ -1064,6 +1064,8 @@ When package package-locks are disabled, automatic pruning of extraneous modules will also be disabled. To remove extraneous modules with package-locks disabled use \`npm prune\`. +This configuration does not affect \`npm ci\`. +