Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Great stuff @kettanaito!! I think we can/should drop support for node. This is definitely a breaking change for users who use the portable stories concept with Jest or Vitest sans-browser mode, but honestly the amount of affected users will be small in comparison to the ones that adopted new testing capabilities of Storybook + Vitest browser mode. It would be amazing to have https://github.com/stackblitz-labs/pkg.pr.new set up for canary releases. I'm overall quite excited to see this getting released, and I love to see msw being part of a story context so it's super easy for people to use it! We need to make sure types work well. Let's chat in detail next week! |
|
Thanks for a quick review, @yannbf! This is going to be a breaking change regardless so it's a great time to drop I will configure pkg-pr in a follow-up, let's keep this branch focused on the public APIs and tests. |
|
That's a great PR. My public library is broken on Storybook level because of this error Source:
(AI suggested a workaround I'm not happy with but have put in a separate branch https://github.com/binarykitchen/videomail-client/blob/storybook-preview-fix/.storybook/preview.ts) |
|
@binarykitchen, have you tried this branch? There's no more |
|
Happy to try.
But can you please define "this branch" first? Your draft PR or the
master branch of this package?
Also, I do not see anything about `activationPromise` in any
documentation nor changelog. It looks like an undocumented, breaking
change to me ...
On 07/04/2026 20:36, Artem Zakharchenko wrote:
*kettanaito* left a comment (mswjs/msw-storybook-addon#182)
<#182 (comment)>
@binarykitchen <https://github.com/binarykitchen>, have you tried this
branch? There's no more |activationPromise| involved so your issue
seems to be related to the current version of the add-on. In that
case, consult the readme and see what you are missing.
—
Reply to this email directly, view it on GitHub
<#182 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABLL2L5JGNAG3AESDLWHU34US4YHAVCNFSM6AAAAACXKYGXBWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DCOJXGY2TGNJVHE>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
Binary Kitchen
Michael Heuberger (Human Being)
1/33 Parrish Road
Sandringham
Auckland 1025
(New Zealand)
Mobile (text only) ... +64 21 261 89 81
Email ................***@***.***
Website ..............https://binarykitchen.com
|
|
@binarykitchen, I see what's happening. Please follow #183 for updates on the issue. I will look into it once I have a moment. For now, you can pin |
|
Apologies for posting here @kettanaito - all clear now, thanks |
There was a problem hiding this comment.
This is awesome & very clean!!! Love the new version. Small comments below.
Would love to see a way for existing users to migrate cleanly to the new version, whether it's a codemod, prompt, or a backwards compatibility code snippet that they can paste into their .storybook/preview.ts file
* fix: remove node.js support * fix: export addon as the default export * fix: support csf 3.0

Motivation
Rewrites the addon to be compatible and adhere to the best practices of Storybook addons.
Issues
initialize2nd parameter #181 (you can provide any handlers you want).play()function not defined when using msw loader #166 (irrelevant)parameters.mswto be a function that takesargs#67 (out of scope)Changes
LICENSE.md. I'm implementing the new architecture from scratch and listing myself as the author, respectively. The old addon versions retain the old license with all the appropriate attributions.Architecture
The addon is now used by importing the
enableMockingfunction and calling it in your Storybook'saddonsarray:That's it. No need to
initializeanything or manage worker/server instances. Everything is provisioned automatically for you with optimal defaults.You can customize the MSW API created via
enableMockingby providing it a custom setup function that returns anysetup*instance:Per-story handlers
You can add request handlers for individual stories:
Internal
Todos
README.md).storybook.icon.*.pnglogo to MSW website, use that URL as the value.versionin package.json so this releases properly.pnpm lintbefore publishing.setupfunction toenableMockingin.storybook/preview.ts./preview).parameters.mswfor easier migration.Questions
msw/node? Both Storybook and its play functions run in the browser (via VBM).