From 6611e9147f1726ab4537a7fe3b9e3beb6728f700 Mon Sep 17 00:00:00 2001 From: Luke Karrys Date: Sun, 10 Apr 2022 11:03:36 -0700 Subject: [PATCH] feat(config): add more npm/node information to config ls --- lib/commands/config.js | 3 +++ tap-snapshots/test/lib/commands/config.js.test.cjs | 9 +++++++++ 2 files changed, 12 insertions(+) diff --git a/lib/commands/config.js b/lib/commands/config.js index 690a69a3233e4..24bab5fe6c9e6 100644 --- a/lib/commands/config.js +++ b/lib/commands/config.js @@ -266,6 +266,9 @@ ${defData} if (!long) { msg.push( `; node bin location = ${process.execPath}`, + `; node version = ${process.version}`, + `; npm bin location = ${dirname(dirname(__dirname))}`, + `; npm version = ${this.npm.version}`, `; cwd = ${process.cwd()}`, `; HOME = ${process.env.HOME}`, '; Run `npm config ls -l` to show all defaults.' diff --git a/tap-snapshots/test/lib/commands/config.js.test.cjs b/tap-snapshots/test/lib/commands/config.js.test.cjs index f98e74c066269..21add30da7be0 100644 --- a/tap-snapshots/test/lib/commands/config.js.test.cjs +++ b/tap-snapshots/test/lib/commands/config.js.test.cjs @@ -342,6 +342,9 @@ prefix = "{LOCALPREFIX}" userconfig = "{HOME}/.npmrc" ; node bin location = {EXECPATH} +; node version = {NODE-VERSION} +; npm bin location = {NPMDIR} +; npm version = {NPM-VERSION} ; cwd = {NPMDIR} ; HOME = {HOME} ; Run \`npm config ls -l\` to show all defaults. @@ -355,6 +358,9 @@ prefix = "{LOCALPREFIX}" userconfig = "{HOME}/.npmrc" ; node bin location = {EXECPATH} +; node version = {NODE-VERSION} +; npm bin location = {NPMDIR} +; npm version = {NPM-VERSION} ; cwd = {NPMDIR} ; HOME = {HOME} ; Run \`npm config ls -l\` to show all defaults. @@ -383,6 +389,9 @@ prefix = "{LOCALPREFIX}" userconfig = "{HOME}/.npmrc" ; node bin location = {EXECPATH} +; node version = {NODE-VERSION} +; npm bin location = {NPMDIR} +; npm version = {NPM-VERSION} ; cwd = {NPMDIR} ; HOME = {HOME} ; Run \`npm config ls -l\` to show all defaults.