whitespace-se / storybook-addon-html

A Storybook addon that extracts and displays compiled syntax-highlighted HTML
Other
95 stars 43 forks source link

42tte/feat support prettier v3 #106

Closed 42tte closed 5 months ago

42tte commented 1 year ago

Fixes #104

Profesor08 commented 1 year ago

@whitespace-dev

mevbg commented 1 year ago

@jeanfredrik

42tte commented 1 year ago

Please have a look at this when you got the time @jeanfredrik It is preventing us, and others, from upgrading Prettier

mevbg commented 1 year ago

Is this project still alive?

prinzt commented 1 year ago

I applied the patch manually for a local Storybook 7.4.1 Vue 3 project and the HTML panel seems to work fine.

mevbg commented 1 year ago

I applied the patch manually for a local Storybook 7.4.1 Vue 3 project and the HTML panel seems to work fine.

How did you make it? Can you give us example?

prinzt commented 1 year ago

I just copy/pasted the changes to the files under node_modules/@whitespace/storybook-addon-html/dist/esm. This was only for testing purposes and is of course not a production solution ;) One could automate this with a patch file for deployment/production until the PR is merged.

Profesor08 commented 1 year ago

You can use this pachage to manage patches: npm i patch-package

prinzt commented 1 year ago

@Profesor08 Thanks a lot. I didn't know that one.

jonock commented 12 months ago

Would be amazing if the PR can be merged @jeanfredrik . It's currently blocking us on a project... Thanks for your work!

42tte commented 10 months ago

Would have loved an early Christmas gift 🎅 🎁

wigsnes commented 9 months ago

@jeanfredrik Would like this fixed!

gavinbarron commented 8 months ago

I just copy/pasted the changes to the files under node_modules/@whitespace/storybook-addon-html/dist/esm. This was only for testing purposes and is of course not a production solution ;) One could automate this with a patch file for deployment/production until the PR is merged.

Great suggestion, I did just this using a patch via yarn for our project that is looking to use this add-on

sovanyio commented 8 months ago

@whitespace-dev, created a fork with storybook v7 changes along with the prettier v3 change: https://github.com/sovanyio/storybook-addon-html/tree/feature/sb-v7

Definitely uglier than what @42tte has, but utilizing this directly from my repo for another project. Didn't test the zx scripts or really anything beyond the build/utilization; its not backward compatible--but might be time for a breaking release for sb v7/prettier v3 support? :)

Ollitod commented 7 months ago

@jeanfredrik please accept the PR. Since we use Angular 17 and the new control flow syntax, we need to use Prettier 3.1 to be able to format the code according to the new rules. This is definitely a blocker for any Angular 17 project. See #110.

JamesIves commented 6 months ago

Seems like this project hasn't been updated in almost a year 😞

Fingers crossed this can be merged, and any necessary work required for Storybook 8 can too.

jaydeep987 commented 6 months ago

Unbelievable, again such issue with storybook ecosystem... always blocks some other upgrades just because such PRs never gets merged and deps version are far behind.

jeanfredrik commented 5 months ago

Hello everyone! Sorry for not taking a look at this. I will look into it now.

jeanfredrik commented 5 months ago

We just released version 6.0.0 which uses Storybook 8 and Prettier 3. Please try to update to the latest version and see if everything works. Create new issues if they are not.