Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI: install the same version as the user in sb-scripts automigration #18917

Merged
merged 3 commits into from
Aug 11, 2022

Conversation

yannbf
Copy link
Member

@yannbf yannbf commented Aug 11, 2022

Issue: N/A

What I did

The sb-scripts were doing a couple things that could result in a wrong structure in users' projects:

  • It was running on Storybook >=6
  • It was installing storybook@latest

This PR fixes both scenarios to:

  • Run on Storybook >= 7
  • Install storybook@<specifier>

The comes from a new utility called getStorybookVersionSpecifier which will install the lib with the same specifier as the one from other @storybook packages. This is assuming that the @storybook packages are consistent when running this migration (something we will work on later to make sure it's always right)

How to test

  • Is this testable with Jest or Chromatic screenshots?
  • Does this need a new example in the kitchen sink apps?
  • Does this need an update to the documentation?

If your answer is yes to any of these, please make sure to include it in your PR.

@yannbf yannbf merged commit 1d80c8e into next Aug 11, 2022
@yannbf yannbf deleted the fix/sb-scripts-automigration branch August 11, 2022 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants