docs: Add --ignore-scripts option to npm version help and docs #8683
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds the missing
--ignore-scriptsoption to thenpm versioncommand'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
version.js: Added'ignore-scripts'to thestatic paramsarray to include it in the command's accepted parameters.Testing
npm version -hnow shows[--ignore-scripts]in the options.npm help versionincludes the--ignore-scriptsconfiguration section.References
Fixes #8668