Skip to content

Commit e59543d

Browse files
designcodeclaude
andauthored
fix!: switch semantic-release to conventionalcommits preset (#96)
* fix!: switch semantic-release to conventionalcommits preset The default angular preset doesn't recognise the `!` syntax for breaking changes (its header regex is `^(\w*)(?:\((.*)\))?: (.*)$`, which doesn't allow `!`). As a result the `feat!:` commit from #95 was classified as "should not trigger a release" and the resulting prerelease was tagged v2.18.1-beta.1 instead of v3.0.0-beta.1. Switch both `@semantic-release/commit-analyzer` and `@semantic-release/release-notes-generator` to the `conventionalcommits` preset, which parses `feat!:` / `fix!:` and emits a proper BREAKING CHANGE note. Add `conventional-changelog-conventionalcommits` as a dev dependency so semantic-release can load the preset. BREAKING CHANGE: `tigris buckets set-ttl`, `tigris buckets set-transition` and the `tigris forks` command group were removed in #95. Use `tigris buckets lifecycle list/create/edit` for lifecycle rules and `tigris buckets create --fork-of` / `tigris buckets list --forks-of` for forks instead. Each removed entry now exits with a redirect message pointing at the replacement. BREAKING CHANGE: The `--region` and `--consistency` flags on `tigris mk`, `tigris buckets create` and `tigris buckets set` were removed. Use `--locations` instead. The flags now exit with a redirect message. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * fix: hoist breaking-change rule above type-specific releaseRules Custom releaseRules are matched before the preset defaults; the existing `{ type: "refactor", release: "patch" }` rule would shadow the preset's `{ breaking: true, release: "major" }` for any `refactor!:` commit (or future custom type rules covering a type that also carries a BREAKING CHANGE note). Add an explicit breaking rule at the top so breaking-change detection always wins regardless of type. Documented gotcha: semantic-release/commit-analyzer#413 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 26dfed6 commit e59543d

2 files changed

Lines changed: 13 additions & 1 deletion

File tree

package-lock.json

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,15 +76,25 @@
7676
[
7777
"@semantic-release/commit-analyzer",
7878
{
79+
"preset": "conventionalcommits",
7980
"releaseRules": [
81+
{
82+
"breaking": true,
83+
"release": "major"
84+
},
8085
{
8186
"type": "refactor",
8287
"release": "patch"
8388
}
8489
]
8590
}
8691
],
87-
"@semantic-release/release-notes-generator",
92+
[
93+
"@semantic-release/release-notes-generator",
94+
{
95+
"preset": "conventionalcommits"
96+
}
97+
],
8898
"@semantic-release/github",
8999
"@semantic-release/npm"
90100
]
@@ -105,6 +115,7 @@
105115
"@commitlint/config-conventional": "^20.5.0",
106116
"@eslint/js": "^10.0.1",
107117
"@types/node": "^22.19.11",
118+
"conventional-changelog-conventionalcommits": "^9.3.1",
108119
"dotenv": "^17.4.2",
109120
"eslint": "^10.2.1",
110121
"eslint-plugin-simple-import-sort": "^13.0.0",

0 commit comments

Comments
 (0)