storybookjs / addon-svelte-csf

[Incubation] CSF using Svelte components.
MIT License
103 stars 32 forks source link

fix(parser): Resolve `autodocs` tag issue and extracting `rawCode` #201

Closed xeho91 closed 1 month ago

xeho91 commented 1 month ago

Resolves #199

Updated reproduction for manual testing in development mode: https://stackblitz.com/edit/sveltejs-kit-template-default-132muy

Fixed:

  1. Analyzing Attribute AST node value when it can be a single ExpressionTag
  2. Walking on compiled Stories component function to extract Story definitions
📦 Published PR as canary version: 4.2.0--canary.201.928fe20.0
:sparkles: Test out this PR locally via: ```bash 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 - Fix missing `@storybook/docs-tools` dependency [#190](https://github.com/storybookjs/addon-svelte-csf/pull/190) ([@JReinhold](https://github.com/JReinhold)) - Experimental support for Svelte 5 [#181](https://github.com/storybookjs/addon-svelte-csf/pull/181) ([@tsar-boomba](https://github.com/tsar-boomba) [@xeho91](https://github.com/xeho91) [@JReinhold](https://github.com/JReinhold) [@benoitf](https://github.com/benoitf)) #### 🐛 Bug Fix - fix(parser): Resolve `autodocs` tag issue and extracting `rawCode` [#201](https://github.com/storybookjs/addon-svelte-csf/pull/201) ([@xeho91](https://github.com/xeho91)) - chore: use dist folder to load the files [#185](https://github.com/storybookjs/addon-svelte-csf/pull/185) ([@benoitf](https://github.com/benoitf)) #### Authors: 4 - Florent BENOIT ([@benoitf](https://github.com/benoitf)) - Isaiah Gamble ([@tsar-boomba](https://github.com/tsar-boomba)) - Jeppe Reinhold ([@JReinhold](https://github.com/JReinhold)) - Mateusz Kadlubowski ([@xeho91](https://github.com/xeho91))
xeho91 commented 1 month ago

@JReinhold

Workflow Check / Test (with svelte-check) failure is expected. Is related to https://github.com/sveltejs/svelte/issues/12292

xeho91 commented 1 month ago

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.
shilman commented 1 month ago

:rocket: PR was released in v5.0.0-next.2 :rocket: