Back to Prisma

Brief: D1 R4 — correct extension-scope misread

projects/prisma7-config/briefs/D1-R4.md

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

Brief: D1 R4 — correct extension-scope misread

Task

Correct the previous review-response misread. Restore automatic Prisma 7 discovery for the spec-required JavaScript/TypeScript family in both locations:

text
prisma7.config.{js,ts,mjs,cjs,mts,cts}
.config/prisma7.{js,ts,mjs,cjs,mts,cts}

The human review comment rejected the newly enumerated legacy data-format extensions (.json, .jsonc, .json5, .yaml, .yml, .toml), not the Prisma 7 JS/TS family. Remove those data formats from the non-executing bootstrap selector and its tests. Retain supported JS/TS legacy flat/index candidates as needed for bootstrap selection, with root/.config ordering matching the c12 path for those supported extensions.

Scope

In: packages/config/src/loadConfigFromFile.ts, packages/config/src/index.ts, config discovery tests, packages/cli/src/bootstrap/project-state.ts, and bootstrap tests.

Out: Runtime c12's pre-existing legacy behavior (including its own handling/rejection of data-format files), explicit --config, init/guidance, compatibility E2E exact scenarios, Bun title fix, project/review artifacts, and unrelated cleanup.

Completed when

  • All six supported Prisma 7 JS/TS extensions are automatically discovered at root and .config/, with root candidates before .config/ and all versioned candidates before legacy discovery.
  • Explicit paths remain authoritative; selected versioned load/validation failures remain terminal; legacy runtime fallback remains the existing c12 call.
  • Bootstrap non-executingly recognizes the same supported Prisma 7 family and supported JS/TS legacy flat/index forms.
  • .json, .jsonc, .json5, .yaml, .yml, and .toml are absent from the added non-executing candidate machinery and its added tests; no new support for those formats is introduced.
  • Candidate exports are limited to what consumers need; do not expose the candidate array unless required.
  • Focused config and bootstrap suites, relevant builds/typechecks/lint/Prettier, diff check, and transient-ID scan pass; changes are staged and committed.

Operational metadata

  • Model tier: high — surgical restoration must preserve the valid prior family behavior while removing only the mistakenly added data formats.
  • Time-box: 60 minutes.
  • Halt conditions: Halt if restoring the JS/TS family requires changing c12's existing legacy runtime behavior, or if any consumer genuinely requires the data-format candidates.

Carry-over

Use pre-correction commit f4a9afd1bb as a reference, not as a blind restore. Its Prisma 7 family and supported JS/TS bootstrap logic are desired; its LEGACY_SUPPORTED_EXTENSIONS data formats are not. Preserve the Bun test-title correction from b949a1b9f5.

Return shape

Report exact restored behavior, proof that data-format candidates are gone, tests, commit SHA, and surprises. Write heartbeat; do not edit project/review artifacts, amend, push, or reply on GitHub.