The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
chore(deps): upgrade vitest to v5 (#49994)
Alaister Young1966209483ed
diff --git a/.gitignore b/.gitignoreindex 2d930f8f779..48d58ae1ad0 100644--- a/.gitignore+++ b/.gitignore@@ -7,6 +7,8 @@ tmp*.swpcoverage+# vitest reporter output (json/junit/html/attachments)+.vitestallure-resultsallure-report.nyc_outputdiff --git a/apps/docs/app/api/graphql/route.test.ts b/apps/docs/app/api/graphql/route.test.tsindex e64a01da124..357a64127be 100644--- a/apps/docs/app/api/graphql/route.test.ts+++ b/apps/docs/app/api/graphql/route.test.ts@@ -20,7 +20,6 @@ describe('/api/graphql POST basic error statuses', () => {})beforeEach(() => {- vi.clearAllMocks()vi.spyOn(console, 'error').mockImplementation(() => {})})diff --git a/apps/docs/app/api/revalidate/route.test.ts b/apps/docs/app/api/revalidate/route.test.tsindex 89eebe45087..52c9eb6bd92 100644--- a/apps/docs/app/api/revalidate/route.test.ts+++ b/apps/docs/app/api/revalidate/route.test.ts@@ -59,7 +59,6 @@ describe('_handleRevalidateRequest', () => {afterEach(() => {process.env = originalEnv- vi.clearAllMocks()vi.useRealTimers()})diff --git a/apps/docs/app/api/search/embeddings/route.test.ts b/apps/docs/app/api/search/embeddings/route.test.tsindex 8cf06aa5c0b..ea125374bab 100644--- a/apps/docs/app/api/search/embeddings/route.test.ts+++ b/apps/docs/app/api/search/embeddings/route.test.ts@@ -1,5 +1,5 @@import { NextRequest } from 'next/server'-import { afterEach, describe, expect, it, vi } from 'vitest'+import { describe, expect, it, vi } from 'vitest'import { POST } from './route'@@ -19,10 +19,6 @@ function makeRequest(body: unknown) {}describe('/api/search/embeddings', () => {- afterEach(() => {- vi.clearAllMocks()- })-it('returns 400 when query is missing', async () => {const response = await POST(makeRequest({}))expect(response.status).toBe(400)diff --git a/apps/docs/app/api/search/fts/route.test.ts b/apps/docs/app/api/search/fts/route.test.tsindex 04d947204c1..883544100b9 100644--- a/apps/docs/app/api/search/fts/route.test.ts+++ b/apps/docs/app/api/search/fts/route.test.ts@@ -1,5 +1,5 @@import { NextRequest } from 'next/server'-import { afterEach, describe, expect, it, vi } from 'vitest'+import { describe, expect, it, vi } from 'vitest'import { POST } from './route'@@ -21,10 +21,6 @@ function makeRequest(body: unknown) {}describe('/api/search/fts', () => {- afterEach(() => {- vi.clearAllMocks()- })-it('returns 400 when query is missing', async () => {const response = await POST(makeRequest({}))expect(response.status).toBe(400)diff --git a/apps/docs/features/directives/Show.test.ts b/apps/docs/features/directives/Show.test.tsindex 3fea57f5012..1a60f1bb086 100644--- a/apps/docs/features/directives/Show.test.ts+++ b/apps/docs/features/directives/Show.test.ts@@ -1,6 +1,6 @@import { mdxToMarkdown } from 'mdast-util-mdx'import { toMarkdown } from 'mdast-util-to-markdown'-import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'+import { afterEach, describe, expect, it, vi } from 'vitest'import { type Feature } from 'common'import { showRemark } from './Show'@@ -14,10 +14,6 @@ vi.mock('common/enabled-features', () => ({const { isFeatureEnabled } = await import('common/enabled-features')describe('$Show', () => {- beforeEach(() => {- vi.clearAllMocks()- })-afterEach(() => {vi.restoreAllMocks()})diff --git a/apps/docs/lib/custom-content/getCustomContent.test.ts b/apps/docs/lib/custom-content/getCustomContent.test.tsindex c48f5413e62..f129832b2a1 100644--- a/apps/docs/lib/custom-content/getCustomContent.test.ts+++ b/apps/docs/lib/custom-content/getCustomContent.test.ts@@ -1,7 +1,6 @@import { beforeEach, describe, expect, it, vi } from 'vitest'beforeEach(() => {- vi.clearAllMocks()vi.resetModules()})diff --git a/apps/docs/package.json b/apps/docs/package.jsonindex f0f734c7c57..519f9a455d3 100644--- a/apps/docs/package.json+++ b/apps/docs/package.json@@ -143,7 +143,7 @@"@graphql-codegen/typescript-resolvers": "4.5.0","@redocly/cli": "^2.26.0","@supabase/supa-mdx-lint": "0.3.2",- "@testing-library/react": "^16.0.0",+ "@testing-library/react": "^16.3.3","@types/common-tags": "^1.8.4","@types/estree": "1.0.5","@types/graphql-validation-complexity": "^0.4.4",@@ -182,7 +182,6 @@"typescript": "catalog:","unist-util-visit-parents": "5.1.3","vite": "catalog:",- "vite-tsconfig-paths": "catalog:","vitest": "catalog:"}}diff --git a/apps/docs/vitest.config.ts b/apps/docs/vitest.config.tsindex 30c7c2703b9..ba0c0334250 100644--- a/apps/docs/vitest.config.ts+++ b/apps/docs/vitest.config.ts@@ -1,19 +1,11 @@-import tsconfigPaths from 'vite-tsconfig-paths'import { defineConfig } from 'vitest/config'export default defineConfig({+ resolve: { tsconfigPaths: true },test: {// Exclude examples from test discovery (does not affect tsconfig scanning)exclude: ['examples/**/*', '**/node_modules/**'],setupFiles: ['vitest.setup.ts'],globalSetup: ['vitest.globalSetup.ts'],},- // Restrict tsconfig-paths to only use this app's tsconfig- plugins: [- tsconfigPaths({- root: import.meta.dirname,- // Prevent scanning tsconfig files in subfolders like examples/**- projects: ['tsconfig.json'],- }),- ],})diff --git a/apps/docs/vitest.setup.ts b/apps/docs/vitest.setup.tsindex ef03c799e6a..4256314e4fe 100644--- a/apps/docs/vitest.setup.ts+++ b/apps/docs/vitest.setup.ts@@ -1,5 +1,11 @@import { afterAll, beforeAll, vi } from 'vitest'+// Prevent errors about importing server-only modules from Client Components.+// Must stay at module scope: Vitest hoists `vi.mock` above imports.+vi.mock('server-only', () => {+ return {}+})+let oldEnv: NodeJS.ProcessEnvbeforeAll(() => {@@ -11,14 +17,8 @@ beforeAll(() => {NEXT_PUBLIC_SUPABASE_ANON_KEY:'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24iLCJleHAiOjE5ODM4MTI5OTZ9.CRXP1A7WOeoJeXxjNni43kdQwgnWNReilDMblYTn_I0',}-- // Prevent errors about importing server-only modules from Client Components- vi.mock('server-only', () => {- return {}- })})afterAll(() => {process.env = oldEnv- vi.doUnmock('server-only')})diff --git a/apps/lite-studio/package.json b/apps/lite-studio/package.jsonindex a149499c259..a0106d4b280 100644--- a/apps/lite-studio/package.json+++ b/apps/lite-studio/package.json@@ -29,7 +29,6 @@"config": "workspace:*","tailwindcss": "catalog:","tsconfig": "workspace:*",- "vite": "^7.3.2",- "vite-tsconfig-paths": "catalog:"+ "vite": "^7.3.2"}}diff --git a/apps/lite-studio/vite.config.ts b/apps/lite-studio/vite.config.tsindex 0c4c883e7e7..7f827bbf907 100644--- a/apps/lite-studio/vite.config.ts+++ b/apps/lite-studio/vite.config.ts@@ -1,14 +1,7 @@import { reactRouter } from '@react-router/dev/vite'import tailwindcss from '@tailwindcss/vite'import { defineConfig } from 'vite'-import tsconfigPaths from 'vite-tsconfig-paths'export default defineConfig({- plugins: [- reactRouter(),- tsconfigPaths({- root: '.',- }),- tailwindcss(),- ],+ plugins: [reactRouter(), tailwindcss()],})diff --git a/apps/studio/components/interfaces/APIKeys/CreateAPIKeyDialogs.test.tsx b/apps/studio/components/interfaces/APIKeys/CreateAPIKeyDialogs.test.tsxindex 15396d5e0e6..6eb3d5b9422 100644--- a/apps/studio/components/interfaces/APIKeys/CreateAPIKeyDialogs.test.tsx+++ b/apps/studio/components/interfaces/APIKeys/CreateAPIKeyDialogs.test.tsx@@ -38,7 +38,6 @@ vi.mock('@/data/api-keys/api-key-create-mutation', () => ({describe('API key create dialogs', () => {beforeEach(() => {- vi.clearAllMocks()mockUseQueryState.mockReturnValue(['', mockSetVisible])})diff --git a/apps/studio/components/interfaces/Account/Preferences/AccountIdentities.test.tsx b/apps/studio/components/interfaces/Account/Preferences/AccountIdentities.test.tsxindex 479d1664acd..f2eabc73323 100644--- a/apps/studio/components/interfaces/Account/Preferences/AccountIdentities.test.tsx+++ b/apps/studio/components/interfaces/Account/Preferences/AccountIdentities.test.tsx@@ -107,7 +107,6 @@ const openAddPasswordDialog = async () => {describe('AccountIdentities', () => {beforeEach(() => {- vi.clearAllMocks()refreshSessionMock.mockResolvedValue({ data: {}, error: null })signOutMock.mockResolvedValue({ error: null })useFlagMock.mockImplementation((name: string) => name === 'enableAccountPassword')diff --git a/apps/studio/components/interfaces/App/CommandMenu/ApiKeys.test.tsx b/apps/studio/components/interfaces/App/CommandMenu/ApiKeys.test.tsxindex 409d8374608..be1335a8ec8 100644--- a/apps/studio/components/interfaces/App/CommandMenu/ApiKeys.test.tsx+++ b/apps/studio/components/interfaces/App/CommandMenu/ApiKeys.test.tsx@@ -80,8 +80,6 @@ async function renderCommandPage() {describe('useApiKeysCommands', () => {beforeEach(() => {- vi.clearAllMocks()-mockUseAsyncCheckPermissions.mockReturnValue({ can: true })mockUseSelectedProjectQuery.mockReturnValue({data: { id: 1, ref: 'default', name: 'default' },diff --git a/apps/studio/components/interfaces/Auth/EmailTemplates/TemplateEditor.test.tsx b/apps/studio/components/interfaces/Auth/EmailTemplates/TemplateEditor.test.tsxindex eff4d0e4d77..8b7b6653b93 100644--- a/apps/studio/components/interfaces/Auth/EmailTemplates/TemplateEditor.test.tsx+++ b/apps/studio/components/interfaces/Auth/EmailTemplates/TemplateEditor.test.tsx@@ -134,7 +134,6 @@ const renderTemplateEditor = ({describe('TemplateEditor reset to default', () => {beforeEach(() => {- vi.clearAllMocks()validateSpamMock.mockImplementation((_vars, callbacks) => callbacks?.onSuccess?.({ rules: [] }))})diff --git a/apps/studio/components/interfaces/Auth/RedirectUrls/AddNewURLModal.test.tsx b/apps/studio/components/interfaces/Auth/RedirectUrls/AddNewURLModal.test.tsxindex 38dbdef939d..f79fa60b610 100644--- a/apps/studio/components/interfaces/Auth/RedirectUrls/AddNewURLModal.test.tsx+++ b/apps/studio/components/interfaces/Auth/RedirectUrls/AddNewURLModal.test.tsx@@ -55,7 +55,6 @@ vi.mock('sonner', () => ({describe('AddNewURLModal', () => {beforeEach(() => {- vi.clearAllMocks()useAuthConfigUpdateMutationMock.mockReturnValue({mutate: mutateMock,isPending: false,diff --git a/apps/studio/components/interfaces/Auth/SiteUrl/SiteUrl.test.tsx b/apps/studio/components/interfaces/Auth/SiteUrl/SiteUrl.test.tsxindex 5d949e8dc71..cb791814773 100644--- a/apps/studio/components/interfaces/Auth/SiteUrl/SiteUrl.test.tsx+++ b/apps/studio/components/interfaces/Auth/SiteUrl/SiteUrl.test.tsx@@ -36,8 +36,6 @@ const renderSiteUrl = () => customRender(<SiteUrl />)describe('SiteUrl', () => {beforeEach(() => {- vi.clearAllMocks()-addAPIMock({method: 'get',path: '/platform/auth/:ref/config',diff --git a/apps/studio/components/interfaces/Auth/Users/UserPanel.test.tsx b/apps/studio/components/interfaces/Auth/Users/UserPanel.test.tsxindex 23b4caea738..47350540faa 100644--- a/apps/studio/components/interfaces/Auth/Users/UserPanel.test.tsx+++ b/apps/studio/components/interfaces/Auth/Users/UserPanel.test.tsx@@ -1,7 +1,7 @@import { screen } from '@testing-library/react'import { http, HttpResponse } from 'msw'import { ResizablePanelGroup } from 'ui'-import { beforeEach, describe, expect, it, vi } from 'vitest'+import { describe, expect, it, vi } from 'vitest'import { UserPanel } from './UserPanel'import type { User } from '@/data/auth/users-infinite-query'@@ -69,10 +69,6 @@ const renderPanel = (disabledFeatures: string[] = []) => {}describe('UserPanel', () => {- beforeEach(() => {- vi.clearAllMocks()- })-it('shows the Logs tab when logs:all is enabled', async () => {renderPanel([])diff --git a/apps/studio/components/interfaces/Billing/Payment/PaymentMethods/PaymentMethods.test.tsx b/apps/studio/components/interfaces/Billing/Payment/PaymentMethods/PaymentMethods.test.tsxindex 29dbe25a73c..b1325eefd02 100644--- a/apps/studio/components/interfaces/Billing/Payment/PaymentMethods/PaymentMethods.test.tsx+++ b/apps/studio/components/interfaces/Billing/Payment/PaymentMethods/PaymentMethods.test.tsx@@ -56,7 +56,6 @@ vi.mock('./DeletePaymentMethodModal', () => ({describe('PaymentMethods', () => {beforeEach(() => {- vi.clearAllMocks()mockSelectedOrganization.mockReturnValue(createMockOrganization({slug: 'stripe-org',diff --git a/apps/studio/components/interfaces/ConnectButton/Connect.Commands.test.tsx b/apps/studio/components/interfaces/ConnectButton/Connect.Commands.test.tsxindex 057f5aa29dc..36e929891e5 100644--- a/apps/studio/components/interfaces/ConnectButton/Connect.Commands.test.tsx+++ b/apps/studio/components/interfaces/ConnectButton/Connect.Commands.test.tsx@@ -39,7 +39,6 @@ vi.mock('@/hooks/misc/useSelectedProject', () => ({describe('useConnectCommands', () => {beforeEach(() => {- vi.clearAllMocks()mockUseSelectedProjectQuery.mockReturnValue({data: { status: PROJECT_STATUS.ACTIVE_HEALTHY },})diff --git a/apps/studio/components/interfaces/ConnectSheet/__tests__/useConnectSheetShortcut.test.ts b/apps/studio/components/interfaces/ConnectSheet/__tests__/useConnectSheetShortcut.test.tsindex d0b32bbe16b..4570149bbcd 100644--- a/apps/studio/components/interfaces/ConnectSheet/__tests__/useConnectSheetShortcut.test.ts+++ b/apps/studio/components/interfaces/ConnectSheet/__tests__/useConnectSheetShortcut.test.ts@@ -42,7 +42,6 @@ vi.mock('@/state/shortcuts/useShortcut', () => ({describe('useConnectSheetShortcut', () => {beforeEach(() => {- vi.clearAllMocks()mockUseSelectedProjectQuery.mockReturnValue({data: { status: PROJECT_STATUS.ACTIVE_HEALTHY },})diff --git a/apps/studio/components/interfaces/Database/Publications/PublicationsAvailability.test.tsx b/apps/studio/components/interfaces/Database/Publications/PublicationsAvailability.test.tsxindex 244222531a9..2594bf39ed0 100644--- a/apps/studio/components/interfaces/Database/Publications/PublicationsAvailability.test.tsx+++ b/apps/studio/components/interfaces/Database/Publications/PublicationsAvailability.test.tsx@@ -1,5 +1,5 @@import { render, screen } from '@testing-library/react'-import { beforeEach, describe, expect, it, vi } from 'vitest'+import { describe, expect, it, vi } from 'vitest'import { PublicationsAvailability } from './PublicationsAvailability'@@ -12,10 +12,6 @@ vi.mock('@/hooks/misc/useHighAvailability', () => ({}))describe('PublicationsAvailability', () => {- beforeEach(() => {- vi.clearAllMocks()- })-it('shows the disabled empty state instead of page content for High Availability projects', () => {mockUseHighAvailability.mockReturnValue({ isHighAvailability: true })diff --git a/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/index.test.tsx b/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/index.test.tsxindex df407d369c8..953cf63bd65 100644--- a/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/index.test.tsx+++ b/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/index.test.tsx@@ -251,7 +251,6 @@ vi.mock('@/components/interfaces/Storage/AnalyticsBuckets/CreateAnalyticsBucketSdescribe('DestinationForm edit submission', () => {beforeEach(() => {- vi.clearAllMocks()pipelineTableIds = [101, 999]mocks.submitPipeline.mockResolvedValue(undefined)mocks.validateConfiguration.mockResolvedValue({ canContinue: true, warnings: [] })diff --git a/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/useDestinationForm.test.tsx b/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/useDestinationForm.test.tsxindex ea4832617bb..32771ae9e24 100644--- a/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/useDestinationForm.test.tsx+++ b/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/useDestinationForm.test.tsx@@ -85,7 +85,6 @@ const formData = {describe('useDestinationForm validation', () => {beforeEach(() => {- vi.clearAllMocks()mocks.validateDestination.mockResolvedValue({ validation_failures: [] })mocks.validatePipeline.mockResolvedValue({ validation_failures: [] })})diff --git a/apps/studio/components/interfaces/DiskManagement/ComputeAndDiskUsageCharts.test.tsx b/apps/studio/components/interfaces/DiskManagement/ComputeAndDiskUsageCharts.test.tsxindex 155dc75c4ea..c66f7bfcada 100644--- a/apps/studio/components/interfaces/DiskManagement/ComputeAndDiskUsageCharts.test.tsx+++ b/apps/studio/components/interfaces/DiskManagement/ComputeAndDiskUsageCharts.test.tsx@@ -143,7 +143,6 @@ const buildUsageResponse = ({describe('ComputeAndDiskUsageCharts', () => {beforeEach(() => {- vi.clearAllMocks()mockUseProject.mockReturnValue({ data: { infra_compute_size: 'micro' } })mockUseInfraMonitoringAttributesQuery.mockReturnValue({data: buildUsageResponse(),diff --git a/apps/studio/components/interfaces/ErrorHandling/ErrorMatcher.test.tsx b/apps/studio/components/interfaces/ErrorHandling/ErrorMatcher.test.tsxindex d3f551ce4d5..22d004f1056 100644--- a/apps/studio/components/interfaces/ErrorHandling/ErrorMatcher.test.tsx+++ b/apps/studio/components/interfaces/ErrorHandling/ErrorMatcher.test.tsx@@ -1,5 +1,5 @@import { render, screen } from '@testing-library/react'-import { beforeEach, describe, expect, it, vi } from 'vitest'+import { describe, expect, it, vi } from 'vitest'import { ErrorMatcher } from './ErrorMatcher'import { ConnectionTimeoutError } from '@/types/api-errors'@@ -20,8 +20,6 @@ vi.mock('./RestartProjectDialog', () => ({}))describe('ErrorMatcher', () => {- beforeEach(() => vi.clearAllMocks())-it('renders the provided title and error message', () => {render(<ErrorMatcherdiff --git a/apps/studio/components/interfaces/Explorer/QueryEditor/QueryResultError.selfhosted.test.tsx b/apps/studio/components/interfaces/Explorer/QueryEditor/QueryResultError.selfhosted.test.tsxindex 7ec4302a2fa..354291b5ed0 100644--- a/apps/studio/components/interfaces/Explorer/QueryEditor/QueryResultError.selfhosted.test.tsx+++ b/apps/studio/components/interfaces/Explorer/QueryEditor/QueryResultError.selfhosted.test.tsx@@ -40,7 +40,6 @@ vi.mock('@/data/config/project-settings-v2-query', () => ({describe('QueryResultError (self-hosted)', () => {beforeEach(() => {- vi.clearAllMocks()mocks.useParams.mockReturnValue({ ref: 'default' })addAPIMock({method: 'get',diff --git a/apps/studio/components/interfaces/Explorer/QueryEditor/QueryResultError.test.tsx b/apps/studio/components/interfaces/Explorer/QueryEditor/QueryResultError.test.tsxindex f7d6b75c223..7b7f1732bb1 100644--- a/apps/studio/components/interfaces/Explorer/QueryEditor/QueryResultError.test.tsx+++ b/apps/studio/components/interfaces/Explorer/QueryEditor/QueryResultError.test.tsx@@ -52,7 +52,6 @@ vi.mock('@/data/config/project-settings-v2-query', () => ({describe('QueryResultError', () => {beforeEach(() => {- vi.clearAllMocks()mocks.useParams.mockReturnValue({ ref: 'default' })mocks.useOrgSubscriptionQuery.mockReturnValue({ data: undefined, isSuccess: true })mocks.useProjectSettingsV2Query.mockReturnValue({ data: undefined, isSuccess: true })diff --git a/apps/studio/components/interfaces/Explorer/__tests__/ExplorerChatTab.test.tsx b/apps/studio/components/interfaces/Explorer/__tests__/ExplorerChatTab.test.tsxindex 7171a783204..b7e5b1fa323 100644--- a/apps/studio/components/interfaces/Explorer/__tests__/ExplorerChatTab.test.tsx+++ b/apps/studio/components/interfaces/Explorer/__tests__/ExplorerChatTab.test.tsx@@ -79,7 +79,6 @@ vi.mock('@/components/ui/AIAssistantPanel/AssistantChat', () => ({describe('ExplorerChatTab', () => {beforeEach(() => {- vi.clearAllMocks()mocks.useParams.mockReturnValue({ ref: 'default', id: 'chat-1' })mocks.assistantSnapshot.mockReturnValue({isInitialized: true,diff --git a/apps/studio/components/interfaces/Explorer/__tests__/hooks.test.tsx b/apps/studio/components/interfaces/Explorer/__tests__/hooks.test.tsxindex 8398181396a..23824ccfe80 100644--- a/apps/studio/components/interfaces/Explorer/__tests__/hooks.test.tsx+++ b/apps/studio/components/interfaces/Explorer/__tests__/hooks.test.tsx@@ -45,7 +45,6 @@ vi.mock('@/state/ai-assistant-state', () => ({describe('useCreateChat', () => {beforeEach(() => {- vi.clearAllMocks()mockWhenInitialized.mockImplementation(() => Promise.resolve())})@@ -112,10 +111,6 @@ describe('useCreateChat', () => {})describe('useCreateQuery', () => {- beforeEach(() => {- vi.clearAllMocks()- })-it('creates a draft and opens it as an Explorer query tab', () => {const { result } = renderHook(() => useCreateQuery())diff --git a/apps/studio/components/interfaces/JwtSecrets/jwt-secret-keys-table/action-panel.test.tsx b/apps/studio/components/interfaces/JwtSecrets/jwt-secret-keys-table/action-panel.test.tsxindex 7ed2c4486b8..9589e6730e7 100644--- a/apps/studio/components/interfaces/JwtSecrets/jwt-secret-keys-table/action-panel.test.tsx+++ b/apps/studio/components/interfaces/JwtSecrets/jwt-secret-keys-table/action-panel.test.tsx@@ -1,6 +1,6 @@import { render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'-import { beforeEach, describe, expect, it, vi } from 'vitest'+import { describe, expect, it, vi } from 'vitest'import { ActionPanel } from './action-panel'import { SHORTCUT_IDS } from '@/state/shortcuts/registry'@@ -14,10 +14,6 @@ vi.mock('@/components/ui/Shortcut', () => ({}))describe('ActionPanel', () => {- beforeEach(() => {- vi.clearAllMocks()- })-it('wraps the action button with a shortcut when one is provided', async () => {const user = userEvent.setup()const onClick = vi.fn()diff --git a/apps/studio/components/interfaces/JwtSecrets/jwt-secret-keys-table/create-key-dialog.test.tsx b/apps/studio/components/interfaces/JwtSecrets/jwt-secret-keys-table/create-key-dialog.test.tsxindex ea5443d2d26..582d8a4b9c2 100644--- a/apps/studio/components/interfaces/JwtSecrets/jwt-secret-keys-table/create-key-dialog.test.tsx+++ b/apps/studio/components/interfaces/JwtSecrets/jwt-secret-keys-table/create-key-dialog.test.tsx@@ -1,6 +1,6 @@import { render, screen } from '@testing-library/react'import { Dialog, DialogContent } from 'ui'-import { beforeEach, describe, expect, it, vi } from 'vitest'+import { describe, expect, it, vi } from 'vitest'import { CreateKeyDialog } from './create-key-dialog'import { SHORTCUT_IDS } from '@/state/shortcuts/registry'@@ -25,10 +25,6 @@ vi.mock('sonner', () => ({}))describe('CreateKeyDialog', () => {- beforeEach(() => {- vi.clearAllMocks()- })-it('wraps the create standby key button with the submit shortcut', () => {render(<Dialog open>diff --git a/apps/studio/components/interfaces/LocalDropdown.test.tsx b/apps/studio/components/interfaces/LocalDropdown.test.tsxindex 7cdfdb91a9d..800a8dce2ef 100644--- a/apps/studio/components/interfaces/LocalDropdown.test.tsx+++ b/apps/studio/components/interfaces/LocalDropdown.test.tsx@@ -182,7 +182,6 @@ vi.mock('ui', async () => {describe('LocalDropdown', () => {beforeEach(() => {- vi.clearAllMocks()mockUseDevToolbar.mockReturnValue({isAvailable: false,isEnabled: false,diff --git a/apps/studio/components/interfaces/LogDrains/LogDrainDestinationSheetForm.test.tsx b/apps/studio/components/interfaces/LogDrains/LogDrainDestinationSheetForm.test.tsxindex 0a2fc184023..741027c76e7 100644--- a/apps/studio/components/interfaces/LogDrains/LogDrainDestinationSheetForm.test.tsx+++ b/apps/studio/components/interfaces/LogDrains/LogDrainDestinationSheetForm.test.tsx@@ -77,8 +77,6 @@ const submitForm = () =>describe('LogDrainDestinationSheetForm', () => {beforeEach(() => {- vi.clearAllMocks()-useFlagMock.mockReturnValue(true)useParamsMock.mockReturnValue({ ref: 'project-ref' })useLogDrainsQueryMock.mockReturnValue({ data: [] })diff --git a/apps/studio/components/interfaces/Organization/BillingSettings/BillingCustomerData/BillingCustomerData.test.tsx b/apps/studio/components/interfaces/Organization/BillingSettings/BillingCustomerData/BillingCustomerData.test.tsxindex 203c3879cc1..6fd15885344 100644--- a/apps/studio/components/interfaces/Organization/BillingSettings/BillingCustomerData/BillingCustomerData.test.tsx+++ b/apps/studio/components/interfaces/Organization/BillingSettings/BillingCustomerData/BillingCustomerData.test.tsx@@ -106,7 +106,6 @@ vi.mock('@/components/ui/PartnerManagedResource', () => ({describe('BillingCustomerData', () => {beforeEach(() => {- vi.clearAllMocks()mockSelectedOrganization.mockReturnValue(createMockOrganization({slug: 'stripe-org',diff --git a/apps/studio/components/interfaces/Organization/BillingSettings/BillingEmail.test.tsx b/apps/studio/components/interfaces/Organization/BillingSettings/BillingEmail.test.tsxindex a5692cdce14..68329323d15 100644--- a/apps/studio/components/interfaces/Organization/BillingSettings/BillingEmail.test.tsx+++ b/apps/studio/components/interfaces/Organization/BillingSettings/BillingEmail.test.tsx@@ -94,7 +94,6 @@ const removeRecipient = (email: string) => {describe('BillingEmail', () => {beforeEach(() => {- vi.clearAllMocks()mockCheckPermissions.mockImplementation(() => ({ can: true, isSuccess: true }))})diff --git a/apps/studio/components/interfaces/Organization/BillingSettings/Subscription/PlanUpdateSidePanel.test.tsx b/apps/studio/components/interfaces/Organization/BillingSettings/Subscription/PlanUpdateSidePanel.test.tsxindex 3607d413e60..a35f2891d89 100644--- a/apps/studio/components/interfaces/Organization/BillingSettings/Subscription/PlanUpdateSidePanel.test.tsx+++ b/apps/studio/components/interfaces/Organization/BillingSettings/Subscription/PlanUpdateSidePanel.test.tsx@@ -152,7 +152,6 @@ vi.mock('@/hooks/misc/useTrackExperimentExposure', () => ({describe('PlanUpdateSidePanel', () => {beforeEach(() => {- vi.clearAllMocks()mockIsPlatform.value = truemockFeatureFlags.mockReturnValue({ posthog: {}, configcat: {}, hasLoaded: true })mockUsePHFlag.mockReturnValue('control')diff --git a/apps/studio/components/interfaces/Organization/BillingSettings/Subscription/Subscription.test.tsx b/apps/studio/components/interfaces/Organization/BillingSettings/Subscription/Subscription.test.tsxindex 4ce21d8f9bb..34978b2375a 100644--- a/apps/studio/components/interfaces/Organization/BillingSettings/Subscription/Subscription.test.tsx+++ b/apps/studio/components/interfaces/Organization/BillingSettings/Subscription/Subscription.test.tsx@@ -47,7 +47,6 @@ vi.mock('./PlanUpdateSidePanel', () => ({describe('Subscription', () => {beforeEach(() => {- vi.clearAllMocks()mockSubscription.mockReturnValue({data: {plan: { id: 'free', name: 'Free' },diff --git a/apps/studio/components/interfaces/Organization/InvoicesSettings/InvoicesSettings.test.tsx b/apps/studio/components/interfaces/Organization/InvoicesSettings/InvoicesSettings.test.tsxindex 05f922830c8..9921530f961 100644--- a/apps/studio/components/interfaces/Organization/InvoicesSettings/InvoicesSettings.test.tsx+++ b/apps/studio/components/interfaces/Organization/InvoicesSettings/InvoicesSettings.test.tsx@@ -75,7 +75,6 @@ const createMockInvoiceWithoutPdf = (): Invoice => {describe('InvoicesSettings', () => {beforeEach(() => {- vi.clearAllMocks()mockSelectedOrganization.mockReturnValue(createMockOrganization({slug: 'stripe-org',diff --git a/apps/studio/components/interfaces/Organization/Usage/Usage.test.tsx b/apps/studio/components/interfaces/Organization/Usage/Usage.test.tsxindex 9718945acbc..a13728da302 100644--- a/apps/studio/components/interfaces/Organization/Usage/Usage.test.tsx+++ b/apps/studio/components/interfaces/Organization/Usage/Usage.test.tsx@@ -40,8 +40,6 @@ vi.mock('@/data/subscriptions/org-subscription-query', () => ({describe('Usage', () => {beforeEach(() => {- vi.clearAllMocks()-mockUseAsyncCheckPermissions.mockReturnValue({ can: true, isLoading: false })mockUseProjectDetailQuery.mockReturnValue({data: {diff --git a/apps/studio/components/interfaces/OrganizationInvite/OrganizationInvite.test.tsx b/apps/studio/components/interfaces/OrganizationInvite/OrganizationInvite.test.tsxindex a76d7420e1f..86bdeed54a0 100644--- a/apps/studio/components/interfaces/OrganizationInvite/OrganizationInvite.test.tsx+++ b/apps/studio/components/interfaces/OrganizationInvite/OrganizationInvite.test.tsx@@ -116,7 +116,6 @@ function setSignedInDefaults() {describe('OrganizationInvite', () => {beforeEach(() => {- vi.clearAllMocks()setSignedInDefaults()})diff --git a/apps/studio/components/interfaces/Platform/Webhooks/PlatformWebhooksEndpointSheet.test.tsx b/apps/studio/components/interfaces/Platform/Webhooks/PlatformWebhooksEndpointSheet.test.tsxindex 82dee7c35d3..417f4740ad5 100644--- a/apps/studio/components/interfaces/Platform/Webhooks/PlatformWebhooksEndpointSheet.test.tsx+++ b/apps/studio/components/interfaces/Platform/Webhooks/PlatformWebhooksEndpointSheet.test.tsx@@ -1,7 +1,7 @@import { fireEvent, screen, waitFor } from '@testing-library/react'import userEvent from '@testing-library/user-event'import type { ComponentProps } from 'react'-import { afterEach, describe, expect, it, vi } from 'vitest'+import { describe, expect, it, vi } from 'vitest'import type { WebhookEndpoint } from './PlatformWebhooks.types'import { PlatformWebhooksEndpointSheet, toEndpointPayload } from './PlatformWebhooksEndpointSheet'@@ -65,10 +65,6 @@ const findEventTypeCheckbox = (eventType: string) =>name: new RegExp(eventType.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')),})describe('PlatformWebhooksEndpointSheet', () => {- afterEach(() => {- vi.clearAllMocks()- })-it('prefills the name field when creating an endpoint', async () => {renderEndpointSheet()diff --git a/apps/studio/components/interfaces/Realtime/RealtimeSettings.test.tsx b/apps/studio/components/interfaces/Realtime/RealtimeSettings.test.tsxindex 09af13e3595..9ecb2680e95 100644--- a/apps/studio/components/interfaces/Realtime/RealtimeSettings.test.tsx+++ b/apps/studio/components/interfaces/Realtime/RealtimeSettings.test.tsx@@ -84,8 +84,6 @@ const REALTIME_ENTITLEMENTS: Entitlement[] = (describe('RealtimeSettings', () => {beforeEach(() => {- vi.clearAllMocks()-mockUseAsyncCheckPermissions.mockReturnValue({ can: true, isSuccess: true })mockUseSelectedProjectQuery.mockReturnValue({data: { ref: 'default', connectionString: 'postgresql://example' },diff --git a/apps/studio/components/interfaces/RedeemCredits/RedeemCredits.test.tsx b/apps/studio/components/interfaces/RedeemCredits/RedeemCredits.test.tsxindex 60e47e94859..9eb57b4ddbe 100644--- a/apps/studio/components/interfaces/RedeemCredits/RedeemCredits.test.tsx+++ b/apps/studio/components/interfaces/RedeemCredits/RedeemCredits.test.tsx@@ -73,7 +73,6 @@ function renderScreen() {describe('RedeemCreditsScreen', () => {beforeEach(() => {- vi.clearAllMocks()creditRedemptionQueryCode.current = undefinedrouterMock.setCurrentUrl('/redeem')})diff --git a/apps/studio/components/interfaces/Settings/Database/ConnectionPooling/ConnectionPooling.test.tsx b/apps/studio/components/interfaces/Settings/Database/ConnectionPooling/ConnectionPooling.test.tsxindex 8a99bec0ec2..48149da7a41 100644--- a/apps/studio/components/interfaces/Settings/Database/ConnectionPooling/ConnectionPooling.test.tsx+++ b/apps/studio/components/interfaces/Settings/Database/ConnectionPooling/ConnectionPooling.test.tsx@@ -73,8 +73,6 @@ const expectEveryQueryCall = (queryMock: ReturnType<typeof vi.fn>, enabled: booldescribe('ConnectionPooling', () => {beforeEach(() => {- vi.clearAllMocks()-mockUseSelectedProjectQuery.mockReturnValue({data: {id: 1,diff --git a/apps/studio/components/interfaces/Settings/Database/PoolingModesModal.test.tsx b/apps/studio/components/interfaces/Settings/Database/PoolingModesModal.test.tsxindex 3258a0327b1..c4f2f5e1d11 100644--- a/apps/studio/components/interfaces/Settings/Database/PoolingModesModal.test.tsx+++ b/apps/studio/components/interfaces/Settings/Database/PoolingModesModal.test.tsx@@ -46,8 +46,6 @@ const expectEveryQueryCall = (queryMock: ReturnType<typeof vi.fn>, enabled: booldescribe('PoolingModesModal', () => {beforeEach(() => {- vi.clearAllMocks()-mockUseDatabaseSettingsStateSnapshot.mockReturnValue({showPoolingModeHelper: true,setShowPoolingModeHelper: vi.fn(),diff --git a/apps/studio/components/interfaces/Settings/Database/SSLConfiguration.test.tsx b/apps/studio/components/interfaces/Settings/Database/SSLConfiguration.test.tsxindex 0d701f78f69..9e10370d335 100644--- a/apps/studio/components/interfaces/Settings/Database/SSLConfiguration.test.tsx+++ b/apps/studio/components/interfaces/Settings/Database/SSLConfiguration.test.tsx@@ -87,8 +87,6 @@ function mockSSLEnforcement(config: SslEnforcementResponse) {describe('SSLConfiguration', () => {beforeEach(() => {- vi.clearAllMocks()-mockUseSelectedProjectQuery.mockReturnValue({ data: { id: 1, ref: 'default' } })mockUseAsyncCheckPermissions.mockReturnValue({ can: true })mockProjectSettings()diff --git a/apps/studio/components/interfaces/Settings/General/Infrastructure/RestartServerButton.test.tsx b/apps/studio/components/interfaces/Settings/General/Infrastructure/RestartServerButton.test.tsxindex 940c2617184..9f73d09524b 100644--- a/apps/studio/components/interfaces/Settings/General/Infrastructure/RestartServerButton.test.tsx+++ b/apps/studio/components/interfaces/Settings/General/Infrastructure/RestartServerButton.test.tsx@@ -42,7 +42,6 @@ vi.mock('@/hooks/misc/useSelectedProject', () => ({describe('RestartServerButton', () => {beforeEach(() => {- vi.clearAllMocks()mockUseFlag.mockReturnValue(false)mockUseAsyncCheckPermissions.mockReturnValue({ can: true })mockUseIsFeatureEnabled.mockReturnValue({ projectSettingsRestartProject: true })diff --git a/apps/studio/components/interfaces/Settings/General/Project.test.tsx b/apps/studio/components/interfaces/Settings/General/Project.test.tsxindex f5d6803b62d..1c2aa079dc2 100644--- a/apps/studio/components/interfaces/Settings/General/Project.test.tsx+++ b/apps/studio/components/interfaces/Settings/General/Project.test.tsx@@ -76,8 +76,6 @@ vi.mock('@/hooks/misc/useSelectedProject', () => ({describe('Project settings availability', () => {beforeEach(() => {- vi.clearAllMocks()-mockUseIsFeatureEnabled.mockReturnValue({projectSettingsRestartProject: true,})diff --git a/apps/studio/components/interfaces/Settings/General/ServiceVersions/ServiceVersionsSection.test.tsx b/apps/studio/components/interfaces/Settings/General/ServiceVersions/ServiceVersionsSection.test.tsxindex 1f384ce4210..9debbbecc34 100644--- a/apps/studio/components/interfaces/Settings/General/ServiceVersions/ServiceVersionsSection.test.tsx+++ b/apps/studio/components/interfaces/Settings/General/ServiceVersions/ServiceVersionsSection.test.tsx@@ -122,7 +122,6 @@ vi.mock('@/hooks/misc/useSelectedProject', () => ({describe('ServiceVersionsSection', () => {beforeEach(() => {- vi.clearAllMocks()mockUseFeatures.mockReturnValue({projectAuthAll: true,projectSettingsDatabaseUpgrades: true,diff --git a/apps/studio/components/interfaces/Storage/__tests__/CreateBucketModal.test.tsx b/apps/studio/components/interfaces/Storage/__tests__/CreateBucketModal.test.tsxindex dd67cccd98e..f7de92004a0 100644--- a/apps/studio/components/interfaces/Storage/__tests__/CreateBucketModal.test.tsx+++ b/apps/studio/components/interfaces/Storage/__tests__/CreateBucketModal.test.tsx@@ -8,12 +8,13 @@ import { customRender } from '@/tests/lib/custom-render'import { addAPIMock } from '@/tests/lib/msw'import { routerMock } from '@/tests/lib/route-mock'+vi.mock(`hooks/misc/useCheckPermissions`, () => ({+ useCheckPermissions: vi.fn(),+ useAsyncCheckPermissions: vi.fn().mockImplementation(() => ({ can: true })),+}))+describe(`CreateBucketModal`, () => {beforeEach(() => {- vi.mock(`hooks/misc/useCheckPermissions`, () => ({- useCheckPermissions: vi.fn(),- useAsyncCheckPermissions: vi.fn().mockImplementation(() => ({ can: true })),- }))// useParamsrouterMock.setCurrentUrl(`/project/default/storage/buckets`)// useSelectedProject -> Projectdiff --git a/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/RowEditor/RowEditor.utils.test.ts b/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/RowEditor/RowEditor.utils.test.tsindex 7fbe7e41464..64a66b311c1 100644--- a/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/RowEditor/RowEditor.utils.test.ts+++ b/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/RowEditor/RowEditor.utils.test.ts@@ -96,11 +96,16 @@ describe('parseValue', () => {it('should return originalValue even when an error occurs', () => {const originalValue = 'some value'const format = 'some format'- // Mocking an error occurring during parsing- JSON.stringify = vi.fn(() => {+ // Mocking an error occurring during parsing. Must be restored before the file+ // ends: the coverage provider serializes its data with JSON.stringify.+ const stringifySpy = vi.spyOn(JSON, 'stringify').mockImplementation(() => {throw new Error('Mocked error')})- expect(parseValue(originalValue, format)).toEqual(originalValue)+ try {+ expect(parseValue(originalValue, format)).toEqual(originalValue)+ } finally {+ stringifySpy.mockRestore()+ }})})@@ -459,9 +464,7 @@ describe('validateFields', () => {expect(validateFields(fields)).toEqual({ tags: 'Value is an invalid array' })})- it('should handle JSON validation (minifyJSON dependency issue)', () => {- // Note: This test shows that minifyJSON currently fails on all JSON input- // This may be due to missing dependencies in the test environment+ it('should accept valid JSON', () => {const fields: RowField[] = [createField({name: 'data',@@ -469,8 +472,7 @@ describe('validateFields', () => {value: '{}',}),]- // Currently all JSON fails validation in test environment- expect(validateFields(fields)).toEqual({ data: 'Value is invalid JSON' })+ expect(validateFields(fields)).toEqual({})})it('should return error for invalid JSON', () => {diff --git a/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/SidePanelEditor.utils.createTable.test.ts b/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/SidePanelEditor.utils.createTable.test.tsindex 2f5b366797a..d9c87e78f03 100644--- a/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/SidePanelEditor.utils.createTable.test.ts+++ b/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/SidePanelEditor.utils.createTable.test.ts@@ -90,8 +90,6 @@ describe('createTable', () => {}beforeEach(() => {- vi.clearAllMocks()-// Default mock implementationsmockExecuteSql.mockResolvedValue({ result: [] })mockGetTable.mockResolvedValue(mockTableResult)diff --git a/apps/studio/components/layouts/APIKeys/APIKeysLayout.test.tsx b/apps/studio/components/layouts/APIKeys/APIKeysLayout.test.tsxindex 9dffd1d9b6d..b9e87b72ffe 100644--- a/apps/studio/components/layouts/APIKeys/APIKeysLayout.test.tsx+++ b/apps/studio/components/layouts/APIKeys/APIKeysLayout.test.tsx@@ -1,5 +1,5 @@import { screen } from '@testing-library/react'-import { beforeEach, describe, expect, it, vi } from 'vitest'+import { describe, expect, it, vi } from 'vitest'import ApiKeysLayout from './APIKeysLayout'import { customRender } from '@/tests/lib/custom-render'@@ -16,10 +16,6 @@ const LEGACY_TAB = 'Legacy anon, service_role API keys'const NEW_TAB = 'Publishable and secret API keys'describe('ApiKeysLayout', () => {- beforeEach(() => {- vi.clearAllMocks()- })-it('hides the legacy keys tab on High Availability projects', () => {mockUseHighAvailability.mockReturnValue({ isHighAvailability: true, isPending: false })diff --git a/apps/studio/components/layouts/AppLayout/AdvisorButton.self-hosted.test.tsx b/apps/studio/components/layouts/AppLayout/AdvisorButton.self-hosted.test.tsxindex 9b575085b84..b7b0a80a04d 100644--- a/apps/studio/components/layouts/AppLayout/AdvisorButton.self-hosted.test.tsx+++ b/apps/studio/components/layouts/AppLayout/AdvisorButton.self-hosted.test.tsx@@ -1,4 +1,4 @@-import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'+import { beforeEach, describe, expect, it, vi } from 'vitest'import { AdvisorButton } from '@/components/layouts/AppLayout/AdvisorButton'import { render } from '@/tests/helpers'@@ -55,10 +55,6 @@ describe('AdvisorButton on self-hosted', () => {})})- afterEach(() => {- vi.clearAllMocks()- })-it('disables the notifications query so no request is made to the platform endpoint', () => {render(<AdvisorButton projectRef="project-ref" />)diff --git a/apps/studio/components/layouts/AppLayout/AdvisorButton.test.tsx b/apps/studio/components/layouts/AppLayout/AdvisorButton.test.tsxindex 9f722d69f86..c921a182b70 100644--- a/apps/studio/components/layouts/AppLayout/AdvisorButton.test.tsx+++ b/apps/studio/components/layouts/AppLayout/AdvisorButton.test.tsx@@ -1,5 +1,5 @@import { screen } from '@testing-library/react'-import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'+import { beforeEach, describe, expect, it, vi } from 'vitest'import { AdvisorButton } from '@/components/layouts/AppLayout/AdvisorButton'import { render } from '@/tests/helpers'@@ -56,10 +56,6 @@ describe('AdvisorButton', () => {})})- afterEach(() => {- vi.clearAllMocks()- })-it('shows a warning dot when advisor signals are present', () => {mockUseAdvisorSignals.mockReturnValue({data: [diff --git a/apps/studio/components/layouts/AppLayout/OrganizationDropdown.test.tsx b/apps/studio/components/layouts/AppLayout/OrganizationDropdown.test.tsxindex 8a052481b2f..455cd9f5b72 100644--- a/apps/studio/components/layouts/AppLayout/OrganizationDropdown.test.tsx+++ b/apps/studio/components/layouts/AppLayout/OrganizationDropdown.test.tsx@@ -31,7 +31,6 @@ vi.mock('@/components/ui/PartnerIcon', () => ({describe('OrganizationDropdown', () => {beforeEach(() => {- vi.clearAllMocks()mockUseIsFeatureEnabled.mockReturnValue(false)mockUseOrganizationsQuery.mockReturnValue({data: [diff --git a/apps/studio/components/layouts/AppLayout/ProjectDropdown.test.tsx b/apps/studio/components/layouts/AppLayout/ProjectDropdown.test.tsxindex 8678e6e4602..39c862650a2 100644--- a/apps/studio/components/layouts/AppLayout/ProjectDropdown.test.tsx+++ b/apps/studio/components/layouts/AppLayout/ProjectDropdown.test.tsx@@ -87,7 +87,6 @@ vi.mock('@/components/ui/PartnerIcon', () => ({describe('ProjectDropdown', () => {beforeEach(() => {- vi.clearAllMocks()mockSelectedOrganization.mockReturnValue(createMockOrganization({slug: 'supabase-org',diff --git a/apps/studio/components/layouts/OrganizationLayout.test.tsx b/apps/studio/components/layouts/OrganizationLayout.test.tsxindex 47efaf2c794..83dd5ee916e 100644--- a/apps/studio/components/layouts/OrganizationLayout.test.tsx+++ b/apps/studio/components/layouts/OrganizationLayout.test.tsx@@ -65,8 +65,6 @@ const renderLayout = () =>describe('OrganizationLayout', () => {beforeEach(() => {- vi.clearAllMocks()-mockUseLocalStorageQuery.mockReturnValue([false,mockSetIsBannerDismissed,diff --git a/apps/studio/components/layouts/ProjectLayout/LayoutSidebar/index.test.tsx b/apps/studio/components/layouts/ProjectLayout/LayoutSidebar/index.test.tsxindex 18937deb5b4..01741276e7c 100644--- a/apps/studio/components/layouts/ProjectLayout/LayoutSidebar/index.test.tsx+++ b/apps/studio/components/layouts/ProjectLayout/LayoutSidebar/index.test.tsx@@ -99,7 +99,6 @@ describe('LayoutSidebar', () => {afterEach(() => {resetSidebarManagerState()localStorage.clear()- vi.clearAllMocks()})const renderSidebar = () =>diff --git a/apps/studio/components/layouts/ProjectLayout/index.test.tsx b/apps/studio/components/layouts/ProjectLayout/index.test.tsxindex 8c2f1e165e7..45b18c908f6 100644--- a/apps/studio/components/layouts/ProjectLayout/index.test.tsx+++ b/apps/studio/components/layouts/ProjectLayout/index.test.tsx@@ -319,7 +319,6 @@ describe('ProjectLayout title', () => {})afterEach(() => {- vi.clearAllMocks()document.title = ''})@@ -434,7 +433,6 @@ describe('FREE_MICRO_UPGRADE banner', () => {})afterEach(() => {- vi.clearAllMocks()mockRouter.pathname = '/project/[ref]/observability/query-performance'mockRouter.asPath = '/project/default/observability/query-performance'mockProjectState.current = {diff --git a/apps/studio/components/layouts/ProjectNeedsSecuring/ProjectNeedsSecuring.test.tsx b/apps/studio/components/layouts/ProjectNeedsSecuring/ProjectNeedsSecuring.test.tsxindex cdd4b125676..adca7556778 100644--- a/apps/studio/components/layouts/ProjectNeedsSecuring/ProjectNeedsSecuring.test.tsx+++ b/apps/studio/components/layouts/ProjectNeedsSecuring/ProjectNeedsSecuring.test.tsx@@ -170,7 +170,6 @@ describe('ProjectNeedsSecuring', () => {})afterEach(() => {- vi.clearAllMocks()window.localStorage.clear()})diff --git a/apps/studio/components/ui/AdvisorPanel/AdvisorSignals.integration.test.tsx b/apps/studio/components/ui/AdvisorPanel/AdvisorSignals.integration.test.tsxindex f8f84356d00..ca2ffa2c2b5 100644--- a/apps/studio/components/ui/AdvisorPanel/AdvisorSignals.integration.test.tsx+++ b/apps/studio/components/ui/AdvisorPanel/AdvisorSignals.integration.test.tsx@@ -148,7 +148,6 @@ describe('Advisor signals integration', () => {advisorState.reset()sidebarManagerState.unregisterSidebar(SIDEBAR_KEYS.ADVISOR_PANEL)sidebarManagerState.clearActiveSidebar()- vi.clearAllMocks()})it('renders signal items and dismisses them across the homepage and panel', async () => {diff --git a/apps/studio/components/ui/AdvisorPanel/useAdvisorSignals.test.tsx b/apps/studio/components/ui/AdvisorPanel/useAdvisorSignals.test.tsxindex b14381b259f..6d74fdcba99 100644--- a/apps/studio/components/ui/AdvisorPanel/useAdvisorSignals.test.tsx+++ b/apps/studio/components/ui/AdvisorPanel/useAdvisorSignals.test.tsx@@ -30,7 +30,6 @@ const createWrapper = () => {describe('useAdvisorSignals', () => {beforeEach(() => {window.localStorage.clear()- vi.clearAllMocks()})it('resurfaces a dismissed banned-IP signal after the IP disappears and is banned again', async () => {diff --git a/apps/studio/components/ui/GlobalShortcuts/GlobalShortcuts.test.tsx b/apps/studio/components/ui/GlobalShortcuts/GlobalShortcuts.test.tsxindex dd596214f3b..1b6be529cee 100644--- a/apps/studio/components/ui/GlobalShortcuts/GlobalShortcuts.test.tsx+++ b/apps/studio/components/ui/GlobalShortcuts/GlobalShortcuts.test.tsx@@ -1,5 +1,5 @@import { act, render, screen } from '@testing-library/react'-import { beforeEach, describe, expect, it, vi } from 'vitest'+import { describe, expect, it, vi } from 'vitest'import { GlobalShortcuts } from './GlobalShortcuts'import { SHORTCUT_IDS } from '@/state/shortcuts/registry'@@ -24,10 +24,6 @@ vi.mock('./ShortcutsReferenceSheet', () => ({}))describe('GlobalShortcuts', () => {- beforeEach(() => {- vi.clearAllMocks()- })-it('registers the shortcuts reference action in the command palette', () => {render(<GlobalShortcuts />)diff --git a/apps/studio/components/ui/PartnerManagedResource.test.tsx b/apps/studio/components/ui/PartnerManagedResource.test.tsxindex 537d366e590..f57ccea34b8 100644--- a/apps/studio/components/ui/PartnerManagedResource.test.tsx+++ b/apps/studio/components/ui/PartnerManagedResource.test.tsx@@ -24,8 +24,6 @@ vi.mock('./PartnerIcon', () => ({describe('PartnerManagedResource', () => {beforeEach(() => {- vi.clearAllMocks()-mockUseVercelRedirectQuery.mockReturnValue({data: undefined,isLoading: false,diff --git a/apps/studio/components/ui/ProductMenu/ProductMenuShortcuts.test.tsx b/apps/studio/components/ui/ProductMenu/ProductMenuShortcuts.test.tsxindex b142c33e185..26e2494e203 100644--- a/apps/studio/components/ui/ProductMenu/ProductMenuShortcuts.test.tsx+++ b/apps/studio/components/ui/ProductMenu/ProductMenuShortcuts.test.tsx@@ -1,5 +1,5 @@import { render } from '@testing-library/react'-import { beforeEach, describe, expect, it, vi } from 'vitest'+import { describe, expect, it, vi } from 'vitest'import type { ProductMenuGroup } from './ProductMenu.types'import { ProductMenuShortcuts } from './ProductMenuShortcuts'@@ -54,10 +54,6 @@ const menu: ProductMenuGroup[] = []describe('ProductMenuShortcuts', () => {- beforeEach(() => {- vi.clearAllMocks()- })-it('registers visible enabled internal shortcut items', () => {render(<ProductMenuShortcuts menu={menu} />)diff --git a/apps/studio/components/ui/Shortcut.test.tsx b/apps/studio/components/ui/Shortcut.test.tsxindex 86634594251..e6ec7a5f8a2 100644--- a/apps/studio/components/ui/Shortcut.test.tsx+++ b/apps/studio/components/ui/Shortcut.test.tsx@@ -1,5 +1,5 @@import { fireEvent, render, screen } from '@testing-library/react'-import { beforeEach, describe, expect, it, vi } from 'vitest'+import { describe, expect, it, vi } from 'vitest'import { Shortcut } from './Shortcut'import { SHORTCUT_IDS } from '@/state/shortcuts/registry'@@ -20,10 +20,6 @@ vi.mock('./ShortcutTooltip', () => ({}))describe('Shortcut', () => {- beforeEach(() => {- vi.clearAllMocks()- })-describe('rendering', () => {it('renders the wrapped child', () => {render(diff --git a/apps/studio/data/analytics/org-daily-stats-query.test.ts b/apps/studio/data/analytics/org-daily-stats-query.test.tsindex b3b0e2f9ae3..da907816ee6 100644--- a/apps/studio/data/analytics/org-daily-stats-query.test.ts+++ b/apps/studio/data/analytics/org-daily-stats-query.test.ts@@ -1,4 +1,4 @@-import { beforeEach, describe, expect, it, vi } from 'vitest'+import { describe, expect, it, vi } from 'vitest'import { getOrgDailyStats } from './org-daily-stats-query'@@ -10,10 +10,6 @@ vi.mock('@/data/fetchers', () => ({}))describe('org-daily-stats-query', () => {- beforeEach(() => {- vi.clearAllMocks()- })-describe('getOrgDailyStats', () => {it('throws error when orgSlug is not provided', async () => {await expect(diff --git a/apps/studio/data/handleError.test.ts b/apps/studio/data/handleError.test.tsindex 40f53679f43..12f937e59d5 100644--- a/apps/studio/data/handleError.test.ts+++ b/apps/studio/data/handleError.test.ts@@ -1,4 +1,4 @@-import { beforeEach, describe, expect, it, vi } from 'vitest'+import { describe, expect, it, vi } from 'vitest'import { ConnectionTimeoutError, UnknownAPIResponseError } from '@/types/api-errors'import { ResponseError } from '@/types/base'@@ -21,8 +21,6 @@ function throwAndCatch(error: unknown): ResponseError {}describe('handleError — error classification', () => {- beforeEach(() => vi.clearAllMocks())-describe('known patterns', () => {it('classifies connection timeout via message field', () => {const err = throwAndCatch({ message: 'CONNECTION TERMINATED DUE TO CONNECTION TIMEOUT' })diff --git a/apps/studio/data/organizations/organization-mappers.test.ts b/apps/studio/data/organizations/organization-mappers.test.tsindex 41aaf38be15..3bc0f75184e 100644--- a/apps/studio/data/organizations/organization-mappers.test.ts+++ b/apps/studio/data/organizations/organization-mappers.test.ts@@ -1,4 +1,4 @@-import { beforeEach, describe, expect, it, vi } from 'vitest'+import { describe, expect, it, vi } from 'vitest'vi.mock('@/data/fetchers', () => ({get: vi.fn(),@@ -47,10 +47,6 @@ const baseOrganizationSlugResponse = {}describe('organization query mappers', () => {- beforeEach(() => {- vi.clearAllMocks()- })-it('keeps billing_partner unchanged while deriving Stripe display state from integration_source', () => {const organization = castOrganizationResponseToOrganization({...baseOrganizationResponse,diff --git a/apps/studio/data/projects/project-create-mutation.test.ts b/apps/studio/data/projects/project-create-mutation.test.tsindex 7b9cff6d66b..28d893de7ee 100644--- a/apps/studio/data/projects/project-create-mutation.test.ts+++ b/apps/studio/data/projects/project-create-mutation.test.ts@@ -1,4 +1,4 @@-import { beforeEach, describe, expect, it, vi } from 'vitest'+import { describe, expect, it, vi } from 'vitest'vi.mock('@/data/fetchers', () => ({post: vi.fn(),@@ -8,10 +8,6 @@ vi.mock('@/data/fetchers', () => ({}))describe('project-create-mutation', () => {- beforeEach(() => {- vi.clearAllMocks()- })-describe('createProject', () => {it('sends GitHub connection fields when provided', async () => {const { post } = await import('@/data/fetchers')diff --git a/apps/studio/data/usage/org-usage-query.test.ts b/apps/studio/data/usage/org-usage-query.test.tsindex 80efdaff7f4..045f7b24c73 100644--- a/apps/studio/data/usage/org-usage-query.test.ts+++ b/apps/studio/data/usage/org-usage-query.test.ts@@ -1,4 +1,4 @@-import { beforeEach, describe, expect, it, vi } from 'vitest'+import { describe, expect, it, vi } from 'vitest'import { getOrgUsage } from './org-usage-query'@@ -10,10 +10,6 @@ vi.mock('@/data/fetchers', () => ({}))describe('org-usage-query', () => {- beforeEach(() => {- vi.clearAllMocks()- })-describe('getOrgUsage', () => {it('throws error when orgSlug is not provided', async () => {await expect(getOrgUsage({ orgSlug: undefined })).rejects.toThrow('orgSlug is required')diff --git a/apps/studio/hooks/custom-content/useCustomContent.test.ts b/apps/studio/hooks/custom-content/useCustomContent.test.tsindex 043488906ec..eb978c3190f 100644--- a/apps/studio/hooks/custom-content/useCustomContent.test.ts+++ b/apps/studio/hooks/custom-content/useCustomContent.test.ts@@ -2,7 +2,6 @@ import { cleanup, renderHook } from '@testing-library/react'import { beforeEach, describe, expect, it, vi } from 'vitest'beforeEach(() => {- vi.clearAllMocks()vi.resetModules()cleanup()})diff --git a/apps/studio/hooks/misc/__tests__/useDataApiRevokeOnCreateDefault.test.ts b/apps/studio/hooks/misc/__tests__/useDataApiRevokeOnCreateDefault.test.tsindex 2d74b58dda2..ee275f597ef 100644--- a/apps/studio/hooks/misc/__tests__/useDataApiRevokeOnCreateDefault.test.ts+++ b/apps/studio/hooks/misc/__tests__/useDataApiRevokeOnCreateDefault.test.ts@@ -104,10 +104,6 @@ describe('useTrackDefaultPrivilegesExposure', () => {vi.mocked(useTrack).mockReturnValue(track)})- afterEach(() => {- vi.clearAllMocks()- })-it('does not fire while the flag is undefined', () => {vi.mocked(usePHFlag).mockReturnValue(undefined)renderHook(() =>diff --git a/apps/studio/hooks/misc/__tests__/useTableEditorFiltersSort.test.ts b/apps/studio/hooks/misc/__tests__/useTableEditorFiltersSort.test.tsindex 0361f295f33..f32de0395bc 100644--- a/apps/studio/hooks/misc/__tests__/useTableEditorFiltersSort.test.ts+++ b/apps/studio/hooks/misc/__tests__/useTableEditorFiltersSort.test.ts@@ -1,13 +1,11 @@import { renderHook } from '@testing-library/react'import { useRouter } from 'next/router'import { withNuqsTestingAdapter } from 'nuqs/adapters/testing'-import { beforeAll, describe, expect, it, vi } from 'vitest'+import { describe, expect, it, vi } from 'vitest'import { useTableEditorFiltersSort } from '../useTableEditorFiltersSort'-beforeAll(() => {- vi.mock('next/router', () => import('next-router-mock'))-})+vi.mock('next/router', () => import('next-router-mock'))describe('useTableEditorFilters', () => {it('should support old syntax', async () => {diff --git a/apps/studio/lib/ai/ai-details.test.ts b/apps/studio/lib/ai/ai-details.test.tsindex 343d36ea6eb..08d8ddd35ee 100644--- a/apps/studio/lib/ai/ai-details.test.ts+++ b/apps/studio/lib/ai/ai-details.test.ts@@ -45,8 +45,6 @@ describe('getAIDetails', () => {let mockCheckEntitlement: ReturnType<typeof vi.fn>beforeEach(async () => {- vi.clearAllMocks()-const orgsQuery = await import('@/data/organizations/organizations-query')const subscriptionQuery = await import('@/data/subscriptions/org-subscription-query')const projectQuery = await import('@/data/projects/project-detail-query')diff --git a/apps/studio/lib/ai/is-explorer-enabled.test.ts b/apps/studio/lib/ai/is-explorer-enabled.test.tsindex 9a376031d80..b8b047d9798 100644--- a/apps/studio/lib/ai/is-explorer-enabled.test.ts+++ b/apps/studio/lib/ai/is-explorer-enabled.test.ts@@ -15,7 +15,6 @@ vi.mock('@/lib/server/configcat', async (importOriginal) => {describe('isExplorerEnabled', () => {beforeEach(async () => {- vi.clearAllMocks()const common = await import('common')vi.spyOn(common, 'IS_PLATFORM', 'get').mockReturnValue(true)})diff --git a/apps/studio/lib/ai/supabase-mcp.test.ts b/apps/studio/lib/ai/supabase-mcp.test.tsindex eae88b4186e..5592b3f6012 100644--- a/apps/studio/lib/ai/supabase-mcp.test.ts+++ b/apps/studio/lib/ai/supabase-mcp.test.ts@@ -21,7 +21,6 @@ describe('createSupabaseMCPClient', () => {const originalSha = process.env.VERCEL_GIT_COMMIT_SHAbeforeEach(() => {- vi.clearAllMocks()createMCPClientMock.mockResolvedValue({ tools: vi.fn() })delete process.env.VERCEL_GIT_COMMIT_SHA})diff --git a/apps/studio/lib/ai/tools/incident-tools.test.ts b/apps/studio/lib/ai/tools/incident-tools.test.tsindex 056b57c0bac..82c27313fe1 100644--- a/apps/studio/lib/ai/tools/incident-tools.test.ts+++ b/apps/studio/lib/ai/tools/incident-tools.test.ts@@ -12,7 +12,6 @@ describe('ai/tools/incident-tools', () => {let mockAbortSignal: AbortSignalbeforeEach(() => {- vi.clearAllMocks()mockFetch = vi.fn()global.fetch = mockFetch as typeof fetchdiff --git a/apps/studio/lib/ai/tools/index.test.ts b/apps/studio/lib/ai/tools/index.test.tsindex 9fa86ca2fa7..c0157b35069 100644--- a/apps/studio/lib/ai/tools/index.test.ts+++ b/apps/studio/lib/ai/tools/index.test.ts@@ -25,7 +25,6 @@ const BASE_PARAMS = {describe('ai/tools getTools', () => {beforeEach(async () => {- vi.clearAllMocks()vi.mocked(getMcpTools).mockResolvedValue({ list_tables: {} } as any)// Reset to platform each test; the self-hosted test overrides to false.// Done here (not afterEach) so the spy can't leak across tests via order.diff --git a/apps/studio/lib/ai/tools/mcp-tools.test.ts b/apps/studio/lib/ai/tools/mcp-tools.test.tsindex f3d03e2736e..349c642c71a 100644--- a/apps/studio/lib/ai/tools/mcp-tools.test.ts+++ b/apps/studio/lib/ai/tools/mcp-tools.test.ts@@ -34,7 +34,6 @@ describe('ai/tools/mcp-tools getMcpTools', () => {let consoleErrorSpy: ReturnType<typeof vi.spyOn>beforeEach(() => {- vi.clearAllMocks()consoleErrorSpy = vi.spyOn(console, 'error').mockImplementation(() => {})close = vi.fn().mockResolvedValue(undefined)tools = vi.fn().mockResolvedValue({ ...FULL_REMOTE_TOOLS })diff --git a/apps/studio/lib/ai/tools/mock-tools.test.ts b/apps/studio/lib/ai/tools/mock-tools.test.tsindex d41b7f50aee..52e3f82c90a 100644--- a/apps/studio/lib/ai/tools/mock-tools.test.ts+++ b/apps/studio/lib/ai/tools/mock-tools.test.ts@@ -1,4 +1,4 @@-import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'+import { beforeEach, describe, expect, it, vi } from 'vitest'import { getMockTools, MOCK_NOTEBOOKS_DATA } from './mock-tools'import { getNotebookTools } from './notebook-tools'@@ -19,7 +19,6 @@ describe('ai/tools/mock-tools getMockTools', () => {let tools: ReturnType<typeof vi.fn>beforeEach(() => {- vi.clearAllMocks()close = vi.fn().mockResolvedValue(undefined)tools = vi.fn().mockResolvedValue({ search_docs: SEARCH_DOCS })vi.mocked(createInProcessSupabaseMCPClient).mockResolvedValue({ tools, close } as any)@@ -60,10 +59,6 @@ describe('ai/tools/mock-tools getMockTools', () => {expect(close).toHaveBeenCalledTimes(1)})- afterEach(() => {- vi.clearAllMocks()- })-describe('notebook tools', () => {const AUTH_HEALTH_NOTEBOOK_ID = MOCK_NOTEBOOKS_DATA[0].idconst EDGE_FUNCTION_NOTEBOOK_ID = MOCK_NOTEBOOKS_DATA[1].iddiff --git a/apps/studio/lib/api/apiAuthenticate.test.ts b/apps/studio/lib/api/apiAuthenticate.test.tsindex 83fa5ecfd46..cb6d2107c91 100644--- a/apps/studio/lib/api/apiAuthenticate.test.ts+++ b/apps/studio/lib/api/apiAuthenticate.test.ts@@ -29,7 +29,6 @@ describe('apiAuthenticate', () => {const mockRes = {} as anybeforeEach(() => {- vi.clearAllMocks()mocks.getUserClaims.mockResolvedValue({claims: {sub: 'test-gotrue-id',diff --git a/apps/studio/lib/api/apiWrappers.test.ts b/apps/studio/lib/api/apiWrappers.test.tsindex c089d55562d..807afc492a3 100644--- a/apps/studio/lib/api/apiWrappers.test.ts+++ b/apps/studio/lib/api/apiWrappers.test.ts@@ -1,7 +1,7 @@import * as Sentry from '@sentry/nextjs'import type { JwtPayload } from '@supabase/supabase-js'import type { NextApiRequest, NextApiResponse } from 'next'-import { beforeEach, describe, expect, it, vi } from 'vitest'+import { describe, expect, it, vi } from 'vitest'import { apiAuthenticate } from './apiAuthenticate'import { apiWrapper } from './apiWrapper'@@ -28,10 +28,6 @@ describe('apiWrapper', () => {} as unknown as NextApiResponseconst mockHandler = vi.fn()- beforeEach(() => {- vi.clearAllMocks()- })-it('should call handler directly when withAuth is false', async () => {await apiWrapper(mockReq, mockRes, mockHandler, { withAuth: false })expect(mockHandler).toHaveBeenCalledWith(mockReq, mockRes, undefined)diff --git a/apps/studio/lib/api/generate-v4.test.ts b/apps/studio/lib/api/generate-v4.test.tsindex 5fa54d62980..8fc0b1dd949 100644--- a/apps/studio/lib/api/generate-v4.test.ts+++ b/apps/studio/lib/api/generate-v4.test.ts@@ -10,6 +10,41 @@ vi.mock('@/lib/ai/tools/tool-sanitizer', () => ({sanitizeMessagePart: vi.fn((part) => part),}))+vi.mock('@/lib/ai/ai-details', () => ({+ getAIDetails: vi.fn().mockResolvedValue({+ aiOptInLevel: 'schema_and_log_and_data',+ hasAccessToAdvanceModel: true,+ hasHipaaAddon: false,+ region: 'us-east-1',+ isSensitive: false,+ }),+}))++vi.mock('@/lib/ai/model', () => ({+ getModel: vi.fn().mockResolvedValue({+ modelParams: { model: {} },+ systemProviderOptions: {},+ }),+}))++vi.mock('@/data/sql/execute-sql-mutation', () => ({+ executeSql: vi.fn().mockResolvedValue({ result: [] }),+}))++vi.mock('@/lib/ai/tools', () => ({+ getTools: vi.fn().mockResolvedValue({}),+}))++vi.mock('ai', async () => {+ const actual = await vi.importActual('ai')+ return {+ ...actual,+ streamText: vi.fn().mockReturnValue({+ pipeUIMessageStreamToResponse: vi.fn(),+ }),+ }+})+test('generateV4 calls the tool sanitizer', async () => {const mockReq = {method: 'POST',@@ -47,41 +82,6 @@ test('generateV4 calls the tool sanitizer', async () => {on: vi.fn(),}- vi.mock('@/lib/ai/ai-details', () => ({- getAIDetails: vi.fn().mockResolvedValue({- aiOptInLevel: 'schema_and_log_and_data',- hasAccessToAdvanceModel: true,- hasHipaaAddon: false,- region: 'us-east-1',- isSensitive: false,- }),- }))-- vi.mock('@/lib/ai/model', () => ({- getModel: vi.fn().mockResolvedValue({- modelParams: { model: {} },- systemProviderOptions: {},- }),- }))-- vi.mock('@/data/sql/execute-sql-mutation', () => ({- executeSql: vi.fn().mockResolvedValue({ result: [] }),- }))-- vi.mock('@/lib/ai/tools', () => ({- getTools: vi.fn().mockResolvedValue({}),- }))-- vi.mock('ai', async () => {- const actual = await vi.importActual('ai')- return {- ...actual,- streamText: vi.fn().mockReturnValue({- pipeUIMessageStreamToResponse: vi.fn(),- }),- }- })-await generateV4(mockReq as any, mockRes as any)expect(sanitizeMessagePart).toHaveBeenCalled()diff --git a/apps/studio/lib/api/rate.test.ts b/apps/studio/lib/api/rate.test.tsindex 37347234c5d..03ea9968868 100644--- a/apps/studio/lib/api/rate.test.ts+++ b/apps/studio/lib/api/rate.test.ts@@ -9,6 +9,35 @@ vi.mock('../ai/tools/tool-sanitizer', () => ({sanitizeMessagePart: vi.fn((part) => part),}))+vi.mock('@/lib/ai/ai-details', () => ({+ getAIDetails: vi.fn().mockResolvedValue({+ aiOptInLevel: 'schema_and_log_and_data',+ hasAccessToAdvanceModel: true,+ hasHipaaAddon: false,+ region: 'us-east-1',+ isSensitive: false,+ }),+}))++vi.mock('@/lib/ai/model', () => ({+ getModel: vi.fn().mockResolvedValue({+ modelParams: { model: {} },+ }),+}))++vi.mock('ai', () => ({+ generateText: vi.fn().mockResolvedValue({+ output: {+ category: 'sql_generation',+ },+ }),+ Output: { object: vi.fn() },+}))++vi.mock('@/components/ui/AIAssistantPanel/Message.utils', () => ({+ rateMessageResponseSchema: {},+}))+test('rate calls the tool sanitizer', async () => {const mockReq = {method: 'POST',@@ -43,35 +72,6 @@ test('rate calls the tool sanitizer', async () => {setHeader: vi.fn(() => mockRes),}- vi.mock('@/lib/ai/ai-details', () => ({- getAIDetails: vi.fn().mockResolvedValue({- aiOptInLevel: 'schema_and_log_and_data',- hasAccessToAdvanceModel: true,- hasHipaaAddon: false,- region: 'us-east-1',- isSensitive: false,- }),- }))-- vi.mock('@/lib/ai/model', () => ({- getModel: vi.fn().mockResolvedValue({- modelParams: { model: {} },- }),- }))-- vi.mock('ai', () => ({- generateText: vi.fn().mockResolvedValue({- output: {- category: 'sql_generation',- },- }),- Output: { object: vi.fn() },- }))-- vi.mock('@/components/ui/AIAssistantPanel/Message.utils', () => ({- rateMessageResponseSchema: {},- }))-await rate(mockReq as any, mockRes as any)expect(sanitizeMessagePart).toHaveBeenCalled()diff --git a/apps/studio/lib/api/self-hosted/generate-types.test.ts b/apps/studio/lib/api/self-hosted/generate-types.test.tsindex 5d0c70d49df..4124e291492 100644--- a/apps/studio/lib/api/self-hosted/generate-types.test.ts+++ b/apps/studio/lib/api/self-hosted/generate-types.test.ts@@ -27,8 +27,6 @@ describe('api/self-hosted/generate-types', () => {let mockAssertSelfHosted: ReturnType<typeof vi.fn>beforeEach(async () => {- vi.clearAllMocks()-const fetchers = await import('@/data/fetchers')const util = await import('./util')diff --git a/apps/studio/lib/api/self-hosted/mcp.test.ts b/apps/studio/lib/api/self-hosted/mcp.test.tsindex 940240d2973..8491e6e51bd 100644--- a/apps/studio/lib/api/self-hosted/mcp.test.ts+++ b/apps/studio/lib/api/self-hosted/mcp.test.ts@@ -23,7 +23,6 @@ describe('api/self-hosted/mcp', () => {let getProjectSettingsMock: ReturnType<typeof vi.fn>beforeEach(async () => {- vi.clearAllMocks()vi.unstubAllEnvs()const settings = await import('./settings')getProjectSettingsMock = vi.mocked(settings.getProjectSettings)@@ -91,7 +90,6 @@ describe('api/self-hosted/mcp', () => {let retrieveAnalyticsDataMock: ReturnType<typeof vi.fn>beforeEach(async () => {- vi.clearAllMocks()vi.unstubAllEnvs()const logs = await import('./logs')retrieveAnalyticsDataMock = vi.mocked(logs.retrieveAnalyticsData)diff --git a/apps/studio/lib/api/self-hosted/settings.test.ts b/apps/studio/lib/api/self-hosted/settings.test.tsindex f5cb08e0f56..9a971f56cd0 100644--- a/apps/studio/lib/api/self-hosted/settings.test.ts+++ b/apps/studio/lib/api/self-hosted/settings.test.ts@@ -16,7 +16,6 @@ describe('api/self-hosted/settings', () => {let mockAssertSelfHosted: ReturnType<typeof vi.fn>beforeEach(async () => {- vi.clearAllMocks()vi.resetModules()const util = await import('./util')diff --git a/apps/studio/lib/api/self-hosted/signing-keys.test.ts b/apps/studio/lib/api/self-hosted/signing-keys.test.tsindex 8e06231cb90..690bcd4486d 100644--- a/apps/studio/lib/api/self-hosted/signing-keys.test.ts+++ b/apps/studio/lib/api/self-hosted/signing-keys.test.ts@@ -10,7 +10,6 @@ describe('api/self-hosted/signing-keys', () => {let mockAssertSelfHosted: ReturnType<typeof vi.fn>beforeEach(async () => {- vi.clearAllMocks()vi.resetModules()const util = await import('./util')diff --git a/apps/studio/lib/api/self-hosted/util.test.ts b/apps/studio/lib/api/self-hosted/util.test.tsindex 85a041984ef..ceba9eb71eb 100644--- a/apps/studio/lib/api/self-hosted/util.test.ts+++ b/apps/studio/lib/api/self-hosted/util.test.ts@@ -21,10 +21,6 @@ vi.mock('crypto-js', () => {})describe('api/self-hosted/util', () => {- beforeEach(() => {- vi.clearAllMocks()- })-describe('assertSelfHosted', () => {it('should not throw when IS_PLATFORM is false', async () => {const constants = await import('@/lib/constants')diff --git a/apps/studio/lib/api/snippets.browser.test.ts b/apps/studio/lib/api/snippets.browser.test.tsindex f8223e256ca..d66a8b4a089 100644--- a/apps/studio/lib/api/snippets.browser.test.ts+++ b/apps/studio/lib/api/snippets.browser.test.ts@@ -1,12 +1,8 @@-import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'+import { afterEach, describe, expect, it, vi } from 'vitest'import { generateDeterministicUuid } from './snippets.browser'describe('snippets.utils', () => {- beforeEach(() => {- vi.clearAllMocks()- })-afterEach(() => {vi.resetAllMocks()})diff --git a/apps/studio/lib/api/snippets.utils.test.ts b/apps/studio/lib/api/snippets.utils.test.tsindex 7cff947defc..c2c5a2da6ad 100644--- a/apps/studio/lib/api/snippets.utils.test.ts+++ b/apps/studio/lib/api/snippets.utils.test.ts@@ -1,6 +1,6 @@import fs from 'fs/promises'import path from 'path'-import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'+import { afterEach, describe, expect, it, vi } from 'vitest'import { generateDeterministicUuid } from './snippets.browser'import {@@ -40,10 +40,6 @@ vi.mock('./snippets.constants', () => ({describe('snippets.utils', () => {const MOCK_SNIPPETS_DIR = '/mock/snippets/dir'- beforeEach(() => {- vi.clearAllMocks()- })-afterEach(() => {vi.resetAllMocks()})diff --git a/apps/studio/lib/error-reporting.test.ts b/apps/studio/lib/error-reporting.test.tsindex b7e0f7751c8..5f6f4ef44c3 100644--- a/apps/studio/lib/error-reporting.test.ts+++ b/apps/studio/lib/error-reporting.test.ts@@ -1,5 +1,5 @@import * as Sentry from '@sentry/nextjs'-import { beforeEach, describe, expect, it, vi } from 'vitest'+import { describe, expect, it, vi } from 'vitest'import { captureCriticalError } from './error-reporting'import { ResponseError } from '@/types'@@ -13,10 +13,6 @@ vi.mock('@sentry/nextjs', () => ({}))describe('error-reporting', () => {- beforeEach(() => {- vi.clearAllMocks()- })-describe('captureCriticalError', () => {it('should not capture error if message is empty', () => {const error = { message: '' }diff --git a/apps/studio/lib/helpers.test.ts b/apps/studio/lib/helpers.test.tsindex 2f77b957d97..c3cd19dff73 100644--- a/apps/studio/lib/helpers.test.ts+++ b/apps/studio/lib/helpers.test.ts@@ -221,15 +221,14 @@ describe('copyToClipboard', () => {})describe('detectBrowser', () => {- const originalNavigator = global.navigator-const setUserAgent = (ua: string) => {vi.stubGlobal('navigator', { userAgent: ua })}afterEach(() => {+ // `global.navigator` can't be assigned directly (jsdom defines it as a getter),+ // so restore it by unstubbing.vi.unstubAllGlobals()- global.navigator = originalNavigator})it('detects Chrome', () => {diff --git a/apps/studio/lib/integration-utils.test.ts b/apps/studio/lib/integration-utils.test.tsindex 9f921716e91..070ab28e471 100644--- a/apps/studio/lib/integration-utils.test.ts+++ b/apps/studio/lib/integration-utils.test.ts@@ -1,4 +1,4 @@-import { beforeEach, describe, expect, it, vi } from 'vitest'+import { describe, expect, it, vi } from 'vitest'import {getInitialMigrationSQLFromGitHubRepo,@@ -16,10 +16,6 @@ vi.mock('@/data/fetchers', () => ({}))describe('integration-utils', () => {- beforeEach(() => {- vi.clearAllMocks()- })-describe('getInitialMigrationSQLFromGitHubRepo', () => {it('should return null when no externalId is provided', async () => {const result = await getInitialMigrationSQLFromGitHubRepo()diff --git a/apps/studio/lib/navigation.test.ts b/apps/studio/lib/navigation.test.tsindex 6b593ced519..b8f5740df6a 100644--- a/apps/studio/lib/navigation.test.ts+++ b/apps/studio/lib/navigation.test.ts@@ -7,8 +7,6 @@ describe('createNavigationHandler', () => {let mockWindowOpen: anybeforeEach(() => {- vi.clearAllMocks()-// Mock router with push methodmockRouter = {push: vi.fn(),diff --git a/apps/studio/lib/posthog.test.ts b/apps/studio/lib/posthog.test.tsindex 157ec98450c..47b602ca633 100644--- a/apps/studio/lib/posthog.test.ts+++ b/apps/studio/lib/posthog.test.ts@@ -1,5 +1,5 @@import * as common from 'common'-import { beforeEach, describe, expect, it, vi } from 'vitest'+import { describe, expect, it, vi } from 'vitest'import * as constants from './constants'import { trackFeatureFlag } from './posthog'@@ -18,10 +18,6 @@ vi.mock('./constants', () => ({}))describe('trackFeatureFlag', () => {- beforeEach(() => {- vi.clearAllMocks()- })-it('returns undefined if user has not consented', async () => {vi.spyOn(common, 'hasConsented').mockReturnValue(false)const result = await trackFeatureFlag({ some: 'value' } as any)diff --git a/apps/studio/lib/project-supabase-client.contract.test.ts b/apps/studio/lib/project-supabase-client.contract.test.tsindex 9f0ed4fcb0d..2681769bbaa 100644--- a/apps/studio/lib/project-supabase-client.contract.test.ts+++ b/apps/studio/lib/project-supabase-client.contract.test.ts@@ -1,4 +1,4 @@-import { beforeEach, describe, expect, it, vi } from 'vitest'+import { describe, expect, it, vi } from 'vitest'import { createProjectSupabaseClient } from './project-supabase-client'import * as apiKeysUtils from '@/data/api-keys/temp-api-keys-utils'@@ -18,10 +18,6 @@ const KEY_SHAPES = []describe('createProjectSupabaseClient key format contract', () => {- beforeEach(() => {- vi.clearAllMocks()- })-it.each(KEY_SHAPES)('constructs a client with a %s', async (_label, apiKey) => {vi.mocked(apiKeysUtils.getOrRefreshTemporaryApiKey).mockResolvedValue({apiKey,diff --git a/apps/studio/lib/project-supabase-client.test.ts b/apps/studio/lib/project-supabase-client.test.tsindex 8a50f9b5f4e..da697c213ed 100644--- a/apps/studio/lib/project-supabase-client.test.ts+++ b/apps/studio/lib/project-supabase-client.test.ts@@ -1,5 +1,5 @@import * as supabaseJs from '@supabase/supabase-js'-import { beforeEach, describe, expect, it, vi } from 'vitest'+import { describe, expect, it, vi } from 'vitest'import { createProjectSupabaseClient } from './project-supabase-client'import * as apiKeysUtils from '@/data/api-keys/temp-api-keys-utils'@@ -13,10 +13,6 @@ vi.mock('@/data/api-keys/temp-api-keys-utils', () => ({}))describe('project-supabase-client', () => {- beforeEach(() => {- vi.clearAllMocks()- })-describe('createProjectSupabaseClient', () => {it('should create a Supabase client with temporary API key', async () => {const mockApiKey = 'sb_temp_nonce1234567890ab_payload1'diff --git a/apps/studio/lib/server/configcat.test.ts b/apps/studio/lib/server/configcat.test.tsindex 417c6b688c3..027eaaec073 100644--- a/apps/studio/lib/server/configcat.test.ts+++ b/apps/studio/lib/server/configcat.test.ts@@ -16,7 +16,6 @@ describe('lib/server/configcat getServerFlags', () => {}beforeEach(() => {- vi.clearAllMocks()vi.resetModules()vi.unstubAllEnvs()vi.mocked(configcat.getClient).mockReturnValue(mockClient as unknown as IConfigCatClient)diff --git a/apps/studio/lib/upload.test.ts b/apps/studio/lib/upload.test.tsindex 72c4140c4f1..6343df4eb45 100644--- a/apps/studio/lib/upload.test.ts+++ b/apps/studio/lib/upload.test.ts@@ -25,7 +25,6 @@ describe('uploadAttachment', () => {const mockFile = new File(['test'], 'test.png', { type: 'image/png' })beforeEach(() => {- vi.clearAllMocks();(createClient as any).mockReturnValue(mockSupabaseClient)})diff --git a/apps/studio/package.json b/apps/studio/package.jsonindex 269958acd38..920028bef68 100644--- a/apps/studio/package.json+++ b/apps/studio/package.json@@ -172,8 +172,8 @@"@tailwindcss/vite": "4.2.4","@tanstack/devtools-vite": "^0.6.0","@testing-library/dom": "^10.0.0",- "@testing-library/jest-dom": "^6.6.0",- "@testing-library/react": "^16.0.0",+ "@testing-library/jest-dom": "^7.0.1",+ "@testing-library/react": "^16.3.3","@testing-library/user-event": "^14.0.0","@types/common-tags": "^1.8.1","@types/crypto-js": "^4.2.2",@@ -215,7 +215,6 @@"tsx": "catalog:","typescript": "catalog:","vite": "catalog:",- "vite-tsconfig-paths": "catalog:","vitest": "catalog:"}}diff --git a/apps/studio/sentry.tanstack.test.ts b/apps/studio/sentry.tanstack.test.tsindex 2adb968ef6a..c8d8e3c38f6 100644--- a/apps/studio/sentry.tanstack.test.ts+++ b/apps/studio/sentry.tanstack.test.ts@@ -1,5 +1,5 @@import type { AnyRouter } from '@tanstack/react-router'-import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'+import { afterEach, describe, expect, it, vi } from 'vitest'const sentryMocks = vi.hoisted(() => ({init: vi.fn(),@@ -26,10 +26,6 @@ async function loadInitializer() {}describe('initSentryTanStackClient', () => {- beforeEach(() => {- vi.clearAllMocks()- })-afterEach(() => {vi.unstubAllGlobals()vi.unstubAllEnvs()diff --git a/apps/studio/state/shortcuts/matchEvent.test.ts b/apps/studio/state/shortcuts/matchEvent.test.tsindex 5a3f0b85a5b..942eb33d435 100644--- a/apps/studio/state/shortcuts/matchEvent.test.ts+++ b/apps/studio/state/shortcuts/matchEvent.test.ts@@ -1,5 +1,5 @@import { getSequenceManager } from '@tanstack/react-hotkeys'-import { beforeEach, describe, expect, it, vi } from 'vitest'+import { describe, expect, it, vi } from 'vitest'import { eventMatchesAnyShortcut } from './matchEvent'import type { RegistryDefinations } from './types'@@ -67,10 +67,6 @@ const registry: RegistryDefinations<string> = {}describe('eventMatchesAnyShortcut', () => {- beforeEach(() => {- vi.clearAllMocks()- })-it('returns false when there are no active registrations', () => {withRegistrations([])expect(eventMatchesAnyShortcut(shiftX, registry)).toBe(false)diff --git a/apps/studio/state/shortcuts/useShortcut.test.tsx b/apps/studio/state/shortcuts/useShortcut.test.tsxindex 448445b5cb2..5233e3d0c83 100644--- a/apps/studio/state/shortcuts/useShortcut.test.tsx+++ b/apps/studio/state/shortcuts/useShortcut.test.tsx@@ -53,7 +53,6 @@ const getLastRegisterCall = () => {describe('useShortcut', () => {beforeEach(() => {- vi.clearAllMocks()mockUseIsShortcutEnabled.mockReturnValue(true)})diff --git a/apps/studio/tests/components/Organization/TeamSettings/InviteMemberButton.network.test.tsx b/apps/studio/tests/components/Organization/TeamSettings/InviteMemberButton.network.test.tsxindex a934d3ced55..e835d9fc5b1 100644--- a/apps/studio/tests/components/Organization/TeamSettings/InviteMemberButton.network.test.tsx+++ b/apps/studio/tests/components/Organization/TeamSettings/InviteMemberButton.network.test.tsx@@ -2,7 +2,7 @@ import { fireEvent, screen, waitFor } from '@testing-library/react'import userEvent from '@testing-library/user-event'import { platformComponents as components, operations } from 'api-types'import { HttpResponse } from 'msw'-import { beforeEach, describe, expect, test, vi } from 'vitest'+import { describe, expect, test, vi } from 'vitest'import { InviteMemberButton } from '@/components/interfaces/Organization/TeamSettings/InviteMemberButton'import type { ProfileContextType } from '@/lib/profile'@@ -179,10 +179,6 @@ async function openDialog() {}describe('InviteMemberButton (network)', () => {- beforeEach(() => {- vi.clearAllMocks()- })-test('renders each role with its permission description and a roles docs link', async () => {setupMocks()customRender(<InviteMemberButton />, { profileContext: PROFILE_CONTEXT })diff --git a/apps/studio/tests/components/Organization/TeamSettings/InviteMemberButton.test.tsx b/apps/studio/tests/components/Organization/TeamSettings/InviteMemberButton.test.tsxindex 3706aeea3a4..43fc7198c8f 100644--- a/apps/studio/tests/components/Organization/TeamSettings/InviteMemberButton.test.tsx+++ b/apps/studio/tests/components/Organization/TeamSettings/InviteMemberButton.test.tsx@@ -118,7 +118,6 @@ async function submitForm(emailValue: string) {// Testsdescribe('InviteMemberButton', () => {beforeEach(() => {- vi.clearAllMocks()mockInvite.mockResolvedValue({ succeeded: [], failed: [] })})diff --git a/apps/studio/tests/components/Organization/TeamSettings/UpdateRolesPanel.network.test.tsx b/apps/studio/tests/components/Organization/TeamSettings/UpdateRolesPanel.network.test.tsxindex 0ab629a98b2..3a2b575228b 100644--- a/apps/studio/tests/components/Organization/TeamSettings/UpdateRolesPanel.network.test.tsx+++ b/apps/studio/tests/components/Organization/TeamSettings/UpdateRolesPanel.network.test.tsx@@ -3,7 +3,7 @@ import userEvent from '@testing-library/user-event'import { platformComponents as components } from 'api-types'import { mockAnimationsApi } from 'jsdom-testing-mocks'import { HttpResponse } from 'msw'-import { beforeEach, describe, expect, test, vi } from 'vitest'+import { describe, expect, test, vi } from 'vitest'import { UpdateRolesPanel } from '@/components/interfaces/Organization/TeamSettings/UpdateRolesPanel/UpdateRolesPanel'import type { OrganizationMember } from '@/data/organizations/organization-members-query'@@ -144,10 +144,6 @@ function setupMocks() {}describe('UpdateRolesPanel (network)', () => {- beforeEach(() => {- vi.clearAllMocks()- })-test('shows each role with its permission description and a roles docs link', async () => {setupMocks()customRender(<UpdateRolesPanel visible member={MEMBER} onClose={vi.fn()} />, {diff --git a/apps/studio/tests/components/SQLEditor/RoleImpersonationSelector.test.tsx b/apps/studio/tests/components/SQLEditor/RoleImpersonationSelector.test.tsxindex 1ccca3ca6ab..022a3a73b97 100644--- a/apps/studio/tests/components/SQLEditor/RoleImpersonationSelector.test.tsx+++ b/apps/studio/tests/components/SQLEditor/RoleImpersonationSelector.test.tsx@@ -1,7 +1,7 @@import { screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'import { toast } from 'sonner'-import { beforeEach, describe, expect, it, vi } from 'vitest'+import { describe, expect, it, vi } from 'vitest'import { RoleImpersonationSelectorInterface } from '@/components/interfaces/RoleImpersonationSelector'import type { ImpersonationRole } from '@/lib/role-impersonation'@@ -21,10 +21,6 @@ vi.mock('@/components/interfaces/RoleImpersonationSelector/UserImpersonationSele}))describe('RoleImpersonationSelectorInterface', () => {- beforeEach(() => {- vi.clearAllMocks()- })-it('enables user settings for authenticated queries and summarizes each role', async () => {const user = userEvent.setup()let currentRole: ImpersonationRole | undefineddiff --git a/apps/studio/tests/components/SQLEditor/UserImpersonationSelector.test.tsx b/apps/studio/tests/components/SQLEditor/UserImpersonationSelector.test.tsxindex aad89d6383c..25213c0b075 100644--- a/apps/studio/tests/components/SQLEditor/UserImpersonationSelector.test.tsx+++ b/apps/studio/tests/components/SQLEditor/UserImpersonationSelector.test.tsx@@ -43,8 +43,6 @@ const AUTH_CONFIG_WITHOUT_CUSTOM_ACCESS_TOKEN_HOOK = {describe('UserImpersonationSelector', () => {beforeEach(() => {- vi.clearAllMocks()-addAPIMock({method: 'get',path: '/platform/projects/:ref',diff --git a/apps/studio/tests/pages/api/mcp/index.test.ts b/apps/studio/tests/pages/api/mcp/index.test.tsindex d156a744cd1..1bf7221d07a 100644--- a/apps/studio/tests/pages/api/mcp/index.test.ts+++ b/apps/studio/tests/pages/api/mcp/index.test.ts@@ -29,8 +29,6 @@ describe('/api/mcp', () => {beforeEach(() => {// Disable MSW for these testsmswServer.close()- // Clear mock state between tests- vi.clearAllMocks()})describe('Method handling', async () => {diff --git a/apps/studio/tests/pages/aws-marketplace-onboarding.test.tsx b/apps/studio/tests/pages/aws-marketplace-onboarding.test.tsxindex 466f16385bb..2765dd36958 100644--- a/apps/studio/tests/pages/aws-marketplace-onboarding.test.tsx+++ b/apps/studio/tests/pages/aws-marketplace-onboarding.test.tsx@@ -122,7 +122,6 @@ function renderScreen(props: Partial<Parameters<typeof AwsMarketplaceOnboardingSdescribe('AwsMarketplaceOnboardingScreen', () => {beforeEach(() => {- vi.clearAllMocks()window.localStorage.clear()})diff --git a/apps/studio/tests/pages/cli-login.test.tsx b/apps/studio/tests/pages/cli-login.test.tsxindex d66b2a453d4..a50b3e80dbb 100644--- a/apps/studio/tests/pages/cli-login.test.tsx+++ b/apps/studio/tests/pages/cli-login.test.tsx@@ -1,6 +1,6 @@import { screen, waitFor } from '@testing-library/react'import userEvent from '@testing-library/user-event'-import { beforeEach, describe, expect, test, vi } from 'vitest'+import { describe, expect, test, vi } from 'vitest'import type { ProfileContextType } from '@/lib/profile'import { CliLoginScreen } from '@/pages/cli/login'@@ -53,10 +53,6 @@ function renderScreen(props: Partial<Parameters<typeof CliLoginScreen>[0]> = {})}describe('CliLoginScreen', () => {- beforeEach(() => {- vi.clearAllMocks()- })-test('creates a session and routes to the device code', async () => {createCliLoginSessionMock.mockResolvedValue({ nonce: 'ABCDEFGH12345678' })const { navigate } = renderScreen()diff --git a/apps/studio/tests/pages/new/[slug].test.tsx b/apps/studio/tests/pages/new/[slug].test.tsxindex 46b5ddc229d..07d3f8dcf23 100644--- a/apps/studio/tests/pages/new/[slug].test.tsx+++ b/apps/studio/tests/pages/new/[slug].test.tsx@@ -341,7 +341,6 @@ const generateAndWaitForStrongPassword = async () => {describe('project creation wizard', () => {beforeEach(() => {- vi.clearAllMocks()user = userEvent.setup({ delay: null })routerMock.setCurrentUrl(`/new/${ORG_SLUG}`)})diff --git a/apps/studio/tests/pages/project/[ref]/settings/infrastructure.test.tsx b/apps/studio/tests/pages/project/[ref]/settings/infrastructure.test.tsxindex 484e844616c..38abd0b4045 100644--- a/apps/studio/tests/pages/project/[ref]/settings/infrastructure.test.tsx+++ b/apps/studio/tests/pages/project/[ref]/settings/infrastructure.test.tsx@@ -306,7 +306,6 @@ function renderInfrastructurePage() {describe('/project/[ref]/settings/infrastructure', () => {beforeEach(() => {- vi.clearAllMocks()mockInfrastructureEndpoints()window.HTMLElement.prototype.scrollIntoView = vi.fn()})diff --git a/apps/studio/tests/pages/stripe-projects-login.test.tsx b/apps/studio/tests/pages/stripe-projects-login.test.tsxindex be2c55fdf11..550827d7e28 100644--- a/apps/studio/tests/pages/stripe-projects-login.test.tsx+++ b/apps/studio/tests/pages/stripe-projects-login.test.tsx@@ -2,7 +2,7 @@ import { screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'import { HttpResponse } from 'msw'import { toast } from 'sonner'-import { beforeEach, expect, test, vi } from 'vitest'+import { expect, test, vi } from 'vitest'import { StripeProjectsLoginPage } from '@/pages/partners/stripe/projects/login'import { customRender } from '@/tests/lib/custom-render'@@ -55,10 +55,6 @@ vi.mock('@/lib/profile', () => ({}),}))-beforeEach(() => {- vi.clearAllMocks()-})-test('shows confirmation failures inline and keeps authorization available', async () => {const user = userEvent.setup()addAPIMock({diff --git a/apps/studio/tests/unit/lints/mcp-advisors.test.ts b/apps/studio/tests/unit/lints/mcp-advisors.test.tsindex b8fa25a5657..486b05ee46d 100644--- a/apps/studio/tests/unit/lints/mcp-advisors.test.ts+++ b/apps/studio/tests/unit/lints/mcp-advisors.test.ts@@ -26,7 +26,6 @@ describe('MCP advisor operations pass exposedSchemas to getLints', () => {const headers = { Authorization: 'Bearer test' }beforeEach(() => {- vi.clearAllMocks()mockGetLints.mockResolvedValue({data: [{diff --git a/apps/studio/tests/vitestSetup.ts b/apps/studio/tests/vitestSetup.tsindex 9465f5e8254..40b49a2f1f8 100644--- a/apps/studio/tests/vitestSetup.ts+++ b/apps/studio/tests/vitestSetup.ts@@ -25,37 +25,38 @@ dayjs.extend(relativeTime)// },// })-beforeAll(() => {- mswServer.listen({ onUnhandledRequest: `error` })- vi.mock('next/router', () => require('next-router-mock'))- vi.mock('next/navigation', async () => {- const actual = await vi.importActual('next/navigation')- return {- ...actual,- useRouter: () => {- return {- push: vi.fn(),- replace: vi.fn(),- }- },- usePathname: () => vi.fn(),- useSearchParams: () => ({- get: vi.fn(),- }),- }- })+// These must stay at module scope: Vitest hoists `vi.mock` above imports.+vi.mock('next/router', () => require('next-router-mock'))+vi.mock('next/navigation', async () => {+ const actual = await vi.importActual('next/navigation')+ return {+ ...actual,+ useRouter: () => {+ return {+ push: vi.fn(),+ replace: vi.fn(),+ }+ },+ usePathname: () => vi.fn(),+ useSearchParams: () => ({+ get: vi.fn(),+ }),+ }+})- vi.mock('next/compat/router', () => require('next-router-mock'))+vi.mock('next/compat/router', () => require('next-router-mock'))- // Mock the useParams hook from common module globally- vi.mock('common', async (importOriginal: any) => {- const actual = await importOriginal()- return {- ...(typeof actual === 'object' ? actual : {}),- useParams: () => ({ ref: 'default' }),- }- })+// Mock the useParams hook from common module globally+vi.mock('common', async (importOriginal: any) => {+ const actual = await importOriginal()+ return {+ ...(typeof actual === 'object' ? actual : {}),+ useParams: () => ({ ref: 'default' }),+ }+})+beforeAll(() => {+ mswServer.listen({ onUnhandledRequest: `error` })routerMock.useParser(createDynamicRouteParser(['/projects/[ref]']))})diff --git a/apps/studio/vitest.config.ts b/apps/studio/vitest.config.tsindex b0d1a68df0f..ec553266787 100644--- a/apps/studio/vitest.config.ts+++ b/apps/studio/vitest.config.ts@@ -1,7 +1,6 @@import { resolve } from 'node:path'import { fileURLToPath } from 'node:url'import react from '@vitejs/plugin-react'-import tsconfigPaths from 'vite-tsconfig-paths'import { configDefaults, defineConfig } from 'vitest/config'// Some tools like Vitest VSCode extensions, have trouble with resolving relative paths,@@ -12,13 +11,9 @@ const dirname = fileURLToPath(new URL('.', import.meta.url))const IS_CI = !!process.env.CIexport default defineConfig({- plugins: [- react(),- tsconfigPaths({- projects: ['.'],- }),- ],+ plugins: [react()],resolve: {+ tsconfigPaths: true,alias: {'@ui': resolve(__dirname, './../../packages/ui/src'),},diff --git a/apps/www/package.json b/apps/www/package.jsonindex bdc93fa0681..67b687abfb9 100644--- a/apps/www/package.json+++ b/apps/www/package.json@@ -126,7 +126,7 @@"unist-util-visit": "^5.1.0","unist-util-visit-parents": "5.1.3","uuid": "^14.0.0",- "vite-tsconfig-paths": "catalog:",+ "vite": "catalog:","vitest": "catalog:","zod": "catalog:"},diff --git a/apps/www/vitest.config.ts b/apps/www/vitest.config.tsindex 13634f4bf18..438b33c74b1 100644--- a/apps/www/vitest.config.ts+++ b/apps/www/vitest.config.ts@@ -1,12 +1,7 @@-import tsconfigPaths from 'vite-tsconfig-paths'import { configDefaults, defineConfig } from 'vitest/config'export default defineConfig({- plugins: [- tsconfigPaths({- projects: ['.'],- }),- ],+ resolve: { tsconfigPaths: true },test: {exclude: [...configDefaults.exclude, '.next/*'],},diff --git a/packages/ai-commands/test/extensions.d.ts b/packages/ai-commands/test/extensions.d.tsindex 6fcac8abd95..b12c924e4e4 100644--- a/packages/ai-commands/test/extensions.d.ts+++ b/packages/ai-commands/test/extensions.d.ts@@ -5,6 +5,6 @@ interface CustomMatchers<R = unknown> {}declare module 'vitest' {- interface Assertion<T = any> extends CustomMatchers<T> {}- interface AsymmetricMatchersContaining extends CustomMatchers {}+ // `Matchers<R, T>` augments both `Assertion` and `AsymmetricMatchersContaining`.+ interface Matchers<R, T> extends CustomMatchers<R> {}}diff --git a/packages/common/configcat.test.ts b/packages/common/configcat.test.tsindex bc3dacfed1e..458d6d088c8 100644--- a/packages/common/configcat.test.ts+++ b/packages/common/configcat.test.ts@@ -23,7 +23,6 @@ describe('configcat', () => {}beforeEach(() => {- vi.clearAllMocks()vi.resetModules()vi.unstubAllEnvs();(configcat.getClient as any).mockReturnValue(mockClient)diff --git a/packages/common/package.json b/packages/common/package.jsonindex b874061734e..28a0b2d1615 100644--- a/packages/common/package.json+++ b/packages/common/package.json@@ -37,6 +37,7 @@"tsconfig": "workspace:*","type-fest": "5.6.0","typescript": "catalog:",+ "vite": "catalog:","vitest": "catalog:"},"peerDependencies": {diff --git a/packages/dev-tools/package.json b/packages/dev-tools/package.jsonindex 366166a2b26..3982a1c76e0 100644--- a/packages/dev-tools/package.json+++ b/packages/dev-tools/package.json@@ -22,8 +22,9 @@"ui": "workspace:*"},"devDependencies": {- "@testing-library/jest-dom": "^6.6.0",- "@testing-library/react": "^16.0.0",+ "@testing-library/dom": "^10.0.0",+ "@testing-library/jest-dom": "^7.0.1",+ "@testing-library/react": "^16.3.3","@testing-library/user-event": "^14.0.0","@types/react": "catalog:","@types/react-dom": "catalog:",@@ -33,6 +34,7 @@"tsconfig": "workspace:*","@typescript/native": "catalog:","typescript": "catalog:",+ "vite": "catalog:","vitest": "catalog:","next": "catalog:","react": "catalog:",diff --git a/packages/ui-patterns/package.json b/packages/ui-patterns/package.jsonindex dd40894f18c..8cdc6963cdc 100644--- a/packages/ui-patterns/package.json+++ b/packages/ui-patterns/package.json@@ -819,8 +819,8 @@},"devDependencies": {"@testing-library/dom": "^10.0.0",- "@testing-library/jest-dom": "^6.6.0",- "@testing-library/react": "^16.0.0",+ "@testing-library/jest-dom": "^7.0.1",+ "@testing-library/react": "^16.3.3","@testing-library/user-event": "^14.0.0","@types/common-tags": "^1.8.4","@types/js-yaml": "^4.0.9",diff --git a/packages/ui-patterns/src/FilterBar/FilterBar.test.tsx b/packages/ui-patterns/src/FilterBar/FilterBar.test.tsxindex 94732014676..54aecbaf391 100644--- a/packages/ui-patterns/src/FilterBar/FilterBar.test.tsx+++ b/packages/ui-patterns/src/FilterBar/FilterBar.test.tsx@@ -1,7 +1,7 @@import { render, screen, waitFor } from '@testing-library/react'import userEvent from '@testing-library/user-event'import React, { useState } from 'react'-import { beforeEach, describe, expect, it, vi } from 'vitest'+import { describe, expect, it, vi } from 'vitest'import { FilterBar } from './FilterBar'import { FilterGroup, FilterProperty } from './types'@@ -37,10 +37,6 @@ describe('FilterBar', () => {const mockOnFilterChange = vi.fn()const mockOnFreeformTextChange = vi.fn()- beforeEach(() => {- vi.clearAllMocks()- })-it('renders with empty state', () => {render(<FilterBardiff --git a/packages/ui-patterns/src/MobileSheetNav/MobileSheetNav.test.tsx b/packages/ui-patterns/src/MobileSheetNav/MobileSheetNav.test.tsxindex 65137313efd..38cde44e60e 100644--- a/packages/ui-patterns/src/MobileSheetNav/MobileSheetNav.test.tsx+++ b/packages/ui-patterns/src/MobileSheetNav/MobileSheetNav.test.tsx@@ -48,7 +48,6 @@ describe('MobileSheetNav', () => {}beforeEach(() => {- vi.clearAllMocks()mockRouter.asPath = '/initial'mockWindowSize.width = 400})diff --git a/packages/ui/package.json b/packages/ui/package.jsonindex 676ce5ee370..7574072768f 100644--- a/packages/ui/package.json+++ b/packages/ui/package.json@@ -43,8 +43,9 @@},"devDependencies": {"@hookform/resolvers": "^3.1.1",- "@testing-library/jest-dom": "^6.6.0",- "@testing-library/react": "^16.0.0",+ "@testing-library/dom": "^10.0.0",+ "@testing-library/jest-dom": "^7.0.1",+ "@testing-library/react": "^16.3.3","@testing-library/user-event": "^14.0.0","@types/lodash": "4.17.5","@types/node": "catalog:",diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex 12f82101721..c4b5fdff10a 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -55,11 +55,11 @@ catalogs:specifier: ^6.0.1version: 6.0.1'@vitest/coverage-v8':- specifier: ^4.1.4- version: 4.1.4+ specifier: ^5.0.0+ version: 5.0.0'@vitest/ui':- specifier: ^4.1.4- version: 4.1.4+ specifier: ^5.0.0+ version: 5.0.0next:specifier: ^16.2.11version: 16.2.11@@ -96,12 +96,9 @@ catalogs:vite:specifier: ^8.0.16version: 8.2.1- vite-tsconfig-paths:- specifier: ^6.1.1- version: 6.1.1vitest:- specifier: ^4.1.4- version: 4.1.4+ specifier: ^5.0.0+ version: 5.0.0zod:specifier: 3.25.76version: 3.25.76@@ -613,8 +610,8 @@ importers:specifier: 0.3.2version: 0.3.2'@testing-library/react':- specifier: ^16.0.0- version: 16.0.0(@testing-library/[email protected])(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ specifier: ^16.3.3+ version: 16.3.3(@testing-library/[email protected])(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])'@types/common-tags':specifier: ^1.8.4version: 1.8.4@@ -726,12 +723,9 @@ importers:vite:specifier: 'catalog:'version: 8.2.1(@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])- vite-tsconfig-paths:- specifier: 'catalog:'- version: 6.1.1([email protected])([email protected])([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))vitest:specifier: 'catalog:'- version: 4.1.4(@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected])(@vitest/[email protected])([email protected](@noble/[email protected])([email protected]))([email protected](@types/[email protected])([email protected]))([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))+ version: 5.0.0(@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected])(@vitest/[email protected])([email protected](@noble/[email protected])([email protected]))([email protected](@types/[email protected])([email protected]))([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))apps/kb:dependencies:@@ -921,9 +915,6 @@ importers:vite:specifier: ^7.3.2version: 7.3.5(@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])- vite-tsconfig-paths:- specifier: 'catalog:'- version: 6.1.1([email protected])([email protected])([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))apps/studio:dependencies:@@ -1322,11 +1313,11 @@ importers:specifier: ^10.0.0version: 10.4.1'@testing-library/jest-dom':- specifier: ^6.6.0- version: 6.6.3+ specifier: ^7.0.1+ version: 7.0.1(@testing-library/[email protected])([email protected])'@testing-library/react':- specifier: ^16.0.0- version: 16.0.0(@testing-library/[email protected])(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ specifier: ^16.3.3+ version: 16.3.3(@testing-library/[email protected])(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])'@testing-library/user-event':specifier: ^14.0.0version: 14.6.1(@testing-library/[email protected])@@ -1383,10 +1374,10 @@ importers:version: 6.0.1([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))'@vitest/coverage-v8':specifier: 'catalog:'- version: 4.1.4([email protected])+ version: 5.0.0([email protected])'@vitest/ui':specifier: 'catalog:'- version: 4.1.4([email protected])+ version: 5.0.0([email protected])api-types:specifier: workspace:*version: link:../../packages/api-types@@ -1450,12 +1441,9 @@ importers:vite:specifier: 'catalog:'version: 8.2.1(@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])- vite-tsconfig-paths:- specifier: 'catalog:'- version: 6.1.1([email protected])([email protected])([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))vitest:specifier: 'catalog:'- version: 4.1.4(@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected])(@vitest/[email protected])([email protected](@noble/[email protected])([email protected]))([email protected](@types/[email protected])([email protected]))([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))+ version: 5.0.0(@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected])(@vitest/[email protected])([email protected](@noble/[email protected])([email protected]))([email protected](@types/[email protected])([email protected]))([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))apps/ui-library:dependencies:@@ -2025,12 +2013,12 @@ importers:uuid:specifier: ^14.0.0version: 14.0.0- vite-tsconfig-paths:+ vite:specifier: 'catalog:'- version: 6.1.1([email protected])([email protected])([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))+ version: 8.2.1(@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])vitest:specifier: 'catalog:'- version: 4.1.4(@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected])(@vitest/[email protected])([email protected](@noble/[email protected])([email protected]))([email protected](@types/[email protected])([email protected]))([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))+ version: 5.0.0(@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected])(@vitest/[email protected])([email protected](@noble/[email protected])([email protected]))([email protected](@types/[email protected])([email protected]))([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))zod:specifier: 'catalog:'version: 3.25.76@@ -2243,7 +2231,7 @@ importers:version: 8.2.1(@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])vitest:specifier: 'catalog:'- version: 4.1.4(@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected])(@vitest/[email protected])([email protected](@noble/[email protected])([email protected]))([email protected](@types/[email protected])([email protected]))([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))+ version: 5.0.0(@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected])(@vitest/[email protected])([email protected](@noble/[email protected])([email protected]))([email protected](@types/[email protected])([email protected]))([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))packages/api-types:devDependencies:@@ -2340,10 +2328,10 @@ importers:version: [email protected]'@vitest/coverage-v8':specifier: 'catalog:'- version: 4.1.4([email protected])+ version: 5.0.0([email protected])'@vitest/ui':specifier: 'catalog:'- version: 4.1.4([email protected])+ version: 5.0.0([email protected])lucide-react:specifier: '*'version: 0.436.0([email protected])@@ -2356,9 +2344,12 @@ importers:typescript:specifier: 'catalog:'version: 6.0.2+ vite:+ specifier: 'catalog:'+ version: 8.2.1(@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])vitest:specifier: 'catalog:'- version: 4.1.4(@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected])(@vitest/[email protected])([email protected](@noble/[email protected])([email protected]))([email protected](@types/[email protected])([email protected]))([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))+ version: 5.0.0(@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected])(@vitest/[email protected])([email protected](@noble/[email protected])([email protected]))([email protected](@types/[email protected])([email protected]))([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))packages/config:dependencies:@@ -2397,12 +2388,15 @@ importers:specifier: workspace:*version: link:../uidevDependencies:+ '@testing-library/dom':+ specifier: ^10.0.0+ version: 10.4.1'@testing-library/jest-dom':- specifier: ^6.6.0- version: 6.6.3+ specifier: ^7.0.1+ version: 7.0.1(@testing-library/[email protected])([email protected])'@testing-library/react':- specifier: ^16.0.0- version: 16.0.0(@testing-library/[email protected])(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ specifier: ^16.3.3+ version: 16.3.3(@testing-library/[email protected])(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])'@testing-library/user-event':specifier: ^14.0.0version: 14.6.1(@testing-library/[email protected])@@ -2439,9 +2433,12 @@ importers:typescript:specifier: 'catalog:'version: 6.0.2+ vite:+ specifier: 'catalog:'+ version: 8.2.1(@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])vitest:specifier: 'catalog:'- version: 4.1.4(@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected])(@vitest/[email protected])([email protected](@noble/[email protected])([email protected]))([email protected](@types/[email protected])([email protected]))([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))+ version: 5.0.0(@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected])(@vitest/[email protected])([email protected](@noble/[email protected])([email protected]))([email protected](@types/[email protected])([email protected]))([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))packages/eslint-config-supabase:devDependencies:@@ -2564,7 +2561,7 @@ importers:version: [email protected]'@vitest/coverage-v8':specifier: 'catalog:'- version: 4.1.4([email protected])+ version: 5.0.0([email protected])npm-run-all:specifier: ^4.1.5version: 4.1.5@@ -2582,7 +2579,7 @@ importers:version: 8.2.1(@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])vitest:specifier: 'catalog:'- version: 4.1.4(@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected])(@vitest/[email protected])([email protected](@noble/[email protected])([email protected]))([email protected](@types/[email protected])([email protected]))([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))+ version: 5.0.0(@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected])(@vitest/[email protected])([email protected](@noble/[email protected])([email protected]))([email protected](@types/[email protected])([email protected]))([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))packages/shared-data:dependencies:@@ -2680,12 +2677,15 @@ importers:'@hookform/resolvers':specifier: ^3.1.1version: 3.3.1([email protected]([email protected]))+ '@testing-library/dom':+ specifier: ^10.0.0+ version: 10.4.1'@testing-library/jest-dom':- specifier: ^6.6.0- version: 6.6.3+ specifier: ^7.0.1+ version: 7.0.1(@testing-library/[email protected])([email protected])'@testing-library/react':- specifier: ^16.0.0- version: 16.0.0(@testing-library/[email protected])(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ specifier: ^16.3.3+ version: 16.3.3(@testing-library/[email protected])(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])'@testing-library/user-event':specifier: ^14.0.0version: 14.6.1(@testing-library/[email protected])@@ -2709,7 +2709,7 @@ importers:version: [email protected]'@vitest/coverage-v8':specifier: 'catalog:'- version: 4.1.4([email protected])+ version: 5.0.0([email protected])config:specifier: workspace:*version: link:../config@@ -2727,7 +2727,7 @@ importers:version: 8.2.1(@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])vitest:specifier: 'catalog:'- version: 4.1.4(@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected])(@vitest/[email protected])([email protected](@noble/[email protected])([email protected]))([email protected](@types/[email protected])([email protected]))([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))+ version: 5.0.0(@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected])(@vitest/[email protected])([email protected](@noble/[email protected])([email protected]))([email protected](@types/[email protected])([email protected]))([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))packages/ui-patterns:dependencies:@@ -2883,11 +2883,11 @@ importers:specifier: ^10.0.0version: 10.4.1'@testing-library/jest-dom':- specifier: ^6.6.0- version: 6.6.3+ specifier: ^7.0.1+ version: 7.0.1(@testing-library/[email protected])([email protected])'@testing-library/react':- specifier: ^16.0.0- version: 16.0.0(@testing-library/[email protected])(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ specifier: ^16.3.3+ version: 16.3.3(@testing-library/[email protected])(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])'@testing-library/user-event':specifier: ^14.0.0version: 14.6.1(@testing-library/[email protected])@@ -2920,7 +2920,7 @@ importers:version: [email protected]'@vitest/coverage-v8':specifier: 'catalog:'- version: 4.1.4([email protected])+ version: 5.0.0([email protected])api-types:specifier: workspace:*version: link:../api-types@@ -2950,7 +2950,7 @@ importers:version: 8.2.1(@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])vitest:specifier: 'catalog:'- version: 4.1.4(@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected])(@vitest/[email protected])([email protected](@noble/[email protected])([email protected]))([email protected](@types/[email protected])([email protected]))([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))+ version: 5.0.0(@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected])(@vitest/[email protected])([email protected](@noble/[email protected])([email protected]))([email protected](@types/[email protected])([email protected]))([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))packages:@@ -8539,19 +8539,25 @@ packages:resolution: {integrity: sha512-o4PXJQidqJl82ckFaXUeoAW+XysPLauYI43Abki5hABd853iMhitooc6znOnczgbTYmEP6U6/y1ZyKAIsvMKGg==}engines: {node: '>=18'}- '@testing-library/[email protected]':- resolution: {integrity: sha512-IteBhl4XqYNkM54f4ejhLRJiZNqcSCoXUOG2CPK7qbD322KjQozM4kHQOfkG2oln9b9HTYqs+Sae8vBATubxxA==}- engines: {node: '>=14', npm: '>=6', yarn: '>=1'}+ '@testing-library/[email protected]':+ resolution: {integrity: sha512-oMDTC3oA+6CXSO2JZnvOI7CA6oVub6kij5ggk9ohwye5slmkwxYDXcPOVxgMw/RQlticjtO0C1RZkR97HgrWMw==}+ engines: {node: '>=22', npm: '>=6', yarn: '>=1'}+ peerDependencies:+ '@testing-library/dom': '>=10 <11'+ vitest: '>= 0.32'+ peerDependenciesMeta:+ vitest:+ optional: true- '@testing-library/[email protected]':- resolution: {integrity: sha512-guuxUKRWQ+FgNX0h0NS0FIq3Q3uLtWVpBzcLOggmfMoUpgBnzBzvLLd4fbm6yS8ydJd94cIfY4yP9qUQjM2KwQ==}+ '@testing-library/[email protected]':+ resolution: {integrity: sha512-Uo193NgQbPMz6lrrhtRQQFcMC6Re/ELLFbbuVL30WDlZxlpZf9/lMHTAVxPRLw1q1iu9OJmR1c2BLiENRstdBg==}engines: {node: '>=18'}peerDependencies:'@testing-library/dom': ^10.0.0- '@types/react': ^18.0.0- '@types/react-dom': ^18.0.0- react: ^18.0.0- react-dom: ^18.0.0+ '@types/react': ^18.0.0 || ^19.0.0+ '@types/react-dom': ^18.0.0 || ^19.0.0+ react: ^18.0.0 || ^19.0.0+ react-dom: ^18.0.0 || ^19.0.0peerDependenciesMeta:'@types/react':optional: true@@ -9325,20 +9331,25 @@ packages:vite: ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0vue: ^3.2.25- '@vitest/[email protected]':- resolution: {integrity: sha512-x7FptB5oDruxNPDNY2+S8tCh0pcq7ymCe1gTHcsp733jYjrJl8V1gMUlVysuCD9Kz46Xz9t1akkv08dPcYDs1w==}+ '@vitest/[email protected]':+ resolution: {integrity: sha512-toMg6PZGCIa/lQNCDoASrfb1ly4hsUKXFtFYC9kD4t78o5Y6LyNJU7AENt8eHPr3quYdxaxK7hj2mnbFfUk9NA==}peerDependencies:- '@vitest/browser': 4.1.4- vitest: 4.1.4+ '@vitest/browser': 5.0.0+ vitest: 5.0.0peerDependenciesMeta:'@vitest/browser':optional: true- '@vitest/[email protected]':- resolution: {integrity: sha512-iPBpra+VDuXmBFI3FMKHSFXp3Gx5HfmSCE8X67Dn+bwephCnQCaB7qWK2ldHa+8ncN8hJU8VTMcxjPpyMkUjww==}+ '@vitest/[email protected]':+ resolution: {integrity: sha512-k3DJZ8LhMBK9NS4SclF1ASD3OgXEWDorbIcPTRDK0/Zae6fRvu+fJRxtFdLfHsa9Y24beCdPnoNZ4LviTNstfA==}+ engines: {node: '>=22'}- '@vitest/[email protected]':- resolution: {integrity: sha512-R9HTZBhW6yCSGbGQnDnH3QHfJxokKN4KB+Yvk9Q1le7eQNYwiCyKxmLmurSpFy6BzJanSLuEUDrD+j97Q+ZLPg==}+ '@vitest/[email protected]':+ resolution: {integrity: sha512-1EOLRfsTMnyAr3+kEAsP4o9dhaDlGPpD7H5iLBBeq//YpNB1VIahkPhB+eRp9N2Dkfw8oySROjE3yf9XDeaIkQ==}+ engines: {node: '>=22'}++ '@vitest/[email protected]':+ resolution: {integrity: sha512-66PGTMIiVJP3t4a5yxU9qPtf7MdTBs8jmToMvy+HVflB3Yy13WJZTtPePdvU+wjRV02SKK5doLbSA6o9pwOmiA==}peerDependencies:msw: ^2.4.9vite: ^6.0.0 || ^7.0.0 || ^8.0.0@@ -9348,25 +9359,19 @@ packages:vite:optional: true- '@vitest/[email protected]':- resolution: {integrity: sha512-ddmDHU0gjEUyEVLxtZa7xamrpIefdEETu3nZjWtHeZX4QxqJ7tRxSteHVXJOcr8jhiLoGAhkK4WJ3WqBpjx42A==}-- '@vitest/[email protected]':- resolution: {integrity: sha512-xTp7VZ5aXP5ZJrn15UtJUWlx6qXLnGtF6jNxHepdPHpMfz/aVPx+htHtgcAL2mDXJgKhpoo2e9/hVJsIeFbytQ==}-- '@vitest/[email protected]':- resolution: {integrity: sha512-MCjCFgaS8aZz+m5nTcEcgk/xhWv0rEH4Yl53PPlMXOZ1/Ka2VcZU6CJ+MgYCZbcJvzGhQRjVrGQNZqkGPttIKw==}+ '@vitest/[email protected]':+ resolution: {integrity: sha512-PVRNuB3wpReb4SQEs4zTKM4KWFhQ5pw3spE8naoDJNB5T5aWRzGKHwXcLUllr0WeOTXpB6bSr3CJLo5+7XQSSQ==}- '@vitest/[email protected]':- resolution: {integrity: sha512-XxNdAsKW7C+FLydqFJLb5KhJtl3PGCMmYwFRfhvIgxJvLSXhhVI1zM8f1qD3Zg7RCjTSzDVyct6sghs9UEgBEQ==}+ '@vitest/[email protected]':+ resolution: {integrity: sha512-uy+luWBAPw9XfthoHi5AkfHUnuPYEESjl0p/r+meoBnU8bxg5GDQ3Ey8MjcJ6sqahkL4PFyrvfMJJBw7LbU06g==}- '@vitest/[email protected]':- resolution: {integrity: sha512-EgFR7nlj5iTDYZYCvavjFokNYwr3c3ry0sFiCg+N7B233Nwp+NNx7eoF/XvMWDCKY71xXAG3kFkt97ZHBJVL8A==}+ '@vitest/[email protected]':+ resolution: {integrity: sha512-h2FIFwggCY2GxUd2UdQoYNVQkOIqEQLPhNREcl3FUiRsdzQep7NWwYbSmhGEA9nFLPDq5pXzRMcBZQU8Py83sg==}peerDependencies:- vitest: 4.1.4+ vitest: 5.0.0- '@vitest/[email protected]':- resolution: {integrity: sha512-13QMT+eysM5uVGa1rG4kegGYNp6cnQcsTc67ELFbhNLQO+vgsygtYJx2khvdt4gVQqSSpC/KT5FZZxUpP3Oatw==}+ '@vitest/[email protected]':+ resolution: {integrity: sha512-dO++xL3vDfvhTAVimfkuQUA3k+JClIF1i1vAkPqpcGAthRmeWnXmHB7YPViPvgCwviX8u7Y5W1u2N//AaQr3fw==}'@vue-macros/[email protected]':resolution: {integrity: sha512-/5Fv+6DgIcM9ajY05ZmKBv+LMX1M9A0X+IUwDRVdt67ciw8OV9bvG2r34p3RiEadlsQybjhKPRKNXDC8Bp23cw==}@@ -9866,8 +9871,8 @@ packages:resolution: {integrity: sha512-6t10qk83GOG8p0vKmaCr8eiilZwO171AvbROMtvvNiwrTly62t+7XkA8RdIIVbpMhCASAsxgAzdRSwh6nw/5Dg==}engines: {node: '>=4'}- resolution: {integrity: sha512-1fSfIwuDICFA4LKkCzRPO7F0hzFf0B7+Xqrl27ynQaa+Rh0e1Es0v6kWHPott3lU10AyAr7oKHa65OppjLn3Rg==}+ resolution: {integrity: sha512-UPAgKJFSEGMWSDr3LX4tqnAb4f7KGT8O40Tyx8wbYmmZ/yn58lNCm8h3svs3eXgiGd5AXxz8NDOvXWvicq+rJA==}resolution: {integrity: sha512-IJdzo2vLiElBxKzwS36VsCue/62d6IdWjnPB2v3nuPKeWGynp6FF/CYoLa5i/3jXH/z97ZDdsXz6abpgM6w07A==}@@ -10180,10 +10185,6 @@ packages:resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==}engines: {node: '>=4'}- resolution: {integrity: sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==}- engines: {node: '>=8'}-resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==}engines: {node: '>=10'}@@ -11348,6 +11349,9 @@ packages:resolution: {integrity: sha512-n27zTYMjYu1aj4MjCWzSP7G9r75utsaoc8m61weK+W8JMBGGQybd43GstCXZ3WNmSFtGT9wi59qQTW6mhTR5LQ==}+ resolution: {integrity: sha512-poHGpORABojJJucnV9KbOavETW8lBVnphkW77ER5/BQ5Fz7oXSoCNek7IH3vR5nRjdsEz926ibFYX8KtLQmdyw==}+resolution: {integrity: sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==}engines: {node: '>= 0.4'}@@ -11783,8 +11787,8 @@ packages:resolution: {integrity: sha512-AFASGfIlnIbkKPQwX1yHaDjFvh/1gyKJODme52V6IORh69uEYgZp0o9C+qsIGNVEiuuhQU0CSSl++Rlegg1qvA==}engines: {node: '>=0.10.0'}- resolution: {integrity: sha512-knvyeauYhqjOYvQ66MznSMs83wmHrCycNEN6Ao+2AeYEfxUIkuiVxdEa1qlGEPK+We3n0THiDciYSsCcgW/DoA==}+ resolution: {integrity: sha512-KfYbmpRm0VbLjEvVa9yGwCi9GI34xvi7A/HXYWQO65CSD2u3MczUJSuwXKFIxlGsgBQizV9q5J9NHj4VG0n+pA==}engines: {node: '>=12.0.0'}@@ -11934,6 +11938,9 @@ packages:resolution: {integrity: sha512-cPJU47OaAoCbg0pBvzsgpTPhmhqI5eJjh/JIu8tPj5q+T7iLvW/JAYUqmE7KOB4R1ZyEhzBaIQpQpardBF5z8A==}+ resolution: {integrity: sha512-tbZNuJrLwGUp3zshBtdy4W+ORxZuIh8a5ilyIEQDC5rY1f3U20JMry0Ll3WBzU58EZKsEuJFXhb5gwv8CsPvgA==}+resolution: {integrity: sha512-f9c00hphOgeQTlDyavwTtu6RiK8AIFjD6+jvXkNkpeQ7rirK3uFWVpalkoS4LAwbdX7mfZ8aoBfFVQX1Re/8aw==}@@ -12013,6 +12020,9 @@ packages:resolution: {integrity: sha512-PjDse7RzhcPkIJwy5t7KPWQSZ9cAbzQXcafsetQoD7sOJRQlGikNbx7yZp2OotDnJyrDcbyRq3Ttb18iYOqkxA==}+ resolution: {integrity: sha512-5+ybhBZANEJxaH3X5evAFatUxLfEHSr7n6kYJ+1Qd0mUqr4eu9gIf6GDbWHf8RJijHrjjO8G+la14SlL2SeS1Q==}+resolution: {integrity: sha512-9UbaD6XdAL97+k/n+N7JwX46K/M6Zc6KcFYskrYL8wbBV/Uyk0CTAMY0VT+qiK5PM7AIc9aTWYtq65U7T+aCNQ==}engines: {node: '>=8'}@@ -12332,9 +12342,6 @@ packages:resolution: {integrity: sha512-QrJia2qDf5BB/V6HYlDTs0I0lBahyjLzpGQg3KT7FnCdTonAyPy2RtY802m2k4ALx6Dp752f82WsOczEVr3l6Q==}engines: {node: '>=20'}- resolution: {integrity: sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==}-resolution: {integrity: sha512-U7veizMqxyKlM58+Z5j2ngJBH/r9siDmxpvNxSw0PylF6WQvrASJEZrxh1hidRBJc2jqoBVSyOban5u8m+6Rxg==}peerDependencies:@@ -13189,18 +13196,6 @@ packages:resolution: {integrity: sha512-PIeMbHqMt4DnUP3MA/Flc0HElYjMXArsw1qwJZcm9sqR8mq3l8NYizFMty0pWwE/tzIGH3EKK5+jes5mAr85yw==}- resolution: {integrity: sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==}- engines: {node: '>=8'}-- resolution: {integrity: sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==}- engines: {node: '>=10'}-- resolution: {integrity: sha512-HGYWWS/ehqTV3xN10i23tkPkpH46MLCIMFNCaaKNavAXTF1RkqxawEPtnjnGZ6XKSInBKkiOA5BKS+aZiY3AvA==}- engines: {node: '>=8'}-resolution: {integrity: sha512-H0dkQoCa3b2VEeKQBOxFph+JAbcrQdE7KC0UkqwpLmv2EC4P41QXP+rqo9wYodACiG5/WM5s9oDApTU8utwj9g==}engines: {node: '>= 0.4'}@@ -13800,6 +13795,9 @@ packages:resolution: {integrity: sha512-kS3VHe0nEPST2saQV4Rbkchcd3UBRkVTQHo1D3h/ZTwFDhai/mfKkmtPAtD129EOI7K3HlHIsFOt0WrI2/oU9g==}+ resolution: {integrity: sha512-Bpb0W2TbLKOZ7vJnOUnVRGq3WL2p+ISV29M6hYPL1AFCpyKZpdr5ytiXoTSSxRVhg8YW7f65+6gbG8WG6PCa/g==}+resolution: {integrity: sha512-llBEhWm1SacoRwgHUoQJYtwp4PBLF4faQi5TCpIGyGs9n4y5+juI0tDgyKIfpqxckRHaHzouUEph3THklWh03w==}@@ -13807,10 +13805,6 @@ packages:resolution: {integrity: sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==}engines: {node: '>=8'}- resolution: {integrity: sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==}- engines: {node: '>=10'}-resolution: {integrity: sha512-cKTUFc/rbKUd/9meOvgrpJ2WrNzymt6jfRDdwg5UCnVzv9dTpEj9JS5m3wtziXVCjluIXyL8pcaukYqezIzZQA==}engines: {node: ^16.14.0 || >=18.0.0}@@ -14855,6 +14849,10 @@ packages:resolution: {integrity: sha512-uTqF9MuPraAQ+IsnPf366RG4cP9RtUi7MLO1N3KEc+wb0a6yKpeL0lmk2IB1jY5KHPAlTc6T/JRdC/YqxHNwkQ==}+ resolution: {integrity: sha512-4a+OsYv9UktOJKE+l1A4OufDgdRF9PifWj+tJnHURo/P+WOxpG4GzUFL9qCalmWauao6ogiG+QvnCovwPoyAWA==}+ engines: {node: '>=12.20.0'}+resolution: {integrity: sha512-2W4oUZlVaqAPAil6FUg/difl6YhqhUR7x2eZY4bQCko22UXg3hptq9KLQdqFClV+Wu85UX7hNtdGTngi/1BxcA==}@@ -15276,6 +15274,10 @@ packages:resolution: {integrity: sha512-RvwwcruNjI1ncT5xRakeyS9Lf8lcItv34KD+aif+VH9kduAyfYBipGh12274xtenIPZ119/R9BdTBa8gAwSh0A==}engines: {node: '>=12'}+ resolution: {integrity: sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==}+ engines: {node: '>=12'}+resolution: {integrity: sha512-qQbW94hLHEqCg7nhby4yRC7G2+jYHY4Rguc2bjw7Uug4GIJuu1tvf2uHaZv5Q8zdt+WKJ6qK1FOI6amaWUo5FA==}engines: {node: '>=0.10'}@@ -17097,8 +17099,9 @@ packages:resolution: {integrity: sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg==}- resolution: {integrity: sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==}+ resolution: {integrity: sha512-9APumHG7r4yOk4X4WlkmE71aZcv1gvin1czO3OQ1U9iJcFA5Ja/ygyb0vPOVHTthFozUYs8CLoLUlM8grb2lTQ==}+ engines: {node: '>=20.0.0'}resolution: {integrity: sha512-uo33abH+Ays0xYaDysoBt494Hb3hsEczMpcC0MwFl773pazORx4fmvKhclhR1wonUbB6vvpRsvVMwnhfqeMc+A==}@@ -17108,6 +17111,10 @@ packages:resolution: {integrity: sha512-SHf/r48b7vOrjve9PxJo3MN5v5yuyjHvdUcrQffT3WXMUfnGmHDVbC4k3sHJaJTgZCwpUplIaAo5ANtMyp3YHg==}engines: {node: '>=18'}+ resolution: {integrity: sha512-QKAl9m8gWWGHV8jZcPeym6j+XULi6tOf1mT83WYJ4Lk2ytW/uwAWkrP0uFsdoYMdueVJ0qs26wZ+23xeB4ibNQ==}+ engines: {node: '>=18'}+resolution: {integrity: sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==}engines: {node: '>=12.0.0'}@@ -17120,8 +17127,8 @@ packages:resolution: {integrity: sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==}engines: {node: '>=12.0.0'}- resolution: {integrity: sha512-Bf+ILmBgretUrdJxzXM0SgXLZ3XfiaUuOj/IKQHuTXip+05Xn+uyEYdVg0kYDipTBcLrCVyUzAPz7QmArb0mmw==}+ resolution: {integrity: sha512-yau8yJdTt989Mm0Bd/236QnzEiPf2xLLTqUZRUJOo/3CB078LSwzei343DgtJVmfJKJE3TMINY1u42SQsP6mXw==}engines: {node: '>=14.0.0'}@@ -17219,17 +17226,6 @@ packages:resolution: {integrity: sha512-ztMO++owQnz8c/gIENcM9XfCEzgoGphTv+nKpYNM1bgsdOVC/jRZuEBf6N+mLLDNg68Kl+GgUZfOySaRiG1/Ug==}- resolution: {integrity: sha512-4t0noZX9t6GcPTfBAbIbbIU4pfpCwh0ueq3S4O/5qXI1VwK1outmxhe9dOiEWqMz3MW2LKgDTpqWV+37IWuVbA==}- engines: {node: ^18 || >=20}- deprecated: unmaintained- hasBin: true- peerDependencies:- typescript: ^5.0.0- peerDependenciesMeta:- typescript:- optional: true-resolution: {integrity: sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==}@@ -17919,11 +17915,6 @@ packages:vite: ^6.0.0 || ^7.0.0 || ^8.0.0-0vue: ^3.5.0- resolution: {integrity: sha512-2cihq7zliibCCZ8P9cKJrQBkfgdvcFkOOc3Y02o3GWUDLgqjWsZudaoiuOwO/gzTzy17cS5F7ZPo4bsnS4DGkg==}- peerDependencies:- vite: '*'-resolution: {integrity: sha512-KuOaNhcnGFN2zIPGA7wRmzF+lJA1sea7rHq17aiJ++9lzY1WWG6Jpwqwe1KNbRVPIqHmr8GLYx7jbrQcN/7/ww==}engines: {node: ^20.19.0 || >=22.12.0}@@ -18015,23 +18006,23 @@ packages:vite:optional: true- resolution: {integrity: sha512-tFuJqTxKb8AvfyqMfnavXdzfy3h3sWZRWwfluGbkeR7n0HUev+FmNgZ8SDrRBTVrVCjgH5cA21qGbCffMNtWvg==}- engines: {node: ^20.0.0 || ^22.0.0 || >=24.0.0}+ resolution: {integrity: sha512-gpsMNoRhMjMktVxPtstOH4/PJuPyovVaMDr4oDilXaGH1EcqM2OE96SoHT2VIQ6fTGtTjqmHDrEu2X9RQiXf8Q==}+ engines: {node: ^22.12.0 || ^24.0.0 || >=26.0.0}hasBin: truepeerDependencies:'@edge-runtime/vm': '*''@opentelemetry/api': ^1.9.0- '@types/node': ^20.0.0 || ^22.0.0 || >=24.0.0- '@vitest/browser-playwright': 4.1.4- '@vitest/browser-preview': 4.1.4- '@vitest/browser-webdriverio': 4.1.4- '@vitest/coverage-istanbul': 4.1.4- '@vitest/coverage-v8': 4.1.4- '@vitest/ui': 4.1.4+ '@types/node': ^22.0.0 || >=24.0.0+ '@vitest/browser-playwright': 5.0.0+ '@vitest/browser-preview': 5.0.0+ '@vitest/browser-webdriverio': ^5.0.0-beta.5 || >=5.0.0+ '@vitest/coverage-istanbul': 5.0.0+ '@vitest/coverage-v8': 5.0.0+ '@vitest/ui': 5.0.0happy-dom: '*'jsdom: '*'- vite: ^6.0.0 || ^7.0.0 || ^8.0.0+ vite: ^6.4.0 || ^7.0.0 || ^8.0.0peerDependenciesMeta:'@edge-runtime/vm':optional: true@@ -25100,17 +25091,19 @@ snapshots:picocolors: 1.1.1pretty-format: 27.5.1- '@testing-library/[email protected]':dependencies:'@adobe/css-tools': 4.4.0+ '@testing-library/dom': 10.4.1aria-query: 5.3.2- chalk: 3.0.0css.escape: 1.5.1dom-accessibility-api: 0.6.3- lodash: 4.18.1+ picocolors: 1.1.1redent: 3.0.0+ optionalDependencies:+ vitest: 5.0.0(@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected])(@vitest/[email protected])([email protected](@noble/[email protected])([email protected]))([email protected](@types/[email protected])([email protected]))([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))- '@testing-library/[email protected](@testing-library/[email protected])(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])':+ '@testing-library/[email protected](@testing-library/[email protected])(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])':dependencies:'@babel/runtime': 7.26.10'@testing-library/dom': 10.4.1@@ -25935,72 +25928,55 @@ snapshots:vite: 8.2.1(@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])vue: 3.5.41([email protected])- '@vitest/[email protected]([email protected])':+ '@vitest/[email protected]([email protected])':dependencies:'@bcoe/v8-coverage': 1.0.2- '@vitest/utils': 4.1.4- ast-v8-to-istanbul: 1.0.0- istanbul-lib-coverage: 3.2.2- istanbul-lib-report: 3.0.1- istanbul-reports: 3.2.0+ '@vitest/istanbul-lib-coverage': 1.0.1+ '@vitest/istanbul-lib-report': 1.0.1+ ast-v8-to-istanbul: 1.0.5magicast: 0.5.4- obug: 2.1.1+ obug: 2.1.4std-env: 4.2.0- tinyrainbow: 3.1.0- vitest: 4.1.4(@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected])(@vitest/[email protected])([email protected](@noble/[email protected])([email protected]))([email protected](@types/[email protected])([email protected]))([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))+ tinyrainbow: 3.1.1+ vitest: 5.0.0(@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected])(@vitest/[email protected])([email protected](@noble/[email protected])([email protected]))([email protected](@types/[email protected])([email protected]))([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))- '@vitest/[email protected]':+ '@vitest/[email protected]': {}++ '@vitest/[email protected]':dependencies:- '@standard-schema/spec': 1.1.0- '@types/chai': 5.2.2- '@vitest/spy': 4.1.4- '@vitest/utils': 4.1.4- chai: 6.2.2- tinyrainbow: 3.1.0+ '@vitest/istanbul-lib-coverage': 1.0.1- '@vitest/[email protected]([email protected](@types/[email protected])([email protected]))([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))':+ '@vitest/[email protected]([email protected](@types/[email protected])([email protected]))([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))':dependencies:- '@vitest/spy': 4.1.4+ '@jridgewell/trace-mapping': 0.3.31+ '@vitest/spy': 5.0.0estree-walker: 3.0.3- magic-string: 0.30.21+ magic-string: 1.2.3optionalDependencies:msw: 2.11.3(@types/[email protected])([email protected])vite: 8.2.1(@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])- '@vitest/[email protected]':+ '@vitest/[email protected]':dependencies:- tinyrainbow: 3.1.0+ tinyrainbow: 3.1.1- '@vitest/[email protected]':- dependencies:- '@vitest/utils': 4.1.4- pathe: 2.0.3+ '@vitest/[email protected]': {}- '@vitest/[email protected]':+ '@vitest/[email protected]([email protected])':dependencies:- '@vitest/pretty-format': 4.1.4- '@vitest/utils': 4.1.4- magic-string: 0.30.21- pathe: 2.0.3-- '@vitest/[email protected]': {}-- '@vitest/[email protected]([email protected])':- dependencies:- '@vitest/utils': 4.1.4- fflate: 0.8.2- flatted: 3.4.2+ '@vitest/utils': 5.0.0+ fflate: 0.8.3+ flatted: 3.4.4pathe: 2.0.3sirv: 3.0.2- tinyglobby: 0.2.17- tinyrainbow: 3.1.0- vitest: 4.1.4(@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected])(@vitest/[email protected])([email protected](@noble/[email protected])([email protected]))([email protected](@types/[email protected])([email protected]))([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))+ tinyrainbow: 3.1.1+ vitest: 5.0.0(@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected])(@vitest/[email protected])([email protected](@noble/[email protected])([email protected]))([email protected](@types/[email protected])([email protected]))([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))- '@vitest/[email protected]':+ '@vitest/[email protected]':dependencies:- '@vitest/pretty-format': 4.1.4+ '@vitest/pretty-format': 5.0.0convert-source-map: 2.0.0- tinyrainbow: 3.1.0+ tinyrainbow: 3.1.1dependencies:@@ -26632,7 +26608,7 @@ snapshots:dependencies:tslib: 2.8.1dependencies:'@jridgewell/trace-mapping': 0.3.31estree-walker: 3.0.3@@ -27115,11 +27091,6 @@ snapshots:escape-string-regexp: 1.0.5supports-color: 5.5.0- dependencies:- ansi-styles: 4.3.0- supports-color: 7.2.0-dependencies:ansi-styles: 4.3.0@@ -28323,6 +28294,8 @@ snapshots:+ [email protected]: {}+dependencies:es-errors: 1.3.0@@ -28893,7 +28866,7 @@ snapshots:dependencies:fill-range: 2.2.4- [email protected]: {}+ [email protected]: {}@@ -29114,6 +29087,8 @@ snapshots:+ [email protected]: {}+@@ -29199,6 +29174,8 @@ snapshots:+ [email protected]: {}+@@ -29509,8 +29486,6 @@ snapshots:slash: 5.1.0unicorn-magic: 0.4.0- [email protected]: {}-dependencies:csstype: 3.2.3@@ -30457,19 +30432,6 @@ snapshots:- [email protected]: {}-- dependencies:- istanbul-lib-coverage: 3.2.2- make-dir: 4.0.0- supports-color: 7.2.0-- dependencies:- html-escaper: 2.0.2- istanbul-lib-report: 3.0.1-dependencies:define-data-property: 1.1.4@@ -31055,6 +31017,10 @@ snapshots:dependencies:'@jridgewell/sourcemap-codec': 1.5.5+ dependencies:+ '@jridgewell/sourcemap-codec': 1.5.5+dependencies:'@babel/parser': 7.29.8@@ -31065,10 +31031,6 @@ snapshots:dependencies:semver: 6.3.1- dependencies:- semver: 7.8.5-dependencies:'@npmcli/agent': 2.2.2([email protected])@@ -32904,6 +32866,8 @@ snapshots:+ [email protected]: {}+dependencies:destr: 2.0.5@@ -33368,6 +33332,8 @@ snapshots:+ [email protected]: {}+@@ -35598,12 +35564,14 @@ snapshots:- [email protected]: {}+ [email protected]: {}+ [email protected]: {}+dependencies:fdir: 6.5.0([email protected])@@ -35619,7 +35587,7 @@ snapshots:fdir: 6.5.0([email protected])picomatch: 4.0.5- [email protected]: {}+ [email protected]: {}dependencies:@@ -35702,10 +35670,6 @@ snapshots:'@ts-morph/common': 0.27.0code-block-writer: 13.0.3- optionalDependencies:- typescript: 6.0.2-dependencies:'@types/json5': 0.0.29@@ -36489,26 +36453,6 @@ snapshots:vite: 7.3.5(@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])vue: 3.5.41([email protected])- [email protected]([email protected])([email protected])([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])):- dependencies:- debug: 4.4.3([email protected])- globrex: 0.1.2- tsconfck: 3.0.3([email protected])- vite: 7.3.5(@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])- transitivePeerDependencies:- - supports-color- - typescript-- [email protected]([email protected])([email protected])([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])):- dependencies:- debug: 4.4.3([email protected])- globrex: 0.1.2- tsconfck: 3.0.3([email protected])- vite: 8.2.1(@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])- transitivePeerDependencies:- - supports-color- - typescript-[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]):dependencies:esbuild: 0.28.1@@ -36548,33 +36492,27 @@ snapshots:optionalDependencies:vite: 8.2.1(@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])- [email protected](@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected])(@vitest/[email protected])([email protected](@noble/[email protected])([email protected]))([email protected](@types/[email protected])([email protected]))([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])):+ [email protected](@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected])(@vitest/[email protected])([email protected](@noble/[email protected])([email protected]))([email protected](@types/[email protected])([email protected]))([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])):dependencies:- '@vitest/expect': 4.1.4- '@vitest/mocker': 4.1.4([email protected](@types/[email protected])([email protected]))([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))- '@vitest/pretty-format': 4.1.4- '@vitest/runner': 4.1.4- '@vitest/snapshot': 4.1.4- '@vitest/spy': 4.1.4- '@vitest/utils': 4.1.4- es-module-lexer: 2.1.0- expect-type: 1.3.0- magic-string: 0.30.21- obug: 2.1.1- pathe: 2.0.3- picomatch: 4.0.5+ '@types/chai': 5.2.2+ '@vitest/mocker': 5.0.0([email protected](@types/[email protected])([email protected]))([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))+ chai: 6.2.2+ es-module-lexer: 2.3.2+ expect-type: 1.4.0+ magic-string: 1.2.3+ obug: 2.1.4+ picomatch: 4.0.7std-env: 4.2.0- tinybench: 2.9.0- tinyexec: 1.2.4+ tinybench: 6.1.4+ tinyexec: 1.3.0tinyglobby: 0.2.17- tinyrainbow: 3.1.0vite: 8.2.1(@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])why-is-node-running: 2.3.0optionalDependencies:'@opentelemetry/api': 1.9.1'@types/node': 22.13.14- '@vitest/coverage-v8': 4.1.4([email protected])- '@vitest/ui': 4.1.4([email protected])+ '@vitest/coverage-v8': 5.0.0([email protected])+ '@vitest/ui': 5.0.0([email protected])jsdom: 28.1.0(@noble/[email protected])([email protected])transitivePeerDependencies:- mswdiff --git a/pnpm-workspace.yaml b/pnpm-workspace.yamlindex 2b643f53d98..ddb6f3dbb9f 100644--- a/pnpm-workspace.yaml+++ b/pnpm-workspace.yaml@@ -32,8 +32,8 @@ catalog:# https://devblogs.microsoft.com/typescript/announcing-typescript-7-0/'@typescript/native': npm:typescript@~7.0.2'@vitejs/plugin-react': ^6.0.1- '@vitest/coverage-v8': ^4.1.4- '@vitest/ui': ^4.1.4+ '@vitest/coverage-v8': ^5.0.0+ '@vitest/ui': ^5.0.0lodash: ^4.18.1lodash-es: ^4.18.1monaco-editor: 0.52.2@@ -50,8 +50,7 @@ catalog:valtio: ^2.3.2vite: ^8.0.16velite: ^0.4.0- vite-tsconfig-paths: ^6.1.1- vitest: ^4.1.4+ vitest: ^5.0.0zod: 3.25.76allowBuilds: