Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependency msw-storybook-addon to v2.0.4 #1303

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Dec 31, 2023

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
msw-storybook-addon (source) 2.0.0--canary.122.b3ed3b1.0 -> 2.0.4 age adoption passing confidence

Release Notes

mswjs/msw-storybook-addon (msw-storybook-addon)

v2.0.4

Compare Source

🐛 Bug Fix
Authors: 1

v2.0.3

Compare Source

🐛 Bug Fix
Authors: 1

v2.0.2

Compare Source

🐛 Bug Fix
Authors: 1

v2.0.1

Compare Source

🐛 Bug Fix
Authors: 1

v2.0.0

Compare Source

Release Notes
BREAKING CHANGE: Support MSW 2.0 (#​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.

// .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.

Please migrate to this format, and the previous format will be removed in the next major release.

// ❌ 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
🐛 Bug Fix
⚠️ Pushed to main
Authors: 6

v2.0.0-next.1

Compare Source

🐛 Bug Fix
Authors: 1

v2.0.0-next.0

Compare Source

💥 Breaking Change
📝 Documentation
Authors: 1

v2.0.0-beta.2

Compare Source

v2.0.0-beta.1

Compare Source

v2.0.0-beta.0

Compare Source

v2.0.0--canary.122.dfa57d7.0

Compare Source

v2.0.0--canary.122.dcca74c.0

Compare Source

v2.0.0--canary.122.bf62ea8.0

Compare Source


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

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


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot enabled auto-merge (rebase) December 31, 2023 08:52
Copy link

vercel bot commented Dec 31, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
kottage-front ❌ Failed (Inspect) Nov 5, 2024 5:12pm

@renovate renovate bot force-pushed the renovate/msw-storybook-addon-2.x branch from 831a570 to f95bf01 Compare December 31, 2023 08:59
@renovate renovate bot force-pushed the renovate/msw-storybook-addon-2.x branch from f95bf01 to 42cefe4 Compare January 15, 2024 04:48
@renovate renovate bot force-pushed the renovate/msw-storybook-addon-2.x branch from 42cefe4 to 4ece367 Compare January 15, 2024 08:13
@renovate renovate bot force-pushed the renovate/msw-storybook-addon-2.x branch from 4ece367 to 5c640f3 Compare January 15, 2024 08:35
@renovate renovate bot force-pushed the renovate/msw-storybook-addon-2.x branch from 5c640f3 to 58d7696 Compare January 15, 2024 16:01
@renovate renovate bot force-pushed the renovate/msw-storybook-addon-2.x branch from 58d7696 to 4ec417e Compare January 17, 2024 03:11
@renovate renovate bot force-pushed the renovate/msw-storybook-addon-2.x branch 2 times, most recently from 0101a39 to 8c44f10 Compare January 17, 2024 03:44
@renovate renovate bot force-pushed the renovate/msw-storybook-addon-2.x branch from 8c44f10 to e5e3573 Compare January 17, 2024 20:14
@renovate renovate bot force-pushed the renovate/msw-storybook-addon-2.x branch from e5e3573 to ae15051 Compare January 17, 2024 21:39
@renovate renovate bot force-pushed the renovate/msw-storybook-addon-2.x branch from ae15051 to 698b0b7 Compare January 19, 2024 00:13
@renovate renovate bot force-pushed the renovate/msw-storybook-addon-2.x branch from 698b0b7 to cd20f2a Compare January 19, 2024 03:16
@renovate renovate bot force-pushed the renovate/msw-storybook-addon-2.x branch from cd20f2a to af30f8f Compare January 19, 2024 04:30
@renovate renovate bot force-pushed the renovate/msw-storybook-addon-2.x branch from af30f8f to f89179c Compare January 19, 2024 13:53
@renovate renovate bot force-pushed the renovate/msw-storybook-addon-2.x branch from 386408d to 165fbb4 Compare April 17, 2024 11:07
@renovate renovate bot changed the title Update dependency msw-storybook-addon to v2.0.0-next.1 Update dependency msw-storybook-addon to v2.0.0 Apr 17, 2024
@renovate renovate bot force-pushed the renovate/msw-storybook-addon-2.x branch from 165fbb4 to 58f2e72 Compare May 3, 2024 16:18
@renovate renovate bot changed the title Update dependency msw-storybook-addon to v2.0.0 Update dependency msw-storybook-addon to v2.0.1 May 3, 2024
@renovate renovate bot changed the title Update dependency msw-storybook-addon to v2.0.1 Update dependency msw-storybook-addon to v2.0.2 May 5, 2024
@renovate renovate bot force-pushed the renovate/msw-storybook-addon-2.x branch from 58f2e72 to 2945803 Compare May 5, 2024 16:26
@renovate renovate bot force-pushed the renovate/msw-storybook-addon-2.x branch from 2945803 to 7af950b Compare July 12, 2024 12:58
@renovate renovate bot changed the title Update dependency msw-storybook-addon to v2.0.2 Update dependency msw-storybook-addon to v2.0.3 Jul 12, 2024
@renovate renovate bot force-pushed the renovate/msw-storybook-addon-2.x branch from 7af950b to 8ec0917 Compare September 21, 2024 12:16
@renovate renovate bot force-pushed the renovate/msw-storybook-addon-2.x branch from 8ec0917 to fbda0fd Compare September 21, 2024 15:43
@renovate renovate bot force-pushed the renovate/msw-storybook-addon-2.x branch from fbda0fd to 3764fcf Compare September 21, 2024 17:13
@renovate renovate bot force-pushed the renovate/msw-storybook-addon-2.x branch from 3764fcf to 861bdc5 Compare September 21, 2024 18:14
@renovate renovate bot force-pushed the renovate/msw-storybook-addon-2.x branch from 861bdc5 to e2479d7 Compare September 21, 2024 21:06
@renovate renovate bot force-pushed the renovate/msw-storybook-addon-2.x branch from e2479d7 to e6f50c7 Compare September 22, 2024 00:24
@renovate renovate bot force-pushed the renovate/msw-storybook-addon-2.x branch from e6f50c7 to 967ea54 Compare September 22, 2024 06:24
@renovate renovate bot changed the title Update dependency msw-storybook-addon to v2.0.3 Update dependency msw-storybook-addon to v2.0.4 Nov 5, 2024
@renovate renovate bot force-pushed the renovate/msw-storybook-addon-2.x branch from 967ea54 to 5d71f62 Compare November 5, 2024 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants