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: Automigration for new frameworks #18919

Merged
merged 11 commits into from
Aug 15, 2022

Conversation

yannbf
Copy link
Member

@yannbf yannbf commented Aug 11, 2022

Issue: N/A

What I did

This PR adds a new automigration to go from older framework format to the new framework format, such as:

from

@storybook/react
@storybook/builder-webpack5
@storybook/manager-webpack5

to

@storybook/react-webpack5

And also make the necessary changes in main.js. There's a limitation currently because the csf-tools don't provide a way to delete keys, so if core was supposed to be deleted, instead it's turned into an empty object.

I tested this in different frameworks and it works great, we can finally have a migration from 6.0 to 7.0 that works right after 👯

A few pics:

image

image

image

Yea, formatting is a slight issue, but we can't do much about it 🤷

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.

Copy link
Member

@tmeasday tmeasday left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some questions but it looks great!

@shilman shilman changed the title CLI: auto migration for new frameworks CLI: Automigration for new frameworks Aug 13, 2022
@shilman shilman merged commit df4bb6b into next Aug 15, 2022
@shilman shilman deleted the yann/sb-467-auto-migration-for-new-frameworks branch August 15, 2022 11:46
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.

3 participants