Skip to content

Conversation

@Tejas242
Copy link
Contributor

This PR adds the missing --ignore-scripts option to the npm version command's help output and documentation. The option allows users to skip running lifecycle scripts (preversion, version, postversion) during version bumps, which is important for CI environments or cases where scripts might fail or be unwanted. This ensures consistency with other npm commands that support --ignore-scripts.

Changes Made

  1. version.js: Added 'ignore-scripts' to the static params array to include it in the command's accepted parameters.

Testing

  • Verified that npm version -h now shows [--ignore-scripts] in the options.
image
  • Confirmed that npm help version includes the --ignore-scripts configuration section.
image
  • Ran docs generation to ensure man pages and HTML docs are updated.

References

Fixes #8668

@Tejas242 Tejas242 requested a review from a team as a code owner October 17, 2025 14:06
@wraithgar
Copy link
Member

npm run snap should update the snapshots for help output.

@wraithgar
Copy link
Member

To be clear, this does not change the accepted parameters, it only changes what shows up on --help.

@wraithgar wraithgar merged commit 06510a8 into npm:latest Oct 20, 2025
20 checks passed
@jasonkarns
Copy link
Contributor

🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[DOCS] <title> npm version help is missing --ignore-scripts option

3 participants