lerna
lerna copied to clipboard
CHANGELOG genetared with all commits from the last release
Hello, I'm using lerna to automatically generate the CHANGELOG for my monorepo app, but when I'm making a new release it generates the whole CHANGELOG with all the commits from the last release, so this commits are printed twice.
How can I do the release without duplicating the previous commits.
Expected Behavior
When I use lerna version
the CHANGELOG should only have the new commits and ignore the commits that are in the previuos release:
Make a new release
1.1.0 (2021-09-08)
Features
commit 1: New funcionality
commit 2: Update an endpoint
1.0.0 (2021-06-24)
Features
commit 1: Create the project
commit 2: Create an endpoint
Current Behavior
When I try to do a new release, the CHANGELOG always have all the commits from the old release. Never show me the new commits that belong to the new release.
Make a new release
1.1.0 (2021-09-08)
Features
commit 1: Create the project
commit 2: Create an endpoint
1.0.0 (2021-06-24)
Features
commit 1: Create the project
commit 2: Create an endpoint
lerna.json
{
"npmClient": "yarn",
"useWorkspaces": true,
"packages": ["backend/*", "libraries/*", "frontend", "mobile/*"],
"version": "independent",
"command": {
"version": {
"allowBranch": ["release/*", "hotfix/*"],
"changelog": true,
"changelogPreset": {
"name": "conventionalcommits",
"commitUrlFormat": "{{host}}/{{owner}}/{{repository}}/commits/{{hash}}",
"compareUrlFormat": "{{host}}/{{owner}}/{{repository}}/compare/{{currentTag}}%0D{{previousTag}}"
},
"conventionalCommits": true,
"includeMergedTags": true,
"message": "chore: release",
"push": false
}
}
}
lerna-debug.log
Context
For the first release we want that the tag was started with the version 1.0.0 so we run the command lerna version 1.0.0
and all our packages have that version. The tags generated automatically for the second release are fine, the problem is the changelog that repeats all the commits again.
Your Environment
Executable | Version |
---|---|
lerna --version |
3.22.1 |
npm --version |
6.14.8 |
yarn --version |
1.21.1 |
node --version |
12.19.0 |
| Ubuntu | 20.04 |
Same here, seems to have happened once we switched to independent versioning. Any advice on this would be amazing.
Hey @moogsG and @leidyjbr5, were you able to resolve this issue? I ran into the same issue