@npmcli/config 10.7.1 → 10.8.1

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.
@@ -946,6 +946,17 @@ const definitions = {
946
946
  `,
947
947
  flatten,
948
948
  }),
949
+ 'include-attestations': new Definition('include-attestations', {
950
+ default: false,
951
+ type: Boolean,
952
+ description: `
953
+ When used with \`npm audit signatures --json\`, includes the full
954
+ sigstore attestation bundles in the JSON output for each verified
955
+ package. The bundles contain DSSE envelopes, verification material,
956
+ and transparency log entries.
957
+ `,
958
+ flatten,
959
+ }),
949
960
  'init-author-email': new Definition('init-author-email', {
950
961
  default: '',
951
962
  hint: '<email>',
@@ -1353,6 +1364,7 @@ const definitions = {
1353
1364
  hint: '<days>',
1354
1365
  type: [null, Number],
1355
1366
  exclusive: ['before'],
1367
+ envExport: false,
1356
1368
  description: `
1357
1369
  If set, npm will build the npm tree such that only versions that were
1358
1370
  available more than the given number of days ago will be installed. If
package/lib/index.js CHANGED
@@ -582,7 +582,7 @@ class Config {
582
582
  }
583
583
  } else {
584
584
  conf.raw = obj
585
- for (const [key, value] of Object.entries(obj)) {
585
+ outer: for (const [key, value] of Object.entries(obj)) {
586
586
  const k = envReplace(key, this.env)
587
587
  const v = this.parseField(value, k)
588
588
  if (where !== 'default') {
@@ -590,6 +590,13 @@ class Config {
590
590
  if (this.definitions[key]?.exclusive) {
591
591
  for (const exclusive of this.definitions[key].exclusive) {
592
592
  if (!this.isDefault(exclusive)) {
593
+ // when loading from env, skip only if sibling was explicitly set via CLI
594
+ if (where === 'env') {
595
+ const cliData = this.data.get('cli').data
596
+ if (Object.hasOwn(cliData, exclusive)) {
597
+ continue outer
598
+ }
599
+ }
593
600
  throw new TypeError(`--${key} cannot be provided when using --${exclusive}`)
594
601
  }
595
602
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@npmcli/config",
3
- "version": "10.7.1",
3
+ "version": "10.8.1",
4
4
  "files": [
5
5
  "bin/",
6
6
  "lib/"