diff --git a/lib/commands/init.js b/lib/commands/init.js index 539fba885deef..030c97356edb8 100644 --- a/lib/commands/init.js +++ b/lib/commands/init.js @@ -16,6 +16,11 @@ const BaseCommand = require('../base-command.js') class Init extends BaseCommand { static description = 'Create a package.json file' static params = [ + 'init-author-name', + 'init-author-url', + 'init-license', + 'init-module', + 'init-version', 'yes', 'force', 'scope', diff --git a/tap-snapshots/test/lib/commands/publish.js.test.cjs b/tap-snapshots/test/lib/commands/publish.js.test.cjs index 4e9efdf6217f3..8392f32bbaafa 100644 --- a/tap-snapshots/test/lib/commands/publish.js.test.cjs +++ b/tap-snapshots/test/lib/commands/publish.js.test.cjs @@ -315,6 +315,7 @@ exports[`test/lib/commands/publish.js TAP re-loads publishConfig.registry if add ` exports[`test/lib/commands/publish.js TAP respects publishConfig.registry, runs appropriate scripts > new package version 1`] = ` + ` exports[`test/lib/commands/publish.js TAP restricted access > must match snapshot 1`] = ` diff --git a/tap-snapshots/test/lib/docs.js.test.cjs b/tap-snapshots/test/lib/docs.js.test.cjs index 7b3f74a0f2704..a7be7240b0bdd 100644 --- a/tap-snapshots/test/lib/docs.js.test.cjs +++ b/tap-snapshots/test/lib/docs.js.test.cjs @@ -3160,7 +3160,9 @@ npm init (same as \`npx \`) npm init <@scope> (same as \`npx <@scope>/create\`) Options: -[-y|--yes] [-f|--force] [--scope <@scope>] +[--init-author-name ] [--init-author-url ] [--init-license ] +[--init-module ] [--init-version ] [-y|--yes] [-f|--force] +[--scope <@scope>] [-w|--workspace [-w|--workspace ...]] [-ws|--workspaces] [--no-workspaces-update] [--include-workspace-root] @@ -3175,6 +3177,11 @@ npm init <@scope> (same as \`npx <@scope>/create\`) aliases: create, innit \`\`\` +#### \`init-author-name\` +#### \`init-author-url\` +#### \`init-license\` +#### \`init-module\` +#### \`init-version\` #### \`yes\` #### \`force\` #### \`scope\` diff --git a/workspaces/config/lib/definitions/definitions.js b/workspaces/config/lib/definitions/definitions.js index e6b9859dc1dfb..b89e988784c95 100644 --- a/workspaces/config/lib/definitions/definitions.js +++ b/workspaces/config/lib/definitions/definitions.js @@ -963,6 +963,7 @@ define('include-workspace-root', { define('init-author-email', { default: '', + hint: '', type: String, description: ` The value \`npm init\` should use by default for the package author's @@ -972,6 +973,7 @@ define('init-author-email', { define('init-author-name', { default: '', + hint: '', type: String, description: ` The value \`npm init\` should use by default for the package author's name. @@ -981,6 +983,7 @@ define('init-author-name', { define('init-author-url', { default: '', type: ['', url], + hint: '', description: ` The value \`npm init\` should use by default for the package author's homepage. `, @@ -988,6 +991,7 @@ define('init-author-url', { define('init-license', { default: 'ISC', + hint: '', type: String, description: ` The value \`npm init\` should use by default for the package license. @@ -997,6 +1001,7 @@ define('init-license', { define('init-module', { default: '~/.npm-init.js', type: path, + hint: '', description: ` A module that will be loaded by the \`npm init\` command. See the documentation for the @@ -1008,6 +1013,7 @@ define('init-module', { define('init-version', { default: '1.0.0', type: semver, + hint: '', description: ` The value that \`npm init\` should use by default for the package version number, if not already set in package.json.