mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 09:25:06 +03:00
## I have read the [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) file. YES ## What kind of change does this PR introduce? Refactor ## What is the current behavior? `/incident-status` is handled via Pages Router. ## What is the new behavior? `/incident-status` is handled via App Router, enabling use of Vercel Data Cache to cache the upstream fetch. ## Additional context Adding the first App Router route handler triggered `next typegen` (run as `pretypecheck`) to generate `.next/dev/types/validator.ts`, which imports all route files and expanded the type-checked graph. This surfaced pre-existing `null`-safety errors in: - `components/grid/SupabaseGrid.utils.ts` — `useSearchParams()` result - `components/layouts/ProjectLayout/UpgradingState/index.tsx` — `useSearchParams()` result - `pages/project/[ref]/sql/quickstarts.tsx` — `useParams()` result - `pages/project/[ref]/sql/templates.tsx` — `useParams()` result These are fixed with optional chaining. The `tsconfig.json` change (adding `.next/dev/types/**/*.ts` to `include`) is auto-generated by Next.js and committed as correct behavior.
44 lines
1.0 KiB
JSON
44 lines
1.0 KiB
JSON
{
|
|
"compilerOptions": {
|
|
"target": "ES2021",
|
|
"lib": ["dom", "dom.iterable", "esnext"],
|
|
"allowJs": false,
|
|
"skipLibCheck": true,
|
|
"strict": true,
|
|
"forceConsistentCasingInFileNames": true,
|
|
"noEmit": true,
|
|
"esModuleInterop": true,
|
|
"module": "esnext",
|
|
"moduleResolution": "bundler",
|
|
"resolveJsonModule": true,
|
|
"isolatedModules": true,
|
|
"jsx": "react-jsx",
|
|
// @deprecated: use @/ instead of importing from root
|
|
"baseUrl": ".",
|
|
"downlevelIteration": true,
|
|
"incremental": true,
|
|
"paths": {
|
|
"@/*": ["./*"],
|
|
"@ui/*": ["./../../packages/ui/src/*"] // handle ui package paths
|
|
},
|
|
"useDefineForClassFields": true,
|
|
"plugins": [
|
|
{
|
|
"name": "next"
|
|
}
|
|
],
|
|
"noErrorTruncation": true
|
|
},
|
|
"include": [
|
|
"next-env.d.ts",
|
|
"**/*.ts",
|
|
"**/*.tsx",
|
|
"**/*.js",
|
|
"**/*.jsx",
|
|
".next/types/**/*.ts",
|
|
"./../../packages/ui/src/**/*.d.ts",
|
|
".next/dev/types/**/*.ts"
|
|
],
|
|
"exclude": ["node_modules", "public/deno/*.ts"]
|
|
}
|