KaotoIO / kaoto

Next version of the UI of the Kaoto project
Apache License 2.0
22 stars 21 forks source link

chore(deps): update dependency msw-storybook-addon to v2 #1136

Closed renovate[bot] closed 3 weeks ago

renovate[bot] commented 3 weeks ago

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
msw-storybook-addon (source) ^1.10.0 -> ^2.0.0 age adoption passing confidence

Release Notes

mswjs/msw-storybook-addon (msw-storybook-addon) ### [`v2.0.2`](https://togithub.com/mswjs/msw-storybook-addon/blob/HEAD/packages/msw-addon/CHANGELOG.md#v202-Sun-May-05-2024) [Compare Source](https://togithub.com/mswjs/msw-storybook-addon/compare/v2.0.1...v2.0.2) ##### 🐛 Bug Fix - Fix `MswParameters` handlers type [#​146](https://togithub.com/mswjs/msw-storybook-addon/pull/146) ([@​jarojasm95](https://togithub.com/jarojasm95)) ##### Authors: 1 - Jose Rojas ([@​jarojasm95](https://togithub.com/jarojasm95)) *** ### [`v2.0.1`](https://togithub.com/mswjs/msw-storybook-addon/blob/HEAD/packages/msw-addon/CHANGELOG.md#v201-Fri-May-03-2024) [Compare Source](https://togithub.com/mswjs/msw-storybook-addon/compare/v2.0.0...v2.0.1) ##### 🐛 Bug Fix - Fix: Use CJS for node entrypoint [#​152](https://togithub.com/mswjs/msw-storybook-addon/pull/152) ([@​yannbf](https://togithub.com/yannbf)) - Maintenance: Migrate monorepo to Yarn 4 [#​151](https://togithub.com/mswjs/msw-storybook-addon/pull/151) ([@​yannbf](https://togithub.com/yannbf)) - Add package.json to exports map [#​150](https://togithub.com/mswjs/msw-storybook-addon/pull/150) ([@​yannbf](https://togithub.com/yannbf)) - update install instructions [#​144](https://togithub.com/mswjs/msw-storybook-addon/pull/144) ([@​yannbf](https://togithub.com/yannbf)) ##### Authors: 1 - Yann Braga ([@​yannbf](https://togithub.com/yannbf)) *** ### [`v2.0.0`](https://togithub.com/mswjs/msw-storybook-addon/releases/tag/v2.0.0) [Compare Source](https://togithub.com/mswjs/msw-storybook-addon/compare/v1.10.0...v2.0.0) ##### Release Notes ##### BREAKING CHANGE: Support MSW 2.0 ([#​122](https://togithub.com/mswjs/msw-storybook-addon/pull/122)) ##### MSW required version is now ^2.0.0 The addon now requires your MSW version to be 2.0.0 or higher. This means you will have to change the format of your handlers as well. More info on how to migrate to MSW 2.0.0: https://mswjs.io/docs/migrations/1.x-to-2.x/ ##### mswDecorator is deprecated in favor of mswLoader Using MSW in a decorator worked for most scenarios, but there's a slight chance the service worker will not get registered in time. As a result, a story that requests data might actually request real data. **Since v1.7.0**, this addon provided a `mswLoader` to use instead of the `mswDecorator`. Loaders get executed before a story renders, differently than decorators, which execute as the story renders. Please replace your `mswDecorator` with `mswLoader`, as the `mswDecorator` will be removed in the next major release. It works the same, respecting the parameters you set, so there's no need to change anything else in your codebase. ```diff // .storybook/preview.js -import { initialize, mswDecorator } from 'msw-storybook-addon' +import { initialize, mswLoader } from 'msw-storybook-addon' initialize() const preview = { - decorators: [mswDecorator] + loaders: [mswLoader] } export default preview ``` ##### parameters.msw Array notation deprecated in favor of Object notation **Since v1.5.0**, this addon started supporting the `parameters.msw.handlers` object format instead of using `parameters.msw` as an Array. This change was done to follow convention for Storybook addon parameters, but also allows for more advanced usage and make the addon more future proof for upcoming features. You can find [more information here](./README.md#composing-request-handlers). Please migrate to this format, and the previous format will be removed in the next major release. ```ts // ❌ Instead of defining the msw parameter like so: export const MyStory = { parameters: { msw: [...] // some handlers here } } // ✅ You should set them like so: export const MyStory = { parameters: { msw: { handlers: [...] // some handlers here } } } // ✅ Or like so: export const MyStory = { parameters: { msw: { handlers: { someHandlerName: [...] // some handlers here } } } } ``` *** ##### 💥 Breaking Change - BREAKING CHANGE: Support MSW 2.0 [#​122](https://togithub.com/mswjs/msw-storybook-addon/pull/122) ([@​yannbf](https://togithub.com/yannbf) [@​mattcosta7](https://togithub.com/mattcosta7) [@​kettanaito](https://togithub.com/kettanaito) [@​ChristianMurphy](https://togithub.com/ChristianMurphy) [@​AlexMunoz](https://togithub.com/AlexMunoz)) ##### 🐛 Bug Fix - Docs: Minor updates to links and navigation issue [#​126](https://togithub.com/mswjs/msw-storybook-addon/pull/126) ([@​jonniebigodes](https://togithub.com/jonniebigodes)) ##### ⚠️ Pushed to `main` - update readme ([@​yannbf](https://togithub.com/yannbf)) ##### Authors: 6 - [@​jonniebigodes](https://togithub.com/jonniebigodes) - Alex Muñoz ([@​AlexMunoz](https://togithub.com/AlexMunoz)) - Artem Zakharchenko ([@​kettanaito](https://togithub.com/kettanaito)) - Christian Murphy ([@​ChristianMurphy](https://togithub.com/ChristianMurphy)) - Matthew Costabile ([@​mattcosta7](https://togithub.com/mattcosta7)) - Yann Braga ([@​yannbf](https://togithub.com/yannbf))

Configuration

📅 Schedule: Branch creation - "before 6am" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.



This PR has been generated by Mend Renovate. View repository job log here.