Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add example and specific name/description for the positional cli argument for yarn version #6223

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
23 changes: 23 additions & 0 deletions .yarn/versions/a6f5e4dd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
releases:
"@yarnpkg/cli": patch
"@yarnpkg/plugin-version": patch

declined:
- "@yarnpkg/plugin-compat"
- "@yarnpkg/plugin-constraints"
- "@yarnpkg/plugin-dlx"
- "@yarnpkg/plugin-essentials"
- "@yarnpkg/plugin-init"
- "@yarnpkg/plugin-interactive-tools"
- "@yarnpkg/plugin-nm"
- "@yarnpkg/plugin-npm-cli"
- "@yarnpkg/plugin-pack"
- "@yarnpkg/plugin-patch"
- "@yarnpkg/plugin-pnp"
- "@yarnpkg/plugin-pnpm"
- "@yarnpkg/plugin-stage"
- "@yarnpkg/plugin-typescript"
- "@yarnpkg/plugin-workspace-tools"
- "@yarnpkg/builder"
- "@yarnpkg/core"
- "@yarnpkg/doctor"
7 changes: 6 additions & 1 deletion packages/plugin-version/sources/commands/version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ export default class VersionCommand extends BaseCommand {
], [
`Prepare the version to be bumped to the next major`,
`yarn version major --deferred`,
], [
`Immediately bump to the specified version`,
`yarn version 1.2.3-alpha.1`,
]],
});

Expand All @@ -45,7 +48,9 @@ export default class VersionCommand extends BaseCommand {
description: `Bump the version immediately`,
});

strategy = Option.String();
strategy = Option.String({
name: `strategy|semver`,
});

async execute() {
const configuration = await Configuration.find(this.context.cwd, this.context.plugins);
Expand Down