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/utils
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2020-09-18 01:31:16 +0300
committerRuy Adorno <ruyadorno@hotmail.com>2020-09-22 19:34:18 +0300
commita1d375f6b0ee358be41110a49acc1c9fdb775fbe (patch)
treec388301509ac3d3d57f98c9ec85381cab813a7a6 /lib/utils
parentb3a50d27501e47c61b52c3cc4de99ff4e4641efe (diff)
Add `--strict-peer-deps` option
This is the CLI portion of https://github.com/npm/arborist/pull/136 PR-URL: https://github.com/npm/cli/pull/1819 Credit: @isaacs Close: #1819 Reviewed-by: @ruyadorno
Diffstat (limited to 'lib/utils')
-rw-r--r--lib/utils/config.js3
-rw-r--r--lib/utils/flat-options.js1
2 files changed, 3 insertions, 1 deletions
diff --git a/lib/utils/config.js b/lib/utils/config.js
index a7fd131d4..d273ae8a5 100644
--- a/lib/utils/config.js
+++ b/lib/utils/config.js
@@ -111,6 +111,7 @@ const defaults = {
key: null,
'legacy-bundling': false,
'legacy-peer-deps': false,
+ 'strict-peer-deps': false,
link: false,
'local-address': undefined,
loglevel: 'notice',
@@ -229,7 +230,6 @@ const types = {
group: [Number, String],
'https-proxy': [null, url],
'user-agent': String,
- 'ham-it-up': Boolean,
heading: String,
'if-present': Boolean,
include: [Array, 'prod', 'dev', 'optional', 'peer'],
@@ -246,6 +246,7 @@ const types = {
key: [null, String],
'legacy-bundling': Boolean,
'legacy-peer-deps': Boolean,
+ 'strict-peer-deps': Boolean,
link: Boolean,
'local-address': getLocalAddresses(),
loglevel: [
diff --git a/lib/utils/flat-options.js b/lib/utils/flat-options.js
index 2ace852d1..d6decdbf7 100644
--- a/lib/utils/flat-options.js
+++ b/lib/utils/flat-options.js
@@ -170,6 +170,7 @@ const flatOptions = npm => npm.flatOptions || Object.freeze({
shell: npm.config.get('shell'),
omit: buildOmitList(npm),
legacyPeerDeps: npm.config.get('legacy-peer-deps'),
+ strictPeerDeps: npm.config.get('strict-peer-deps'),
// npx stuff
call: npm.config.get('call'),