From a2c4cec27eb35c1fcbbd44b59bfc5b1617234525 Mon Sep 17 00:00:00 2001 From: Zaran Lalvani Date: Mon, 29 Apr 2024 20:55:45 -0400 Subject: [PATCH] fix: allow specifying non major versions explicitly (#57) --- apps/cli/package.json | 2 +- apps/cli/src/index.tsx | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/apps/cli/package.json b/apps/cli/package.json index fd5d8e5..a8217509 100644 --- a/apps/cli/package.json +++ b/apps/cli/package.json @@ -1,6 +1,6 @@ { "name": "bumpgen", - "version": "0.1.1", + "version": "0.1.2", "scripts": { "build": "tsup src/index.tsx --format esm", "dev": "tsup src/index.tsx --format esm --watch", diff --git a/apps/cli/src/index.tsx b/apps/cli/src/index.tsx index 1ee48c4..5ba8322 100644 --- a/apps/cli/src/index.tsx +++ b/apps/cli/src/index.tsx @@ -87,7 +87,9 @@ if (!pkg) { pkg = available[choice]!.packageName; version = available[choice]!.newVersion; -} else { +} + +if (!version) { const choice = available.find((p) => p.packageName === pkg); if (!choice) { @@ -96,10 +98,7 @@ if (!pkg) { ); process.exit(1); } - - if (!version) { - version = choice.newVersion; - } + version = choice.newVersion; } const bumpgen = makeBumpgen({