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(core): support changelog customizations and project changelogs #19704

Merged
merged 2 commits into from
Oct 20, 2023

Conversation

JamesHenry
Copy link
Collaborator

@JamesHenry JamesHenry commented Oct 18, 2023

Current Behavior

release config is not included in the JSON schema

AND

  • It's not possible to customize generated changelogs in any way
  • It's not possible to have project level changelogs
  • It's not possible to set version config at the root of release config to be shared across all groups
  • It's not possible to set createRelease or the tag pattern to use for releases in config
  • It's not possible to create github releases per project

Expected Behavior

release config is included in the JSON schema

AND

As of this PR, you can now:

  • Fully customize changelogs via providing a custom renderer implementation which takes parsed commits and other metadata and returns the contents
  • Tweak the renderer's output via renderOptions (added one includeAuthors option for now for our built in renderer)
  • Set version config at the root of release config to be shared across all groups
  • Set createRelease, file and releaseTagPattern at both the root and group level of config
  • Create github releases per project (this will be much more applicable once we support independently versioned projects)

NOTE: There are breaking changes to the supported CLI arguments for nx release changelog:

  • --file, --tag-version-prefix and --create-release no longer exist (replaced by config options)
  • --interactive is no longer a boolean, it takes in an enum string of either all, workspace or projects to control which projects you want to run interactively

image

^ custom releaseTagPattern per group and project level github releases in action on this branch

@vercel
Copy link

vercel bot commented Oct 18, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Updated (UTC)
nx-dev ⬜️ Ignored (Inspect) Visit Preview Oct 20, 2023 7:17pm



+ ## v999.9.9
+ ## 999.9.9
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It was previously unintentional to have the v prefix within the changelog contents, other tools don't do it, so this small change is a fix really

@@ -122,10 +123,10 @@ describe('nx release', () => {
const changelogOutput = runCLI(`release changelog 999.9.9`);
expect(changelogOutput).toMatchInlineSnapshot(`

> NX Generating a CHANGELOG.md entry for v999.9.9
> NX Generating an entry in CHANGELOG.md for v999.9.9
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I switched round the structure of the log, because now that the path is fully customizable it could end up being reasonably long (depending on the level of nesting within the tree) and for longer paths it reads better this new way round




> NX Previewing a Github release and an entry in {project-name}/CHANGELOG.md for {project-name}@v1000.0.0-next.0
Copy link
Collaborator Author

@JamesHenry JamesHenry Oct 18, 2023

Choose a reason for hiding this comment

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

Just a reminder that the {project-name} here is normalized by the e2e snapshot serializer. I verified this produces the correct project name in real usage

@JamesHenry JamesHenry enabled auto-merge (squash) October 20, 2023 19:59
@FrozenPandaz FrozenPandaz disabled auto-merge October 20, 2023 20:26
@FrozenPandaz FrozenPandaz merged commit 3942332 into nrwl:master Oct 20, 2023
2 checks passed
@JamesHenry JamesHenry deleted the individual-changelogs branch October 21, 2023 17:30
@github-actions
Copy link

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants