Change8

v8.0.0-rc.1-dev.40

Breaking Changes
📦 prismaView on GitHub →
1 breaking8 features🐛 5 fixes🔧 17 symbols

Summary

The `db verify`, `db sign`, and `migration check` commands now provide more granular exit codes to distinguish between findings (exit 4) and execution errors (exit 2). Internal CLI bugs are now consistently reported with exit code 1.

⚠️ Breaking Changes

  • The exit codes for `prisma-next db verify`, `prisma-next db sign`, and `prisma-next migration check` have changed. Previously, drift findings resulted in exit code 1 (or 2 for `migration check`), but now they consistently result in exit code 4. Commands that could not run due to errors now exit with code 2. CI scripts that specifically check for exit code 1 will need to be updated to check for exit code 4 for drift findings or exit code 2 for execution errors.

Migration Steps

  1. Update CI scripts that specifically check for exit code 1 from `prisma-next db verify` or `prisma-next db sign` to check for exit code 4 instead.
  2. Update CI scripts that specifically check for exit code 1 from `prisma-next migration check` to check for exit code 4 instead.

✨ New Features

  • `prisma-next db verify`, `prisma-next db sign`, and `prisma-next migration check` now distinguish between findings (exit code 4) and execution errors (exit code 2).
  • Exit code 1 is now exclusively reserved for internal CLI bugs.
  • Secrets are now scrubbed from all envelope fields, including `meta` and `nextActions`, preventing sensitive information leakage.
  • `prisma-next db verify` now reports marker drift as a finding (exit code 4), even with the `--marker-only` flag.
  • `prisma-next migration check` now includes the migration package path in its human-readable findings.
  • Warn-grade findings (schema warnings, lenient unclaimed elements) no longer attach a `Diagnostic` and are now found in the human tree and result document.
  • A new error code `CLI.CONTRACT_ARG_CONFLICT` is introduced for when `db sign` receives both a positional argument and the `--contract` flag.
  • The error-reference documentation has been updated to reflect the new exit code meanings and to specify which codes can result in exit code 4.

🐛 Bug Fixes

  • Internal CLI errors (`InternalError`) are now re-thrown correctly, leading to exit code 1 instead of being masked as exit code 2 (`CLI.UNEXPECTED`).
  • The `combine-verify-results.ts` script now correctly throws an `InternalError` when the aggregate verifier returns no per-space results.
  • `db sign` now correctly throws an `InternalError` when a family returns a sign result that claims it did not sign.
  • `prisma-next migration show` now renders preview statements verbatim, without trimming or appending semicolons, and only drops blank statements.
  • Loader violations and introspection failures in `db verify` now correctly result in exit code 2 (could not run) instead of exit code 4 (findings).

Affected Symbols