chore: extract shared tsconfig, move display-status to core, add i18n tests

- Add `@sofa/tsconfig` package with a shared `base.json` (target, lib, strict, moduleResolution, etc.) and migrate all packages/apps to `"extends": "@sofa/tsconfig/base.json"` to eliminate duplicated compiler options
- Move `display-status.ts` (and its `DisplayStatus` type + `getDisplayStatus` fn) from `@sofa/api` to `@sofa/core`; remove the `./display-status` export from `@sofa/api` and update all import sites in `discovery.ts` and `tracking.ts`
- Add `packages/core/test/display-status.test.ts`: 15 tests covering `ONGOING_TMDB_STATUSES` and all `getDisplayStatus` branches (movie, TV watchlist/in_progress/caught_up/completed, edge cases)
- Add `packages/i18n/vitest.config.ts` and two new test files: `date-buckets.test.ts` and `format.test.ts` covering date bucketing and locale formatting utilities
This commit is contained in:
2026-03-22 14:46:25 -04:00
parent 6be586bd53
commit 1d67b201a0
34 changed files with 508 additions and 180 deletions
+1
View File
@@ -20,6 +20,7 @@
"zod": "catalog:"
},
"devDependencies": {
"@sofa/tsconfig": "workspace:*",
"@types/bun": "catalog:",
"typescript": "catalog:"
}
+2 -13
View File
@@ -1,15 +1,4 @@
{
"compilerOptions": {
"target": "ES2017",
"lib": ["esnext"],
"strict": true,
"noEmit": true,
"module": "esnext",
"moduleResolution": "bundler",
"isolatedModules": true,
"skipLibCheck": true,
"types": ["bun"]
},
"include": ["**/*.ts"],
"exclude": ["node_modules", "dist"]
"extends": "@sofa/tsconfig/base.json",
"include": ["src"]
}
+1
View File
@@ -29,6 +29,7 @@
"zod": "catalog:"
},
"devDependencies": {
"@sofa/tsconfig": "workspace:*",
"@types/bun": "catalog:",
"typescript": "catalog:"
}
+1 -12
View File
@@ -1,15 +1,4 @@
{
"compilerOptions": {
"target": "ES2017",
"lib": ["esnext"],
"strict": true,
"noEmit": true,
"module": "esnext",
"moduleResolution": "bundler",
"isolatedModules": true,
"skipLibCheck": true,
"types": ["bun"],
"jsx": "react-jsx"
},
"extends": "@sofa/tsconfig/base.json",
"include": ["src"]
}
+1
View File
@@ -49,6 +49,7 @@
"devDependencies": {
"@lingui/babel-plugin-lingui-macro": "catalog:",
"@lingui/vite-plugin": "catalog:",
"@sofa/tsconfig": "workspace:*",
"@tailwindcss/vite": "4.2.2",
"@tanstack/devtools-vite": "0.6.0",
"@tanstack/react-devtools": "0.10.0",
+3 -10
View File
@@ -1,18 +1,11 @@
{
"extends": "@sofa/tsconfig/base.json",
"compilerOptions": {
"target": "ES2022",
"lib": ["dom", "dom.iterable", "esnext"],
"skipLibCheck": true,
"strict": true,
"noEmit": true,
"module": "esnext",
"moduleResolution": "bundler",
"lib": ["DOM", "DOM.Iterable", "ESNext"],
"jsx": "react-jsx",
"isolatedModules": true,
"paths": {
"@/*": ["./src/*"]
},
"types": ["bun"]
}
},
"include": ["src", "vite.config.ts", "../../packages/i18n/src/po.d.ts"],
"exclude": ["node_modules", "dist"]