v8.0.0-rc.1-dev.40
Breaking Changes📦 prismaView on GitHub →
⚠ 1 breaking✨ 8 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
- 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.
- 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
`prisma-next db verify``prisma-next db sign``prisma-next migration check``@prisma/cli-engine``defineOrmCommand``InternalError``CLI.INTERNAL_ERROR``CLI.UNEXPECTED``combine-verify-results.ts``exitCodes``Diagnostic``MIGRATION.CONTRACT_SPACE_VIOLATION``migration show``MIGRATION.PACKAGE_NOT_FOUND``CLI.CONTRACT_ARG_CONFLICT``deserializeContract``CONTRACT.MARKER_REQUIRED`