From 6eadfdb7e6cc13a76358e65208a88ff41e8a88e4 Mon Sep 17 00:00:00 2001 From: may Date: Sat, 20 May 2023 04:34:24 +0200 Subject: [PATCH 1/3] docs: add cli params to npm set --- lib/commands/set.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/commands/set.js b/lib/commands/set.js index b650026a599a9..a660b372e5677 100644 --- a/lib/commands/set.js +++ b/lib/commands/set.js @@ -4,6 +4,7 @@ class Set extends BaseCommand { static description = 'Set a value in the npm configuration' static name = 'set' static usage = ['= [= ...] (See `npm config`)'] + static params = ['global', 'location'] static ignoreImplicitWorkspace = false // TODO From badaacd81dbb12729111b539884f7eb1bfba6dbd Mon Sep 17 00:00:00 2001 From: may Date: Sat, 20 May 2023 04:43:21 +0200 Subject: [PATCH 2/3] update tests --- tap-snapshots/test/lib/docs.js.test.cjs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tap-snapshots/test/lib/docs.js.test.cjs b/tap-snapshots/test/lib/docs.js.test.cjs index 319015a0c883a..5dd8f28ff9877 100644 --- a/tap-snapshots/test/lib/docs.js.test.cjs +++ b/tap-snapshots/test/lib/docs.js.test.cjs @@ -3531,6 +3531,9 @@ Set a value in the npm configuration Usage: npm set = [= ...] (See \`npm config\`) +Options: +[-g|--global] [-L|--location ] + Run "npm help set" for more info \`\`\`bash @@ -3539,7 +3542,8 @@ npm set = [= ...] (See \`npm config\`) Note: This command is unaware of workspaces. -NO PARAMS +#### \`global\` +#### \`location\` ` exports[`test/lib/docs.js TAP usage shrinkwrap > must match snapshot 1`] = ` From cf0ce9de75eb8c5775f3171c439efebc3c55a081 Mon Sep 17 00:00:00 2001 From: may Date: Mon, 22 May 2023 03:13:36 +0200 Subject: [PATCH 3/3] do the same but with npm get --long --- lib/commands/get.js | 1 + tap-snapshots/test/lib/docs.js.test.cjs | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/commands/get.js b/lib/commands/get.js index 5e92e85a66382..7a59bd9052d67 100644 --- a/lib/commands/get.js +++ b/lib/commands/get.js @@ -4,6 +4,7 @@ class Get extends BaseCommand { static description = 'Get a value from the npm configuration' static name = 'get' static usage = ['[ ...] (See `npm config`)'] + static params = ['long'] static ignoreImplicitWorkspace = false // TODO diff --git a/tap-snapshots/test/lib/docs.js.test.cjs b/tap-snapshots/test/lib/docs.js.test.cjs index 5dd8f28ff9877..435ff67f8a4c3 100644 --- a/tap-snapshots/test/lib/docs.js.test.cjs +++ b/tap-snapshots/test/lib/docs.js.test.cjs @@ -2638,6 +2638,9 @@ Get a value from the npm configuration Usage: npm get [ ...] (See \`npm config\`) +Options: +[-l|--long] + Run "npm help get" for more info \`\`\`bash @@ -2646,7 +2649,7 @@ npm get [ ...] (See \`npm config\`) Note: This command is unaware of workspaces. -NO PARAMS +#### \`long\` ` exports[`test/lib/docs.js TAP usage help > must match snapshot 1`] = `