break-stuff / wc-storybook-helpers

Helpers designed to make integrating Web Components with Storybook easier.
MIT License
52 stars 9 forks source link

Update deprecated shim package #59

Closed nkabrown closed 6 months ago

nkabrown commented 6 months ago

Fixes #47

As of Storybook v8 the @storybook/client-api package has been removed and incorporated into @storybook/preview-api. Update the useArgs import statement.

nkabrown commented 6 months ago

See this section of the v8 migration guide: https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#removed-deprecated-shim-packages

break-stuff commented 6 months ago

Is this API in v7 as well? I would like to maintain backwards compatibility with it, if we can.

nkabrown commented 6 months ago

It is. In fact i updated to the v7 library version in package.json instead of the v8 version and I've tested in v7 and v8 Storybook instances.

nkabrown commented 6 months ago

This API was added to @storybook/preview-api when v7.0.0 was released. Here is the relevant section from the 6 to 7 migration guide.

"You might also depend (and use) these packages in your addon's decorators: @storybook/store, @storybook/preview-web, @storybook/core-client, @storybook/client-api; these have all been consolidated into @storybook/preview-api. So if you use any of these packages, please import what you need from @storybook/preview-api instead."

break-stuff commented 6 months ago

You are awesome! Thanks!

break-stuff commented 6 months ago

The only downside is that this will introduce a breaking change because we are dropping v6 support. I'm totally ok with that, but I need to plan accordingly.