Skip to content

feat: Expose release count option #53

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

Conversation

lucahuettner
Copy link

@lucahuettner lucahuettner commented Jan 31, 2023

Hey, thanks for the fork it offers really useful additions to standard-version!

One feature that is missing for us is that we can't regenerate the complete changelog since the releaseCount option isn't passed through to conventional-changelog so I added it with this PR. If you have any feedback on it feel free to share.

Hope we can make it an addition to the package since also other people seem to miss it as well (Fixes conventional-changelog#719)

@lucahuettner
Copy link
Author

Extension:
Since releaseCount = 0 regenerates the complete changelog but still gets added to the old changelog it might be good to also have an option to regenerate the changelog without appending it to the old one. Or have an extra option to ignore the old changelog which could be combined with releaseCount = 0 to regenerate the complete changelog. This would also be helpful to us and I would be happy to implement it as well.

@TimothyJones
Copy link
Member

This is awesome, thank you!

I can definitely accept this. A couple of requests:

  1. Would it be possible to add a test or two? I think this file would be a good place to look for a pattern- there are mocks and expected changelogs there.

  2. Could you add the option to the readme too?

And a question:

  1. I agree with @lucahuettner that releaseCount = 0 appending the whole changelog is probably unexpected - I can't think of a use case for that. Should we instead replace the whole changelog when releaseCount is 0? (Adding an option to control this would give the most configurability, but I'm not wild about expanding the API surface when I can't see a use case for controlling it) Thoughts?

@lucahuettner
Copy link
Author

Yes I will take a look at the tests and add the option to the readme. And I also agree with you on the 3rd point, I will implement this as well.

@lucahuettner
Copy link
Author

I have added documentation about the option to the readme and have added that the changelog gets overridden when releaseCount is 0.

But unfortunately, I couldn't figure out how to test the changelog regeneration.

@TimothyJones
Copy link
Member

I'll get this in on Monday, and see if I can add a test. Either way, I'll release it then.

Thanks again for the PR! Much appreciated <3

@codecov-commenter
Copy link

codecov-commenter commented Feb 11, 2023

Codecov Report

Merging #53 (6dfde4e) into master (7fbc106) will not change coverage.
The diff coverage is 100.00%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@           Coverage Diff           @@
##           master      #53   +/-   ##
=======================================
  Coverage   97.40%   97.40%           
=======================================
  Files          27       27           
  Lines        1194     1194           
=======================================
  Hits         1163     1163           
  Misses         31       31           
Impacted Files Coverage Δ
command.js 84.61% <ø> (ø)
defaults.js 100.00% <ø> (ø)
lib/lifecycles/changelog.js 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@TimothyJones TimothyJones self-requested a review February 11, 2023 05:18
@lucahuettner
Copy link
Author

Okay sounds great :)

@TimothyJones TimothyJones merged commit d862d4a into absolute-version:master Feb 14, 2023
@TimothyJones
Copy link
Member

Released as 11.1.0. Please let me know if there are any issues, and thanks again for the PR!

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.

Standard version does not allow to set releaseCount -> impossible to use with existing projects
3 participants