From 1098f6ff58f372ad5247f1e97ef1792536575812 Mon Sep 17 00:00:00 2001 From: David Oyinbo Date: Mon, 25 May 2026 21:46:29 +0100 Subject: [PATCH] fix: support feat! breaking change notation in semantic-release Add parserOpts to commit-analyzer so feat!: and feat(scope)!: are recognized as breaking changes and trigger a major bump. Angular preset v8 headerPattern lacks ! support by default. Co-Authored-By: Claude Sonnet 4.6 --- release.config.js | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/release.config.js b/release.config.js index 06b4120..627846c 100644 --- a/release.config.js +++ b/release.config.js @@ -1,18 +1,13 @@ export default { branches: [{ name: "v1", channel: "v1" }, "main"], plugins: [ - [ - "@semantic-release/commit-analyzer", - { - preset: "conventionalcommits", // 👈 Add this + ["@semantic-release/commit-analyzer", { + parserOpts: { + headerPattern: /^(\w*)(?:\((.*)\))?!?: (.*)$/, + breakingHeaderPattern: /^(\w*)(?:\((.*)\))?!: (.*)$/, + headerCorrespondence: ["type", "scope", "subject"], }, - ], - [ - "@semantic-release/release-notes-generator", - { - preset: "conventionalcommits", // 👈 Add this for consistent notes - }, - ], + }], "@semantic-release/release-notes-generator", [ "@semantic-release/changelog",