mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 09:25:06 +03:00
Fixes the TanStack Studio app failing to load locally, and adds a CI guard so the same class of bug can't come back. `packages/ui-patterns/src/admonition.tsx` is a back-compat shim containing `export * from './Admonition'`. On a case-insensitive filesystem (macOS, Windows) the resolver tries `./Admonition.tsx` before the directory index — and that's the same file. The shim re-exported itself and exported nothing, so every consumer of `ui-patterns/admonition` blew up with `does not provide an export named 'Admonition'`, plus knock-on Vite dep-optimizer errors about missing chunks. It works on Linux, so typecheck, lint, build and tests all pass on CI. This only reproduces on dev machines. **Changed:** - `admonition.tsx` now points at `./Admonition/index` explicitly, so the specifier can't resolve back to itself **Added:** - `scripts/check-case-hazards.mjs` — dependency-free, two textual checks so they fire on Linux CI: - **Self-resolving imports**: for `dir/X.tsx`, flags any extension-less relative specifier resolving to `dir/X` case-insensitively - **Case-colliding paths**: tracked paths (files and directory prefixes) equal when lowercased, which can't coexist in a case-insensitive checkout - `pnpm test:case-hazards`, plus a step in `typecheck.yml` after `setup-node` but before `pnpm install` — no deps needed, fails fast Scoped check 1 to genuine self-imports rather than all case-insensitive file/directory ambiguity. The broader rule lights up ~45 legitimate routing pairs (`_app.tsx` + `_app/`, `changelog.tsx` + `changelog/`) and would get switched off within a week. This version has zero false positives on master today. ## Follow-up (not in this PR) The underlying duplication is still there: `src/admonition.tsx` and `src/Admonition/` both exist, and the ~14 internal `'../Admonition'` imports inside the package resolve through the shim on macOS but through the directory on Linux. Two resolution paths for one module is exactly what produced this. Real fix is to collapse it. Current counts: **246** files import `ui-patterns/admonition`, **0** import `ui-patterns/Admonition`. So either rename the directory to lowercase and delete the shim (zero import churn, but one lowercase dir among ~50 PascalCase siblings), or codemod the 246 imports to PascalCase to match the package convention. I'd lean to the codemod, on a day it won't conflict with in-flight branches. ## To test - `pnpm test:case-hazards` on master → passes, ~16.5k files checked - Revert `admonition.tsx` to `export * from './Admonition'` and re-run → fails with the offending file and the suggested fix - Confirm the fixed form `'./Admonition/index'` is *not* flagged - With the fix in place: `rm -rf apps/studio/node_modules/.vite`, then `STUDIO_FRAMEWORK=tanstack pnpm dev:studio` → app loads, no `Pre-transform error` and no missing-export error in the console <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved detection of file-path casing issues that could cause failures on case-insensitive systems. * Corrected a module re-export to ensure the intended UI component is exposed consistently. * **Tests** * Added a dedicated case-sensitivity hazard check. * Integrated the check into the type-check workflow for earlier issue detection. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com>
86 lines
4.4 KiB
JSON
86 lines
4.4 KiB
JSON
{
|
|
"name": "supabase",
|
|
"description": "The Postgres Development Platform.",
|
|
"version": "0.0.0",
|
|
"author": "Supabase, Inc.",
|
|
"license": "Apache-2.0",
|
|
"private": true,
|
|
"scripts": {
|
|
"preinstall": "npx only-allow pnpm",
|
|
"build": "turbo run build",
|
|
"build:studio": "turbo run build --filter=studio",
|
|
"build:studio:docker": "docker build . -f apps/studio/Dockerfile --target production -t supabase-studio:local --build-arg NEXT_PUBLIC_STUDIO_AUTH_MODE=supabase --no-cache",
|
|
"build:studio:docker:tanstack": "docker build . -f apps/studio/Dockerfile --target production -t supabase-studio:local-tanstack --build-arg NEXT_PUBLIC_STUDIO_AUTH_MODE=supabase --build-arg STUDIO_FRAMEWORK=tanstack --no-cache",
|
|
"build:design-system": "turbo run build --filter=design-system",
|
|
"build:docs": "turbo run build --filter=docs",
|
|
"clean": "turbo run clean --parallel && rimraf -G .turbo/cache && pnpm purge",
|
|
"dev": "turbo run dev --parallel",
|
|
"dev:studio": "turbo run dev --filter=studio --parallel",
|
|
"dev:studio-local": "pnpm setup:cli && NODE_ENV=test MODE=test pnpm --prefix ./apps/studio dev",
|
|
"dev:docs": "turbo run dev --filter=docs --parallel",
|
|
"dev:www": "turbo run dev --filter=www --parallel",
|
|
"dev:design-system": "turbo run dev --filter=design-system --parallel",
|
|
"lint": "turbo run lint",
|
|
"typecheck": "turbo --continue typecheck",
|
|
"test:case-hazards": "node scripts/check-case-hazards.mjs",
|
|
"test:prettier": "SORT_IMPORTS=false prettier --config prettier.config.mjs --cache --check '{apps,packages,blocks,examples,i18n}/**/*.{js,jsx,ts,tsx,css,md,mdx,json}'",
|
|
"format": "SORT_IMPORTS=false prettier --config prettier.config.mjs --cache --write '{apps,packages,blocks,examples,i18n}/**/*.{js,jsx,ts,tsx,css,md,mdx,json}'",
|
|
"test:docs": "turbo run test --filter=docs",
|
|
"test:ui": "turbo run test --filter=ui",
|
|
"test:ui-patterns": "turbo run test --filter=ui-patterns",
|
|
"test:studio": "turbo run test --filter=studio",
|
|
"test:studio:watch": "turbo run test --filter=studio -- watch",
|
|
"e2e:setup:cli": "supabase stop --all --no-backup --workdir ./e2e/studio; supabase start --exclude studio,mailpit --workdir ./e2e/studio && supabase status --output json --workdir ./e2e/studio > keys.json && node scripts/generateLocalEnv.js",
|
|
"e2e:setup:selfhosted": "SKIP_ASSET_UPLOAD=1 pnpm e2e:setup:cli && NODE_ENV=test MODE=test NODE_OPTIONS=\"--max-old-space-size=4096\" pnpm run build:studio && NODE_ENV=test MODE=test pnpm --prefix ./apps/studio start",
|
|
"e2e:setup:selfhosted:start-studio": "SKIP_ASSET_UPLOAD=1 NODE_ENV=test MODE=test pnpm --prefix ./apps/studio start",
|
|
"e2e:setup:platform": "SKIP_ASSET_UPLOAD=1 NODE_OPTIONS=\"--max-old-space-size=4096\" pnpm run build:studio && pnpm --prefix ./apps/studio start",
|
|
"e2e": "pnpm --prefix e2e/studio run e2e",
|
|
"e2e:ui": "pnpm --prefix e2e/studio run e2e:ui",
|
|
"e2e:docs": "pnpm --prefix e2e/docs run e2e:docs",
|
|
"e2e:docs:ui": "pnpm --prefix e2e/docs run e2e:ui",
|
|
"e2e:docs:local-smoke": "pnpm --prefix e2e/docs run e2e:docs:local-smoke",
|
|
"perf:kong": "ab -t 5 -c 20 -T application/json http://localhost:8000/",
|
|
"perf:meta": "ab -t 5 -c 20 -T application/json http://localhost:5555/tables",
|
|
"setup:cli": "supabase start -x studio && supabase status --output json > keys.json && node scripts/generateLocalEnv.js",
|
|
"generate:types": "supabase gen types typescript --local > ./supabase/functions/common/database-types.ts",
|
|
"api:codegen": "cd packages/api-types && pnpm run codegen",
|
|
"knip": "pnpx knip@~5.50.0",
|
|
"authorize-vercel-deploys": "tsx scripts/authorizeVercelDeploys.ts"
|
|
},
|
|
"devDependencies": {
|
|
"@aws-sdk/client-secrets-manager": "^3.1041.0",
|
|
"@ianvs/prettier-plugin-sort-imports": "^4.7.0",
|
|
"@types/node": "catalog:",
|
|
"eslint": "^9.0.0",
|
|
"jsdom": "^28.1.0",
|
|
"prettier": "^3.8.0",
|
|
"prettier-plugin-sql-cst": "^0.18.0",
|
|
"rimraf": "^6.0.0",
|
|
"supabase": "^2.76.10",
|
|
"supports-color": "^8.0.0",
|
|
"tailwindcss": "catalog:",
|
|
"tsx": "catalog:",
|
|
"turbo": "2.9.14",
|
|
"@typescript/native": "catalog:",
|
|
"typescript": "catalog:",
|
|
"zod": "catalog:"
|
|
},
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://github.com/supabase/supabase.git"
|
|
},
|
|
"engines": {
|
|
"pnpm": "11.13",
|
|
"node": ">=22.13"
|
|
},
|
|
"keywords": [
|
|
"postgres",
|
|
"firebase",
|
|
"storage",
|
|
"functions",
|
|
"database",
|
|
"auth"
|
|
],
|
|
"packageManager": "pnpm@11.13.1"
|
|
}
|