From 260814cc04c52d8e9368ec2a6beeb366f1c8d263 Mon Sep 17 00:00:00 2001 From: Artem Zakharchenko Date: Sat, 12 Sep 2020 07:15:59 +0200 Subject: [PATCH] Updates "msw" package to version 0.21.0 (#17012) --- examples/with-msw/package.json | 2 +- examples/with-msw/public/mockServiceWorker.js | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/examples/with-msw/package.json b/examples/with-msw/package.json index 4af39232c3046..d55b6641ec28e 100644 --- a/examples/with-msw/package.json +++ b/examples/with-msw/package.json @@ -8,7 +8,7 @@ }, "license": "MIT", "dependencies": { - "msw": "^0.20.4", + "msw": "^0.21.0", "next": "latest", "react": "^16.13.1", "react-dom": "^16.13.1" diff --git a/examples/with-msw/public/mockServiceWorker.js b/examples/with-msw/public/mockServiceWorker.js index fb1c0774bf493..e94d7a8f30569 100644 --- a/examples/with-msw/public/mockServiceWorker.js +++ b/examples/with-msw/public/mockServiceWorker.js @@ -7,7 +7,7 @@ /* eslint-disable */ /* tslint:disable */ -const INTEGRITY_CHECKSUM = 'ca2c3cd7453d8c614e2c19db63ede1a1' +const INTEGRITY_CHECKSUM = 'd1e0e502f550d40a34bee90822e4bf98' const bypassHeaderName = 'x-msw-bypass' let clients = {} @@ -27,6 +27,13 @@ self.addEventListener('message', async function (event) { const allClientIds = allClients.map((client) => client.id) switch (event.data) { + case 'KEEPALIVE_REQUEST': { + sendToClient(client, { + type: 'KEEPALIVE_RESPONSE', + }) + break + } + case 'INTEGRITY_CHECK_REQUEST': { sendToClient(client, { type: 'INTEGRITY_CHECK_RESPONSE',