-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
feat(version): Added semver versioning flags for convenience #5670
Conversation
Would you mind also making a PR to the yarnpkg/website repo where the help docs are stored, adding these flags to the docs? https://github.com/yarnpkg/website/blob/master/lang/en/docs/cli/version.md |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thanks for the contribution! 👍
I'd like to hold off on the merge until we get a PR for the docs added as well, so that we can merge both and keep the code and docs in sync.
@rally25rs Sounds good. I was initially thinking I'd make the PR on the website repo right after this was merged, but I'll go ahead and put that together first. |
Thanks @faazshift I'll go ahead and merge this now then with the expectation of getting a PR on the docs side soon. Thanks again for the contribution, we really appreciate it! |
@rally25rs Thanks! I've added the PR for the website. |
FYI: when adding to precommit hook
Not sure if that is a design flaw or not, so posting here as a potential bug. |
should this be working for $ yarn version --patch
yarn version v1.6.0
info Current version: 1.7.0
question New version: █ I expect to not be asked what the new version should be 🙁 PS: asking b/c it is already in the docs on the website: https://yarnpkg.com/lang/en/docs/cli/version/#toc-yarn-version-major |
@pkyeck The PR for the docs on the site was unintentionally merged/released along with the |
Hey @faazshift this is super confusing and annoying, can the docs have this feature removed until it's actually released, or can the docs be updated to say that it is not yet released? |
@cache-rules This was shipped a couple days ago, in |
fixes #5670
Summary
Currently, it's possible (although undocumented) to automatically bump the version by running something like
yarn version --loose-semver --new-version minor
. To me, this seems less convenient and less intuitive than something likeyarn version --minor
(closely comparable tonpm version minor
). I've added the ability to automatically increment the version with one of the flags:--major
,--minor
, or--patch
. This will also satisfy feature request #5367.Test plan
I've included Jest test cases for each of the new versioning flags.