Repository navigation
Feat/changelog preview - #2555
rishabhgupta wants to merge 4 commits into
Conversation
evocateur
left a comment
There was a problem hiding this comment.
I had envisioned this as more akin to --dry-run rather than "edit in place" for each changelog. Anything that needed to be customized later could just as easily be done in a subsequent commit, and anything worth automating should be achievable within a changelog preset.
| - [`--sign-git-tag`](#--sign-git-tag) | ||
| - [`--yes`](#--yes) | ||
| - [`--tag-version-prefix`](#--tag-version-prefix) | ||
| - [`--changelog-preview`](#--changelog-preview) |
There was a problem hiding this comment.
This (and its target block) should be alphabetized after --changelog-preset.
| alias: "yes", | ||
| type: "boolean", | ||
| }, | ||
| "changelog-preview": { |
There was a problem hiding this comment.
This should be alphabetized after the changelog-preset key (yes, behind conventional-changelog, ordering is... challenging)
| // if change log preview option is passed open the file in vim before commiting | ||
| if (changelogPreview) { | ||
| return new Promise((resolve, reject) => { | ||
| const vim = spawn("vim", [changelogFileLoc], { stdio: "inherit" }); |
There was a problem hiding this comment.
This is a bit specific, what if I don't like vim, and prefer code instead? What if my platform doesn't have vim? (i mean, yeah, "don't use --changelog-preview" is a reasonable answer to the latter question)
|
I'm not sure motivation #2 is valid, if the conventional commit addressed something, isn't removing it violating the spirit of the convention? (It's not a law, sure, and I'm not your dad, but it just feels weird to explicitly endorse by virtue of accepting this feature) |
|
@evocateur if we need to preview the change log, cant we just run |
|
Hi @rishabhgupta 👋 Thank you very much for taking the initiative to contribute this PR! You may or may not know that lerna is now under the stewardship of Nrwl (announcement here #3121), a company with a long history of not just producing valuable open-source software (OSS), but also backing others (at the time of writing, Nrwl has donated over $50,000 to OSS it hasn't created, see https://opencollective.com/nx for full details). Quite simply, Nrwl ❤️ OSS, and is committed to making lerna the best it can be. We use it ourselves. We hope you will continue to be a part of this community as we look to take things forward from here! Please see #3140 for more details on our plans for 2022. In this case of this PR, because there has been no activity on it for over 2 years, we are going to close it for now. If you would like to discuss the possibility of adding new features to lerna, please kindly open a new issue (or upvote and comment on an existing one) so we can cover all the details: https://github.com/lerna/lerna/issues/new/choose Many thanks again 🙏 |
Description
Adds a way to preview and modify the generated changelog file when using conventional commits.
When the version command is run with
--changelog-previewoption, once the change log is written it will open in VIM where the user can preview and make changes to the log file. Once the user exists out of vim the file is committed. This will happen for every change log generated.Motivation and Context
At times you want to preview or make changes to the generated change log. For eg:
ISSUE: #1094
How Has This Been Tested?
Switched to forked copy and verified the publish and version command on existing lerna repo.
My changes shouldn't be affecting any other areas than publish and version commands.
Types of changes
Checklist: