Skip to content
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

Updates "msw" package to version 0.21.0 #17012

Merged
merged 2 commits into from
Sep 12, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/with-msw/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
9 changes: 8 additions & 1 deletion examples/with-msw/public/mockServiceWorker.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
/* eslint-disable */
/* tslint:disable */

const INTEGRITY_CHECKSUM = 'ca2c3cd7453d8c614e2c19db63ede1a1'
const INTEGRITY_CHECKSUM = 'd1e0e502f550d40a34bee90822e4bf98'
const bypassHeaderName = 'x-msw-bypass'

let clients = {}
Expand All @@ -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',
Expand Down