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

docs(release): document __INVALID__ conventional commit type #30124

Merged
merged 1 commit into from
Feb 26, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -148,3 +148,34 @@ If you want to use custom, non-standard conventional commit types, you can defin
}
}
```

## Including Invalid Commits in the Changelog

Nx Release ignores all commits that do not conform to the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/#summary) standard by default. A special `__INVALID__` type is available in situations where you want to process invalid messages.

{% callout type="warning" title="Invalid != Unmatched" %}
It's worth noting that this type will only include **invalid** commits. _e.g. those that do not follow the `<type>: <message>...` format._ Commits that are otherwise valid, but with a type that is not enabled, will not be matched by this group.
{% /callout %}

This can be useful in cases where you have not managed to be consistent with your use of the Conventional Commits standard (e.g. when applying it retroactively to an existing codebase) but still want a changelog to be generated with the contents of each commit message and/or for invalid commits to still affect project versioning.

{% callout type="info" title="Alternative to Conventional Commits" %}
If you cannot adhere to the Conventional Commits standard for your commits, file based versioning via Nx Release Version Plans could be a good alternative for managing your releases. See our docs on [File Based Versioning](/recipes/nx-release/file-based-versioning-version-plans) for more information.
{% /callout %}

```json {% fileName="nx.json" %}
{
"release": {
"conventionalCommits": {
"types": {
"__INVALID__": {
"semverBump": "patch", // Note: the default is "none"
"changelog": {
"title": "Uncategorized changes"
}
}
}
}
}
}
```