Skip to content

fix: install the project-owned local Postgres runtime - #102

Merged
AmanVarshney01 merged 1 commit into
mainfrom
codex/fix-local-postgres-dependency
Sep 15, 2026
Merged

AmanVarshney01 merged 1 commit into
mainfrom
codex/fix-local-postgres-dependency

Conversation

@AmanVarshney01

Copy link
Copy Markdown
Member

Fix

Declare @prisma/dev@0.25.2 in generated PostgreSQL projects' devDependencies so Composer can start local Postgres. Prisma 8 does not include that runtime itself.

  • One shared dependency-writing change covers every Composer template and both contract authoring styles.
  • In a Turborepo, the dependency belongs only at the root where Composer runs, not in each workspace.
  • MongoDB and Deno-only projects remain unchanged.
  • Keep prisma: latest. No runtime download, global lookup, generated source patch, or CLI packaging change.
  • Reuse the existing template matrix and dependency tests; no new test cases or CI jobs.

Related PRs

prisma/composer#296 fixes Composer's CLI-relative lookup and its misleading instruction to install prisma when @prisma/dev is missing. This scaffolding fix works with the currently published Composer release and does not need to wait for that release.

prisma/prisma-cli#270 is not required. That alternative packages the runtime inside every CLI installation; this PR follows the project-owned optional-dependency direction recorded in the CLI design instead.

Verified

  • Based on latest main 787a5d8, including the merged Hello World monorepo template.
  • Unit tests: 67 passed, including the existing all-template/provider/authoring/package-manager matrix.
  • Typecheck, formatting, lint, and build passed.
  • Existing Turborepo end-to-end test passed: scaffold, agent skills, contract, migration, build, typecheck, local Composer dev, and seeded HTTP response.
  • Ran the actual built CLI in a fresh directory to create a Bun + Turborepo + TypeScript project and a pnpm + minimal + PSL project.
  • Both use published prisma@8.0.0-rc.15, app @prisma/composer-prisma-cloud@0.19.0, and the generated direct @prisma/dev@0.25.2 dependency. No dependency or source edits after generation.
  • Both dev:composer commands started local Postgres, applied the baseline migration, and served Alice/Bob/Carol over HTTP 200. Repeated requests returned the same three IDs. The monorepo / also returned Hello World!.
  • All local create-prisma verification runs disable telemetry. No cloud deployments were created or changed.

Signed-off-by: Aman Varshney <amanvarshney.work@gmail.com>
@coderabbitai

coderabbitai Bot commented Sep 15, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Essentials

Run ID: 3d17722f-8694-4250-a4e2-535b87b3afc1

📥 Commits

Reviewing files that changed from the base of the PR and between 787a5d8 and 1e0b031.

📒 Files selected for processing (4)
  • README.md
  • src/constants/dependencies.ts
  • src/tasks/install.ts
  • tests/install.test.ts

Included review availability: 1 review is currently available. Your included PR review attempts over the past 7 days set your current allowance at 3 reviews per hour.


Summary by CodeRabbit

  • New Features
    • PostgreSQL Composer projects now automatically include @prisma/dev for local PostgreSQL development.
    • The dependency is added only for supported package managers and is not included as a runtime dependency.
  • Documentation
    • Quick start guidance now explains when @prisma/dev is required and where to install it in monorepos.
  • Bug Fixes
    • MongoDB, Deno-only, and Prisma 8 projects no longer receive unnecessary PostgreSQL development dependencies.

Walkthrough

The installer now includes @prisma/dev at version 0.25.2 for non-Deno PostgreSQL projects. The dependency is written as a development dependency. MongoDB and Deno projects do not receive it. Tests cover individual providers, the template matrix, runtime dependency exclusion, and Turborepo workspace manifests. The README documents the requirement and monorepo placement.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to 1e0b0

The installer places the Prisma development runtime in the intended project package without affecting unsupported project types.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly states that the PR installs the project-owned local PostgreSQL runtime. It accurately summarizes the main change.
Description check ✅ Passed The description directly explains the @prisma/dev dependency change, its PostgreSQL scope, Turborepo behavior, exclusions, and verification results.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 3…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/fix-local-postgres-dependency
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch codex/fix-local-postgres-dependency

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

PR preview published

  • Version: 0.12.1-pr.102.352.1
  • Tag: pr102
  • Run with Bun: bunx create-prisma@pr102
  • Run with npm: npx create-prisma@pr102
  • Run with Yarn: yarn dlx create-prisma@pr102
  • Run with pnpm: pnpm dlx create-prisma@pr102
  • Run with Deno: deno run -A --minimum-dependency-age=0 npm:create-prisma@pr102
  • Workflow run: https://github.com/prisma/create-prisma/actions/runs/34949352798

@AmanVarshney01
AmanVarshney01 merged commit 278bcfa into main Sep 15, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant