Skip to content

Conversation

yeager-eren
Copy link
Collaborator

@yeager-eren yeager-eren commented Jul 25, 2025

Summary

Generate changelog using a separate script.

This PR includes:

  • Upgrade changelog related packages.
  • Making a separate script for generating changelog.
  • Two types of changelog can be generated: 1. packages changelog (already had) 2. root changelog (manually created)
  • We used to rely on conventional-commits-cli binary and its cli interface, but now we've switched to their nodejs package and are using stream instead.
    Fixes RF-2536

Flags

--name:
generating changelog for an specific package.

node ./scripts/changelog/command.mjs --name @rango-dev/wallets-core

--save:
By default, we print the output into the stdout. with this flag it will append the changelog to CHANGELOG.md.
In root it will write into ./CHANGELOG.md, in packages it will write into the package's changelog.

node ./scripts/changelog/command.mjs --save

--all:
Extract the list of packages, and try to generate changelog for all of the workspace members:

node ./scripts/changelog/command.mjs --all

Root changelog

From now on, we should update the root's package.json. don't need to tag that using git tags.
The reason behind this is the changelog's title includes a version always, to make that automatically we need to do this.

TODO

We modified the root's changelog a bit, and it adds a includes widget-emmbedded@0.0.0. We can do it in a separate task.

in scripts/common/changelog.mjs, we have generateChangelog. it should be added here.
conventional-changelog has support for templates, it can be done by using writer context and options. [more info.](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-writer#options.

We have got a bug in github release notes, turns out the changelog is always empty because genertaeChangelog function needs to be run before tagging.

How did you test this change?

Publish script was using the changelog, ensure it's not affected in any ways.

Try to create a commit on a single package, and one where it modiefies different packages at the same time, it should generate changelog correctly.

Try to generate change log for the root.

Checklist:

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • Implemented a user interface (UI) change, referencing our Figma design to ensure pixel-perfect precision.

@yeager-eren yeager-eren requested a review from nikaaru as a code owner July 25, 2025 12:11
@yeager-eren yeager-eren marked this pull request as draft July 25, 2025 12:11
@yeager-eren yeager-eren force-pushed the chore/rf-2536-changelog-script branch from 23b66df to c02ecdc Compare July 25, 2025 12:13
@yeager-eren yeager-eren changed the title !WIP chore: refactor changelog script and make it an standalone script chore: refactor changelog script and make it an standalone script Jul 28, 2025
Copy link
Contributor

@arlert-armin arlert-armin left a comment

Choose a reason for hiding this comment

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

We have another issue with the conventional-recommended-bump package, which returns an empty object right now.

@yeager-eren yeager-eren marked this pull request as ready for review August 9, 2025 15:04
@nikaaru nikaaru self-assigned this Aug 10, 2025
Copy link
Contributor

@arlert-armin arlert-armin left a comment

Choose a reason for hiding this comment

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

LGTM

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.

3 participants