From 19a862c0a7d83c6a1bb3df42925bca52e35214f3 Mon Sep 17 00:00:00 2001 From: Klein Petr Date: Thu, 19 Sep 2024 13:47:00 +0200 Subject: [PATCH] fix: lowercase scope when filtering (#199) --- src/commands/default.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/commands/default.ts b/src/commands/default.ts index 7a47357..185c909 100644 --- a/src/commands/default.ts +++ b/src/commands/default.ts @@ -41,11 +41,13 @@ export default async function defaultMain(args: Argv) { const rawCommits = await getGitDiff(config.from, config.to); // Parse commits as conventional commits - const commits = parseCommits(rawCommits, config).filter( - (c) => - config.types[c.type] && - !(c.type === "chore" && c.scope === "deps" && !c.isBreaking) - ); + const commits = parseCommits(rawCommits, config) + .map((c) => ({ ...c, type: c.type.toLowerCase() /* #198 */ })) + .filter( + (c) => + config.types[c.type] && + !(c.type === "chore" && c.scope === "deps" && !c.isBreaking) + ); // Shortcut for canary releases if (args.canary) {