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
When running lerna version using the conventionalCommits option/flag, Lerna should produce accurate root and package-level change logs.
Current Behavior
Lerna produces accurate package-level change logs, but the root-level change log contains a very verbose change set spanning several releases.
Possible Solution
When generating root-level changelogs, this code path is taken in update-changelog.js. Notice that in the else branch on L44 for non-root packages, tagPrefix is being assigned to options, but this does not happen on the root-level code path. I believe this is sufficient to explain why package-level change logs are produced correctly, but root-level change logs are not.
I have tested this flow locally by adding the following line just below L34 in update-changelog.js, and it resulted in root-level change logs that were accurate:
options.tagPrefix=tagPrefix;
However, I am not aware of the context around why this wasn't being set in the first place, and as such, this solution may have other undesired effects for other use cases that I'm not aware of.
Steps to Reproduce (for bugs)
Set the same tagVersionPrefix option for the version and publish commands in lerna.json or use the same --tag-version-prefix flag when executing lerna version and lerna publish below.
With 1 or more commits representing changes to at least 1 package, run lerna version.
When using lerna version with a custom tagVersionPrefix and conventionalCommits, it is necessary to manually remove all extraneous information from the root-level change log that Lerna produces.
Your Environment
Executable
Version
lerna --version
3.16.3
npm --version
6.10.1
node --version
10.16.0
OS
Version
NAME
VERSION
macOS Sierra
10.14.5
The text was updated successfully, but these errors were encountered:
Expected Behavior
When running
lerna version
using theconventionalCommits
option/flag, Lerna should produce accurate root and package-level change logs.Current Behavior
Lerna produces accurate package-level change logs, but the root-level change log contains a very verbose change set spanning several releases.
Possible Solution
When generating root-level changelogs, this code path is taken in
update-changelog.js
. Notice that in theelse
branch on L44 for non-root packages,tagPrefix
is being assigned tooptions
, but this does not happen on the root-level code path. I believe this is sufficient to explain why package-level change logs are produced correctly, but root-level change logs are not.I have tested this flow locally by adding the following line just below L34 in
update-changelog.js
, and it resulted in root-level change logs that were accurate:However, I am not aware of the context around why this wasn't being set in the first place, and as such, this solution may have other undesired effects for other use cases that I'm not aware of.
Steps to Reproduce (for bugs)
tagVersionPrefix
option for theversion
andpublish
commands inlerna.json
or use the same--tag-version-prefix
flag when executinglerna version
andlerna publish
below.lerna version
.lerna.json
Context
When using
lerna version
with a customtagVersionPrefix
andconventionalCommits
, it is necessary to manually remove all extraneous information from the root-level change log that Lerna produces.Your Environment
lerna --version
3.16.3
npm --version
6.10.1
node --version
10.16.0
10.14.5
The text was updated successfully, but these errors were encountered: