[Issue 2507] upgrade storybook to version 8 #2508
Merged
+1,550
−7,715
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.
Summary
Fixes #2507
Time to review: 20 mins
Changes proposed
Upgrade to the latest version of Storybook.
This PR is largely needed in order to work around a security issue with esbuild that is present in storybook until 8.4. A workaround was applied in #2502 that can hopefully now be reverted.
Note that to get this working I ran the suggested upgrade script mentioned below, which eventually worked, but then had to fix the reference to our next config, which was not being found for some reason, in order to get storybook to load
https://storybook.js.org/docs/migration-guide
Context for reviewers
Most of our stories are currently broken, so set a baseline expectation on what is currently working before jumping in and assuming that the upgrade broke stuff
Test steps
npm install && npm run storybook
Additional information
it looks like Go 1.23 support in esbuild only came along last month in version 0.24 https://github.com/evanw/esbuild/releases/tag/v0.24.0
version 0.24 of esbuild is only supported in storybook core as of v8.4.0-alpha.4 storybookjs/storybook@c40aba2
now that storybook 8.4 is officially released, we can upgrade and hopefully remove the workaround built in #2502
upgrade pitfalls
@storybook/blocks: ^8.4.2
as a dev dependency, and deleting package-lock