@npmcli/config 6.1.7 → 6.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/index.js +7 -0
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -575,6 +575,13 @@ class Config {
575
575
  const v = this.parseField(value, k)
576
576
  if (where !== 'default') {
577
577
  this.#checkDeprecated(k, where, obj, [key, value])
578
+ if (this.definitions[key]?.exclusive) {
579
+ for (const exclusive of this.definitions[key].exclusive) {
580
+ if (!this.isDefault(exclusive)) {
581
+ throw new TypeError(`--${key} can not be provided when using --${exclusive}`)
582
+ }
583
+ }
584
+ }
578
585
  }
579
586
  conf.data[k] = v
580
587
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@npmcli/config",
3
- "version": "6.1.7",
3
+ "version": "6.2.0",
4
4
  "files": [
5
5
  "bin/",
6
6
  "lib/"