1110
rmSync(fakeBin, { recursive: true, force: true });
1111
}
1112
1113
+// Private workspaces still receive version bumps, but must never get release tags.
1114
+{
1115
+ const fixtureDir = mkdtempSync(join(tmpdir(), 'composio-private-release-'));
1116
+ const packages = [
1117
+ { directory: 'sdk', name: '@composio/core', private: false },
1118
+ { directory: 'example', name: 'release-example', private: true },
1119
+ { directory: 'test', name: '@e2e-tests/release', private: true },
1120
+ ];
1121
+ try {
1122
+ mkdirSync(join(fixtureDir, '.changeset'), { recursive: true });
1123
+ writeFileSync(
1124
+ join(fixtureDir, 'package.json'),
1125
+ JSON.stringify({ name: 'private-release-fixture', private: true, workspaces: ['packages/*'] })
1126
+ );
1127
+ writeFileSync(join(fixtureDir, 'pnpm-workspace.yaml'), "packages:\n - 'packages/*'\n");
1128
+ writeFileSync(
1129
+ join(fixtureDir, '.changeset/config.json'),
1130
+ JSON.stringify({ ...changesetConfig, changelog: false, fixed: [], ignore: [] })
1131
+ );
1132
+ writeFileSync(
1133
+ join(fixtureDir, '.changeset/release.md'),
1134
+ ['---', ...packages.map(pkg => `"${pkg.name}": patch`), '---', '', 'Release fixture.'].join(
1135
+ '\n'
1136
+ )
1137
+ );
1138
+ for (const pkg of packages) {
1139
+ const directory = join(fixtureDir, 'packages', pkg.directory);
1140
+ mkdirSync(directory, { recursive: true });
1141
+ writeFileSync(
1142
+ join(directory, 'package.json'),
1143
+ JSON.stringify({ name: pkg.name, version: '0.1.0', private: pkg.private })
1144
+ );
1145
+ }
1146
+ const commands = [
1147
+ [changesetBinPath, ['version']],
1148
+ ['git', ['init', '--quiet', '--initial-branch=next']],
1149
+ ['git', ['config', 'user.name', 'Release test']],
1150
+ ['git', ['config', 'user.email', 'release-test@example.invalid']],
1151
+ ['git', ['add', '.']],
1152
+ ['git', ['commit', '-qm', 'Prepare fixture']],
1153
+ ['git', ['tag', '@e2e-tests/release@0.1.0']],
1154
+ [changesetBinPath, ['tag']],
1155
+ ] as const;
1156
+ for (const [command, args] of commands) {
1157
+ const result = spawnSync(command, args, { cwd: fixtureDir, encoding: 'utf8' });
1158
+ if (result.status !== 0) {
1159
+ throw new Error(
1160
+ `private release fixture failed: ${command} ${args.join(' ')}\n${result.stderr}`
1161
+ );
1162
+ }
1163
+ }
1164
+ for (const pkg of packages) {
1165
+ const manifest = JSON.parse(
1166
+ readFileSync(join(fixtureDir, 'packages', pkg.directory, 'package.json'), 'utf8')
1167
+ );
1168
+ if (manifest.version !== '0.1.1') {
1169
+ throw new Error(`release must still version ${pkg.name}, got ${manifest.version}`);
1170
+ }
1171
+ }
1172
+ const tags = spawnSync('git', ['tag', '--list'], { cwd: fixtureDir, encoding: 'utf8' });
1173
+ if (
1174
+ tags.status !== 0 ||
1175
+ tags.stdout.trim() !== '@composio/core@0.1.1\n@e2e-tests/release@0.1.0'
1176
+ ) {
1177
+ throw new Error(
1178
+ `release must tag only public SDK updates and preserve existing tags, got:\n${tags.stdout}`
1179
+ );
1180
+ }
1181
+ } finally {
1182
+ rmSync(fixtureDir, { recursive: true, force: true });
1183
+ }
1184
+}
1185
+
1186
+if (!tsReleaseWorkflow.includes('create-github-releases: false')) {
1187
+ throw new Error('SDK publication must not create GitHub Releases; the CLI workflow owns them');
1188
+}
1189
+
1190
// A core minor release must not force every provider package to 1.0.0 while the
1191
// provider peer range still accepts the new core version. This protects the
1192
// @composio/core 0.10.0 → 0.11.0 release train from accidentally promoting