@oorabona/release-it-preset 0.12.0 → 0.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -95,7 +95,41 @@ export function parseCommitsWithMultiplePrefixes(gitOutput, repoUrl) {
|
|
|
95
95
|
}
|
|
96
96
|
if (sha && body) {
|
|
97
97
|
const shortSha = sha.trim().substring(0, 7);
|
|
98
|
-
|
|
98
|
+
// Compute the header block: first contiguous run of non-empty lines.
|
|
99
|
+
// This prevents paragraph-separated footer tokens like "Refs: #42" or
|
|
100
|
+
// "Co-authored-by: ..." from matching the conventional-commit regex
|
|
101
|
+
// via the 'gm' flag in extractConventionalCommitParts. AC#5 (consecutive
|
|
102
|
+
// multi-prefix lines) is preserved because those lines share no blank line.
|
|
103
|
+
const headerBlock = body.split('\n').reduce((acc, line) => {
|
|
104
|
+
if (!acc.done) {
|
|
105
|
+
if (line.trim() === '') {
|
|
106
|
+
acc.done = true;
|
|
107
|
+
}
|
|
108
|
+
else {
|
|
109
|
+
acc.lines.push(line);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
return acc;
|
|
113
|
+
}, { lines: [], done: false }).lines.join('\n');
|
|
114
|
+
const parts = extractConventionalCommitParts(headerBlock, shortSha);
|
|
115
|
+
// Detect "BREAKING CHANGE:" trailer in the full body (not just header).
|
|
116
|
+
// This handles the footer-style breaking annotation per Conventional Commits spec.
|
|
117
|
+
const breakingFooterMatch = /^BREAKING[- ]CHANGE:\s*(.+)/m.exec(body);
|
|
118
|
+
if (breakingFooterMatch) {
|
|
119
|
+
if (parts.length > 0) {
|
|
120
|
+
// Promote the first emitted part to breaking.
|
|
121
|
+
parts[0] = { ...parts[0], breaking: true };
|
|
122
|
+
}
|
|
123
|
+
else {
|
|
124
|
+
// No leading conventional prefix found; emit a standalone breaking entry.
|
|
125
|
+
parts.push({
|
|
126
|
+
type: 'misc',
|
|
127
|
+
description: breakingFooterMatch[1].trim(),
|
|
128
|
+
sha: shortSha,
|
|
129
|
+
breaking: true,
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
}
|
|
99
133
|
if (parts.length === 0) {
|
|
100
134
|
const firstLine = body.split('\n')[0].trim();
|
|
101
135
|
if (firstLine) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oorabona/release-it-preset",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Shared release-it
|
|
3
|
+
"version": "0.13.1",
|
|
4
|
+
"description": "Shared release-it preset with OIDC trusted publishing, smart npm dist-tag selection, and monorepo per-package changelog support",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"release-it",
|
|
@@ -9,7 +9,16 @@
|
|
|
9
9
|
"version",
|
|
10
10
|
"changelog",
|
|
11
11
|
"conventional-commits",
|
|
12
|
-
"keep-a-changelog"
|
|
12
|
+
"keep-a-changelog",
|
|
13
|
+
"monorepo",
|
|
14
|
+
"npm-publish",
|
|
15
|
+
"provenance",
|
|
16
|
+
"oidc",
|
|
17
|
+
"trusted-publishing",
|
|
18
|
+
"github-actions",
|
|
19
|
+
"automation",
|
|
20
|
+
"typescript",
|
|
21
|
+
"semver"
|
|
13
22
|
],
|
|
14
23
|
"author": "Olivier Orabona",
|
|
15
24
|
"license": "MIT",
|