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/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 diff --git a/tap-snapshots/test/lib/docs.js.test.cjs b/tap-snapshots/test/lib/docs.js.test.cjs index 319015a0c883a..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`] = ` @@ -3531,6 +3534,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 +3545,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`] = `