@npmcli/config 8.3.1 → 8.3.2
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.
- package/lib/definitions/definitions.js +5 -2
- package/lib/index.js +3 -3
- package/package.json +4 -4
|
@@ -1549,13 +1549,16 @@ const definitions = {
|
|
|
1549
1549
|
type: Boolean,
|
|
1550
1550
|
description: `
|
|
1551
1551
|
When set to \`true\`, npm will display a progress bar during time
|
|
1552
|
-
intensive operations, if \`process.stderr\`
|
|
1552
|
+
intensive operations, if \`process.stderr\` and \`process.stdout\` are a TTY.
|
|
1553
1553
|
|
|
1554
1554
|
Set to \`false\` to suppress the progress bar.
|
|
1555
1555
|
`,
|
|
1556
1556
|
flatten (key, obj, flatOptions) {
|
|
1557
1557
|
flatOptions.progress = !obj.progress ? false
|
|
1558
|
-
|
|
1558
|
+
// progress is only written to stderr but we disable it unless stdout is a tty
|
|
1559
|
+
// also. This prevents the progress from appearing when piping output to another
|
|
1560
|
+
// command which doesn't break anything, but does look very odd to users.
|
|
1561
|
+
: !!process.stderr.isTTY && !!process.stdout.isTTY && process.env.TERM !== 'dumb'
|
|
1559
1562
|
},
|
|
1560
1563
|
}),
|
|
1561
1564
|
provenance: new Definition('provenance', {
|
package/lib/index.js
CHANGED
|
@@ -585,7 +585,7 @@ class Config {
|
|
|
585
585
|
|
|
586
586
|
async #loadFile (file, type) {
|
|
587
587
|
// only catch the error from readFile, not from the loadObject call
|
|
588
|
-
log.silly(`
|
|
588
|
+
log.silly('config', `load:file:${file}`)
|
|
589
589
|
await readFile(file, 'utf8').then(
|
|
590
590
|
data => {
|
|
591
591
|
const parsedConfig = ini.parse(data)
|
|
@@ -684,7 +684,7 @@ class Config {
|
|
|
684
684
|
if (w === this.localPrefix) {
|
|
685
685
|
// see if there's a .npmrc file in the workspace, if so log a warning
|
|
686
686
|
if (await fileExists(this.localPrefix, '.npmrc')) {
|
|
687
|
-
log.warn(`ignoring workspace config at ${this.localPrefix}/.npmrc`)
|
|
687
|
+
log.warn('config', `ignoring workspace config at ${this.localPrefix}/.npmrc`)
|
|
688
688
|
}
|
|
689
689
|
|
|
690
690
|
// set the workspace in the default layer, which allows it to be overridden easily
|
|
@@ -692,7 +692,7 @@ class Config {
|
|
|
692
692
|
data.workspace = [this.localPrefix]
|
|
693
693
|
this.localPrefix = p
|
|
694
694
|
this.localPackage = hasPackageJson
|
|
695
|
-
log.info(`found workspace root at ${this.localPrefix}`)
|
|
695
|
+
log.info('config', `found workspace root at ${this.localPrefix}`)
|
|
696
696
|
// we found a root, so we return now
|
|
697
697
|
return
|
|
698
698
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@npmcli/config",
|
|
3
|
-
"version": "8.3.
|
|
3
|
+
"version": "8.3.2",
|
|
4
4
|
"files": [
|
|
5
5
|
"bin/",
|
|
6
6
|
"lib/"
|
|
@@ -32,14 +32,14 @@
|
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@npmcli/eslint-config": "^4.0.0",
|
|
34
34
|
"@npmcli/mock-globals": "^1.0.0",
|
|
35
|
-
"@npmcli/template-oss": "4.
|
|
35
|
+
"@npmcli/template-oss": "4.22.0",
|
|
36
36
|
"tap": "^16.3.8"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@npmcli/map-workspaces": "^3.0.2",
|
|
40
40
|
"ci-info": "^4.0.0",
|
|
41
41
|
"ini": "^4.1.2",
|
|
42
|
-
"nopt": "^7.
|
|
42
|
+
"nopt": "^7.2.1",
|
|
43
43
|
"proc-log": "^4.2.0",
|
|
44
44
|
"read-package-json-fast": "^3.0.2",
|
|
45
45
|
"semver": "^7.3.5",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
},
|
|
51
51
|
"templateOSS": {
|
|
52
52
|
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
|
|
53
|
-
"version": "4.
|
|
53
|
+
"version": "4.22.0",
|
|
54
54
|
"content": "../../scripts/template-oss/index.js"
|
|
55
55
|
}
|
|
56
56
|
}
|