Skip to content

Commit 6611e91

Browse files
lukekarrysfritzy
authored andcommitted
feat(config): add more npm/node information to config ls
1 parent a4ee396 commit 6611e91

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

lib/commands/config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,9 @@ ${defData}
266266
if (!long) {
267267
msg.push(
268268
`; node bin location = ${process.execPath}`,
269+
`; node version = ${process.version}`,
270+
`; npm bin location = ${dirname(dirname(__dirname))}`,
271+
`; npm version = ${this.npm.version}`,
269272
`; cwd = ${process.cwd()}`,
270273
`; HOME = ${process.env.HOME}`,
271274
'; Run `npm config ls -l` to show all defaults.'

tap-snapshots/test/lib/commands/config.js.test.cjs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,9 @@ prefix = "{LOCALPREFIX}"
342342
userconfig = "{HOME}/.npmrc"
343343
344344
; node bin location = {EXECPATH}
345+
; node version = {NODE-VERSION}
346+
; npm bin location = {NPMDIR}
347+
; npm version = {NPM-VERSION}
345348
; cwd = {NPMDIR}
346349
; HOME = {HOME}
347350
; Run \`npm config ls -l\` to show all defaults.
@@ -355,6 +358,9 @@ prefix = "{LOCALPREFIX}"
355358
userconfig = "{HOME}/.npmrc"
356359
357360
; node bin location = {EXECPATH}
361+
; node version = {NODE-VERSION}
362+
; npm bin location = {NPMDIR}
363+
; npm version = {NPM-VERSION}
358364
; cwd = {NPMDIR}
359365
; HOME = {HOME}
360366
; Run \`npm config ls -l\` to show all defaults.
@@ -383,6 +389,9 @@ prefix = "{LOCALPREFIX}"
383389
userconfig = "{HOME}/.npmrc"
384390
385391
; node bin location = {EXECPATH}
392+
; node version = {NODE-VERSION}
393+
; npm bin location = {NPMDIR}
394+
; npm version = {NPM-VERSION}
386395
; cwd = {NPMDIR}
387396
; HOME = {HOME}
388397
; Run \`npm config ls -l\` to show all defaults.

0 commit comments

Comments
 (0)