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(release): add conventional commits configurability for version and changelog #22004

Merged
merged 26 commits into from Mar 14, 2024

Conversation

fahslaj
Copy link
Contributor

@fahslaj fahslaj commented Feb 26, 2024

Current Behavior

  • nx release version will only use feat and fix commit types when determining the specifier (when specifierSource is conventional-commits). It will also always assume that fixes are patches and feats are minor bumps.
  • nx release changelog will only include feat, fix, and perf changes in changelogs.

Expected Behavior

  • nx release version will consider user configuration when picking the specifier when specifierSource is conventional-commits.
  • nx release changelog will consider user configuration when filtering commits to appear in the changelog. It will also consider the configured section title.

Copy link

vercel bot commented Feb 26, 2024

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

Name Status Preview Updated (UTC)
nx-dev ✅ Ready (Inspect) Visit Preview Mar 13, 2024 7:34pm

@fahslaj fahslaj requested review from a team as code owners March 1, 2024 20:46
@fahslaj fahslaj requested a review from isaacplmann March 1, 2024 20:46

## Configure Commit Types

Commit types are configured in the `release.conventionalCommits.types` property in `nx.json`:
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'd like it to be made clearer that this is an advanced case and that most folks are perfectly fine/happy with the default behavior and no configuration should be required for most people (i.e. should just be "conventionalCommits": true

Copy link
Contributor Author

@fahslaj fahslaj Mar 8, 2024

Choose a reason for hiding this comment

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

I can add something about this being an advanced use case, but I want to point out that the release.conventionalCommits property they are setting here is different than the existing release.version.conventionalCommits property that is frequently set to true to enable it for versioning. Most users will never set release.conventionalCommits, as its only valid value is an advanced config option outlined in this doc. It is invalid (and meaningless) for release.conventionalCommits to be set to true.

The reason there are two different properties is because this new one affects both version and changelog commands, so it didn't make sense to extend the existing release.version.conventionalCommits property to accept a configuration object.

packages/nx/schemas/nx-schema.json Outdated Show resolved Hide resolved
@fahslaj fahslaj merged commit cbb88f0 into nrwl:master Mar 14, 2024
6 checks passed
@fahslaj fahslaj deleted the feat/conventional-commits-config branch March 14, 2024 00:19
arekkubaczkowski pushed a commit to arekkubaczkowski/nx that referenced this pull request Mar 19, 2024
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 Mar 20, 2024
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.

None yet

3 participants