mirror of
https://github.com/supabase/supabase.git
synced 2026-05-06 08:56:46 -04:00
1b1d05ff96
Upgrade vite and vitest to their latest major versions across the
monorepo, along with related packages.
**Changed:**
- `vite` catalog: `^7.3.2` → `^8.0.8` (Rolldown replaces esbuild/Rollup)
- `vitest` catalog: `^3.2.0` → `^4.1.4`
- `@vitejs/plugin-react`: `^4.3.4` → `^6.0.1`
- `@vitest/coverage-v8`: `^3.2.0` → `^4.1.4`
- `@vitest/ui`: `^3.2.0` → `^4.1.4`
- `vite-tsconfig-paths`: `^4.3.2` / `^5.1.4` → `^6.1.1`
**Pinned to vite 7:**
- `apps/lite-studio` — `@react-router/dev` hasn't declared vite 8
support yet
- `blocks/vue` — Nuxt plugins (`vite-plugin-inspect`, `vite-dev-rpc`,
`vite-hot-client`, `vite-plugin-vue-tracer`) haven't declared vite 8
support yet
**Test fixes for vitest 4 breaking changes:**
- **`apps/studio/lib/api/snippets.utils.test.ts`** — Replaced
`vi.mock('fs/promises')` automock with an explicit factory. Vitest 4's
automocking doesn't create mock functions for getter-based exports on
Node built-ins, so `mockedFS.access.mockResolvedValue` etc. were
`undefined`.
- **`apps/studio/lib/api/self-hosted/functions/index.test.ts`** —
Changed `mockReturnValue` to `mockImplementation(function() { ... })`
for a constructor mock. Vitest 4 no longer allows `mockReturnValue` when
the mock is called with `new`.
- **`apps/studio/tests/pages/api/mcp/index.test.ts`** — Changed arrow
function to regular `function` in `mockImplementation` for
`StreamableHTTPServerTransport`. Arrow functions can't be constructors,
and vitest 4 now enforces this.
- **`packages/ui-patterns/vitest.setup.ts`** — Changed `ResizeObserver`
mock from arrow function to regular `function` for the same constructor
enforcement reason. This was crashing Radix popover rendering in jsdom.
## To test
- `pnpm test:studio` — all 226 test files should pass
- `pnpm --filter ui-patterns vitest run` — all 183 tests should pass
- `pnpm --filter www test -- --run` — all 19 tests should pass
- `pnpm --filter ui vitest run` — all tests should pass
- `pnpm --filter dev-tools vitest run` — all tests should pass
- `pnpm --filter ai-commands vitest run` — all tests should pass
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Chores**
* Standardized and updated development tooling versions and version
sources for consistent installs across the repo (Vite, Vitest,
vite-tsconfig-paths and related plugins/catalog entries).
* **Tests**
* Improved test mocks and typings (updated mock
factories/implementations and tightened spy/type assertions) to increase
test reliability and compatibility with updated tooling.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com>
37 lines
1013 B
JSON
37 lines
1013 B
JSON
{
|
|
"name": "lite-studio",
|
|
"private": true,
|
|
"type": "module",
|
|
"scripts": {
|
|
"build": "react-router build",
|
|
"dev": "react-router dev",
|
|
"start": "react-router-serve ./build/server/index.js",
|
|
"typecheck": "react-router typegen && tsc",
|
|
"clean": "rimraf node_modules tsconfig.tsbuildinfo build .react-router .turbo"
|
|
},
|
|
"dependencies": {
|
|
"@react-router/node": "7.13.2",
|
|
"@react-router/serve": "7.13.2",
|
|
"isbot": "^5.1.36",
|
|
"react": "catalog:",
|
|
"react-dom": "catalog:",
|
|
"react-router": "7.13.2",
|
|
"@react-router/fs-routes": "^7.4.0",
|
|
"ui": "workspace:*",
|
|
"ui-patterns": "workspace:*"
|
|
},
|
|
"devDependencies": {
|
|
"@react-router/dev": "7.13.2",
|
|
"@types/node": "^22",
|
|
"@types/react": "catalog:",
|
|
"@types/react-dom": "catalog:",
|
|
"autoprefixer": "^10.4.27",
|
|
"config": "workspace:*",
|
|
"postcss": "^8.5.8",
|
|
"tailwindcss": "catalog:",
|
|
"tsconfig": "workspace:*",
|
|
"vite": "^7.3.2",
|
|
"vite-tsconfig-paths": "catalog:"
|
|
}
|
|
}
|