Skip to content

fix(prisma): reject unknown CLI flags instead of silently ignoring them#413

Merged
amaksimo merged 1 commit into
mainfrom
reject-unknown-flags
Apr 28, 2026
Merged

fix(prisma): reject unknown CLI flags instead of silently ignoring them#413
amaksimo merged 1 commit into
mainfrom
reject-unknown-flags

Conversation

@amaksimo

Copy link
Copy Markdown
Contributor

Summary

  • All four CLI commands (migrate, validate, transform, lint) now error on unknown flags instead of silently ignoring them.
  • Each command defines its known flags and calls rejectUnknownFlags() before parsing arguments.
  • Error message format: Error: Unknown flag: --whatever

Test plan

  • validate --unknown-flag exits 1 with "Unknown flag" message
  • migrate schema.prisma -o out.sql --bogus exits 1 with "Unknown flag" message
  • transform --verbose exits 1 with "Unknown flag" message
  • lint --fix exits 1 with "Unknown flag" message
  • All existing tests still pass (60 tests)

@amaksimo amaksimo requested a review from a team as a code owner April 28, 2026 20:15
@amaksimo amaksimo merged commit 5c4f3a3 into main Apr 28, 2026
22 checks passed
@amaksimo amaksimo deleted the reject-unknown-flags branch April 28, 2026 20:28
@amaksimo amaksimo mentioned this pull request Apr 28, 2026
2 tasks
amaksimo added a commit that referenced this pull request Apr 28, 2026
## Summary

Bump version to 0.1.1 for release.

### Changes since v0.1.0

- **Replace custom SQL transform with dsql-lint** (#401) — SQL
transformation and linting now use `dsql-lint` instead of hand-written
regex rules
- **Delegate validator checks to dsql-lint** (#412) — Schema validation
generates SQL and runs `dsql-lint` in lint mode instead of maintaining
custom checks
- **Reject unknown CLI flags** (#413) — All commands now error on
unrecognized flags instead of silently ignoring them

## Test plan

- [x] All 60 tests pass
- [x] After merge, tag `node/prisma/v0.1.1` and push to trigger npm
publish
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.

2 participants