Skip to content

Commit

Permalink
fix bump type
Browse files Browse the repository at this point in the history
  • Loading branch information
marikaner committed Sep 12, 2024
1 parent 94c0af6 commit 1d4c05e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/actions/changesets-fixed-version-bump/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions build-packages/changesets-fixed-version-bump/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@ export async function getNextVersion(): Promise<{
.sort((a, b) => b - a);
const bumpType = bumpTypeOrder[Math.min(...versionIncreases)];

if (bumpType === 'none') {
if (bumpType === 'none' || !bumpType) {
throw new Error(`No changesets to release`);
}
const version = inc(currentVersion, bumpType);

if (!version) {
throw new Error(
`Invalid new version -- current version: ${currentVersion}, version type: ${bumpType}`
`Invalid new version -- current version: ${currentVersion}, bump type: ${bumpType}`
);
}
return { version, bumpType };
Expand Down

0 comments on commit 1d4c05e

Please sign in to comment.