Skip to content

Commit

Permalink
docs(release): document __INVALID__ conventional commit type
Browse files Browse the repository at this point in the history
Co-authored-by: James Henry <james@henry.sc>
  • Loading branch information
llwt and JamesHenry committed Feb 25, 2025
1 parent a94bc76 commit 3be3301
Showing 1 changed file with 29 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -148,3 +148,32 @@ If you want to use custom, non-standard conventional commit types, you can defin
}
}
```

## Including Invalid Commits in the Changelog

Nx only includes commits in the changelog that match either the [default conventional commit types](https://github.com/nrwl/nx/blob/master/packages/nx/src/command-line/release/config/conventional-commits.ts) or types you've [added to your configuration](#defining-non-standard-commit-types).

You can configure Nx to include non-matching commits by adding the special `__INVALID__` type.

This can also 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="note" title="Alternative to Conventional Commits" %}
If you don't plan on using Conventional Commits, file based versioning via Version Plans is the recommended alternative for managing 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": "paths", // Note: the default is "none"
"changelog": {
"title": "Uncategorized changes"
}
}
}
}
}
}
```

0 comments on commit 3be3301

Please sign in to comment.