generated from storybookjs/addon-kit
-
Notifications
You must be signed in to change notification settings - Fork 34
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
refactor: Improve AST-related types readability & fix existing issues #208
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
This reverts commit 6e5ccae.
Experimental support for Svelte 5
Fix missing `@storybook/docs-tools` dependency
fix(parser): Resolve `autodocs` tag issue and extracting `rawCode`
v5: Fix tags being ignored
Apologies, wrong |
xeho91
added
duplicate
This issue or pull request already exists
and removed
internal
Changes only affect the internal API
labels
Sep 5, 2024
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.
To summarize, the main objective - fix CI
check
What has been done
I've created two types
SvelteAST
&ESTreeAST
that are used across entire codebase (imported from#parser/ast
).I figured when wrapped into two namespaces is it easier to read and to quickly see from which AST they come from.
This project is unique for using both Svelte AST and ESTree AST, so I hope this clears possible future confusion.
svelte
to latest rc version (where AST types fromsvelte/compiler
are finally exposed),I could see the existing types issues related to previous PR attempting to fix breaking change in Svelte AST
(references: [Bug]:
autodocs
usingsvelte-csf
v5
does not render individual story within docs #199 fix(parser): Resolveautodocs
tag issue and extractingrawCode
#201). So, I solved them + refactored them a little bit with early returns. There are smalllogic duplications, but I didn't mind them as they are easier to read and maintain than what having very long and
complicated if/else statements.
What is not included
There are only warnings lefts with deprecations related to
<svelte:component>
and<script context="module">
.I'd rather them being solved them in separate PRs.