Skip to content

Commit

Permalink
Merge pull request #20126 from storybookjs/shilman/fix-upgrade-prerel…
Browse files Browse the repository at this point in the history
…ease-flag

CLI: Fix upgrade --prerelease to upgrade to the next tag
  • Loading branch information
shilman authored Dec 7, 2022
2 parents 2d47210 + de23d5d commit b11198f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion code/lib/cli/src/upgrade.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,10 @@ export const doUpgrade = async ({

let target = 'latest';
if (prerelease) {
target = 'greatest';
// '@next' is storybook's convention for the latest prerelease tag.
// This used to be 'greatest', but that was not reliable and could pick canaries, etc.
// and random releases of other packages with storybook in their name.
target = '@next';
} else if (tag) {
target = `@${tag}`;
}
Expand Down

0 comments on commit b11198f

Please sign in to comment.