Back to Prisma

Walkthrough

projects/prisma7-config/walkthrough.md

7.10.0-integration-fix-prisma-publish-token.18.5 KB
Original Source

Sources

Intent

Let Prisma 7 and Prisma 8 coexist without competing for the same automatically discovered config file. Prisma 7 gains a canonical prisma7.config.* namespace while preserving existing prisma.config.* projects as a quiet compatibility path.

Change map

The story

  1. Define one deterministic Prisma 7 discovery order: all root prisma7.config.* candidates, then all .config/prisma7.* candidates, then the existing c12-backed legacy search.
  2. Make the selected versioned file authoritative. Only absence reaches legacy discovery; a broken versioned config reports its own path and error instead of silently loading another contract.
  3. Share supported JavaScript/TypeScript selection with bootstrap without importing project code. Project detection and seed inspection cover the versioned family and supported legacy flat and index.* forms, without adding legacy data-format candidates.
  4. Teach the new convention everywhere a user creates or is directed to a concrete default file. Both CLI identities generate prisma7.config.ts, while retaining their respective config-package imports.
  5. Verify the contract at the installed-package boundary through both Prisma 7 entrypoints, rather than relying only on loader unit tests.

Behavior changes & evidence

Compatibility / migration / risk

  • Existing projects that only contain prisma.config.* need no rename and receive no new fallback warning; the installed E2E locks the existing loaded-file diagnostic exactly.
  • An explicit --config path remains authoritative regardless of filename.
  • A present but invalid prisma7.config.* intentionally blocks legacy fallback. Fix or remove that file to resume legacy discovery.
  • Bootstrap's non-executing legacy selector mirrors the supported JavaScript/TypeScript portion of c12 3.3.4 discovery; parity tests cover flat/index locations and ordering, and exclusion tests ensure data-format candidates are not added.
  • The review ledger records all 12 acceptance criteria as passing with no open findings, backed by the linked loader, bootstrap, init/guidance, and packed E2E tests.

Non-goals / intentionally out of scope

  • Prisma 8 config parsing, validation, or discovery behavior.
  • Config conversion, merging, synchronization, or deprecation warnings.
  • Changes to explicit --config semantics or unrelated Prisma filenames and terminology.