Bump msw from 0.47.4 to 1.3.3#43689
Conversation
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] <support@github.com>
ravicious
left a comment
There was a problem hiding this comment.
Requesting changes because the update breaks mocks in the stories.
| import { rest } from 'msw'; | ||
|
|
||
| import type { SetupWorkerApi } from 'msw'; | ||
| import type { SetupWorker } from 'msw'; |
There was a problem hiding this comment.
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. 🤔
| "jsdom": "^21.1.0", | ||
| "jsdom-testing-mocks": "^1.13.0", | ||
| "msw": "^0.47.4", | ||
| "msw": "^1.3.3", |
There was a problem hiding this comment.
msw 1.3.3 breaks mocks in stories unfortunately. Take a look at http://localhost:9002/?path=/story/teleport-discover-connectmycomputer-setupconnect--polling-success
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".
|
This might or might not need to be coupled with msw-storybook-addon update (#43693). |
|
msw was updated in #44041. |
|
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 If you change your mind, just re-open this PR and I'll resolve any conflicts on it. |
Bumps msw from 0.47.4 to 1.3.3.
Release notes
Sourced from msw's releases.
... (truncated)
Commits
0ec0da6chore(release): v1.3.3a194905chore: checkout the v1.3.2 tag as basecf5d171chore: checkout the entire git history up to HEAD8f456bbfix: remove upper version range for "typescript" (#2086)0039733chore: force backport branch checkout on released5e0796chore: remove custom "fetch-depth" for backport release jobb6ac315chore: add automatic backport release pipeline2f72152chore(release): v1.3.20a857f6fix: set minimal "graphql" version to 16.18.1 (#1754)b225a88chore: update to@ossjs/release@0.8.0 (#1740)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 rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot mergewill merge this PR after your CI passes on it@dependabot squash and mergewill squash and merge this PR after your CI passes on it@dependabot cancel mergewill cancel a previously requested merge and block automerging@dependabot reopenwill reopen this PR if it is closed@dependabot closewill close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill 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 versionwill 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 dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)