-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Add storybook typescript plugin for compatibility with Typescript 5 #53445
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
noahtallen
added
[Type] Build Tooling
Issues or PRs related to build tooling
[Priority] High
Used to indicate top priority items that need quick attention
labels
Aug 8, 2023
Since this is testing well locally, I'll merge quickly so that Storybook isn't broken on trunk. I'll revert both commits asap if this fails. |
Size Change: 0 B Total Size: 1.44 MB ℹ️ View Unchanged
|
This fixed the trunk failure, and the new storybook deployment is working correctly 👍 |
11 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
[Priority] High
Used to indicate top priority items that need quick attention
[Type] Build Tooling
Issues or PRs related to build tooling
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.
What?
After merging #52621, I broke Storybook on trunk: https://github.com/WordPress/gutenberg/actions/runs/5802390714/job/15728688482
Because that check doesn't run on PRs, I didn't notice Storybook would fail after merging. :(
Why?
It looks like Storybook 6 doesn't have full compatibility with Typescript 5, which causes a crash when building Storybook.
How?
I'm using the workaround mentioned here: hipstersmoothie/react-docgen-typescript-plugin#78 (comment). From what I understand, it makes Storybook use a version of this plugin which is compatible with TS 5.
See also storybookjs/storybook#21642. This may be fixed after upgrading to Storybook 7, but that's a bigger task.
Testing Instructions
npm run storybook:build
needs to pass locally.Looks like
npm run storybook:dev
is working as well: