From 2790b658ddd42595ebb1c6b4050920142a926757 Mon Sep 17 00:00:00 2001 From: George Choustoulakis Date: Wed, 21 Feb 2024 13:05:36 +0100 Subject: [PATCH 1/2] Reformat dependency updates in changelog --- .changeset/format.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.changeset/format.js b/.changeset/format.js index 1e62dba8..78859f86 100644 --- a/.changeset/format.js +++ b/.changeset/format.js @@ -22,9 +22,9 @@ const getDependencyReleaseLine = async (changesets, dependenciesUpdated, changel if (dependenciesUpdated.length === 0) return ""; const updatedDependenciesList = dependenciesUpdated.map( - (dependency) => ` - ${dependency.name}@${dependency.newVersion}` + (dependency) => `- ${dependency.name}@${dependency.newVersion}` ); - return [['- Updated dependencies:'], ...updatedDependenciesList].join("\n"); + return `\n### 📦 Dependency Updates\n\n${updatedDependenciesList.join("\n")}`; } /** From 70af81cd738b59385cbd3caffa0e106c92150677 Mon Sep 17 00:00:00 2001 From: George Choustoulakis Date: Wed, 21 Feb 2024 13:08:17 +0100 Subject: [PATCH 2/2] Remove empty changelog sections --- .changeset/post-process.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.changeset/post-process.js b/.changeset/post-process.js index 122025cb..b512a3e5 100644 --- a/.changeset/post-process.js +++ b/.changeset/post-process.js @@ -8,6 +8,8 @@ for (const workspace of require('../package.json').workspaces) { changelog = changelog .replace(/^### Major Changes/gm, '### 💥 Breaking Changes') .replace(/^### Minor Changes/gm, '### ✨ Features') - .replace(/^### Patch Changes/gm, '### 🐛 Issues'); + .replace(/^### Patch Changes/gm, '### 🐛 Issues') + // Remove empty sections + .replace(/\n### ([^\n]+)\n\n###/g, '\n###'); fs.writeFileSync(changelogPath, changelog); }