From 9c1b1b84b88f7d01a7940544bb899387c810c03f Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 7 Jun 2024 02:21:49 +0000 Subject: [PATCH] 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 --- .../demo/package.json | 2 +- .../demo/public/mockServiceWorker.js | 19 ++++++++----------- pnpm-lock.yaml | 4 ++-- 3 files changed, 11 insertions(+), 14 deletions(-) diff --git a/packages/redux-devtools-rtk-query-monitor/demo/package.json b/packages/redux-devtools-rtk-query-monitor/demo/package.json index 7cb4e823..394e35bc 100644 --- a/packages/redux-devtools-rtk-query-monitor/demo/package.json +++ b/packages/redux-devtools-rtk-query-monitor/demo/package.json @@ -20,7 +20,7 @@ "@redux-devtools/rtk-query-monitor": "^5.0.0", "@reduxjs/toolkit": "^1.9.7", "framer-motion": "^11.2.10", - "msw": "^2.2.3", + "msw": "^2.3.1", "react": "^18.3.1", "react-dom": "^18.3.1", "react-icons": "^5.2.1", diff --git a/packages/redux-devtools-rtk-query-monitor/demo/public/mockServiceWorker.js b/packages/redux-devtools-rtk-query-monitor/demo/public/mockServiceWorker.js index cb86abcd..24fe3a25 100644 --- a/packages/redux-devtools-rtk-query-monitor/demo/public/mockServiceWorker.js +++ b/packages/redux-devtools-rtk-query-monitor/demo/public/mockServiceWorker.js @@ -2,13 +2,14 @@ /* tslint:disable */ /** - * Mock Service Worker (2.2.3). + * Mock Service Worker. * @see https://github.com/mswjs/msw * - Please do NOT modify this file. * - Please do NOT serve this file on production. */ -const INTEGRITY_CHECKSUM = '223d191a56023cd36aa88c802961b911' +const PACKAGE_VERSION = '2.3.1' +const INTEGRITY_CHECKSUM = '26357c79639bfa20d64c0efca2a87423' const IS_MOCKED_RESPONSE = Symbol('isMockedResponse') const activeClientIds = new Set() @@ -48,7 +49,10 @@ self.addEventListener('message', async function (event) { case 'INTEGRITY_CHECK_REQUEST': { sendToClient(client, { type: 'INTEGRITY_CHECK_RESPONSE', - payload: INTEGRITY_CHECKSUM, + payload: { + packageVersion: PACKAGE_VERSION, + checksum: INTEGRITY_CHECKSUM, + }, }) break } @@ -202,13 +206,6 @@ async function getResponse(event, client, requestId) { return passthrough() } - // Bypass requests with the explicit bypass header. - // Such requests can be issued by "ctx.fetch()". - const mswIntention = request.headers.get('x-msw-intention') - if (['bypass', 'passthrough'].includes(mswIntention)) { - return passthrough() - } - // Notify the client that a request has been intercepted. const requestBuffer = await request.arrayBuffer() const clientMessage = await sendToClient( @@ -240,7 +237,7 @@ async function getResponse(event, client, requestId) { return respondWithMock(clientMessage.data) } - case 'MOCK_NOT_FOUND': { + case 'PASSTHROUGH': { return passthrough() } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ae45f6de..52390fe8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -2436,7 +2436,7 @@ importers: specifier: ^11.2.10 version: 11.2.10(react-dom@18.3.1)(react@18.3.1) msw: - specifier: ^2.2.3 + specifier: ^2.3.1 version: 2.3.1(typescript@5.3.3) react: specifier: ^18.3.1 @@ -17343,7 +17343,7 @@ packages: bl: 4.1.0 chalk: 4.1.2 cli-cursor: 3.1.0 - cli-spinners: 2.6.1 + cli-spinners: 2.9.2 is-interactive: 1.0.0 log-symbols: 4.1.0 strip-ansi: 6.0.1