fix: repair astro dev, turborepo runtime paths, and prisma postgres migration retry#51
fix: repair astro dev, turborepo runtime paths, and prisma postgres migration retry#51AmanVarshney01 wants to merge 1 commit into
Conversation
…igration retry Verified end to end by scaffolding all nine templates and exercising build, dev, and production servers against seeded databases.
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 45 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (6)
✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
Comment |
PR preview published
|
End-to-end sweep of all 9 templates (scaffold → install → generate → migrate → seed → build → dev server → prod server, asserting seeded users over HTTP). 7/9 passed; astro and turborepo had real bugs, fixed here. Also bumps the only stale exact pins and replaces the provisioning sleep hack.
astro:
astro devcrashed at startupvite.ssr.noExternal: true(the workaround for Prisma Compute's Bun runtime failing on cookie's CJS named exports) forces CJS deps through Vite's ESM module runner in dev →exports is not definedincookie/dist/index.js, so the dev server never booted. Moved the setting into an inline integration that applies it only forastro build. Verified: dev serves/api/usersfrom the seeded DB, the built server output still bundlescookieinline (no external import remains indist/server), andpreviewworks. Once prisma/project-compute#111 (stable Bun runtime) ships, this workaround can be deleted entirely.turborepo: three runtime bugs
DATABASE_URL="file:./dev.db"is relative; the CLI (migrate/seed, cwdpackages/db) createdpackages/db/dev.db, but@prisma/adapter-libsqlresolves the path against the process cwd — turbo runs the api inapps/api, soGET /usershit a fresh emptyapps/api/dev.dband 500'd.client.tsnow resolves relativefile:paths against the db package dir. (Underlying CLI/adapter inconsistency is worth an upstream prisma/prisma issue.)PORTsilently ignored. turbo 2.x strict env mode strips undeclared vars, soPORT=x bun run devlistened on 3000. AddedglobalPassThroughEnv: ["PORT", "DATABASE_URL"].startcrashed under Node.node dist/src/index.jscan't resolve@repo/db's raw-TS export (ERR_MODULE_NOT_FOUNDon the extensionless./clientimport).startnow usestsx, same asdev.Verified: root
PORT=8129 bun run devserves seeded users on 8129,startworks, no strayapps/api/dev.dbis created.next: stale exact pins
next/eslint-config-next16.2.9 → 16.2.10 (everything else uses caret ranges that already resolve to latest; Prisma is on current 7.8.0). Also clears the eslint peer-dep warnings during install. Re-verified scaffold + build + dev.prisma postgres: retry instead of blind sleep
The first
migrate devagainst a freshly provisioned database raced provisioning readiness, papered over with a fixed 2s sleep. Root cause fixed in prisma/create-db#84 (create-db now blocks until the DB answersSELECT 1); here the sleep is replaced with bounded retries (1s/2s/4s backoff, Prisma Postgres flow only), which is net faster in the common case and covers older create-db versions. Verified with a live run: provision → migrate → seed all green.Testing
bun run check+typecheckclean--provider postgresql --prisma-postgres→ provisioned, migrated, seeded, exit 0