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

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

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

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Apr 24, 2024

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
msw-storybook-addon (source) ^1.10.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

Configuration

📅 Schedule: Branch creation - "after 10pm every weekday,before 5am every weekday,every weekend" in timezone Asia/Tokyo, Automerge - At any time (no schedule defined).

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

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 added the renovate label Apr 24, 2024
Copy link

cloudflare-workers-and-pages bot commented Apr 24, 2024

Deploying tasks-app-nextjs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 7aeb66e
Status:🚫  Build failed.

View logs

Copy link

vercel bot commented Apr 24, 2024

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

Name Status Preview Comments Updated (UTC)
tasks-app-nextjs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 5, 2024 2:48pm

Copy link

github-actions bot commented Apr 24, 2024

yarn.lock changes

Click to toggle table visibility
Name Status Previous Current
msw-storybook-addon UPDATED 1.10.0 2.0.4

Copy link

github-actions bot commented Apr 24, 2024

Size Change: +10 B (0%)

Total Size: 277 kB

Filename Size Change
./.next/build-manifest.json 544 B -2 B (-0.37%)
./.next/cache/next-server.js.nft.json 18.9 kB +16 B (+0.08%)
./.next/next-server.js.nft.json 18.9 kB +16 B (+0.08%)
./.next/server/middleware-build-manifest.js 541 B -1 B (-0.18%)
./.next/server/pages/_app.js.nft.json 1.21 kB -3 B (-0.25%)
./.next/server/pages/_document.js.nft.json 526 B -4 B (-0.75%)
./.next/server/pages/_error.js.nft.json 269 B -2 B (-0.74%)
./.next/server/pages/404.html 2.28 kB +1 B (+0.04%)
./.next/server/pages/500.html 2.27 kB +1 B (+0.04%)
./.next/server/pages/css-containment.html 2.37 kB +2 B (+0.08%)
./.next/server/pages/dvh.html 2.02 kB +2 B (+0.1%)
./.next/server/pages/height.html 1.97 kB +2 B (+0.1%)
./.next/server/pages/height.js.nft.json 404 B -3 B (-0.74%)
./.next/server/pages/hydration.html 2.08 kB +2 B (+0.1%)
./.next/server/pages/index.js.nft.json 641 B -6 B (-0.93%)
./.next/server/pages/lvh.html 2.02 kB -1 B (-0.05%)
./.next/server/pages/tasks.js.nft.json 1.66 kB -11 B (-0.66%)
./.next/server/pages/vh.html 2.01 kB +1 B (+0.05%)
./.next/static/uXDG4pAayyeLAnwEvITBm/_buildManifest.js 0 B -449 B (removed) 🏆
./.next/static/uXDG4pAayyeLAnwEvITBm/_ssgManifest.js 0 B -61 B (removed) 🏆
./.next/static/f3scHFoVCRH_7b3O9Iw8Q/_buildManifest.js 449 B +449 B (new file) 🆕
./.next/static/f3scHFoVCRH_7b3O9Iw8Q/_ssgManifest.js 61 B +61 B (new file) 🆕
ℹ️ View Unchanged
Filename Size
./.next/cache/config.json 165 B
./.next/export-marker.json 100 B
./.next/images-manifest.json 325 B
./.next/package.json 40 B
./.next/prerender-manifest.json 234 B
./.next/react-loadable-manifest.json 224 B
./.next/required-server-files.json 1.36 kB
./.next/routes-manifest.json 448 B
./.next/server/chunks/198.js 725 B
./.next/server/chunks/377.js 587 B
./.next/server/chunks/636.js 2.53 kB
./.next/server/chunks/664.js 5.53 kB
./.next/server/chunks/755.js 6.33 kB
./.next/server/chunks/859.js 9.45 kB
./.next/server/chunks/893.js 680 B
./.next/server/chunks/font-manifest.json 550 B
./.next/server/font-manifest.json 550 B
./.next/server/middleware-manifest.json 79 B
./.next/server/middleware-react-loadable-manifest.js 235 B
./.next/server/next-font-manifest.js 85 B
./.next/server/next-font-manifest.json 73 B
./.next/server/pages-manifest.json 185 B
./.next/server/pages/_app.js 1.88 kB
./.next/server/pages/_document.js 1.27 kB
./.next/server/pages/_error.js 1.86 kB
./.next/server/pages/api/plausible-options.js 454 B
./.next/server/pages/api/plausible-options.js.nft.json 91 B
./.next/server/pages/css-containment.js.nft.json 323 B
./.next/server/pages/dvh.js.nft.json 323 B
./.next/server/pages/hydration.js.nft.json 360 B
./.next/server/pages/index.html 2.45 kB
./.next/server/pages/lvh.js.nft.json 323 B
./.next/server/pages/svh.html 2.02 kB
./.next/server/pages/svh.js.nft.json 323 B
./.next/server/pages/tasks.js 5.42 kB
./.next/server/pages/vh.js.nft.json 323 B
./.next/server/webpack-api-runtime.js 1.43 kB
./.next/server/webpack-runtime.js 2.59 kB
./.next/static/chunks/198.78fa1dcebb60ea32.js 415 B
./.next/static/chunks/440.095145731ac3f875.js 1.16 kB
./.next/static/chunks/521-ea7603751fd7df64.js 23.4 kB
./.next/static/chunks/664-7af439310aee7d36.js 2.38 kB
./.next/static/chunks/framework-2c79e2a64abdb08b.js 45.2 kB
./.next/static/chunks/main-0c863f4fb511a522.js 26.6 kB
./.next/static/chunks/pages/_app-7587b394da45347e.js 21.1 kB
./.next/static/chunks/pages/_error-54de1933a164a1ff.js 181 B
./.next/static/chunks/pages/css-containment-9f8566d5f380f19e.js 976 B
./.next/static/chunks/pages/dvh-f55fec59daf8cef4.js 437 B
./.next/static/chunks/pages/height-a8915716b5a261e4.js 679 B
./.next/static/chunks/pages/hydration-82f2699a10d834b9.js 567 B
./.next/static/chunks/pages/index-4870f167ebbb676e.js 4.55 kB
./.next/static/chunks/pages/lvh-bd6948df7800c6a7.js 437 B
./.next/static/chunks/pages/svh-1da6914a1ef61189.js 438 B
./.next/static/chunks/pages/tasks-e115e678c11af8d7.js 2.54 kB
./.next/static/chunks/pages/vh-55663a7ccb7983e6.js 377 B
./.next/static/chunks/polyfills-c67a75d1b6f99dc8.js 31.1 kB
./.next/static/chunks/webpack-1389b2a86429d862.js 1.54 kB

compressed-size-action

@renovate renovate bot force-pushed the renovate/msw-storybook-addon-2.x branch from 3471dc5 to 714c62c Compare April 24, 2024 16:34
@renovate renovate bot force-pushed the renovate/msw-storybook-addon-2.x branch from 714c62c to 3264cc1 Compare April 25, 2024 15:18
@renovate renovate bot force-pushed the renovate/msw-storybook-addon-2.x branch from 3264cc1 to 8f1ceba Compare April 25, 2024 18:55
@renovate renovate bot force-pushed the renovate/msw-storybook-addon-2.x branch from 8f1ceba to 3797cf3 Compare April 26, 2024 14:36
@renovate renovate bot force-pushed the renovate/msw-storybook-addon-2.x branch from 3797cf3 to 3f94d6e Compare April 26, 2024 15:40
@renovate renovate bot force-pushed the renovate/msw-storybook-addon-2.x branch from 3f94d6e to d94adfb Compare April 26, 2024 18:59
@renovate renovate bot force-pushed the renovate/msw-storybook-addon-2.x branch from d94adfb to e6c58b7 Compare April 29, 2024 19:58
@renovate renovate bot force-pushed the renovate/msw-storybook-addon-2.x branch from e6c58b7 to 24b745d Compare April 30, 2024 18:25
@renovate renovate bot force-pushed the renovate/msw-storybook-addon-2.x branch from 24b745d to f661856 Compare May 1, 2024 17:49
@renovate renovate bot force-pushed the renovate/msw-storybook-addon-2.x branch from f661856 to c8b866a Compare May 3, 2024 16:49
@renovate renovate bot force-pushed the renovate/msw-storybook-addon-2.x branch from c8b866a to 6cd9aa4 Compare May 5, 2024 16:34
@renovate renovate bot force-pushed the renovate/msw-storybook-addon-2.x branch from 6cd9aa4 to 82ff879 Compare July 12, 2024 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant