From 71d15a68c1ca5de2055ad8c1ad9fc47608022a53 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 21 Nov 2018 17:27:27 +0000 Subject: immediately return the patch incremented version if no changelog entries exist --- packages/monorepo-scripts/src/utils/utils.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/monorepo-scripts/src/utils/utils.ts b/packages/monorepo-scripts/src/utils/utils.ts index 44ff971e8..95b187cc2 100644 --- a/packages/monorepo-scripts/src/utils/utils.ts +++ b/packages/monorepo-scripts/src/utils/utils.ts @@ -91,6 +91,7 @@ export const utils = { const changelog = changelogUtils.getChangelogOrCreateIfMissing(packageName, packageLocation); if (_.isEmpty(changelog)) { nextVersionIfValid = semver.inc(currentVersion, 'patch'); + return nextVersionIfValid as string; } const lastEntry = changelog[0]; if (semver.gt(currentVersion, lastEntry.version)) { -- cgit v1.2.3