docs(skills): update Prisma and Zod API patterns for cross-version compatibility (#2336)

* docs(skills): update Prisma and Zod API patterns for cross-version compatibility

- skills/prisma-patterns: show both adapter-based and direct PrismaClient
  initialization side-by-side; update import paths with conditional notes;
  rewrite version header to be release-agnostic
- skills/backend-patterns: fix ZodError.errors -> ZodError.issues
- skills/coding-standards: fix ZodError.errors -> ZodError.issues
- skills/security-review: fix ZodError.errors -> ZodError.issues

These API differences were discovered during implementation of a
full-stack health assessment project. The updated code samples show
both the new and old API forms so the skill remains useful regardless
of which Prisma or Zod version is installed.

Closes #2335

* fix(skills): revert Prisma client imports to '@prisma/client'

The 'prisma' npm package is the CLI tool, not the runtime client.
Using it as an import source would cause compile-time failures on all
versions. '@prisma/client' remains the correct import source for the
generated PrismaClient and Prisma namespace types.

Found by Greptile during PR review.
This commit is contained in:
weizhiyuan
2026-06-29 18:38:30 -07:00
committed by GitHub
parent 8c75abf02e
commit 3a46c82b0c
4 changed files with 50 additions and 21 deletions
+1 -1
View File
@@ -324,7 +324,7 @@ export async function POST(request: Request) {
return NextResponse.json({
success: false,
error: 'Validation failed',
details: error.errors
details: error.issues
}, { status: 400 })
}
}