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 #297

Merged
merged 1 commit into from
Aug 22, 2024

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Apr 19, 2024

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.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 - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

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.


  • 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 dependencies Pull requests that update a dependency file label Apr 19, 2024
@renovate renovate bot enabled auto-merge (squash) April 19, 2024 17:47
Copy link
Contributor Author

renovate bot commented Apr 19, 2024

⚠ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: frontend/pnpm-lock.yaml
octavio                                  |  WARN  Unsupported engine: wanted: {"node":"^18"} (current: {"node":"v20.12.2","pnpm":"8.15.4"})
Scope: all 4 workspace projects
/tmp/renovate/repos/github/ictsc/ictsc-outlands/frontend/packages/ui:
 ERR_PNPM_WORKSPACE_PKG_NOT_FOUND  In packages/ui: "zenn-content-css@workspace:*" is in the dependencies but no package named "zenn-content-css" is present in the workspace

This error happened while installing a direct dependency of /tmp/renovate/repos/github/ictsc/ictsc-outlands/frontend/packages/ui

Packages found in the workspace: frontend, duardo, octavio, @repo/ui

Copy link
Contributor Author

renovate bot commented May 12, 2024

⚠️ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: frontend/pnpm-lock.yaml
octavio                                  |  WARN  Unsupported engine: wanted: {"node":"^18"} (current: {"node":"v20.16.0","pnpm":"8.15.9"})
Scope: all 4 workspace projects
/tmp/renovate/repos/github/ictsc/ictsc-regalia/frontend/packages/ui:
 ERR_PNPM_WORKSPACE_PKG_NOT_FOUND  In packages/ui: "zenn-content-css@workspace:*" is in the dependencies but no package named "zenn-content-css" is present in the workspace

This error happened while installing a direct dependency of /tmp/renovate/repos/github/ictsc/ictsc-regalia/frontend/packages/ui

Packages found in the workspace: frontend, duardo, octavio, @repo/ui

@renovate renovate bot force-pushed the renovate/msw-storybook-addon-2.x branch 8 times, most recently from c9ab2cb to 641dbf2 Compare May 14, 2024 05:16
@renovate renovate bot force-pushed the renovate/msw-storybook-addon-2.x branch 5 times, most recently from c637c03 to fff3026 Compare May 29, 2024 13:04
@renovate renovate bot force-pushed the renovate/msw-storybook-addon-2.x branch 3 times, most recently from 6d399dc to 2a35d2f Compare June 6, 2024 05:17
@renovate renovate bot force-pushed the renovate/msw-storybook-addon-2.x branch 2 times, most recently from ee73056 to 2ad136d Compare June 10, 2024 16:05
@renovate renovate bot force-pushed the renovate/msw-storybook-addon-2.x branch 5 times, most recently from 6c07a4e to 1e9954a Compare June 21, 2024 17:14
@renovate renovate bot force-pushed the renovate/msw-storybook-addon-2.x branch from 1e9954a to fa086a8 Compare June 28, 2024 19:44
@renovate renovate bot force-pushed the renovate/msw-storybook-addon-2.x branch from fa086a8 to f072ae7 Compare July 7, 2024 04:06
@renovate renovate bot force-pushed the renovate/msw-storybook-addon-2.x branch 3 times, most recently from 9ff2803 to d557c85 Compare July 12, 2024 08:32
@renovate renovate bot force-pushed the renovate/msw-storybook-addon-2.x branch 4 times, most recently from 30f6d1b to ee03ff6 Compare July 30, 2024 11:01
@renovate renovate bot force-pushed the renovate/msw-storybook-addon-2.x branch 3 times, most recently from 3e9e35f to 8d329f3 Compare August 7, 2024 08:31
@renovate renovate bot force-pushed the renovate/msw-storybook-addon-2.x branch from 8d329f3 to 12beb74 Compare August 11, 2024 01:52
@renovate renovate bot merged commit 687d43e into main Aug 22, 2024
13 of 27 checks passed
@renovate renovate bot deleted the renovate/msw-storybook-addon-2.x branch August 22, 2024 04:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants