build(deps): update dependencies (#1335)

* build(deps): update dependencies

 @storybook/addon-a11y    10.4.6  →  10.5.0
 @storybook/addon-docs    10.4.6  →  10.5.0
 @storybook/addon-vitest  10.4.6  →  10.5.0
 @storybook/react-vite    10.4.6  →  10.5.0
 conventional-changelog    7.2.1  →   8.1.0
 eslint-plugin-storybook  10.4.6  →  10.5.0
 lucide-react             1.23.0  →  1.24.0
 prettier                  3.9.4  →   3.9.5
 react-i18next            17.0.8  →  17.0.9
 storybook                10.4.6  →  10.5.0
 vite                      8.1.3  →   8.1.4
 @playwright/test            1.61.0  →  1.61.1
 @vitest/browser              4.1.9  →  4.1.10
 @vitest/browser-playwright   4.1.9  →  4.1.10
 @vitest/coverage-v8          4.1.9  →  4.1.10
 vitest                       4.1.9  →  4.1.10

* chore(dev): fail fast on pre-push tests

* chore(dev): re-init mockServiceWorker.js with v2.15.0
This commit is contained in:
Thebora Kompanioni 2026-07-11 08:46:26 +02:00 committed by GitHub
parent 2ebee2e8ee
commit 91901ae106
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 537 additions and 619 deletions

View file

@ -1 +1 @@
npm test
npm run test -- --bail=1

1071
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -98,14 +98,14 @@
"clsx": "2.1.1",
"html5-qrcode": "2.3.8",
"i18next-browser-languagedetector": "8.2.1",
"lucide-react": "1.23.0",
"lucide-react": "1.24.0",
"next-themes": "0.4.6",
"qrcode": "1.5.4",
"radix-ui": "1.6.2",
"react": "19.2.7",
"react-dom": "19.2.7",
"react-hook-form": "7.81.0",
"react-i18next": "17.0.8",
"react-i18next": "17.0.9",
"react-router-dom": "7.18.1",
"react-use-websocket": "4.13.0",
"sonner": "2.0.7",
@ -118,11 +118,11 @@
"devDependencies": {
"@chromatic-com/storybook": "5.2.1",
"@eslint/js": "9.39.4",
"@playwright/test": "1.61.0",
"@storybook/addon-a11y": "10.4.6",
"@storybook/addon-docs": "10.4.6",
"@storybook/addon-vitest": "10.4.6",
"@storybook/react-vite": "10.4.6",
"@playwright/test": "1.61.1",
"@storybook/addon-a11y": "10.5.0",
"@storybook/addon-docs": "10.5.0",
"@storybook/addon-vitest": "10.5.0",
"@storybook/react-vite": "10.5.0",
"@tanstack/eslint-plugin-query": "5.101.2",
"@testing-library/jest-dom": "6.9.1",
"@testing-library/react": "16.3.2",
@ -133,15 +133,15 @@
"@types/react": "19.2.17",
"@types/react-dom": "19.2.3",
"@vitejs/plugin-react": "6.0.3",
"@vitest/browser": "4.1.9",
"@vitest/browser-playwright": "4.1.9",
"@vitest/coverage-v8": "4.1.9",
"conventional-changelog": "7.2.1",
"@vitest/browser": "4.1.10",
"@vitest/browser-playwright": "4.1.10",
"@vitest/coverage-v8": "4.1.10",
"conventional-changelog": "8.1.0",
"eslint": "9.39.4",
"eslint-plugin-compat": "7.0.2",
"eslint-plugin-react-hooks": "7.1.1",
"eslint-plugin-react-refresh": "0.5.3",
"eslint-plugin-storybook": "10.4.6",
"eslint-plugin-storybook": "10.5.0",
"eslint-plugin-unicorn": "65.0.1",
"globals": "17.7.0",
"husky": "9.1.7",
@ -149,13 +149,13 @@
"lint-staged": "17.0.8",
"msw": "2.15.0",
"msw-storybook-addon": "2.0.7",
"prettier": "3.9.4",
"prettier": "3.9.5",
"prettier-plugin-tailwindcss": "0.8.0",
"storybook": "10.4.6",
"storybook": "10.5.0",
"typescript": "6.0.3",
"typescript-eslint": "8.63.0",
"vite": "8.1.3",
"vitest": "4.1.9"
"vite": "8.1.4",
"vitest": "4.1.10"
},
"overrides": {
"storybook": "$storybook",

View file

@ -7,8 +7,8 @@
* - Please do NOT modify this file.
*/
const PACKAGE_VERSION = '2.14.6'
const INTEGRITY_CHECKSUM = '4db4a41e972cec1b64cc569c66952d82'
const PACKAGE_VERSION = '2.15.0'
const INTEGRITY_CHECKSUM = '03cb67ac84128e63d7cd722a6e5b7f1e'
const IS_MOCKED_RESPONSE = Symbol('isMockedResponse')
const activeClientIds = new Set()
@ -98,7 +98,10 @@ addEventListener('fetch', function (event) {
// Opening the DevTools triggers the "only-if-cached" request
// that cannot be handled by the worker. Bypass such requests.
if (event.request.cache === 'only-if-cached' && event.request.mode !== 'same-origin') {
if (
event.request.cache === 'only-if-cached' &&
event.request.mode !== 'same-origin'
) {
return
}
@ -121,7 +124,12 @@ addEventListener('fetch', function (event) {
async function handleRequest(event, requestId, requestInterceptedAt) {
const client = await resolveMainClient(event)
const requestCloneForEvents = event.request.clone()
const response = await getResponse(event, client, requestId, requestInterceptedAt)
const response = await getResponse(
event,
client,
requestId,
requestInterceptedAt,
)
// Send back the response clone for the "response:*" life-cycle events.
// Ensure MSW is active and ready to handle the message, otherwise
@ -129,8 +137,18 @@ async function handleRequest(event, requestId, requestInterceptedAt) {
if (client && activeClientIds.has(client.id)) {
const serializedRequest = await serializeRequest(requestCloneForEvents)
// Omit the body of server-sent event stream responses.
// Cloning such responses would prevent client-side stream cancelations
// from reaching the original stream (a teed stream only cancels its
// source once both of its branches cancel) and would buffer the
// entire stream into the unconsumed clone indefinitely.
const isEventStreamResponse = response.headers
.get('content-type')
?.toLowerCase()
.startsWith('text/event-stream')
// Clone the response so both the client and the library could consume it.
const responseClone = response.clone()
const responseClone = isEventStreamResponse ? null : response.clone()
sendToClient(
client,
@ -143,15 +161,17 @@ async function handleRequest(event, requestId, requestInterceptedAt) {
...serializedRequest,
},
response: {
type: responseClone.type,
status: responseClone.status,
statusText: responseClone.statusText,
headers: Object.fromEntries(responseClone.headers.entries()),
body: responseClone.body,
type: response.type,
status: response.status,
statusText: response.statusText,
headers: Object.fromEntries(response.headers.entries()),
body: responseClone ? responseClone.body : null,
},
},
},
responseClone.body ? [serializedRequest.body, responseClone.body] : [],
responseClone && responseClone.body
? [serializedRequest.body, responseClone.body]
: [],
)
}
@ -216,7 +236,9 @@ async function getResponse(event, client, requestId, requestInterceptedAt) {
const acceptHeader = headers.get('accept')
if (acceptHeader) {
const values = acceptHeader.split(',').map((value) => value.trim())
const filteredValues = values.filter((value) => value !== 'msw/passthrough')
const filteredValues = values.filter(
(value) => value !== 'msw/passthrough',
)
if (filteredValues.length > 0) {
headers.set('accept', filteredValues.join(', '))
@ -287,7 +309,10 @@ function sendToClient(client, message, transferrables = []) {
resolve(event.data)
}
client.postMessage(message, [channel.port2, ...transferrables.filter(Boolean)])
client.postMessage(message, [
channel.port2,
...transferrables.filter(Boolean),
])
})
}