Skip to content

feat(config): add support for engine?: 'js' | 'classic'#28266

Merged
jkomyno merged 27 commits intomainfrom
feat/prisma-config-engine
Oct 14, 2025
Merged

feat(config): add support for engine?: 'js' | 'classic'#28266
jkomyno merged 27 commits intomainfrom
feat/prisma-config-engine

Conversation

@jkomyno
Copy link
Copy Markdown
Contributor

@jkomyno jkomyno commented Oct 9, 2025

@jkomyno jkomyno changed the title feat(config): feat(config): add support for engine?: 'js' | 'classic' Oct 9, 2025
@jkomyno jkomyno added this to the 6.18.0 milestone Oct 9, 2025
…neConfig", which influences the "primaryDatasource" output
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Oct 10, 2025

size-limit report 📦

Path Size
packages/client/runtime/library.js 197.77 KB (0%)
packages/client/runtime/library.d.ts 126.71 KB (0%)
packages/client/runtime/binary.js 658.34 KB (0%)
packages/client/runtime/binary.d.ts 26 B (0%)
packages/client/runtime/edge.js 166.66 KB (0%)
packages/client/runtime/edge-esm.js 166.12 KB (0%)
packages/client/runtime/wasm-engine-edge.js 128.78 KB (0%)
packages/client/runtime/index-browser.js 34.5 KB (0%)
packages/client/runtime/index-browser.d.ts 11.64 KB (0%)
packages/cli/build/index.js 2.68 MB (+0.04% 🔺)
packages/client/prisma-client-0.0.0.tgz 25.93 MB (-0.01% 🔽)
packages/cli/prisma-0.0.0.tgz 16.75 MB (+0.01% 🔺)
packages/bundle-size/da-workers-libsql/output.tgz 924.95 KB (+0.01% 🔺)
packages/bundle-size/da-workers-neon/output.tgz 999.02 KB (+0.01% 🔺)
packages/bundle-size/da-workers-pg/output.tgz 998.19 KB (+0.01% 🔺)
packages/bundle-size/da-workers-planetscale/output.tgz 941.41 KB (+0.01% 🔺)
packages/bundle-size/da-workers-d1/output.tgz 906.8 KB (+0.01% 🔺)

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Oct 10, 2025

Client memory tests, node 24, library:

✅ Success

@jkomyno jkomyno marked this pull request as ready for review October 13, 2025 12:23
Copilot AI review requested due to automatic review settings October 13, 2025 12:23
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 adapter field with explicit engine configuration to select between JavaScript and classic schema engines
  • Updates validation logic to check engine === 'js' instead of presence of adapter field
  • 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.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Oct 13, 2025

🟢 All good, this PR is no longer uses custom engine.

jkomyno and others added 2 commits October 13, 2025 17:59
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
jkomyno added a commit to prisma/prisma-engines that referenced this pull request Oct 14, 2025
…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>
@jkomyno jkomyno merged commit a3e36ae into main Oct 14, 2025
408 of 410 checks passed
@jkomyno jkomyno deleted the feat/prisma-config-engine branch October 14, 2025 13:41
aqrln added a commit that referenced this pull request Oct 16, 2025
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)**
@clemens
Copy link
Copy Markdown
Contributor

clemens commented Nov 10, 2025

I've been wondering about these changes: I would expect that when I'm adding engine and url (and shadowDatabaseUrl) to prisma.config.ts, then I could remove their counterparts from schema.prisma. But that doesn't seem to be the case. Is this intentional or an oversight? Does preparing for Prisma v7 mean (for now) that we have to keep these values duplicated in both files?

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.

4 participants