-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
SvelteKit: Automigration #20094
SvelteKit: Automigration #20094
Conversation
…eltekit-framework-automigration
…eltekit-framework-automigration
…storybookjs/storybook into jeppe/sveltekit-framework-automigration
…eltekit-framework-automigration
Looking great! My primary concern from above is the |
Co-authored-by: Michael Shilman <[email protected]>
…storybookjs/storybook into jeppe/sveltekit-framework-automigration
const index = properties.findIndex( | ||
(p) => | ||
(t.isIdentifier(p.key) && p.key.name === prop) || | ||
(t.isStringLiteral(p.key) && p.key.value === prop) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shilman we missed the fact that keys could be string literals ( { 'core': {...} }
as opposed to { core: {...} }
) which they were. Luckily my AST-fu has 10x today so I figured it out.
I'm sure there are other edge cases, but I think this is good for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job!! 💪
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really nice one @JReinhold !! Bravo!! 👏
This PR creates an automigration that handles migrating SvelteKit projects from an existing Svelte+Vite setup to the new SvelteKit Storybook framework.
It both migrates 6.x and 7.0 setups:
@storybook/svelte-vite
@storybook/svelte
+ builder:@storybook/builder-vite
@storybook/svelte
+ builder:storybook-builder-vite
Two other related changes:
svelteOptions
in most Vite-based projects.@storybook/svelte
as a dependency to@storybook/sveltekit
which is needed for some reason, even though it's transitive through@storybook/svelte-vite