-
-
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
Automigrations: Enhance experience for upgrades from Storybook 6 to 8 #26067
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ttern like for the other package managers
valentinpalkovic
changed the title
Valentin/6 to 8 automigrations
Automigrations: Enhance experience for Automigrations from 6 to 8
Feb 16, 2024
valentinpalkovic
changed the title
Automigrations: Enhance experience for Automigrations from 6 to 8
Automigrations: Enhance experience for upgrades from Storybook 6 to 8
Feb 16, 2024
8 tasks
valentinpalkovic
force-pushed
the
valentin/6-to-8-automigrations
branch
from
February 16, 2024 13:40
0c4f704
to
05ebcc2
Compare
valentinpalkovic
force-pushed
the
valentin/6-to-8-automigrations
branch
from
February 16, 2024 13:43
05ebcc2
to
e1ba87c
Compare
valentinpalkovic
force-pushed
the
valentin/6-to-8-automigrations
branch
from
February 19, 2024 07:10
8da1b98
to
3770642
Compare
8 tasks
valentinpalkovic
force-pushed
the
valentin/6-to-8-automigrations
branch
from
February 20, 2024 11:15
f85be76
to
609482b
Compare
valentinpalkovic
force-pushed
the
valentin/6-to-8-automigrations
branch
from
February 23, 2024 09:19
f99173d
to
b481b3f
Compare
yannbf
reviewed
Feb 27, 2024
yannbf
reviewed
Feb 27, 2024
yannbf
reviewed
Feb 27, 2024
yannbf
approved these changes
Feb 27, 2024
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.
LGTM!
yannbf
approved these changes
Feb 27, 2024
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.
LGTM!
30 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #26032, closes #25975, closes #25989
What I did
Added version range checks to all automigrations to ensure that the automigrations only run for particular version upgrades. For example, upgrade from 6 to 8 or 7 to 8. The version check only happens during
npx storybook upgrade
and not duringnpx storybook automigrate
.The following auto migrations were removed in Storybook 8 because they aren't necessary anymore:
Additionally, I have optimized the logic of how the Storybook version is evaluated so that it is also compatible with Storybook 6.
Checklist for Contributors
Testing
Storybook 6
npx [email protected] upgrade
Make sure that only the following automigrations were triggered when applicable:
Storybook 7
npx [email protected] upgrade
Make sure that only the following automigrations were triggered when applicable:
The changes in this PR are covered in the following automated tests:
Manual testing
This section is mandatory for all contributions. If you believe no manual test is necessary, please state so explicitly. Thanks!
Test Results - Freecodecamp (React - SB6.5.16)
The following automigrations got triggered:
Issues:
@storybook/addon-postcss
doesn't work anymore with Storybook 8bare-mdx-stories-glob
codemod isn't applied automatically, which it should@storybook/addons
doesn't exist anymore. This is not caught be automigrations. Manual migration required.bare-mdx-stories-glob
codemod to this:The codemod should actually not create a
stories.ts
file, if there are actually no components.Test Results - Astro UXDS Web Component (Web Components - SB6.4.22)
Issues:
stories.mdx
files aren't renamed, because 5stories.mdx
files cannot be transformed. Reported here: [Bug]: The mdx-to-csf codemod doesn't renamestories.mdx
files when at least one transformation fails #26140Test Results - Mealdrop (React SB7.6.0)
The following automigrations got triggered
Test Results - In General
All major package managers (yarn 1, yarn berry, npm and pnpm) were tested to ensure version detection works.
Documentation
MIGRATION.MD
Checklist for Maintainers
When this PR is ready for testing, make sure to add
ci:normal
,ci:merged
orci:daily
GH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found incode/lib/cli/src/sandbox-templates.ts
Make sure this PR contains one of the labels below:
Available labels
bug
: Internal changes that fixes incorrect behavior.maintenance
: User-facing maintenance tasks.dependencies
: Upgrading (sometimes downgrading) dependencies.build
: Internal-facing build tooling & test updates. Will not show up in release changelog.cleanup
: Minor cleanup style change. Will not show up in release changelog.documentation
: Documentation only changes. Will not show up in release changelog.feature request
: Introducing a new feature.BREAKING CHANGE
: Changes that break compatibility in some way with current major version.other
: Changes that don't fit in the above categories.🦋 Canary release
This pull request has been released as version
0.0.0-pr-26067-sha-847cb0b0
. Try it out in a new sandbox by runningnpx [email protected] sandbox
or in an existing project withnpx [email protected] upgrade
.More information
0.0.0-pr-26067-sha-847cb0b0
valentin/6-to-8-automigrations
847cb0b0
1708335968
)To request a new release of this pull request, mention the
@storybookjs/core
team.core team members can create a new canary release here or locally with
gh workflow run --repo storybookjs/storybook canary-release-pr.yml --field pr=26067