Skip to content

Commit 9c1b1b8

Browse files
fix(deps): update dependency msw to ^2.3.1 (#1656)
* fix(deps): update dependency msw to ^2.3.1 * Update --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Nathan Bierema <nbierema@gmail.com>
1 parent 6842c89 commit 9c1b1b8

File tree

3 files changed

+11
-14
lines changed

3 files changed

+11
-14
lines changed

packages/redux-devtools-rtk-query-monitor/demo/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"@redux-devtools/rtk-query-monitor": "^5.0.0",
2121
"@reduxjs/toolkit": "^1.9.7",
2222
"framer-motion": "^11.2.10",
23-
"msw": "^2.2.3",
23+
"msw": "^2.3.1",
2424
"react": "^18.3.1",
2525
"react-dom": "^18.3.1",
2626
"react-icons": "^5.2.1",

packages/redux-devtools-rtk-query-monitor/demo/public/mockServiceWorker.js

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@
22
/* tslint:disable */
33

44
/**
5-
* Mock Service Worker (2.2.3).
5+
* Mock Service Worker.
66
* @see https://github.com/mswjs/msw
77
* - Please do NOT modify this file.
88
* - Please do NOT serve this file on production.
99
*/
1010

11-
const INTEGRITY_CHECKSUM = '223d191a56023cd36aa88c802961b911'
11+
const PACKAGE_VERSION = '2.3.1'
12+
const INTEGRITY_CHECKSUM = '26357c79639bfa20d64c0efca2a87423'
1213
const IS_MOCKED_RESPONSE = Symbol('isMockedResponse')
1314
const activeClientIds = new Set()
1415

@@ -48,7 +49,10 @@ self.addEventListener('message', async function (event) {
4849
case 'INTEGRITY_CHECK_REQUEST': {
4950
sendToClient(client, {
5051
type: 'INTEGRITY_CHECK_RESPONSE',
51-
payload: INTEGRITY_CHECKSUM,
52+
payload: {
53+
packageVersion: PACKAGE_VERSION,
54+
checksum: INTEGRITY_CHECKSUM,
55+
},
5256
})
5357
break
5458
}
@@ -202,13 +206,6 @@ async function getResponse(event, client, requestId) {
202206
return passthrough()
203207
}
204208

205-
// Bypass requests with the explicit bypass header.
206-
// Such requests can be issued by "ctx.fetch()".
207-
const mswIntention = request.headers.get('x-msw-intention')
208-
if (['bypass', 'passthrough'].includes(mswIntention)) {
209-
return passthrough()
210-
}
211-
212209
// Notify the client that a request has been intercepted.
213210
const requestBuffer = await request.arrayBuffer()
214211
const clientMessage = await sendToClient(
@@ -240,7 +237,7 @@ async function getResponse(event, client, requestId) {
240237
return respondWithMock(clientMessage.data)
241238
}
242239

243-
case 'MOCK_NOT_FOUND': {
240+
case 'PASSTHROUGH': {
244241
return passthrough()
245242
}
246243
}

pnpm-lock.yaml

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)