-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
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] <[email protected]>
There was a problem hiding this 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'; |
There was a problem hiding this comment.
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", |
There was a problem hiding this comment.
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
teleport/web/packages/teleport/src/Discover/ConnectMyComputer/SetupConnect/SetupConnect.story.tsx
Lines 99 to 116 in 629f2d3
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".
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
0ec0da6
chore(release): v1.3.3a194905
chore: checkout the v1.3.2 tag as basecf5d171
chore: checkout the entire git history up to HEAD8f456bb
fix: remove upper version range for "typescript" (#2086)0039733
chore: force backport branch checkout on released5e0796
chore: remove custom "fetch-depth" for backport release jobb6ac315
chore: add automatic backport release pipeline2f72152
chore(release): v1.3.20a857f6
fix: set minimal "graphql" version to 16.18.1 (#1754)b225a88
chore: 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 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)