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): bump prerelease versions from conventional commits (#2… #3362
Conversation
What can I do that someone takes a look at this pull request. Is there any additional information needed? Some feedback would be nice. What is more it would be cool if I get some authorization to run the required workflows. How can I achieve this? Thx a lot! |
@amorscher Thanks a lot for your patience on this! I am currently recovering from COVID while traveling internationally, so am taking a break at the moment. I will discuss this potential feature with the team towards the end of next week. The workflows do not run by default for folks who have never contributed before. I have enabled them now but it looks like in this case it failed the first check. I recommend getting the checks we specify in |
6204367
to
ad81938
Compare
@JamesHenry THX for the response and for bringing it to the team. I updated the pull request. Now the workflows should pass. I ran them locally, despite some minor snapshot differences due to committer id and CPU infos all of them passed. Wish you a good recorvery! I really know that takes some time. |
@JamesHenry Looks like I need another approval for running the workflows. Is this all the time needed for the first contribution? |
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.
Thanks a lot @amorscher, I'm doing much better now and we agreed at the end of this week to press ahead with this feature!
Please see my various items of feedback inline.
Please could you also add an e2e test to cover the use of this flag?
another thing missing in this PR is the lerna-schema.json that needs to be updated with the new option |
Thanks a lot for the review. I am really happy that the feature is pressed ahead. I integrated requested changes and I will add an e2e test during the week. Also updated lerna-schema.json. @ghiscoding THX for the hint. |
ee9e1e7
to
f448845
Compare
f448845
to
a2010a8
Compare
Thank you @amorscher! |
Adds possibility to force a version bump, even if already existing version is a prerelease version. This is achieved by introducing a new flag for
lerna version
command named--conventional-bumpprerelease
.Description
Adds new flag
--conventional-bumpprerelease
to force a version bump, if required according to conventional commits. When run with this flag,lerna version
will release with bumped prerelease versions, even if already released packages are prereleases. Releases all unreleased changes as pre(patch/minor/major/release) by prefixing the version recommendation fromconventional-commits
withpre
, eg. if present changes include a feature commit, the recommended bump will beminor
, so this flag will result in apreminor
release. If not used just a prerelease bump will be applied to prereleased packages.Motivation and Context
Currently, if the existing version is a prerelease no version bump is performed, although there exists conventional commits which would require that. Following version bumps are performed using
--conventional-bumpprerelease
:Behaviour without using the flag is:
The issue/question is described here (#2536).
How Has This Been Tested?
Added several unit tests and tested manually with locally published lerna version.
Types of changes
Checklist: