Repository navigation
feat: update build and database scripts in package.json: #318
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,12 +4,13 @@ | |
| "private": true, | ||
| "scripts": { | ||
| "dev": "bun run db:generate && next dev", | ||
| "build": "bun run db:generate && next build --webpack", | ||
| "build": "bun run db:generate && bun run db:migrate && next build --webpack", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The root build uses Turborepo's cacheable There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
If a preview or branch build shares the production |
||
| "postinstall": "bun run db:generate", | ||
| "start": "next start", | ||
| "lint": "eslint", | ||
| "typecheck": "tsc --noEmit", | ||
| "db:generate": "prisma generate --schema ../../packages/db/prisma/schema.prisma" | ||
| "db:generate": "prisma generate --schema ../../packages/db/prisma/schema.prisma", | ||
| "db:migrate": "prisma migrate deploy --config ../../packages/db/prisma.config.ts" | ||
| }, | ||
| "dependencies": { | ||
| "@ai-sdk/anthropic": "^4.0.49", | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P1 · HIGH · Build now applies production migrations (side effects during build)
apps/web/package.jsonchangesbuildto runbun run db:migrate(Prismamigrate deploy). This introduces schema/data mutation as part of the build step, which can unexpectedly affect CI/local/dev environments and expand blast radius. Suggested fix: move migrations to a deployment-specific step (or gate with an env var) instead of running duringbuild.