fix(storybook): update version check #27278
Merged
+5
−3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Previously the check would see if the version of storybook is less than 7 and would throw an error. This causes an issue when testing canary releases of storybook since they are labeled 0.0.0-[pr-info...]
Update pleaseUpgrade text
One of the checks is to see if storybook is less than 7. The text is updated so it matches for the very unlikely scenario that someone with version 5 or lower runs this plugin.
Current Behavior
The storybook plugin throws and error if the storybook version is less than 7.
When testing a canary release for storybook the version is 0.0.0-[pr info] so when spinning up storybook it will display:
Expected Behavior
Storybook spins up when running a canary release. Modifying the version check to not include v0 solves the problem:
then running Storybook with that modification:
Related Issue(s)
Fixes #27277