You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
add support for conventional-changelog format commit messages #662
I also use this CHANGELOG format to recommend the next version # (if a release is taking a month to land, it's sometimes easy to forget if it's a patch, minor, or major).
When running lerna in independent mode, I lose this valued functionality.
Proposal
I've been hard at work adding support to conventional-changelog for a lerna-style-git-history:
I would like to add an additional flag for publishing in independent mode (--conventional-commits?) when running in this mode, two things would happen:
we would not prompt the user for version increments, we'd detect this based on the commit history (instead having a confirm step).
we would auto-generate the CHANGELOG in each ./pacakge/:name.
I think adding this functionality would be pretty straightforward, and could be facilitated by pulling in a couple of the conventional-changelog core libraries, and augmenting the functionality of PublishCommand.js.
I am generally in favor of this (also p excited that you're getting excited about lerna :D). As I mentioned in #643, this feels like a plugin system, but I am not opposed to a more focused solution to avoid larger, more complicated refactoring.
--conventional-commits seems like a reasonable flag. It would also be configurable in lerna.json as "conventionalCommits": true, either at the root or command.publish namespace.
@evocateur lifecycle scripts and/or a plugin system does feel like it would be a pretty awesome eventual feature.
It felt to me that using conventional commit messages is a common enough practice, and that it improves the independent workflow enough, that it would be worth implementing the approach outlined in #665 -- it also turns out that it doesn't take too much code to wire things together 😄
We could certainly open up more customization to the --conventional-commits args (not everyone uses the angular style?), but I don't see it necessarily conflicting with lerna-changelog.
In fact, I'm kind of interested in seeing how this could be "dogfooded" on an eventual lerna-as-lerna-monorepo ( #174, aka "yo dawg, i heard you liked lerna...").
For one thing, it's nice (for unfortunate folks like me who will forever yearn for their company's code to be rescued from Bitbucketian horrors) that conventional-changelog doesn't depend explicitly on GitHub metadata to operate.
@hzoo I think they probably pair nicely, and could eventually be combined? It seems to me that:
if you're running in independent mode, it's pretty nice to have a per-module CHANGELOG.md (makes it easier to pull in legacy projects for starters); Also, it can be tedious bumping each version manually so using a convention is nice.
it seems like an approach like lerna-changelog works better for fixed/locked mode -- where I think it potentially makes more sense to report changes in a single top level document?
It seems like the angular conventional-commit format (which is used by semantic-release by default, and standard-version) is getting pretty healthy adoption, is probably worth parsing for both use-cases?
Been waiting for something like this to land 🙌 I'm hoping it can replace a lot of the infra we built manually to do this ourselves. Thanks @bcoe and @evocateur!
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.
Activity
evocateur commentedon Mar 10, 2017
I am generally in favor of this (also p excited that you're getting excited about
lerna:D). As I mentioned in #643, this feels like a plugin system, but I am not opposed to a more focused solution to avoid larger, more complicated refactoring.--conventional-commitsseems like a reasonable flag. It would also be configurable inlerna.jsonas"conventionalCommits": true, either at the root orcommand.publishnamespace.bcoe commentedon Mar 12, 2017
@evocateur lifecycle scripts and/or a plugin system does feel like it would be a pretty awesome eventual feature.
It felt to me that using conventional commit messages is a common enough practice, and that it improves the
independentworkflow enough, that it would be worth implementing the approach outlined in #665 -- it also turns out that it doesn't take too much code to wire things together 😄hzoo commentedon Mar 15, 2017
Curious how this will interop/relate to https://github.com/lerna/lerna-changelog, I guess unrelated then since this assumes the commit message format?
evocateur commentedon Mar 15, 2017
We could certainly open up more customization to the
--conventional-commitsargs (not everyone uses the angular style?), but I don't see it necessarily conflicting withlerna-changelog.In fact, I'm kind of interested in seeing how this could be "dogfooded" on an eventual lerna-as-lerna-monorepo ( #174, aka "yo dawg, i heard you liked lerna...").
For one thing, it's nice (for unfortunate folks like me who will forever yearn for their company's code to be rescued from Bitbucketian horrors) that
conventional-changelogdoesn't depend explicitly on GitHub metadata to operate.bcoe commentedon Mar 15, 2017
@hzoo I think they probably pair nicely, and could eventually be combined? It seems to me that:
independentmode, it's pretty nice to have a per-module CHANGELOG.md (makes it easier to pull in legacy projects for starters); Also, it can be tedious bumping each version manually so using a convention is nice.It seems like the angular conventional-commit format (which is used by semantic-release by default, and standard-version) is getting pretty healthy adoption, is probably worth parsing for both use-cases?
tldr; I don't think there's any conflict 👍
evocateur commentedon Mar 15, 2017
@bcoe oh hey, forgot to mention:
traviskaufman commentedon Mar 23, 2017
Been waiting for something like this to land 🙌 I'm hoping it can replace a lot of the infra we built manually to do this ourselves. Thanks @bcoe and @evocateur!
bcoe commentedon Mar 24, 2017
@traviskaufman awesome, please don't hesitate to flag me in issues on lerna as you test stuff out; I'm excited to make this feature kick butt.
myfairsyer commentedon May 25, 2017
How is atlassian/cz-lerna-changelog (not) related and/or relevant to this?
lock commentedon Dec 28, 2018
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.