fix: Gracefully handle missing .env in prisma.config.mts files#676
Conversation
🦋 Changeset detectedLatest commit: 6edf837 The changes in this PR will be included in the next version bump. This PR includes changesets to release 18 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
WalkthroughAdds a conditional .env loading check to Prisma config files in examples and the generator template using existsSync before loadEnvFile(). Updates AGENTS.md guidance and template metadata instructions. Introduces a permissions allowlist in .claude/settings.json. Adds a changeset recording a patch for the fastify-generators package. Changes
Sequence Diagram(s)sequenceDiagram
participant Dev as Developer
participant CLI as Prisma CLI
participant CFG as prisma.config.mts
participant FS as File System
participant Env as loadEnvFile()
Dev->>CLI: run `pnpm prisma generate`
CLI->>CFG: load prisma config
CFG->>FS: existsSync(".env")
alt .env present
CFG->>Env: loadEnvFile()
note right of Env: environment variables loaded
else .env absent
note right of CFG: skip env loading
end
CFG-->>CLI: continue
CLI-->>Dev: generation completes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Disabled knowledge base sources:
📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
Comment |
Summary by CodeRabbit
New Features
Bug Fixes
Documentation
Chores