Repository navigation
Support --conventional-commits in fixed versioning mode - #922
Conversation
2d76b19 to
f57f359
Compare
- group checks by option type first, then independent/fixed
4446bd1 to
3beee9a
Compare
|
Is this missing anything that you would accept contributions for? I'd love to help get this merged. |
|
I've been using the changes in this PR in a internal fork of lerna successfully for a while now. @evocateur would you be able to review this? Thanks! |
evocateur
left a comment
There was a problem hiding this comment.
LGTM, apologies for the delayed response!
| @@ -1,3 +1,3 @@ | |||
| { | |||
| "name": "independent" | |||
| "name": "normal-exact" | |||
|
Awesome thanks! |
|
So what do i need to do to be able to use this? What conventional commit dependencies do i need? I'm just getting to grips with both lerna and conventional, so this i a bit of a learning curve i'm trying to climb. Any advice to get lerna working with conventional using I've got standard-version installed, but it doesn't seem to be filling the changelog with my commit messages. |
|
@KingScooty Just |
|
Thanks @evocateur. I've been using I'll stage my commits, run |
|
As long as those |
|
Hmm. Well this is an example of one of my commits: Lerna detects any package and dependency changes before publishing, so everything is working fine lerna side. |
|
If you could open a new issue with your version, config, and perhaps a small repro, that would be greatly appreciated! |
|
@KingScooty For your example with a commit type of
Lerna has the option to use a different preset through the |
|
Ahhh, that makes sense! Thanks @jezzay! |
|
@jezzay related links: Thanks~ |
|
This thread has been automatically locked because there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Description
This PR adds support for --conventional-commits in fixed mode. When the --conventional-commits
flag is used, the highest bump from the changed packages will be used as the new version.
Eg
package-1 1.0.0 -> feat
package-2 1.0.0 -> fix
lerna publish --conventional-commitsResults in package-1 and package-2 being updated to 1.1.0
This is accomplished by only using the
"-l", pkg.namearguments (lerna mode) to conventional-recommended-bump/conventional-changelog-cli in independent mode.The CHANGELOG.md files for each package are also created/updated on each publish.
The order of commands in
src/commands/PublishCommand.jshas been updated to group by option type first, then independent/fixed, which improves readability.Motivation and Context
This PR allows lerna to be used to publish new versions in CI more easily in fixed mode when conventional commits are followed. With something like
lerna publish --conventional-commits --force-publish=*it will be possible to release new versions of projects managed with lerna automatically on PR merges.Fixes #890
How Has This Been Tested?
Types of changes
Checklist: