Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ AGENTS.local.md
docs/superpowers/
outputs/

# The Changesets release-PR action expects package-local changelogs, but this
# repository intentionally keeps the canonical changelog at the root. The
# version script creates these as ignored CI compatibility files.
plugins/*/CHANGELOG.md

# Editor / OS
.DS_Store
Thumbs.db
Expand Down
13 changes: 13 additions & 0 deletions scripts/version-packages.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,16 @@ const updated = changelog.replace(
'## [Unreleased]\n\n' + releaseSection,
);
fs.writeFileSync(changelogPath, updated);

// Changesets' release-PR action reads a CHANGELOG.md beside every changed
// package while building the PR body, even when the repo's Changesets config
// disables package changelogs. Keep the canonical content at the root and
// create ignored compatibility files for that action only.
for (const packageJsonPath of packagePaths) {
const packageChangelogPath = path.join(
root,
path.dirname(packageJsonPath),
'CHANGELOG.md',
);
fs.writeFileSync(packageChangelogPath, `# Changelog\n\n${releaseSection}`);
}