tercul-frontend/package.json
Damir Mukimov ea2ef8fa6d
Fix/typescript testing issues (#12)
* feat: Add missing shared schema types and fix TypeScript imports

- Add AuthorWithStats and AnnotationWithUser schemas with relations
- Add corresponding TypeScript type exports
- Update tsconfig.json with @shared/* path mapping
- Fix @shared/schema import issues across components
- Resolve major TypeScript compilation errors

Next: Fix remaining type mismatches and component prop issues

* fix: resolve major TypeScript errors and type mismatches

- Add AuthorWithStats and AnnotationWithUser schemas with proper relations
- Fix AnnotationSystem component type issues (string IDs, nested user objects)
- Update component props to match schema expectations
- Fix function parameter types for annotation operations
- Resolve null/undefined type assignments
- Add missing required properties (type, isOfficial) to annotations

Remaining issues: Test ES module configuration and some component prop type mismatches

* fix: resolve remaining TypeScript errors and improve type safety

- Fix tag-manager component to work with string IDs from schema
- Update author-stats component to use schema-based AuthorWithStats type
- Add missing utility functions (formatNumber, formatRating) to author utils
- Fix WorkCard test to use correct schema types with string IDs
- Resolve type mismatches in component props and form handling
- Update interface definitions to match schema requirements

Linting:  90%+ resolved, remaining minor issues
Testing: ⚠️ ES module configuration needs refinement

* fix: complete TypeScript fixes and testing refinements

- Fix remaining AnnotationSystem component type issues
- Update FilterSidebar to use string tag IDs
- Resolve all major TypeScript compilation errors
- Testing infrastructure fully functional with Jest + ES modules
- Linting errors reduced to minor unused variable warnings

All critical type safety and testing issues resolved!

* Fix annotation types and author utils

* Fix TypeScript and testing infrastructure issues

- Fix AnnotationSystem component types (string IDs, user objects, liked/likes properties)
- Add formatNumber and formatRating utilities for author components
- Update FilterSidebar to use correct tag ID types (string vs number)
- Fix EnhancedReadingView translation and work ID type mismatches
- Resolve Playwright dependency issues in testing setup
- Update Jest configuration for ES module compatibility
- Fix import paths and type conflicts across components

All unit tests now pass and major TypeScript compilation errors resolved.

* Fix Vite build configuration for CI

- Set root to 'client' directory to find index.html
- Configure path aliases (@/* and @shared/*) for proper module resolution
- Set build output directory to '../dist' to place files in frontend root

Resolves CI build failure: 'Could not resolve entry module index.html'

* Fix Docker build for Yarn v4

- Replace deprecated 'yarn install --immutable --production' with 'yarn workspaces focus --production'
- This resolves the YN0050 error in CI Docker builds

Yarn v4 deprecated the --production flag on install command.
2025-11-30 15:39:18 +01:00

141 lines
4.5 KiB
JSON

{
"name": "rest-express",
"version": "1.0.0",
"type": "module",
"license": "MIT",
"scripts": {
"dev": "NODE_ENV=development tsx server/index.ts",
"build": "vite build && esbuild server/index.ts --platform=node --packages=external --bundle --format=esm --outdir=dist",
"start": "NODE_ENV=production node dist/index.js",
"check": "tsc",
"lint": "tsc --noEmit",
"test": "yarn test:unit && yarn test:e2e",
"test:unit": "jest",
"test:e2e": "playwright test"
},
"dependencies": {
"@anthropic-ai/sdk": "^0.37.0",
"@graphql-codegen/cli": "^5.0.7",
"@graphql-codegen/typescript": "^4.1.6",
"@graphql-codegen/typescript-graphql-request": "^6.3.0",
"@graphql-codegen/typescript-operations": "^4.6.1",
"@hookform/resolvers": "^3.10.0",
"@jridgewell/trace-mapping": "^0.3.25",
"@neondatabase/serverless": "^0.10.4",
"@radix-ui/react-accordion": "^1.2.4",
"@radix-ui/react-alert-dialog": "^1.1.7",
"@radix-ui/react-aspect-ratio": "^1.1.3",
"@radix-ui/react-avatar": "^1.1.4",
"@radix-ui/react-checkbox": "^1.1.5",
"@radix-ui/react-collapsible": "^1.1.4",
"@radix-ui/react-context-menu": "^2.2.7",
"@radix-ui/react-dialog": "^1.1.7",
"@radix-ui/react-dropdown-menu": "^2.1.7",
"@radix-ui/react-hover-card": "^1.1.7",
"@radix-ui/react-label": "^2.1.3",
"@radix-ui/react-menubar": "^1.1.7",
"@radix-ui/react-navigation-menu": "^1.2.6",
"@radix-ui/react-popover": "^1.1.7",
"@radix-ui/react-progress": "^1.1.3",
"@radix-ui/react-radio-group": "^1.2.4",
"@radix-ui/react-scroll-area": "^1.2.4",
"@radix-ui/react-select": "^2.1.7",
"@radix-ui/react-separator": "^1.1.3",
"@radix-ui/react-slider": "^1.2.4",
"@radix-ui/react-slot": "^1.2.0",
"@radix-ui/react-switch": "^1.1.4",
"@radix-ui/react-tabs": "^1.1.4",
"@radix-ui/react-toast": "^1.2.7",
"@radix-ui/react-toggle": "^1.1.3",
"@radix-ui/react-toggle-group": "^1.1.3",
"@radix-ui/react-tooltip": "^1.2.0",
"@tailwindcss/vite": "^4.1.3",
"@tanstack/react-query": "^5.60.5",
"@tanstack/react-table": "^8.21.3",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"cmdk": "^1.1.1",
"connect-pg-simple": "^10.0.0",
"date-fns": "^3.6.0",
"drizzle-orm": "^0.39.1",
"drizzle-zod": "^0.7.0",
"embla-carousel-react": "^8.6.0",
"express": "^4.21.2",
"express-session": "^1.18.1",
"framer-motion": "^11.13.1",
"graphql": "^16.11.0",
"graphql-request": "^6.1.0",
"graphql-tag": "^2.12.6",
"input-otp": "^1.4.2",
"lucide-react": "^0.453.0",
"memorystore": "^1.6.7",
"next-themes": "^0.4.6",
"passport": "^0.7.0",
"passport-local": "^1.0.0",
"react": "^19.1.1",
"react-day-picker": "^8.10.1",
"react-dom": "^19.1.1",
"react-hook-form": "^7.55.0",
"react-icons": "^5.4.0",
"react-resizable-panels": "^2.1.7",
"recharts": "^2.15.2",
"tailwind-merge": "^2.6.0",
"tailwindcss-animate": "^1.0.7",
"tw-animate-css": "^1.2.5",
"vaul": "^1.1.2",
"wouter": "^3.3.5",
"ws": "^8.18.0",
"zod": "4.0.0",
"zod-validation-error": "^3.4.0"
},
"devDependencies": {
"@babel/core": "^7.28.5",
"@babel/preset-env": "^7.28.5",
"@babel/preset-react": "^7.28.5",
"@babel/preset-typescript": "^7.28.5",
"@playwright/test": "^1.57.0",
"@replit/vite-plugin-cartographer": "^0.1.2",
"@replit/vite-plugin-runtime-error-modal": "^0.0.3",
"@tailwindcss/typography": "^0.5.15",
"@testing-library/dom": "^10.4.1",
"@testing-library/jest-dom": "^6.9.1",
"@testing-library/react": "^16.3.0",
"@types/babel__core": "^7",
"@types/babel__preset-env": "^7",
"@types/connect-pg-simple": "^7.0.3",
"@types/express": "4.17.21",
"@types/express-session": "^1.18.0",
"@types/jest": "^30.0.0",
"@types/node": "^24.2.1",
"@types/passport": "^1.0.16",
"@types/passport-local": "^1.0.38",
"@types/react": "^19.1.10",
"@types/react-dom": "^19.1.7",
"@types/ws": "^8.5.13",
"@vitejs/plugin-react": "^4.3.2",
"autoprefixer": "^10.4.20",
"babel-jest": "^30.2.0",
"drizzle-kit": "^0.30.4",
"esbuild": "^0.25.0",
"jest": "^30.2.0",
"jest-environment-jsdom": "^30.2.0",
"jest-transform-stub": "^2.0.0",
"jest-util": "^30.2.0",
"nanoid": "^5.1.5",
"playwright": "^1.57.0",
"postcss": "^8.4.47",
"prettier": "^3.6.2",
"prettier-vscode": "^1.0.0",
"react-router-dom": "^7.8.0",
"tailwindcss": "^3.4.17",
"ts-jest": "^29.4.5",
"tsx": "^4.19.1",
"typescript": "5.6.3",
"vite": "^7.1.2"
},
"optionalDependencies": {
"bufferutil": "^4.0.8"
},
"packageManager": "yarn@4.9.0+sha512.5f5f00843eae735dfab6f0442524603e987ceca55e98b36eb0120f4e58908e5b1406545321e46627dca97d15d562f23dc13fb96cabd4e6bc92d379f619001e4e"
}