From aaf3f0217adac2990b4f8c4b10d92c735b798dc5 Mon Sep 17 00:00:00 2001 From: michael faith Date: Wed, 25 Dec 2024 17:50:44 -0600 Subject: [PATCH] fix: don't include chore PRs in changelog This change adjusts the release-it config for both this repo, as well as what the create script generates, so that only three categories of changes are included in the changelog entries: feat, fix, and perf. The idea being that these are the only three types of changes that are generally user-facing. --- .release-it.json | 23 ++++++++++++++++++++++- package.json | 4 ++-- src/next/blocks/blockReleaseIt.ts | 12 ++++++++++++ src/steps/writing/creation/rootFiles.ts | 12 ++++++++++++ 4 files changed, 48 insertions(+), 3 deletions(-) diff --git a/.release-it.json b/.release-it.json index 2b95facce..4487bd3e7 100644 --- a/.release-it.json +++ b/.release-it.json @@ -12,7 +12,28 @@ "plugins": { "@release-it/conventional-changelog": { "infile": "CHANGELOG.md", - "preset": "angular" + "preset": "angular", + "types": [ + { + "type": "feat", + "section": "Features" + }, + { + "type": "fix", + "section": "Bug Fixes" + }, + { + "type": "perf", + "section": "Performance Improvements" + }, + { "type": "build", "hidden": true }, + { "type": "chore", "hidden": true }, + { "type": "ci", "hidden": true }, + { "type": "docs", "hidden": true }, + { "type": "refactor", "hidden": true }, + { "type": "style", "hidden": true }, + { "type": "test", "hidden": true } + ] } } } diff --git a/package.json b/package.json index ec3150ee3..bba77467b 100644 --- a/package.json +++ b/package.json @@ -32,8 +32,8 @@ "lint:spelling": "cspell \"**\" \".github/**/*\"", "prepare": "husky", "test": "vitest", - "test:create": "npx tsx script/create-test-e2e.ts", - "test:initialize": "npx tsx script/initialize-test-e2e.ts", + "test:create": "tsx script/create-test-e2e.ts", + "test:initialize": "tsx script/initialize-test-e2e.ts", "test:migrate": "vitest run -r script/", "tsc": "tsc" }, diff --git a/src/next/blocks/blockReleaseIt.ts b/src/next/blocks/blockReleaseIt.ts index 59747744a..29d4e2d01 100644 --- a/src/next/blocks/blockReleaseIt.ts +++ b/src/next/blocks/blockReleaseIt.ts @@ -132,6 +132,18 @@ export const blockReleaseIt = base.createBlock({ "@release-it/conventional-changelog": { infile: "CHANGELOG.md", preset: "angular", + types: [ + { section: "Features", type: "feat" }, + { section: "Bug Fixes", type: "fix" }, + { section: "Performance Improvements", type: "perf" }, + { hidden: true, type: "build" }, + { hidden: true, type: "chore" }, + { hidden: true, type: "ci" }, + { hidden: true, type: "docs" }, + { hidden: true, type: "refactor" }, + { hidden: true, type: "style" }, + { hidden: true, type: "test" }, + ], }, }, }), diff --git a/src/steps/writing/creation/rootFiles.ts b/src/steps/writing/creation/rootFiles.ts index 85cadb5d5..95e669f3c 100644 --- a/src/steps/writing/creation/rootFiles.ts +++ b/src/steps/writing/creation/rootFiles.ts @@ -68,6 +68,18 @@ export async function createRootFiles(options: Options) { "@release-it/conventional-changelog": { infile: "CHANGELOG.md", preset: "angular", + types: [ + { section: "Features", type: "feat" }, + { section: "Bug Fixes", type: "fix" }, + { section: "Performance Improvements", type: "perf" }, + { hidden: true, type: "build" }, + { hidden: true, type: "chore" }, + { hidden: true, type: "ci" }, + { hidden: true, type: "docs" }, + { hidden: true, type: "refactor" }, + { hidden: true, type: "style" }, + { hidden: true, type: "test" }, + ], }, }, }),