Skip to content

Commit 62846d9

Browse files
committed
chore: remove accidental breaking change wording from triggering sem rel as breaking
1 parent 419e905 commit 62846d9

11 files changed

Lines changed: 250 additions & 228 deletions

File tree

apps/cli/.releaserc.cjs

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
/* eslint-env node */
2+
const {
3+
createCommitAnalyzer,
4+
createReleaseNotesGenerator,
5+
} = require('../../scripts/semantic-release/strict-breaking-parser.cjs');
6+
27
/*
38
* Commit filter: CLI bundles multiple sub-packages, so git log must include
49
* commits touching any of them. This shared helper patches git-log-parser to
@@ -26,20 +31,16 @@ const branches = [
2631
{ name: 'main', prerelease: 'next', channel: 'next' },
2732
];
2833

29-
const isPrerelease = branches.some(
30-
(b) => typeof b === 'object' && b.name === branch && b.prerelease,
31-
);
34+
const isPrerelease = branches.some((b) => typeof b === 'object' && b.name === branch && b.prerelease);
3235

3336
// Use AI-powered notes for stable releases, conventional generator for prereleases
34-
const notesPlugin = isPrerelease
35-
? '@semantic-release/release-notes-generator'
36-
: ['semantic-release-ai-notes', { style: 'concise' }];
37+
const notesPlugin = isPrerelease ? createReleaseNotesGenerator() : ['semantic-release-ai-notes', { style: 'concise' }];
3738

3839
const config = {
3940
branches,
4041
tagFormat: 'cli-v${version}',
4142
plugins: [
42-
'@semantic-release/commit-analyzer',
43+
createCommitAnalyzer(),
4344
notesPlugin,
4445
['@semantic-release/npm', { npmPublish: false }],
4546
[

apps/create/.releaserc.cjs

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
/* eslint-env node */
2+
const {
3+
createCommitAnalyzer,
4+
createReleaseNotesGenerator,
5+
} = require('../../scripts/semantic-release/strict-breaking-parser.cjs');
6+
27
const branch = process.env.GITHUB_REF_NAME || process.env.CI_COMMIT_BRANCH;
38

49
const branches = [
@@ -8,19 +13,12 @@ const branches = [
813

914
const isPrerelease = branches.some((b) => typeof b === 'object' && b.name === branch && b.prerelease);
1015

11-
const notesPlugin = isPrerelease
12-
? '@semantic-release/release-notes-generator'
13-
: ['semantic-release-ai-notes', { style: 'concise' }];
16+
const notesPlugin = isPrerelease ? createReleaseNotesGenerator() : ['semantic-release-ai-notes', { style: 'concise' }];
1417

1518
const config = {
1619
branches,
1720
tagFormat: 'create-v${version}',
18-
plugins: [
19-
'semantic-release-commit-filter',
20-
'@semantic-release/commit-analyzer',
21-
notesPlugin,
22-
['@semantic-release/npm'],
23-
],
21+
plugins: ['semantic-release-commit-filter', createCommitAnalyzer(), notesPlugin, ['@semantic-release/npm']],
2422
};
2523

2624
if (!isPrerelease) {
@@ -33,18 +31,22 @@ if (!isPrerelease) {
3331
]);
3432
}
3533

36-
config.plugins.push(['semantic-release-linear-app', {
37-
teamKeys: ['SD'],
38-
addComment: true,
39-
packageName: 'create',
40-
commentTemplate: 'shipped in {package} {releaseLink} {channel}'
41-
}]);
34+
config.plugins.push([
35+
'semantic-release-linear-app',
36+
{
37+
teamKeys: ['SD'],
38+
addComment: true,
39+
packageName: 'create',
40+
commentTemplate: 'shipped in {package} {releaseLink} {channel}',
41+
},
42+
]);
4243

4344
config.plugins.push([
4445
'@semantic-release/github',
4546
{
46-
successComment: ':tada: This ${issue.pull_request ? "PR" : "issue"} is included in **@superdoc-dev/create** v${nextRelease.version}\n\nThe release is available on [GitHub release](${releases.find(release => release.pluginName === "@semantic-release/github").url})',
47-
}
47+
successComment:
48+
':tada: This ${issue.pull_request ? "PR" : "issue"} is included in **@superdoc-dev/create** v${nextRelease.version}\n\nThe release is available on [GitHub release](${releases.find(release => release.pluginName === "@semantic-release/github").url})',
49+
},
4850
]);
4951

5052
module.exports = config;

apps/mcp/.releaserc.cjs

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
/* eslint-env node */
2+
const {
3+
createCommitAnalyzer,
4+
createReleaseNotesGenerator,
5+
} = require('../../scripts/semantic-release/strict-breaking-parser.cjs');
6+
27
/*
38
* Commit filter: MCP depends on SDK (workspace:*) and imports engine/session
49
* code directly. Git log must include commits touching those paths so MCP
@@ -33,18 +38,12 @@ const branches = [
3338
const isPrerelease = branches.some((b) => typeof b === 'object' && b.name === branch && b.prerelease);
3439

3540
// Use AI-powered notes for stable releases, conventional generator for prereleases
36-
const notesPlugin = isPrerelease
37-
? '@semantic-release/release-notes-generator'
38-
: ['semantic-release-ai-notes', { style: 'concise' }];
41+
const notesPlugin = isPrerelease ? createReleaseNotesGenerator() : ['semantic-release-ai-notes', { style: 'concise' }];
3942

4043
const config = {
4144
branches,
4245
tagFormat: 'mcp-v${version}',
43-
plugins: [
44-
'@semantic-release/commit-analyzer',
45-
notesPlugin,
46-
['@semantic-release/npm'],
47-
],
46+
plugins: [createCommitAnalyzer(), notesPlugin, ['@semantic-release/npm']],
4847
};
4948

5049
if (!isPrerelease) {
@@ -58,18 +57,22 @@ if (!isPrerelease) {
5857
}
5958

6059
// Linear integration - labels issues with version on release
61-
config.plugins.push(['semantic-release-linear-app', {
62-
teamKeys: ['SD'],
63-
addComment: true,
64-
packageName: 'mcp',
65-
commentTemplate: 'shipped in {package} {releaseLink} {channel}'
66-
}]);
60+
config.plugins.push([
61+
'semantic-release-linear-app',
62+
{
63+
teamKeys: ['SD'],
64+
addComment: true,
65+
packageName: 'mcp',
66+
commentTemplate: 'shipped in {package} {releaseLink} {channel}',
67+
},
68+
]);
6769

6870
config.plugins.push([
6971
'@semantic-release/github',
7072
{
71-
successComment: ':tada: This ${issue.pull_request ? "PR" : "issue"} is included in **@superdoc-dev/mcp** v${nextRelease.version}\n\nThe release is available on [GitHub release](${releases.find(release => release.pluginName === "@semantic-release/github").url})',
72-
}
73+
successComment:
74+
':tada: This ${issue.pull_request ? "PR" : "issue"} is included in **@superdoc-dev/mcp** v${nextRelease.version}\n\nThe release is available on [GitHub release](${releases.find(release => release.pluginName === "@semantic-release/github").url})',
75+
},
7376
]);
7477

7578
module.exports = config;

apps/vscode-ext/.releaserc.cjs

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
/* eslint-env node */
2+
const {
3+
createCommitAnalyzer,
4+
createReleaseNotesGenerator,
5+
} = require('../../scripts/semantic-release/strict-breaking-parser.cjs');
6+
27
/*
38
* Commit filter: vscode-ext bundles superdoc, so git log must include
49
* commits touching superdoc's sub-packages. This shared helper patches
@@ -29,29 +34,24 @@ const branches = [
2934
const isPrerelease = branches.some((b) => typeof b === 'object' && b.name === branch && b.prerelease);
3035

3136
// Use AI-powered notes for stable releases, conventional generator for prereleases
32-
const notesPlugin = isPrerelease
33-
? '@semantic-release/release-notes-generator'
34-
: ['semantic-release-ai-notes', { style: 'concise' }];
37+
const notesPlugin = isPrerelease ? createReleaseNotesGenerator() : ['semantic-release-ai-notes', { style: 'concise' }];
3538

3639
const config = {
3740
branches,
3841
tagFormat: 'vscode-v${version}',
3942
plugins: [
40-
[
41-
'@semantic-release/commit-analyzer',
42-
{
43-
// Cap at minor — the extension bundles superdoc, so upstream breaking
44-
// changes don't break the extension's public API (it has none).
45-
// Prevents accidental major bumps from superdoc feat!/BREAKING CHANGE commits.
46-
releaseRules: [
47-
{ breaking: true, release: 'minor' },
48-
{ type: 'feat', release: 'minor' },
49-
{ type: 'fix', release: 'patch' },
50-
{ type: 'perf', release: 'patch' },
51-
{ type: 'revert', release: 'patch' },
52-
],
53-
},
54-
],
43+
createCommitAnalyzer({
44+
// Cap at minor — the extension bundles superdoc, so upstream breaking
45+
// changes don't break the extension's public API (it has none).
46+
// Prevents accidental major bumps from superdoc feat!/BREAKING CHANGE commits.
47+
releaseRules: [
48+
{ breaking: true, release: 'minor' },
49+
{ type: 'feat', release: 'minor' },
50+
{ type: 'fix', release: 'patch' },
51+
{ type: 'perf', release: 'patch' },
52+
{ type: 'revert', release: 'patch' },
53+
],
54+
}),
5555
notesPlugin,
5656
['semantic-release-pnpm', { npmPublish: false }], // Version bump only, handles workspace:* versions
5757
],

packages/esign/.releaserc.cjs

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
/* eslint-env node */
2+
const {
3+
createCommitAnalyzer,
4+
createReleaseNotesGenerator,
5+
} = require('../../scripts/semantic-release/strict-breaking-parser.cjs');
6+
27
/*
38
* Release narrow: esign externalizes `superdoc` in its build, so a core
49
* change does not alter the published esign tarball (consumers get the new
@@ -14,21 +19,17 @@ const branches = [
1419
{ name: 'main', prerelease: 'next', channel: 'next' },
1520
];
1621

17-
const isPrerelease = branches.some(
18-
(b) => typeof b === 'object' && b.name === branch && b.prerelease
19-
);
22+
const isPrerelease = branches.some((b) => typeof b === 'object' && b.name === branch && b.prerelease);
2023

2124
// Use AI-powered notes for stable releases, conventional generator for prereleases
22-
const notesPlugin = isPrerelease
23-
? '@semantic-release/release-notes-generator'
24-
: ['semantic-release-ai-notes', { style: 'concise' }];
25+
const notesPlugin = isPrerelease ? createReleaseNotesGenerator() : ['semantic-release-ai-notes', { style: 'concise' }];
2526

2627
const config = {
2728
branches,
2829
tagFormat: 'esign-v${version}',
2930
plugins: [
3031
'semantic-release-commit-filter',
31-
'@semantic-release/commit-analyzer',
32+
createCommitAnalyzer(),
3233
notesPlugin,
3334
['@semantic-release/npm', { npmPublish: true }],
3435
],
@@ -39,25 +40,28 @@ if (!isPrerelease) {
3940
'@semantic-release/git',
4041
{
4142
assets: ['package.json'],
42-
message:
43-
'chore(esign): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}',
43+
message: 'chore(esign): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}',
4444
},
4545
]);
4646
}
4747

4848
// Linear integration - labels issues with version on release
49-
config.plugins.push(['semantic-release-linear-app', {
50-
teamKeys: ['SD'],
51-
addComment: true,
52-
packageName: 'esign',
53-
commentTemplate: 'shipped in {package} {releaseLink} {channel}'
54-
}]);
49+
config.plugins.push([
50+
'semantic-release-linear-app',
51+
{
52+
teamKeys: ['SD'],
53+
addComment: true,
54+
packageName: 'esign',
55+
commentTemplate: 'shipped in {package} {releaseLink} {channel}',
56+
},
57+
]);
5558

5659
config.plugins.push([
5760
'@semantic-release/github',
5861
{
59-
successComment: ':tada: This ${issue.pull_request ? "PR" : "issue"} is included in **esign** v${nextRelease.version}\n\nThe release is available on [GitHub release](https://github.com/superdoc-dev/superdoc/releases/tag/${nextRelease.gitTag})',
60-
}
62+
successComment:
63+
':tada: This ${issue.pull_request ? "PR" : "issue"} is included in **esign** v${nextRelease.version}\n\nThe release is available on [GitHub release](https://github.com/superdoc-dev/superdoc/releases/tag/${nextRelease.gitTag})',
64+
},
6165
]);
6266

6367
module.exports = config;

packages/react/.releaserc.cjs

Lines changed: 23 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
/* eslint-env node */
2+
const {
3+
createCommitAnalyzer,
4+
createReleaseNotesGenerator,
5+
} = require('../../scripts/semantic-release/strict-breaking-parser.cjs');
6+
27
/*
38
* Commit filter: react declares `superdoc` in dependencies (not
49
* peerDependencies), so existing consumers with lockfiles won't pick up a
@@ -26,34 +31,27 @@ const branches = [
2631
{ name: 'main', prerelease: 'next', channel: 'next' },
2732
];
2833

29-
const isPrerelease = branches.some(
30-
(b) => typeof b === 'object' && b.name === branch && b.prerelease
31-
);
34+
const isPrerelease = branches.some((b) => typeof b === 'object' && b.name === branch && b.prerelease);
3235

3336
// Use AI-powered notes for stable releases, conventional generator for prereleases
34-
const notesPlugin = isPrerelease
35-
? '@semantic-release/release-notes-generator'
36-
: ['semantic-release-ai-notes', { style: 'concise' }];
37+
const notesPlugin = isPrerelease ? createReleaseNotesGenerator() : ['semantic-release-ai-notes', { style: 'concise' }];
3738

3839
const config = {
3940
branches,
4041
tagFormat: 'react-v${version}',
4142
plugins: [
42-
[
43-
'@semantic-release/commit-analyzer',
44-
{
45-
// Cap at minor — react declares superdoc in dependencies, so
46-
// upstream breaking changes don't break react's own public API.
47-
// Prevents accidental major bumps from superdoc feat!/BREAKING CHANGE commits.
48-
releaseRules: [
49-
{ breaking: true, release: 'minor' },
50-
{ type: 'feat', release: 'minor' },
51-
{ type: 'fix', release: 'patch' },
52-
{ type: 'perf', release: 'patch' },
53-
{ type: 'revert', release: 'patch' },
54-
],
55-
},
56-
],
43+
createCommitAnalyzer({
44+
// Cap at minor — react declares superdoc in dependencies, so
45+
// upstream breaking changes don't break react's own public API.
46+
// Prevents accidental major bumps from superdoc feat!/BREAKING CHANGE commits.
47+
releaseRules: [
48+
{ breaking: true, release: 'minor' },
49+
{ type: 'feat', release: 'minor' },
50+
{ type: 'fix', release: 'patch' },
51+
{ type: 'perf', release: 'patch' },
52+
{ type: 'revert', release: 'patch' },
53+
],
54+
}),
5755
notesPlugin,
5856
['semantic-release-pnpm', { npmPublish: false }],
5957
'../../scripts/publish-react.cjs',
@@ -65,8 +63,7 @@ if (!isPrerelease) {
6563
'@semantic-release/git',
6664
{
6765
assets: ['package.json'],
68-
message:
69-
'chore(react): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}',
66+
message: 'chore(react): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}',
7067
},
7168
]);
7269
}
@@ -77,8 +74,9 @@ config.plugins.push(['semantic-release-linear-app', { teamKeys: ['SD'], addComme
7774
config.plugins.push([
7875
'@semantic-release/github',
7976
{
80-
successComment: ':tada: This ${issue.pull_request ? "PR" : "issue"} is included in **@superdoc-dev/react** v${nextRelease.version}\n\nThe release is available on [GitHub release](https://github.com/superdoc-dev/superdoc/releases/tag/${nextRelease.gitTag})',
81-
}
77+
successComment:
78+
':tada: This ${issue.pull_request ? "PR" : "issue"} is included in **@superdoc-dev/react** v${nextRelease.version}\n\nThe release is available on [GitHub release](https://github.com/superdoc-dev/superdoc/releases/tag/${nextRelease.gitTag})',
79+
},
8280
]);
8381

8482
module.exports = config;

0 commit comments

Comments
 (0)