build(deps): update dependencies (#1390)
Some checks are pending
Build / build (v26.5.0) (push) Waiting to run
CodeQL / Analyze (push) Waiting to run
Deploy Storybook / deploy (push) Waiting to run

* build(deps): update dependencies

 @vitejs/plugin-react   6.0.4  →   6.0.5
 lucide-react          1.26.0  →  1.28.0
 react-router-dom      7.18.1  →  7.18.2
 vite                   8.1.5  →   8.2.0
 @storybook/addon-a11y    10.5.4  →  10.5.5
 @storybook/addon-docs    10.5.4  →  10.5.5
 @storybook/addon-vitest  10.5.4  →  10.5.5
 @storybook/react-vite    10.5.4  →  10.5.5
 @types/node              26.1.1  →  26.1.2
 eslint-plugin-storybook  10.5.4  →  10.5.5
 storybook                10.5.4  →  10.5.5
 @playwright/test           1.61.1  →  1.62.0
 @testing-library/jest-dom   6.9.1  →  6.10.0
 globals                    17.7.0  →  17.8.0

* build: fix vitest warnings after update

* build(deps): update @hookform/resolvers to v5.5.7

* build(deps): update msw-storybook-addon to v3.0.0

note: still uses a deprecated feature as the migration path did not work properly

* build(dev-deps): update jsdom to v30.0.1
This commit is contained in:
Thebora Kompanioni 2026-07-30 21:25:10 +02:00 committed by GitHub
parent 02115e808a
commit e0d7479711
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 788 additions and 332 deletions

View file

@ -2,7 +2,8 @@
import { Suspense, useEffect } from 'react'
import type { Preview } from '@storybook/react-vite'
import { QueryClientProvider, QueryClient } from '@tanstack/react-query'
import { initialize, mswLoader } from 'msw-storybook-addon'
import { mswLoader } from 'msw-storybook-addon/csf3'
import { setupWorker } from 'msw/browser'
import { ThemeProvider } from 'next-themes'
import { I18nextProvider } from 'react-i18next'
import { MemoryRouter } from 'react-router-dom'
@ -17,15 +18,6 @@ import mswHandlers from './msw-handlers'
// needed if you want to use msw on a subpath (e.g. github pages /<repo>)
const mswServiceWorkerUrl = import.meta.env.STORYBOOK_MSW_SERVICE_WORKER_URL ?? '/mockServiceWorker.js'
// Initialize MSW (https://github.com/mswjs/msw-storybook-addon)
initialize({
onUnhandledRequest: 'bypass',
serviceWorker: {
url: mswServiceWorkerUrl,
},
quiet: true,
})
const locales = [
{ value: 'en', title: 'en' },
{ value: 'fr', title: 'fr' },
@ -85,12 +77,28 @@ const preview: Preview = {
viewport: {
options: { ...MINIMAL_VIEWPORTS, ...INITIAL_VIEWPORTS },
},
// this approach is deprecated as of v3.0.0
// but it seems the new approach does not work as expected (404 response for our handlers)
// revisit after next update (last checked 2026-07-30)
// see: https://github.com/mswjs/msw-storybook-addon/blob/v3.0.0/MIGRATION.md#parametersmsw-is-deprecated-in-favor-of-beforeeach
msw: {
handlers: mswHandlers,
},
},
// Provide the MSW addon loader globally
loaders: [mswLoader],
loaders: [
mswLoader(async () => {
const worker = setupWorker()
await worker.start({
onUnhandledRequest: 'bypass',
serviceWorker: {
url: mswServiceWorkerUrl,
},
quiet: true,
})
return worker
}),
],
}
const withTheme = (Story: React.ComponentType, context: GlobalContext) => {

1043
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -71,7 +71,7 @@
]
},
"dependencies": {
"@hookform/resolvers": "5.4.0",
"@hookform/resolvers": "5.5.7",
"@joinmarket-webui/joinmarket-ng-api-ts": "1.0.0",
"@noble/hashes": "2.2.0",
"@radix-ui/react-accordion": "1.2.20",
@ -100,7 +100,7 @@
"clsx": "2.1.1",
"html5-qrcode": "2.3.8",
"i18next-browser-languagedetector": "8.2.1",
"lucide-react": "1.26.0",
"lucide-react": "1.28.0",
"next-themes": "0.4.6",
"qrcode": "1.5.4",
"radix-ui": "1.6.7",
@ -108,7 +108,7 @@
"react-dom": "19.2.8",
"react-hook-form": "7.83.0",
"react-i18next": "17.0.11",
"react-router-dom": "7.18.1",
"react-router-dom": "7.18.2",
"react-use-websocket": "4.13.0",
"sonner": "2.0.7",
"tailwind-merge": "3.6.0",
@ -120,21 +120,21 @@
"devDependencies": {
"@chromatic-com/storybook": "5.2.1",
"@eslint/js": "9.39.5",
"@playwright/test": "1.61.1",
"@storybook/addon-a11y": "10.5.4",
"@storybook/addon-docs": "10.5.4",
"@storybook/addon-vitest": "10.5.4",
"@storybook/react-vite": "10.5.4",
"@playwright/test": "1.62.0",
"@storybook/addon-a11y": "10.5.5",
"@storybook/addon-docs": "10.5.5",
"@storybook/addon-vitest": "10.5.5",
"@storybook/react-vite": "10.5.5",
"@tanstack/eslint-plugin-query": "5.101.4",
"@testing-library/jest-dom": "6.9.1",
"@testing-library/jest-dom": "7.0.0",
"@testing-library/react": "16.3.2",
"@testing-library/user-event": "14.6.1",
"@trivago/prettier-plugin-sort-imports": "6.0.2",
"@types/node": "26.1.1",
"@types/node": "26.1.2",
"@types/qrcode": "1.5.6",
"@types/react": "19.2.17",
"@types/react-dom": "19.2.3",
"@vitejs/plugin-react": "6.0.4",
"@vitejs/plugin-react": "6.0.5",
"@vitest/browser": "4.1.10",
"@vitest/browser-playwright": "4.1.10",
"@vitest/coverage-v8": "4.1.10",
@ -143,20 +143,20 @@
"eslint-plugin-compat": "7.0.2",
"eslint-plugin-react-hooks": "7.1.1",
"eslint-plugin-react-refresh": "0.5.3",
"eslint-plugin-storybook": "10.5.4",
"eslint-plugin-storybook": "10.5.5",
"eslint-plugin-unicorn": "65.0.1",
"globals": "17.7.0",
"globals": "17.8.0",
"husky": "9.1.7",
"jsdom": "29.1.1",
"jsdom": "30.0.1",
"lint-staged": "17.2.0",
"msw": "2.15.0",
"msw-storybook-addon": "2.0.7",
"msw-storybook-addon": "3.0.0",
"prettier": "3.9.6",
"prettier-plugin-tailwindcss": "0.8.1",
"storybook": "10.5.4",
"storybook": "10.5.5",
"typescript": "6.0.3",
"typescript-eslint": "8.65.0",
"vite": "8.1.5",
"vite": "8.2.0",
"vitest": "4.1.10"
},
"overrides": {

View file

@ -3,7 +3,7 @@ import { yupResolver } from '@hookform/resolvers/yup'
import type { TFunction } from 'i18next'
import { HandshakeIcon, PercentIcon } from 'lucide-react'
import { useForm, useWatch } from 'react-hook-form'
import type { Resolver, SubmitHandler } from 'react-hook-form'
import type { SubmitHandler } from 'react-hook-form'
import { useTranslation } from 'react-i18next'
import * as yup from 'yup'
import { Button } from '@/components/ui/button'
@ -179,8 +179,7 @@ export function EarnForm({
} = useForm<EarnFormValues, unknown, EarnFormValues>({
mode: 'onSubmit',
defaultValues: FORM_INPUT_DEFAULT_VALUES,
// force type (see https://github.com/react-hook-form/resolvers/issues/807)
resolver: yupResolver(schema) as Resolver<EarnFormValues, unknown, EarnFormValues>,
resolver: yupResolver(schema),
})
const values = useWatch({ control })

View file

@ -75,7 +75,7 @@ export default defineConfig((config): UserConfig => {
],
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
'@': path.resolve(import.meta.dirname, './src'),
},
},
server: {

View file

@ -3,7 +3,7 @@ import { playwright } from '@vitest/browser-playwright'
import path from 'node:path'
import { mergeConfig } from 'vite'
import { ConfigEnv, coverageConfigDefaults, defineConfig, type ViteUserConfig } from 'vitest/config'
import viteConfig from './vite.config'
import viteConfig from './vite.config.ts'
export default defineConfig((args: ConfigEnv): ViteUserConfig => {
return mergeConfig(viteConfig(args), {
@ -41,7 +41,7 @@ export default defineConfig((args: ConfigEnv): ViteUserConfig => {
plugins: [
// The plugin will run tests for the stories defined in your Storybook config
// See options at: https://storybook.js.org/docs/next/writing-tests/integrations/vitest-addon#storybooktest
storybookTest({ configDir: path.resolve(__dirname, './.storybook') }),
storybookTest({ configDir: path.resolve(import.meta.dirname, './.storybook') }),
],
test: {
name: 'storybook',
@ -69,7 +69,7 @@ export default defineConfig((args: ConfigEnv): ViteUserConfig => {
},
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
'@': path.resolve(import.meta.dirname, './src'),
},
},
},