chore(config): 更新项目构建与测试配置
- 升级 Next.js 配置,移除 webpackBuildWorker 实验特性 - 更新 Tailwind 设计令牌系统,对齐新品牌色与字体 - 配置 TypeScript strict 模式 (noUncheckedIndexedAccess) - 更新 ESLint 规则与 Jest 测试配置 - 添加 prisma.config.ts 数据库配置
This commit is contained in:
+47
-2
@@ -7,10 +7,12 @@
|
||||
"dev:clean": "rm -rf .next dist && next dev -p 3000",
|
||||
"build": "next build",
|
||||
"build:clean": "rm -rf .next dist && next build",
|
||||
"start": "npx serve dist -p 3000",
|
||||
"start": "next start -p 3000",
|
||||
"db:seed": "npx tsx prisma/seed.ts",
|
||||
"db:reset": "npx prisma migrate reset --force",
|
||||
"lint": "eslint",
|
||||
"type-check": "tsc --noEmit",
|
||||
"preview": "npx serve dist -p 3000",
|
||||
"preview": "next start -p 3000",
|
||||
"test": "cd e2e && npx playwright test --config=playwright.config.ts",
|
||||
"test:unit": "jest",
|
||||
"test:coverage": "jest --coverage",
|
||||
@@ -18,6 +20,12 @@
|
||||
"coverage:report": "open coverage/lcov-report/index.html",
|
||||
"test:e2e": "cd e2e && npm test",
|
||||
"test:smoke": "cd e2e && npx playwright test --grep @smoke",
|
||||
"test:visual": "cd e2e && npx playwright test visual-regression.spec.ts --project=visual-chromium-desktop",
|
||||
"test:visual:all": "cd e2e && npx playwright test visual-regression.spec.ts",
|
||||
"test:visual:update": "cd e2e && npx playwright test visual-regression.spec.ts --project=visual-chromium-desktop --update-snapshots",
|
||||
"test:visual:mobile": "cd e2e && npx playwright test visual-regression.spec.ts --project=visual-chromium-mobile",
|
||||
"test:visual:tablet": "cd e2e && npx playwright test visual-regression.spec.ts --project=visual-chromium-tablet",
|
||||
"test:visual:browsers": "cd e2e && npx playwright test visual-regression.spec.ts --project=visual-chromium-desktop --project=visual-firefox-desktop --project=visual-webkit-desktop",
|
||||
"test:performance": "k6 run tests/performance/load-test.js",
|
||||
"test:stress": "k6 run tests/performance/stress-test.js",
|
||||
"check:contrast": "tsx scripts/utils/check-color-contrast.ts",
|
||||
@@ -38,18 +46,49 @@
|
||||
"prepare": "husky"
|
||||
},
|
||||
"dependencies": {
|
||||
"@hookform/resolvers": "^5.4.0",
|
||||
"@playwright/test": "^1.58.2",
|
||||
"@prisma/client": "^6.19.3",
|
||||
"@radix-ui/react-accordion": "^1.2.15",
|
||||
"@radix-ui/react-alert-dialog": "^1.1.18",
|
||||
"@radix-ui/react-avatar": "^1.2.1",
|
||||
"@radix-ui/react-checkbox": "^1.3.6",
|
||||
"@radix-ui/react-context-menu": "^2.3.2",
|
||||
"@radix-ui/react-dialog": "^1.1.18",
|
||||
"@radix-ui/react-dropdown-menu": "^2.1.19",
|
||||
"@radix-ui/react-hover-card": "^1.1.18",
|
||||
"@radix-ui/react-label": "^2.1.11",
|
||||
"@radix-ui/react-popover": "^1.1.18",
|
||||
"@radix-ui/react-progress": "^1.1.11",
|
||||
"@radix-ui/react-radio-group": "^1.4.2",
|
||||
"@radix-ui/react-scroll-area": "^1.2.13",
|
||||
"@radix-ui/react-select": "^2.3.2",
|
||||
"@radix-ui/react-separator": "^1.1.11",
|
||||
"@radix-ui/react-slider": "^1.4.2",
|
||||
"@radix-ui/react-slot": "^1.2.4",
|
||||
"@radix-ui/react-switch": "^1.3.2",
|
||||
"@radix-ui/react-tabs": "^1.1.16",
|
||||
"@radix-ui/react-tooltip": "^1.2.11",
|
||||
"@sentry/nextjs": "^10.52.0",
|
||||
"@sentry/tracing": "^7.120.4",
|
||||
"@tiptap/extension-link": "^3.27.1",
|
||||
"@tiptap/extension-placeholder": "^3.27.1",
|
||||
"@tiptap/pm": "^3.27.1",
|
||||
"@tiptap/react": "^3.27.1",
|
||||
"@tiptap/starter-kit": "^3.27.1",
|
||||
"bcryptjs": "^3.0.3",
|
||||
"class-variance-authority": "^0.7.1",
|
||||
"clsx": "^2.1.1",
|
||||
"date-fns": "^4.1.0",
|
||||
"framer-motion": "^12.34.3",
|
||||
"jsonwebtoken": "^9.0.3",
|
||||
"lucide-react": "^0.563.0",
|
||||
"next": "^14.2.21",
|
||||
"prisma": "^6.19.3",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"react-hook-form": "^7.80.0",
|
||||
"sonner": "^2.0.7",
|
||||
"tailwind-merge": "^3.4.0",
|
||||
"zod": "^4.3.6"
|
||||
},
|
||||
@@ -67,7 +106,9 @@
|
||||
"@testing-library/jest-dom": "^6.9.1",
|
||||
"@testing-library/react": "^16.3.2",
|
||||
"@testing-library/user-event": "^14.6.1",
|
||||
"@types/bcryptjs": "^2.4.6",
|
||||
"@types/jest": "^30.0.0",
|
||||
"@types/jsonwebtoken": "^9.0.10",
|
||||
"@types/node": "^20",
|
||||
"@types/react": "^18",
|
||||
"@types/react-dom": "^18",
|
||||
@@ -87,8 +128,12 @@
|
||||
"lint-staged": "^16.4.0",
|
||||
"postcss": "^8.4.49",
|
||||
"tailwindcss": "^3.4.17",
|
||||
"tailwindcss-animate": "^1.0.7",
|
||||
"ts-jest": "^29.4.6",
|
||||
"tsx": "^4.21.0",
|
||||
"typescript": "^5"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@next/swc-darwin-arm64": "^16.2.9"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user