storybook-addon-mock icon indicating copy to clipboard operation
storybook-addon-mock copied to clipboard

Storybook 8 compatibility

Open joevaugh4n opened this issue 1 year ago • 10 comments
trafficstars

Hey @nutboltu! I’m one of Storybook’s core maintainers.

Storybook 8 (our next major release) is coming soon, and it introduces some breaking changes that your addon might need to account for.

We’ve listed all the key changes in a new Storybook 8 migration guide, and we’d encourage you to check it out and see if your addon is impacted.

We also have an addons channel in our Discord community, which we’d like to use to better communicate with addon authors in the future. If you’re not part of the server, consider joining here and message me (@joevaugh4n) so that I can give you the addon creator role! If you’re already in the server, please just ping me and I’ll respond to you there.

Thanks for being a part of our addon community!

Joe

joevaugh4n avatar Feb 21 '24 14:02 joevaugh4n

Yeah. I have an update on Storybook 8 and have a problem. The following packages are incompatible with Storybook 8.0.0. I found it with npx storybook@latest doctor

lekarev90 avatar Mar 11 '24 20:03 lekarev90

We are using this addon as well and we have been quite happy with it so far. It would be awesome if you found some time to make it Storybook 8 compatible.

MikaKarjunen avatar Mar 13 '24 12:03 MikaKarjunen

@lekarev90 @MikaKarjunen I'll prioritise the migration work to support Storybook ^8. I don't have any release date yet, but I will keep you updated here.

nutboltu avatar Mar 14 '24 03:03 nutboltu

How it's released and I'm getting this error when I'm building Storybook 8 with React and Vite:

=> Failed to build the preview
RollupError: Expected ',', got ':'
    at getRollupEror (file://./node_modules/vite/node_modules/rollup/dist/es/shared/parseAst.js:375:41)
    at ParseError.initialise (file://./node_modules/vite/node_modules/rollup/dist/es/shared/node-entry.js:11155:28)
    at convertNode (file://./node_modules/vite/node_modules/rollup/dist/es/shared/node-entry.js:12895:10)
    at convertProgram (file://./node_modules/vite/node_modules/rollup/dist/es/shared/node-entry.js:12215:12)
    at Module.setSource (file://./node_modules/vite/node_modules/rollup/dist/es/shared/node-entry.js:14039:24)
    at async ModuleLoader.addModuleSource (file://./node_modules/vite/node_modules/rollup/dist/es/shared/node-entry.js:18697:13)

Not if I remove storybook-addon-mock though.

tonygustafsson avatar Mar 14 '24 07:03 tonygustafsson

This bug in storybook-addon-pseudo-states has the same error message and it started happening with the upgrade to Storybook 8. Linking to it since it might help fix this issue.

https://github.com/chromaui/storybook-addon-pseudo-states/issues/108#issuecomment-1999477683

janaagaard75 avatar Mar 17 '24 20:03 janaagaard75

I just contributed to the bounty on this issue:

https://until.dev/bounty/linearlabs-workspace/storybook-addon-mock/208

The current bounty for completing it is $50.00 if it is closed within 1 month, and decreases after that.

elirov avatar Mar 23 '24 20:03 elirov

Any updates on this issue? We're stuck on storybook 7..

elirov avatar Apr 04 '24 13:04 elirov

To anyone else ending up in here, frustrated to be stuck on Storybook 7:

We migrated to msw-storybook-addon. The setup in a little more complex, but feature wise it was a drop in replacement for us.

(Note that you have to install v1 of msw because the add-on it not yet compatible with new version 2. They seem to be working adding support, though.)

janaagaard75 avatar Apr 05 '24 08:04 janaagaard75

Hello ! I've fixed it to the best of my ability and a little sunday afternon. And migrated to storybook v8. I'll create a PR and all of that

Jontii avatar Apr 07 '24 08:04 Jontii

Here is a PR for the migration to v8 @elirov @nutboltu

https://github.com/linearlabs-workspace/storybook-addon-mock/pull/209

Jontii avatar Apr 07 '24 09:04 Jontii

Really great to see a pull request that could add support for Storybook 8. Does anybody know if @nutboltu will have time to look at the PR? There is a badge with the text "I may be slow to respond" on his profile picture - I don't know about this feature on GitHub, so I don't if this is something added by a bot, or something you set up manually. Does anybody else have merge rights?

janaagaard75 avatar Apr 14 '24 18:04 janaagaard75

Apologies to everyone for not being active, and a huge shout out to @Jontii for his contribution to v8 compatibility. I have published the new version 5.0.0

nutboltu avatar Apr 15 '24 05:04 nutboltu

This issue should be closed now right ? @nutboltu

Jontii avatar Apr 17 '24 07:04 Jontii