Skip to content

Commit e71ca0e

Browse files
MaxBlack-devMax Black
andauthored
docs: add --save flag to documentation (#8746)
The --save flag was already implemented and used in workspaces but was not included in the auto-generated documentation. Adding it to the params array will ensure it appears in the npm version help and documentation. When used with workspaces, --save updates the root package.json dependencies to match the new workspace versions. Fixes #8170 --------- Co-authored-by: Max Black <[email protected]>
1 parent 3439a89 commit e71ca0e

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

lib/commands/version.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ class Version extends BaseCommand {
1313
'json',
1414
'preid',
1515
'sign-git-tag',
16+
'save',
1617
'workspace',
1718
'workspaces',
1819
'workspaces-update',

tap-snapshots/test/lib/docs.js.test.cjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4652,6 +4652,7 @@ npm version [<newversion> | major | minor | patch | premajor | preminor | prepat
46524652
Options:
46534653
[--allow-same-version] [--no-commit-hooks] [--no-git-tag-version] [--json]
46544654
[--preid prerelease-id] [--sign-git-tag]
4655+
[-S|--save|--no-save|--save-prod|--save-dev|--save-optional|--save-peer|--save-bundle]
46554656
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
46564657
[--workspaces] [--no-workspaces-update] [--include-workspace-root]
46574658
[--ignore-scripts]
@@ -4672,6 +4673,7 @@ alias: verison
46724673
#### \`json\`
46734674
#### \`preid\`
46744675
#### \`sign-git-tag\`
4676+
#### \`save\`
46754677
#### \`workspace\`
46764678
#### \`workspaces\`
46774679
#### \`workspaces-update\`

0 commit comments

Comments
 (0)