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

Bump msw from 0.47.4 to 1.3.3 #43689

Closed
wants to merge 2 commits into from

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Jul 1, 2024

Bumps msw from 0.47.4 to 1.3.3.

Release notes

Sourced from msw's releases.

v1.3.3 (2024-03-15)

Bug Fixes

  • remove upper version range for "typescript" (#2086) (8f456bb3dec7c9a136483a9ce9021a90a62cb0f9) @​kettanaito

v1.3.2 (2023-10-01)

Bug Fixes

  • set minimal "graphql" version to 16.18.1 (#1754) (0a857f67b6e0883336a790633aa9bafc0b16c7cb) @​kettanaito

v1.3.1 (2023-09-13)

Bug Fixes

  • pin "headers-polyfill" to 3.2.5 (#1736) (2e53ae73bd734c435ac447ca2b60cdaaebc1390b) @​kettanaito

v1.3.0 (2023-09-03)

Features

v1.2.5 (2023-08-28)

Bug Fixes

  • allow installs with any version of pnpm (#1713) (d35e851faa3d75b58b8051084c50b7f02491df84) @​kettanaito

v1.2.4 (2023-08-25)

Bug Fixes

v1.2.3 (2023-07-20)

Bug Fixes

  • clone Response before logging (#1662) (daa04af4075b06607b81ed23bbe5ea09d56e8825) @​kettanaito

v1.2.2 (2023-06-09)

Bug Fixes

v1.2.1 (2023-03-24)

... (truncated)

Commits
  • 0ec0da6 chore(release): v1.3.3
  • a194905 chore: checkout the v1.3.2 tag as base
  • cf5d171 chore: checkout the entire git history up to HEAD
  • 8f456bb fix: remove upper version range for "typescript" (#2086)
  • 0039733 chore: force backport branch checkout on release
  • d5e0796 chore: remove custom "fetch-depth" for backport release job
  • b6ac315 chore: add automatic backport release pipeline
  • 2f72152 chore(release): v1.3.2
  • 0a857f6 fix: set minimal "graphql" version to 16.18.1 (#1754)
  • b225a88 chore: update to @​ossjs/release@​0.8.0 (#1740)
  • Additional commits viewable in compare view

Dependabot compatibility score

You can trigger a rebase of this PR by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Note
Automatic rebases have been disabled on this pull request as it has been open for over 30 days.

Bumps [msw](https://github.com/mswjs/msw) from 0.47.4 to 1.3.3.
- [Release notes](https://github.com/mswjs/msw/releases)
- [Changelog](https://github.com/mswjs/msw/blob/main/CHANGELOG.md)
- [Commits](mswjs/msw@v0.47.4...v1.3.3)

---
updated-dependencies:
- dependency-name: msw
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file no-changelog Indicates that a PR does not require a changelog entry ui labels Jul 1, 2024
Copy link
Member

@ravicious ravicious left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting changes because the update breaks mocks in the stories.

@@ -18,15 +18,15 @@

import { rest } from 'msw';

import type { SetupWorkerApi } from 'msw';
import type { SetupWorker } from 'msw';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a breaking change from v1.0.0.

rename "SetupWorkerApi"/"SetupServerApi" types to "SetupWorker"/"SetupServer"

Though SetupWorkerApi is still there and TypeScript wasn't complaining about anything. 🤔

@@ -67,7 +67,7 @@
"jest-styled-components": "^7.2.0",
"jsdom": "^21.1.0",
"jsdom-testing-mocks": "^1.13.0",
"msw": "^0.47.4",
"msw": "^1.3.3",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

msw 1.3.3 breaks mocks in stories unfortunately. Take a look at http://localhost:9002/?path=/story/teleport-discover-connectmycomputer-setupconnect--polling-success

export const PollingSuccess = () => (
<Provider>
<SetupConnect {...setupConnectProps} pingInterval={5} />
</Provider>
);
PollingSuccess.parameters = {
msw: {
handlers: [
rest.get(cfg.api.nodesPath, (req, res, ctx) => {
return res.once(ctx.json({ items: [] }));
}),
rest.get(cfg.api.nodesPath, (req, res, ctx) => {
return res(ctx.json({ items: [{ id: '1234', hostname: 'foo' }] }));
}),
],
},
};

After the update, I'm getting a warning about an outdated service worker telling me to run msw init. This is a red herring, it should go away after a hard reset or just by opening the storybook in an incognito window.

After getting through that, I see the following warning:

[MSW] Warning: captured a request without a matching request handler:

  • GET http://localhost:9002/v1/webapi/sites/aws/nodes

If you still wish to intercept this unhandled request, please create a request handler for it.
Read more: https://mswjs.io/docs/getting-started/mocks 6 main.iframe.bundle.js:173362:11


XHR GET http://localhost:9002/v1/webapi/sites/aws/nodes?searchAsRoles=&limit=50&startKey=&query=labels["teleport.dev/connect-my-computer/owner"] == "llama"&search=&sort=
[HTTP/1.1 404 Not Found 1ms]

Before that, I see another one related to what I assume is the actual problem:

[MSW] Found a redundant usage of query parameters in the request handler URL for "GET /v1/webapi/sites/:clusterId/nodes?searchAsRoles=:searchAsRoles?&limit=:limit?&startKey=:startKey?&query=:query?&search=:search?&sort=:sort?". Please match against a path instead and access query parameters in the response resolver function using "req.url.searchParams".

@ravicious
Copy link
Member

This might or might not need to be coupled with msw-storybook-addon update (#43693).

@ravicious
Copy link
Member

msw was updated in #44041.

@ravicious ravicious closed this Aug 29, 2024
Copy link
Contributor Author

dependabot bot commented on behalf of github Aug 29, 2024

OK, I won't notify you again about this release, but will get in touch when a new version is available. If you'd rather skip all updates until the next major or minor version, let me know by commenting @dependabot ignore this major version or @dependabot ignore this minor version. You can also ignore all major, minor, or patch releases for a dependency by adding an ignore condition with the desired update_types to your config file.

If you change your mind, just re-open this PR and I'll resolve any conflicts on it.

@dependabot dependabot bot deleted the dependabot/npm_and_yarn/msw-1.3.3 branch August 29, 2024 10:05
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 no-changelog Indicates that a PR does not require a changelog entry ui
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants