-
Notifications
You must be signed in to change notification settings - Fork 32
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
fix(parser): Resolve autodocs
tag issue and extracting rawCode
#201
Conversation
Workflow Check / Test (with |
EDIT Resolved
Converting back to draft, it needs further inspection. I was checking only on Chromatic for now.
But then I checked in development mode on my device, and the issue still persists. |
Attribute
AST node value when it can be a single ExpressionTag
autodocs
tag issue and extracting rawCode
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.
a tiny question about safety, otherwise it looks good!
@@ -37,9 +37,9 @@ describe(getStringValueFromAttribute.name, () => { | |||
.toThrowErrorMatchingInlineSnapshot(` | |||
[SB_SVELTE_CSF_PARSER_ANALYSE_STORY_0001 (AttributeNotStringError): In the stories file: <path not specified> | |||
|
|||
A '<Story name="<unspecified Story name>" />' has a prop 'name' whose value must be a static literal string. | |||
A '<Story name="undefined" />' has a prop 'name' whose value must be a static literal string. |
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.
@JReinhold If you're cool with this change, then please feel free to merge it.
And also, I'd like you to ensure if the tags are correct for the next
release. I'm a newbie when it comes to using auto
. I'm not 100% sure whether it should be major
or patch
with the prerelease of the next
branch.
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.
I'm actually also similarly confused about it. We'll see what happens. 🚀
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.
Phew https://github.com/storybookjs/addon-svelte-csf/releases/tag/v5.0.0-next.2 😅
I guess it's just the canary versioning that's a little broken with auto
.
🚀 PR was released in |
Resolves #199
Updated reproduction for manual testing in development mode: https://stackblitz.com/edit/sveltejs-kit-template-default-132muy
Fixed:
Attribute
AST node value when it can be a singleExpressionTag
Story
definitions📦 Published PR as canary version:
4.2.0--canary.201.928fe20.0
✨ Test out this PR locally via:
npm install @storybook/addon-svelte-csf@4.2.0--canary.201.928fe20.0 # or yarn add @storybook/addon-svelte-csf@4.2.0--canary.201.928fe20.0
Version
Published prerelease version:
v5.0.0-next.2
Changelog
💥 Breaking Change
@storybook/docs-tools
dependency #190 (@JReinhold)🐛 Bug Fix
autodocs
tag issue and extractingrawCode
#201 (@xeho91)Authors: 4