From e7bc14d1acadee09acebca410f9a122f51e3f7a2 Mon Sep 17 00:00:00 2001 From: Jens Meisner Date: Tue, 17 Nov 2026 16:41:08 +0100 Subject: [PATCH 1/2] build: Group and deduplicate release notes by change type Changesets writes a changeset that affects several packages into each package's changelog. Because of this, the aggregated release notes listed the same entry once per package. - Collect entries from all package changelogs into one Major, Minor and Patch section each. - Deduplicate entries by changeset hash. - Still skip dependency-only updates. - Add an empty changeset, since no package is released. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .changeset/funny-insects-relate.md | 2 + scripts/release-notes.mjs | 75 ++++++++++++++++-------------- 2 files changed, 42 insertions(+), 35 deletions(-) create mode 100644 .changeset/funny-insects-relate.md diff --git a/.changeset/funny-insects-relate.md b/.changeset/funny-insects-relate.md new file mode 100644 index 0000000000..a845151cc8 --- /dev/null +++ b/.changeset/funny-insects-relate.md @@ -0,0 +1,2 @@ +--- +--- diff --git a/scripts/release-notes.mjs b/scripts/release-notes.mjs index 7cde083523..1d70bfaec1 100644 --- a/scripts/release-notes.mjs +++ b/scripts/release-notes.mjs @@ -3,8 +3,8 @@ * Assembles the notes of the single GitHub release `vX.Y.Z` from the `## X.Y.Z` * sections of all package changelogs written by Changesets. * - * Packages whose section only lists dependency updates are skipped: in the fixed - * versioning group every package is bumped, but most of them without own changes. + * Entries are grouped by change type and deduplicated by changeset hash because a + * changeset affecting multiple packages appears in each package's changelog. * * Usage: node scripts/release-notes.mjs [packages-dir] */ @@ -37,35 +37,42 @@ const isDependencyUpdate = (entry) => /^- Updated dependencies\b/.test(entry[0]) || entry.filter((line) => line.trim() !== "").every((line) => /^\s*- \S+@\d\S*$/.test(line)); -/** - * Removes dependency update entries (including their nested list) and drops `###` - * subsections that end up empty. - */ -const withoutDependencyUpdates = (section) => { - const subsections = []; - let current = { heading: undefined, entries: [] }; +const changeTypes = ["Major", "Minor", "Patch"]; +const entriesByChangeType = Object.fromEntries(changeTypes.map((type) => [type, []])); +const seenChangesetHashes = new Set(); + +const collectChangeEntries = (section) => { + let changeType; + let currentEntry; + const flushEntry = () => { + if (!currentEntry) { + return; + } + if (!isDependencyUpdate(currentEntry)) { + const hash = currentEntry[0].match(/^- ([a-f0-9]{7,40}):/i)?.[1].toLowerCase(); + if (!hash || !seenChangesetHashes.has(hash)) { + entriesByChangeType[changeType].push(currentEntry.join("\n").trimEnd()); + if (hash) { + seenChangesetHashes.add(hash); + } + } + } + currentEntry = undefined; + }; + for (const line of section.split("\n")) { if (/^###\s/.test(line)) { - subsections.push(current); - current = { heading: line, entries: [] }; - } else if (/^- /.test(line)) { - current.entries.push([line]); - } else if (current.entries.length > 0) { - current.entries.at(-1).push(line); + flushEntry(); + const heading = line.match(/^### (Major|Minor|Patch) Changes$/); + changeType = heading?.[1]; + } else if (changeType && /^- /.test(line)) { + flushEntry(); + currentEntry = [line]; + } else if (currentEntry) { + currentEntry.push(line); } } - subsections.push(current); - - return subsections - .map(({ heading, entries }) => ({ - heading, - entries: entries - .filter((entry) => !isDependencyUpdate(entry)) - .map((entry) => entry.join("\n").trimEnd()), - })) - .filter(({ entries }) => entries.length > 0) - .map(({ heading, entries }) => [heading, entries.join("\n\n")].filter(Boolean).join("\n\n")) - .join("\n\n"); + flushEntry(); }; const directories = (await readdir(packagesDir, { withFileTypes: true })) @@ -73,7 +80,6 @@ const directories = (await readdir(packagesDir, { withFileTypes: true })) .map((entry) => entry.name) .sort(); -const sections = []; for (const directory of directories) { let changelog; try { @@ -81,12 +87,11 @@ for (const directory of directories) { } catch { continue; } - const notes = withoutDependencyUpdates(extractSection(changelog, version)); - if (notes) { - sections.push(notes); - } + collectChangeEntries(extractSection(changelog, version)); } -process.stdout.write( - sections.length > 0 ? `${sections.join("\n\n")}\n` : "No changes besides dependency updates.\n", -); +const sections = changeTypes + .filter((type) => entriesByChangeType[type].length > 0) + .map((type) => `### ${type} Changes\n\n${entriesByChangeType[type].join("\n\n")}`); + +process.stdout.write(sections.length > 0 ? `${sections.join("\n\n")}\n` : "No changes besides dependency updates.\n"); From 513f339ea58ee47051c70789d0a5dabd2e4bb1b5 Mon Sep 17 00:00:00 2001 From: Jens Meisner Date: Wed, 18 Nov 2026 12:45:15 +0100 Subject: [PATCH 2/2] docs: Derive README version badges from package.json and pnpm-workspace.yaml The Node.js, pnpm, TypeScript and CKEditor badges were hardcoded and had fallen far behind (e.g. pnpm 8.6.9 instead of 11.28.8). They are now shields.io dynamic badges that read engines.node/engines.pnpm from package.json and catalog.typescript/catalog.ckeditor5 from pnpm-workspace.yaml on main, so they no longer need manual updates. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index eefa9ab082..4d7b1e35e8 100644 --- a/README.md +++ b/README.md @@ -237,13 +237,13 @@ implements the described behavior. [badge:license:Apache2]: -[badge:engine:nodejs]: +[badge:engine:nodejs]: -[badge:engine:pnpm]: +[badge:engine:pnpm]: -[badge:lang:typescript]: +[badge:lang:typescript]: -[badge:ckeditor]: +[badge:ckeditor]: [CKEditor 4]: "CKEditor 4 | Visual Text Editor for HTML"