Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(version): add --changelog-skip-unstable option #3882

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Juveniel
Copy link

Description

Adds --changelog-skip-unstable option that allows to include changelogs from prereleases when publishing a stable release.

Motivation and Context

fixes: #3392, #3119, #2248

How Has This Been Tested?

Added unit and integration tests.

Types of changes

  • New feature (non-breaking change which adds functionality)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Copy link
Contributor

@fahslaj fahslaj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should not have duplicate prerelease headers in the generated markdown. Changes in prereleases should be aggregated together with the changes from the major release. See comment in lerna-publish-conventional-fixed-prerelease.spec.ts.

Comment on lines +612 to +629
# 2.0.0-alpha.0 (YYYY-MM-DD)


### Features

* **package-1:** Add foo ([SHA](COMMIT_URL))





# [2.0.0-alpha.0](/compare/v1.0.0...v2.0.0-alpha.0) (YYYY-MM-DD)


### Features

* **package-1:** Add foo ([SHA](COMMIT_URL))

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2.0.0-alpha.0 appears twice in this markdown file. This shouldn't happen, as users looking at version 2.0.0 won't care which specific prerelease version the feature was added in. Instead, we should get the changes from all the prereleases aggregated together with the changes from 2.0.0 itself, so it would look like this:

# [2.0.0](/compare/v1.0.0...v2.0.0) (YYYY-MM-DD)


### Features

* **package-1:** Add baz ([SHA](COMMIT_URL))
* **package-1:** Add foo ([SHA](COMMIT_URL))


# [2.0.0-alpha.0](/compare/v1.0.0...v2.0.0-alpha.0) (YYYY-MM-DD)


### Features

* **package-1:** Add foo ([SHA](COMMIT_URL))

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fahslaj I do agree that this is the expected markup.

conventional-changelog/conventional-changelog#675 suggests this is an issue with conventional-changelog. However, tests in this PR with independent versioning seem to be correct and the prerelease changes are properly aggregated see here. Any suggestions ?

@Juveniel Juveniel marked this pull request as draft December 5, 2023 10:45
@JamesHenry
Copy link
Member

@Juveniel do you have plans to carry this forward please?

@Juveniel
Copy link
Author

Juveniel commented Feb 5, 2024

Hey @JamesHenry,

In order to continue with this PR, I need to first fix the issue in conventional-changelog. Unfortunately I am quite limited on time for the upcoming quarter and will not be able to do it asap.

In general, I would love for this feature to be pushed forward, as it really is a pain to not be able to aggregate changes from pre-release versions in the actual graduated version. I am even considering switching to nx release as a somewhat faster alternative once it goes out of beta, as the issue seems to be resolved with nx.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add --skip-unstable option to lerna version command
3 participants