Repository navigation
contract emit survives a relative project root; init scaffolds definePrismaConfig - #30064
Conversation
…PrismaConfig
validateContractDeps() handed createRequire() a path built from the
project root verbatim, and createRequire requires an absolute path —
so `contract emit` wrote its artifacts and then crashed whenever the
project root arrived relative ('./src/prisma/package.json'). The root
is resolved first now, with a test on a relative root.
The init templates import definePrismaConfig, the name engine 0.2.0
gives the config marker; the deprecated defineConfig alias still works
for existing files, but new scaffolds should not start deprecated.
Snapshots move with the templates.
Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>
|
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yml Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (5)
Included review availability: Your plan includes up to 10 reviews per rolling hour; 8 remain after this review. 📝 WalkthroughWalkthroughThe CLI configuration templates now use ChangesCLI tooling updates
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to The PR fixes relative-root contract emission and updates init scaffolds to use definePrismaConfig without changing the existing dotenv flow; no actionable merge-blocking risk remains after normal checks and review. Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Ruling from Will (2026-08-18): the engine will never load |
@prisma/orm-extension-arktype-json
@prisma/orm-extension-middleware-cache
@prisma/orm-extension-paradedb
@prisma/orm-extension-pgvector
@prisma/orm-extension-postgis
@prisma/orm-extension-supabase
@prisma/orm-family-mongo
@prisma/orm-family-sql
@prisma/orm-framework
@prisma/orm-mongo
@prisma/orm-postgres
@prisma/orm-sqlite
@prisma/orm-target-mongo
@prisma/orm-target-postgres
@prisma/orm-target-sqlite
@prisma/orm-toolchain
commit: |
size-limit report 📦
|
…ma#30065) Follow-up to prisma#30064: the init-journey harness pinned the scaffolded project's `@prisma/cli-engine` at 0.0.9 — an engine from before the `definePrismaConfig` rename — so all 20 journey emit/plan steps fail on main right now (`(0, _cliEngine.definePrismaConfig) is not a function`). The pin moves to 0.2.0, what the workspace pins. All 32 journey tests pass locally with the full workspace built. 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Updated the scaffolded CLI engine development dependency to version 0.2.0. * Clarified the required `definePrismaConfig` export in generated project documentation. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
Releases the consolidated-stack fixes as `[email protected]`: the config hard-cut (#30058), `contract emit` surviving a relative project root, and init scaffolding `definePrismaConfig` (#30064). `composer-prisma-cloud` re-releases against this next, then `[email protected]` pins the pair. Beyond the version sweep: regenerated contract fixtures; release notes at `docs/releases/v8.0.0-rc.4.md` leading with #30058's config migration; two new upgrade-skill entries covering the contract-artifact restamp (users re-emit once, extension authors regenerate fixtures — cases #30058's entries don't reach); and a cherry-pick of #30068 so this PR's CI runs the fixed `check:upgrade-coverage` (deduplicates on merge). Both release checks pass locally. Merging publishes. 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added upgrade guidance for regenerating contract artifacts when moving to v8.0.0-rc.4. - **Bug Fixes** - Fixed handling of relative project roots during contract generation. - Updated initialization scaffolding. - Removed deprecated configuration fallbacks and the legacy `prisma-next` binary. - Added guidance for migrating to `prisma.config.ts` with `definePrismaConfig`. - **Documentation** - Published v8.0.0-rc.4 release notes and upgrade instructions. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
Two of the three defects reported against the consolidated
8.0.0-rc.5stack:contract emitcrashed after writing artifacts when the project root was relative:validateContractDeps()builtcreateRequire()'s argument from the root verbatim, and createRequire requires an absolute path (The argument 'filename' must be … or absolute path string. Received './src/prisma/package.json'). The root is resolved first now, with a regression test on a relative root.defineConfig: templates and quick-references now importdefinePrismaConfig, the name engine 0.2.0 gives the config marker. Snapshots updated — the diff is purely the rename. All 1422 CLI package tests pass.Deliberately not done: dropping
dotenvfrom the scaffold. The report asked for it, but engine 0.2.0's config loader explicitly disables.envreading (dotenv: falsein its c12 options), and init scaffolds a.envthat the config reads throughprocess.env— removing theimport 'dotenv/config'line today would break the scaffold's own flow. If the intent is for the engine (or CLI startup) to load.envitself, that's an engine change to make first; flagging for a decision rather than guessing.The third reported defect —
@prisma/[email protected]requiring[email protected]— is composer-repo work and follows separately.🤖 Generated with Claude Code
Summary by CodeRabbit
Bug Fixes
Tests