@npmcli/config 10.2.0 → 10.3.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.
@@ -230,12 +230,13 @@ const definitions = {
230
230
  }),
231
231
  before: new Definition('before', {
232
232
  default: null,
233
+ hint: '<date>',
233
234
  type: [null, Date],
234
235
  description: `
235
236
  If passed to \`npm install\`, will rebuild the npm tree such that only
236
- versions that were available **on or before** the \`--before\` time get
237
- installed. If there's no versions available for the current set of
238
- direct dependencies, the command will error.
237
+ versions that were available **on or before** the given date are
238
+ installed. If there are no versions available for the current set of
239
+ dependencies, the command will error.
239
240
 
240
241
  If the requested version is a \`dist-tag\` and the given tag does not
241
242
  pass the \`--before\` filter, the most recent version less than or equal
@@ -260,7 +261,7 @@ const definitions = {
260
261
  browser: new Definition('browser', {
261
262
  default: null,
262
263
  defaultDescription: `
263
- OS X: \`"open"\`, Windows: \`"start"\`, Others: \`"xdg-open"\`
264
+ macOS: \`"open"\`, Windows: \`"start"\`, Others: \`"xdg-open"\`
264
265
  `,
265
266
  type: [null, Boolean, String],
266
267
  description: `
@@ -847,7 +848,7 @@ const definitions = {
847
848
  type: Boolean,
848
849
  envExport: false,
849
850
  description: `
850
- If true, npm will not exit with an error code when \`run-script\` is
851
+ If true, npm will not exit with an error code when \`run\` is
851
852
  invoked for a script that isn't defined in the \`scripts\` section of
852
853
  \`package.json\`. This option can be used when it's desirable to
853
854
  optionally run a script when it's present and fail if the script fails.
@@ -864,7 +865,7 @@ const definitions = {
864
865
 
865
866
  Note that commands explicitly intended to run a particular script, such
866
867
  as \`npm start\`, \`npm stop\`, \`npm restart\`, \`npm test\`, and \`npm
867
- run-script\` will still run their intended script if \`ignore-scripts\` is
868
+ run\` will still run their intended script if \`ignore-scripts\` is
868
869
  set, but they will *not* run any pre- or post-scripts.
869
870
  `,
870
871
  flatten,
@@ -971,6 +972,14 @@ const definitions = {
971
972
  version number, if not already set in package.json.
972
973
  `,
973
974
  }),
975
+ 'init-private': new Definition('init-private', {
976
+ default: false,
977
+ type: Boolean,
978
+ description: `
979
+ The value \`npm init\` should use by default for the package's private flag.
980
+ `,
981
+ flatten,
982
+ }),
974
983
  // these "aliases" are historically supported in .npmrc files, unfortunately
975
984
  // They should be removed in a future npm version.
976
985
  'init.author.email': new Definition('init.author.email', {
@@ -1563,9 +1572,9 @@ const definitions = {
1563
1572
  },
1564
1573
  }),
1565
1574
  progress: new Definition('progress', {
1566
- default: !ciInfo.isCI,
1575
+ default: !(ciInfo.isCI || !process.stderr.isTTY || !process.stdout.isTTY || process.env.TERM === 'dumb'),
1567
1576
  defaultDescription: `
1568
- \`true\` unless running in a known CI system
1577
+ \`true\` when not in CI and both stderr and stdout are TTYs and not in a dumb terminal
1569
1578
  `,
1570
1579
  type: Boolean,
1571
1580
  description: `
@@ -1575,11 +1584,8 @@ const definitions = {
1575
1584
  Set to \`false\` to suppress the progress bar.
1576
1585
  `,
1577
1586
  flatten (key, obj, flatOptions) {
1578
- flatOptions.progress = !obj.progress ? false
1579
- // progress is only written to stderr but we disable it unless stdout is a tty
1580
- // also. This prevents the progress from appearing when piping output to another
1581
- // command which doesn't break anything, but does look very odd to users.
1582
- : !!process.stderr.isTTY && !!process.stdout.isTTY && process.env.TERM !== 'dumb'
1587
+ // Only show progress if explicitly enabled AND we have proper TTY environment
1588
+ flatOptions.progress = !!obj.progress && !!process.stderr.isTTY && !!process.stdout.isTTY && process.env.TERM !== 'dumb'
1583
1589
  },
1584
1590
  }),
1585
1591
  provenance: new Definition('provenance', {
@@ -1695,6 +1701,7 @@ const definitions = {
1695
1701
  default: false,
1696
1702
  type: Boolean,
1697
1703
  short: 'D',
1704
+ exclusive: ['save-optional', 'save-peer', 'save-prod'],
1698
1705
  description: `
1699
1706
  Save installed packages to a package.json file as \`devDependencies\`.
1700
1707
  `,
@@ -1726,6 +1733,7 @@ const definitions = {
1726
1733
  default: false,
1727
1734
  type: Boolean,
1728
1735
  short: 'O',
1736
+ exclusive: ['save-dev', 'save-peer', 'save-prod'],
1729
1737
  description: `
1730
1738
  Save installed packages to a package.json file as
1731
1739
  \`optionalDependencies\`.
@@ -1754,6 +1762,7 @@ const definitions = {
1754
1762
  'save-peer': new Definition('save-peer', {
1755
1763
  default: false,
1756
1764
  type: Boolean,
1765
+ exclusive: ['save-dev', 'save-optional', 'save-prod'],
1757
1766
  description: `
1758
1767
  Save installed packages to a package.json file as \`peerDependencies\`
1759
1768
  `,
@@ -1799,6 +1808,7 @@ const definitions = {
1799
1808
  default: false,
1800
1809
  type: Boolean,
1801
1810
  short: 'P',
1811
+ exclusive: ['save-dev', 'save-optional', 'save-peer'],
1802
1812
  description: `
1803
1813
  Save installed packages into \`dependencies\` specifically. This is
1804
1814
  useful if a package already exists in \`devDependencies\` or
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@npmcli/config",
3
- "version": "10.2.0",
3
+ "version": "10.3.1",
4
4
  "files": [
5
5
  "bin/",
6
6
  "lib/"
@@ -33,7 +33,7 @@
33
33
  "devDependencies": {
34
34
  "@npmcli/eslint-config": "^5.0.1",
35
35
  "@npmcli/mock-globals": "^1.0.0",
36
- "@npmcli/template-oss": "4.23.6",
36
+ "@npmcli/template-oss": "4.24.4",
37
37
  "tap": "^16.3.8"
38
38
  },
39
39
  "dependencies": {
@@ -51,7 +51,7 @@
51
51
  },
52
52
  "templateOSS": {
53
53
  "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
54
- "version": "4.23.6",
54
+ "version": "4.24.4",
55
55
  "content": "../../scripts/template-oss/index.js"
56
56
  }
57
57
  }