feat(config): add support for engine?: 'js' | 'classic'#28266
Conversation
engine?: 'js' | 'classic'
…neConfig", which influences the "primaryDatasource" output
size-limit report 📦
|
|
Client memory tests, node 24, library: ✅ Success |
…into feat/prisma-config-engine
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for specifying the schema engine type via an engine?: 'js' | 'classic' configuration option in Prisma config files, replacing the previous implicit adapter field approach.
Key Changes:
- Replaces
adapterfield with explicitengineconfiguration to select between JavaScript and classic schema engines - Updates validation logic to check
engine === 'js'instead of presence ofadapterfield - Refactors schema loading to support classic engine with direct datasource configuration
Reviewed Changes
Copilot reviewed 47 out of 48 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/config/src/PrismaConfig.ts | Adds new schema engine config types and shapes, replaces adapter-based validation |
| packages/config/src/defineConfig.ts | Refactors engine configuration logic to handle both 'js' and 'classic' engines |
| packages/migrate/src/Migrate.ts | Updates Migrate.setup to use schemaEngineConfig instead of adapter parameter |
| packages/internals/src/cli/schemaContext.ts | Adds support for classic engine datasource overrides in schema context |
| packages/migrate/src/commands/*.ts | Updates all migrate commands to use new engine configuration pattern |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
🟢 All good, this PR is no longer uses custom engine. |
This reverts commit 5cfe495.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…into feat/prisma-config-engine
…a Config file (#5645) This PR: - contributes to [TML-1332](https://linear.app/prisma-company/issue/TML-1332/prisma-config-alternative-to-url-directurl-shadowdatabaseurl) - complements prisma/prisma#28266 - adds `--datasource` to `schema-engine-cli`, which is a JSON-encoded object used to override PSL's `datasource` URL-like attributes --------- Co-authored-by: jkomyno <12381818+jkomyno@users.noreply.github.com>
…into feat/prisma-config-engine
Conflicts in `packages/config` were automatically solved using [Mergiraf](https://mergiraf.org/). Commits: - **fix: fix neon listener leak (#28255)** - **feat(qpe): add an option to disable logging to console (#28253)** - **feat(adapter-mssql): support multiSubnetFailover flag in connection string (#28261)** - **chore: use pnpm catalog (#28236)** - **fix: revert "chore: use pnpm catalog (#28236)" (#28271)** - **chore: upgrade OpenTelemetry deps and refresh tracing setup in client (#28268)** - **chore(deps): update engines to 6.18.0-3.b03d75f1a67e62289420f5697c28a3ff8dbb0424 (#28258)** - **feat(qpe): expose package version as an export (#28275)** - **feat: support OpenTelemetry in loadable sub-commands (#28272)** - **chore(deps): update engines to 6.18.0-6.9bf76dbea6c9e34d59a3577015bd1e94bfda7624 (#28288)** - **fix(adapter-pg): historical dates (#28212)** - **chore(deps): update engines to 6.18.0-7.d3fc122f88ca3ce86f67a797debfb179a39ccf48 (#28293)** - **fix: support multiple Prisma instances with different providers (#28291)** - **feat(config): add support for `engine?: 'js' | 'classic'` (#28266)**
|
I've been wondering about these changes: I would expect that when I'm adding |
This PR:
engine: 'classic'in Prisma Config file prisma-engines#5645.