devDeps: Manually bump msw from 2.6.6 to 2.7.0

This bumps msw from 2.6.6 to 2.7.0
This commit is contained in:
regexowl 2024-12-17 09:08:43 +01:00 committed by Lucas Garfield
parent 68c7b566e9
commit 7da478791e
3 changed files with 21 additions and 9 deletions

10
package-lock.json generated
View file

@ -73,7 +73,7 @@
"madge": "8.0.0",
"mini-css-extract-plugin": "2.9.1",
"moment": "2.30.1",
"msw": "2.6.6",
"msw": "2.7.0",
"npm-run-all": "4.1.5",
"postcss-scss": "4.0.9",
"react-chartjs-2": "5.2.0",
@ -14390,9 +14390,9 @@
"license": "MIT"
},
"node_modules/msw": {
"version": "2.6.6",
"resolved": "https://registry.npmjs.org/msw/-/msw-2.6.6.tgz",
"integrity": "sha512-npfIIVRHKQX3Lw4aLWX4wBh+lQwpqdZNyJYB5K/+ktK8NhtkdsTxGK7WDrgknozcVyRI7TOqY6yBS9j2FTR+YQ==",
"version": "2.7.0",
"resolved": "https://registry.npmjs.org/msw/-/msw-2.7.0.tgz",
"integrity": "sha512-BIodwZ19RWfCbYTxWTUfTXc+sg4OwjCAgxU1ZsgmggX/7S3LdUifsbUPJs61j0rWb19CZRGY5if77duhc0uXzw==",
"dev": true,
"hasInstallScript": true,
"license": "MIT",
@ -14406,12 +14406,12 @@
"@open-draft/until": "^2.1.0",
"@types/cookie": "^0.6.0",
"@types/statuses": "^2.0.4",
"chalk": "^4.1.2",
"graphql": "^16.8.1",
"headers-polyfill": "^4.0.2",
"is-node-process": "^1.2.0",
"outvariant": "^1.4.3",
"path-to-regexp": "^6.3.0",
"picocolors": "^1.1.1",
"strict-event-emitter": "^0.5.1",
"type-fest": "^4.26.1",
"yargs": "^17.7.2"

View file

@ -71,7 +71,7 @@
"madge": "8.0.0",
"mini-css-extract-plugin": "2.9.1",
"moment": "2.30.1",
"msw": "2.6.6",
"msw": "2.7.0",
"npm-run-all": "4.1.5",
"postcss-scss": "4.0.9",
"react-chartjs-2": "5.2.0",

View file

@ -8,8 +8,8 @@
* - Please do NOT serve this file on production.
*/
const PACKAGE_VERSION = '2.6.6'
const INTEGRITY_CHECKSUM = 'ca7800994cc8bfb5eb961e037c877074'
const PACKAGE_VERSION = '2.7.0'
const INTEGRITY_CHECKSUM = '00729d72e3b82faf54ca8b9621dbb96f'
const IS_MOCKED_RESPONSE = Symbol('isMockedResponse')
const activeClientIds = new Set()
@ -199,7 +199,19 @@ async function getResponse(event, client, requestId) {
// Remove the "accept" header value that marked this request as passthrough.
// This prevents request alteration and also keeps it compliant with the
// user-defined CORS policies.
headers.delete('accept', 'msw/passthrough')
const acceptHeader = headers.get('accept')
if (acceptHeader) {
const values = acceptHeader.split(',').map((value) => value.trim())
const filteredValues = values.filter(
(value) => value !== 'msw/passthrough',
)
if (filteredValues.length > 0) {
headers.set('accept', filteredValues.join(', '))
} else {
headers.delete('accept')
}
}
return fetch(requestClone, { headers })
}