From bf1fd72f3bcb137124081117fbe1a5ac76842764 Mon Sep 17 00:00:00 2001 From: David Date: Mon, 29 Jan 2024 21:52:07 +0100 Subject: [PATCH 1/2] fix: [#1] Fixes problem with calculating next version --- src/ConventionalCommitVersion.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/ConventionalCommitVersion.ts b/src/ConventionalCommitVersion.ts index 9a6de07..d66aa87 100644 --- a/src/ConventionalCommitVersion.ts +++ b/src/ConventionalCommitVersion.ts @@ -37,12 +37,12 @@ export default class ConventionalCommitVersion { for (const commit of commits.split(/[\n\r]/gm)) { const parts = commit.trim().split(':'); - if (parts.length === 1 && !commit.startsWith('Merge ')) { - if (parts[0]) { + if (parts.length === 1) { + if (parts[0] && !commit.startsWith('Merge ')) { change.patch = true; } } else { - const type = parts[0]; + const type = parts[0].split('[')[0]; switch (type) { case 'BREAKING CHANGE': change.major = true; @@ -53,6 +53,11 @@ export default class ConventionalCommitVersion { case 'fix': change.patch = true; break; + case 'chore': + break; + default: + change.patch = true; + break; } } } From 95c8aa01d538fb6ce4fe7629f8cac8fd436d9323 Mon Sep 17 00:00:00 2001 From: David Date: Mon, 29 Jan 2024 21:54:38 +0100 Subject: [PATCH 2/2] fix: [#1] Fixes problem with linting --- .lintignore => .eslintignore | 1 + 1 file changed, 1 insertion(+) rename .lintignore => .eslintignore (91%) diff --git a/.lintignore b/.eslintignore similarity index 91% rename from .lintignore rename to .eslintignore index 7e00cb6..862af41 100755 --- a/.lintignore +++ b/.eslintignore @@ -1,6 +1,7 @@ **/node_modules **/tmp **/lib +.turbo .eslintrc.cjs .prettierrc.cjs vitest.config.ts \ No newline at end of file