mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-12 23:01:41 +00:00
DataTable accepted any mix of its 40-odd props and rejected the incoherent combinations at runtime, from a validator that threw during the first render. A caller only found out it had wired server sorting without a `sorting` prop when the page blew up in front of them. Split the public prop type into mode-keyed unions instead, so the compiler rejects those combinations at the call site. `validateDataTableConfig` and `DataTableConfigError` go away; the component body reads an unchanged flat `DataTableResolvedProps`, which every union member is assignable to, so there is no narrowing inside it. All 44 existing call sites typecheck against the new union unchanged, which `next build` covers. That build only typechecks the app module graph, so the prop type itself needed a gate of its own: `npm run test:types` runs vitest's typecheck mode over `*.test-d.tsx`, and the unit workflow now runs it. The four guards deleted from `DataTable.test.tsx` come back there as compile-time assertions, and loosening the union back to the flat shape fails all five.
110 lines
3.1 KiB
JSON
110 lines
3.1 KiB
JSON
{
|
|
"name": "litellm-dashboard",
|
|
"version": "0.1.0",
|
|
"private": true,
|
|
"scripts": {
|
|
"dev": "next dev",
|
|
"dev:webpack": "next dev --webpack",
|
|
"build": "next build",
|
|
"start": "next start",
|
|
"lint": "eslint .",
|
|
"test": "vitest",
|
|
"test:dot": "vitest --reporter=dot",
|
|
"test:types": "vitest --run --typecheck.only",
|
|
"test:watch": "vitest -w",
|
|
"test:coverage": "vitest run --coverage",
|
|
"format": "prettier --write .",
|
|
"format:check": "prettier --check .",
|
|
"knip": "knip",
|
|
"knip:ci": "knip --exclude exports,nsExports,types,nsTypes,enumMembers,classMembers,duplicates",
|
|
"knip:fix": "knip --fix",
|
|
"gen:api": "node scripts/gen-api-types.mjs"
|
|
},
|
|
"dependencies": {
|
|
"@ant-design/cssinjs": "1.24.0",
|
|
"@ant-design/icons": "5.6.1",
|
|
"@anthropic-ai/sdk": "0.92.0",
|
|
"@base-ui/react": "^1.6.0",
|
|
"@headlessui/tailwindcss": "0.2.2",
|
|
"@heroicons/react": "1.0.6",
|
|
"@hookform/resolvers": "5.4.0",
|
|
"@tanstack/react-pacer": "0.22.1",
|
|
"@tanstack/react-query": "5.100.7",
|
|
"@tanstack/react-table": "8.21.3",
|
|
"@tremor/react": "3.18.7",
|
|
"@types/papaparse": "5.5.2",
|
|
"antd": "5.29.3",
|
|
"cva": "1.0.0-beta.4",
|
|
"date-fns": "^4.4.0",
|
|
"dayjs": "1.11.19",
|
|
"jwt-decode": "4.0.0",
|
|
"lucide-react": "0.513.0",
|
|
"moment": "2.30.1",
|
|
"next": "16.2.11",
|
|
"nuqs": "^2.9.4",
|
|
"openai": "4.104.0",
|
|
"openapi-fetch": "^0.17.0",
|
|
"openapi-react-query": "^0.5.4",
|
|
"papaparse": "5.5.3",
|
|
"react": "18.3.1",
|
|
"react-copy-to-clipboard": "5.1.1",
|
|
"react-dom": "18.3.1",
|
|
"react-hook-form": "7.82.0",
|
|
"react-json-view-lite": "2.5.0",
|
|
"react-markdown": "9.1.0",
|
|
"react-syntax-highlighter": "15.6.6",
|
|
"recharts": "3.9.2",
|
|
"remark-gfm": "4.0.1",
|
|
"tailwind-merge": "3.4.0",
|
|
"uuid": "14.0.0",
|
|
"zod": "3.25.76"
|
|
},
|
|
"devDependencies": {
|
|
"@eslint/js": "9.39.2",
|
|
"@tailwindcss/forms": "0.5.11",
|
|
"@tailwindcss/postcss": "4.3.2",
|
|
"@testing-library/dom": "10.4.1",
|
|
"@testing-library/jest-dom": "6.9.1",
|
|
"@testing-library/react": "16.3.2",
|
|
"@testing-library/user-event": "14.6.1",
|
|
"@types/node": "20.19.37",
|
|
"@types/react": "18.2.48",
|
|
"@types/react-copy-to-clipboard": "5.0.7",
|
|
"@types/react-dom": "18.3.7",
|
|
"@types/react-syntax-highlighter": "15.5.13",
|
|
"@vitest/coverage-v8": "3.2.6",
|
|
"@vitest/ui": "3.2.6",
|
|
"eslint": "9.39.2",
|
|
"eslint-config-next": "16.2.11",
|
|
"eslint-config-prettier": "10.1.8",
|
|
"eslint-plugin-unused-imports": "4.3.0",
|
|
"jsdom": "27.4.0",
|
|
"knip": "5.83.1",
|
|
"openapi-typescript": "7.13.0",
|
|
"postcss": "8.5.23",
|
|
"prettier": "3.2.5",
|
|
"tailwindcss": "4.3.2",
|
|
"tw-animate-css": "1.4.0",
|
|
"typescript": "5.9.3",
|
|
"typescript-eslint": "8.60.1",
|
|
"vitest": "3.2.6"
|
|
},
|
|
"overrides": {
|
|
"prismjs": "1.30.0",
|
|
"js-yaml": "4.3.1",
|
|
"brace-expansion": "5.0.9",
|
|
"glob": "13.0.0",
|
|
"minimatch": "10.2.4",
|
|
"ws": "8.21.0",
|
|
"braces": "3.0.3",
|
|
"axios": "1.13.6",
|
|
"postcss": "8.5.23",
|
|
"esbuild": "0.28.1",
|
|
"date-fns": "^4.4.0",
|
|
"sharp": "^0.35.0"
|
|
},
|
|
"engines": {
|
|
"node": ">=24.14.1",
|
|
"npm": ">=11.10.0"
|
|
}
|
|
}
|