Skip to content

Config files import definePrismaConfig, the engine's current name for the marker - #30129

Merged
wmadden-electric merged 6 commits into
mainfrom
rename-define-config
Sep 22, 2026
Merged

wmadden-electric merged 6 commits into
mainfrom
rename-define-config

Conversation

@wmadden-electric

Copy link
Copy Markdown
Contributor

Why now

@prisma/cli-engine has exported the config marker as definePrismaConfig since 0.2.0, keeping defineConfig as a deprecated alias. Engine 0.3.0 drops the alias before launch. Every prisma.config.ts in this repo still imports the old name, so on 0.3.0 they all fail at evaluation with defineConfig is not a function.

Doing the rename now, on the current 0.2.3 pin, costs nothing. The two names are literally the same function object there:

import('@prisma/cli-engine').then((m) => m.definePrismaConfig === m.defineConfig);
// true

So this PR is mergeable today and changes no behaviour. It clears the last blocker on moving the engine pin to 0.3.0, which #30128 is waiting for.

What changed

306 TypeScript files import the marker from @prisma/cli-engine. All move to definePrismaConfig, at the import and at the call. Almost all are prisma.config.ts fixtures under test/, plus the example and app configs.

Two things that share the name are deliberately untouched:

  • The framework's own defineConfig, exported by the target facades and @internal/cli/config-types. It is always imported aliased (defineConfig as ormConfig), so it never collided with the sweep.
  • defineConfigSection, a separate and current engine export.

Replacements were anchored on the exact import line and on defineConfig(, never on a bare word match. After the sweep:

  • no defineConfig reference to @prisma/cli-engine remains in any .ts, .mts, .mjs or .js file
  • both defineConfigSection occurrences are intact, and no definePrismaConfigSection exists anywhere
  • the aliased framework imports are unchanged
  • the diff is 643 insertions against 643 deletions — line for line, nothing added or dropped

21 more files spell the old name out rather than importing it:

  • scripts/regen-example-migrations.mjs generates a temporary config file. Its engineDefineConfig alias existed only because the engine marker and the framework builder shared a name, so the alias goes with the rename.
  • The CONFIG.VERSION_MARKER_MISSING diagnostic told the reader to create the config with defineConfig. Its summary, explanation and fix now name definePrismaConfig. So does its entry in docs/reference/error-reference.md, which additionally pointed at the target package's /config entrypoint — the wrong import for the marker.
  • Doc comments in the config loader, the ORM loader and its config types, init and its package resolution, and the publish-surface import roots.
  • Four test names, and an init assertion that only checked for the substring defineConfig and so passed by accident against the scaffold's definePrismaConfig. It now asserts the real name.

The CHANGELOG, the rc.2 release notes and the rc.1-to-rc.2 upgrade recipes still say defineConfig, deliberately: they record releases where that was the name.

Verification

All on the current 0.2.3 pin — no override, no tarball.

Check Result
pnpm build 85/85 tasks pass
turbo run typecheck --force 166/166 tasks pass, nothing cached. Covers integration-tests, whose tsconfig includes test/**/*, so all 262 fixture configs are typechecked.
pnpm test:packages 15630 tests — the same count as main before the change, so nothing was lost or silently skipped
pnpm test:integration 2061 pass across 370 of 371 files. These evaluate the renamed config files for real.
@internal/cli 1436 tests pass
@internal/config-loader 46 tests pass
@internal/errors 124 tests pass
@internal/config 23 tests pass
@internal/language-server 273 tests pass
pnpm lint 99/99 tasks pass
pnpm lint:deps, lint:docs, lint:manifests pass
pnpm check:conformance pass
pnpm check:error-reference pass, all 288 codes listed

Three test files fail somewhere in those runs. Each was checked and none is caused by this change:

  • test/ports/.../driver-adapters-error-forwarding fails identically on unmodified origin/main — I checked out main in this working copy and reproduced it.
  • @prisma/orm-framework's module-identity also fails on unmodified main here: pnpm pack trips over a leftover gitignored skills/prisma-8 directory.
  • @internal/adapter-postgres's order-by-enum PGlite test fails only under parallel load; it passes on its own (7/7).

Related

🤖 Generated with Claude Code

… the marker

`@prisma/cli-engine` has exported the config marker as `definePrismaConfig` since 0.2.0, keeping `defineConfig` as a deprecated alias. On the pinned 0.2.3 the two names are the same function object, so this sweep changes no behaviour today. Engine 0.3.0 drops the alias before launch, and every one of these files would then fail with `defineConfig is not a function`.

306 TypeScript files import the marker from `@prisma/cli-engine`; all of them move to the current name, at the import and at the call. Almost all are `prisma.config.ts` fixtures under `test/`, plus the example and app configs.

Two things that share the name are untouched. The framework's own `defineConfig`, exported by the target facades and `@internal/cli/config-types`, is always imported aliased (`defineConfig as ormConfig`), so it never collided with the sweep. `defineConfigSection` is a separate and current engine export.

21 more files spell the old name out rather than importing it:

- `scripts/regen-example-migrations.mjs` generates a temporary config file. Its `engineDefineConfig` alias existed only because the engine marker and the framework builder shared a name, so the alias goes with the rename.
- The `CONFIG.VERSION_MARKER_MISSING` diagnostic told the reader to create the config with `defineConfig`. Its summary, explanation and fix now name `definePrismaConfig`, as does its entry in `docs/reference/error-reference.md` — which additionally pointed at the target package's `/config` entrypoint, the wrong import for the marker.
- Doc comments in the config loader, the ORM loader and its config types, `init` and its package resolution, and the publish-surface import roots.
- Four test names, and an `init` assertion that only checked for the substring `defineConfig` and so passed by accident against the scaffold's `definePrismaConfig`.

The CHANGELOG, the rc.2 release notes and the rc.1-to-rc.2 upgrade recipes still say `defineConfig`, deliberately: they record releases where that was the name.

This unblocks moving the engine pin to 0.3.0, which #30128 waits on.

Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>
@wmadden-electric
wmadden-electric requested a review from a team as a code owner August 25, 2026 15:51
@CLAassistant

CLAassistant commented Aug 25, 2026 •

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@coderabbitai

coderabbitai Bot commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Too many files!

This PR contains 335 files, which is 35 over the limit of 300.

To get a review, reduce the PR to 300 files or fewer by splitting it into smaller PRs or changing its base branch.

Usage-priced reviews support at most 300 files.

⚙️ Run configuration

Configuration used: Repository: prisma/orm/.coderabbit.yml

Review profile: CHILL

Plan: Advanced

Run ID: e1b5d8bf-8170-4db4-9e8b-f3037bf8a172

📥 Commits

Reviewing files that changed from the base of the PR and between 3bbb722 and 9ca8d58.

📒 Files selected for processing (335)
  • apps/lsp-playground/src/default-config.ts
  • apps/telemetry-backend/prisma.config.ts
  • docs/CLI Style Guide.md
  • examples/bundle-size/src/mongo/prisma.config.ts
  • examples/bundle-size/src/postgres/prisma.config.ts
  • examples/mongo-blog-leaderboard/prisma.config.ts
  • examples/mongo-demo/prisma.config.ts
  • examples/multi-extension-monorepo/app/prisma.config.ts
  • examples/multi-extension-monorepo/packages/audit/prisma.config.ts
  • examples/multi-extension-monorepo/packages/feature-flags/prisma.config.ts
  • examples/paradedb-demo/prisma.config.ts
  • examples/prisma-8-cloudflare-worker/prisma.config.ts
  • examples/prisma-8-demo-sqlite/prisma.config.ts
  • examples/prisma-8-demo/fixtures/converging-branches/prisma.config.ts
  • examples/prisma-8-demo/fixtures/diamond/prisma.config.ts
  • examples/prisma-8-demo/fixtures/long-spine/prisma.config.ts
  • examples/prisma-8-demo/fixtures/multi-branch/prisma.config.ts
  • examples/prisma-8-demo/fixtures/showcase/prisma.config.ts
  • examples/prisma-8-demo/fixtures/skip-rollback/prisma.config.ts
  • examples/prisma-8-demo/fixtures/wide-fan/prisma.config.ts
  • examples/prisma-8-demo/prisma.config.contract-ts.ts
  • examples/prisma-8-demo/prisma.config.ts
  • examples/prisma-8-postgis-demo/prisma.config.ts
  • examples/react-router-demo/prisma.config.ts
  • examples/retail-store/prisma.config.ts
  • examples/supabase/prisma.config.ts
  • packages/0-shared/publish-surface/src/import-roots.ts
  • packages/1-framework/1-core/config/src/config-types.ts
  • packages/1-framework/1-core/errors/src/control.ts
  • packages/1-framework/1-core/errors/test/control.test.ts
  • packages/1-framework/3-tooling/cli/recordings/fixtures/prisma.config.ts
  • packages/1-framework/3-tooling/cli/src/orm/init-packages.ts
  • packages/1-framework/3-tooling/cli/src/orm/init.ts
  • packages/1-framework/3-tooling/cli/src/orm/load-config.ts
  • packages/1-framework/3-tooling/cli/test/orm/init-reinit.test.ts
  • packages/1-framework/3-tooling/cli/test/orm/load-config.test.ts
  • packages/1-framework/3-tooling/config-loader/src/load.ts
  • packages/1-framework/3-tooling/config-loader/test/load.test.ts
  • packages/1-framework/3-tooling/config-loader/test/section-requirements.test.ts
  • packages/1-framework/3-tooling/language-server/test/config-resolution.test.ts
  • packages/3-extensions/paradedb/prisma.config.ts
  • packages/3-extensions/pgvector/prisma.config.ts
  • packages/3-extensions/postgis/prisma.config.ts
  • packages/3-extensions/supabase/prisma.config.ts
  • packages/3-extensions/supabase/test/fixtures/example-app.config.ts
  • packages/3-extensions/supabase/test/fixtures/no-policy.config.ts
  • packages/3-extensions/supabase/test/fixtures/renamed-policy.config.ts
  • scripts/regen-example-migrations.mjs
  • test/e2e/framework/test/fixtures/prisma.config.ts
  • test/e2e/framework/test/sqlite/fixtures/prisma.config.ts
  • test/integration/test/authoring/attribute-specs/_fixture-mongo/prisma.config.ts
  • test/integration/test/authoring/attribute-specs/_fixture/prisma.config.ts
  • test/integration/test/authoring/templates/prisma.config.parity-psl.ts
  • test/integration/test/authoring/templates/prisma.config.parity-ts.ts
  • test/integration/test/cli-journeys/config-errors.e2e.test.ts
  • test/integration/test/cli-journeys/format.e2e.test.ts
  • test/integration/test/cli.config-section-requirements.test.ts
  • test/integration/test/cli.emit-command.test.ts
  • test/integration/test/cli.migration-plan-ref-aware.e2e.test.ts
  • test/integration/test/enum-order-by/_fixture/prisma.config.ts
  • test/integration/test/fixtures/cli/cli-e2e-test-app/fixtures/cli-journeys/prisma.config.ts
  • test/integration/test/fixtures/cli/cli-e2e-test-app/fixtures/cli-journeys/prisma.config.with-db.psl.ts
  • test/integration/test/fixtures/cli/cli-e2e-test-app/fixtures/cli-journeys/prisma.config.with-db.ts
  • test/integration/test/fixtures/cli/cli-e2e-test-app/fixtures/control-policy/mongo/prisma.config.with-db.ts
  • test/integration/test/fixtures/cli/cli-e2e-test-app/fixtures/control-policy/postgres-external-floor/prisma.config.with-db.ts
  • test/integration/test/fixtures/cli/cli-e2e-test-app/fixtures/control-policy/postgres/prisma.config.with-db.ts
  • test/integration/test/fixtures/cli/cli-e2e-test-app/fixtures/db-init-with-contract-space/prisma.config.with-db.ts
  • test/integration/test/fixtures/cli/cli-e2e-test-app/fixtures/db-init/prisma.config.with-db.ts
  • test/integration/test/fixtures/cli/cli-e2e-test-app/fixtures/db-introspect/prisma.config.no-db.ts
  • test/integration/test/fixtures/cli/cli-e2e-test-app/fixtures/db-introspect/prisma.config.no-driver.ts
  • test/integration/test/fixtures/cli/cli-e2e-test-app/fixtures/db-introspect/prisma.config.with-db.ts
  • test/integration/test/fixtures/cli/cli-e2e-test-app/fixtures/db-sign/prisma.config.with-db.ts
  • test/integration/test/fixtures/cli/cli-e2e-test-app/fixtures/db-update-preflight-gaps/prisma.config.with-db.ts
  • test/integration/test/fixtures/cli/cli-e2e-test-app/fixtures/db-update-scenarios/prisma.config.with-db.ts
  • test/integration/test/fixtures/cli/cli-e2e-test-app/fixtures/db-verify/prisma.config.no-driver.ts
  • test/integration/test/fixtures/cli/cli-e2e-test-app/fixtures/db-verify/prisma.config.no-verify.ts
  • test/integration/test/fixtures/cli/cli-e2e-test-app/fixtures/db-verify/prisma.config.ts
  • test/integration/test/fixtures/cli/cli-e2e-test-app/fixtures/db-verify/prisma.config.with-db.ts
  • test/integration/test/fixtures/cli/cli-e2e-test-app/fixtures/emit/prisma.config.emit.ts
  • test/integration/test/fixtures/cli/cli-e2e-test-app/fixtures/emit/prisma.config.no-contract.ts
  • test/integration/test/fixtures/cli/cli-e2e-test-app/fixtures/migrate-external-space/prisma.config.with-db.ts
  • test/integration/test/fixtures/cli/cli-e2e-test-app/fixtures/migration-apply/prisma.config.with-db.ts
  • test/integration/test/fixtures/cli/cli-e2e-test-app/fixtures/migration-plan/prisma.config.ts
  • test/integration/test/fixtures/cli/cli-e2e-test-app/fixtures/mongo-cli-journeys/prisma.config.with-db.ts
  • test/integration/test/fixtures/cli/cli-e2e-test-app/fixtures/mongo-db-commands/prisma.config.with-db.ts
  • test/integration/test/fixtures/cli/cli-e2e-test-app/fixtures/vite-plugin-psl/prisma.config.ts
  • test/integration/test/fixtures/cli/cli-e2e-test-app/fixtures/vite-plugin/prisma.config.ts
  • test/integration/test/fixtures/cli/cli-integration-test-app/fixtures/emit-command/prisma.config.async-source.ts
  • test/integration/test/fixtures/cli/cli-integration-test-app/fixtures/emit-command/prisma.config.custom-output.ts
  • test/integration/test/fixtures/cli/cli-integration-test-app/fixtures/emit-command/prisma.config.defaults.ts
  • test/integration/test/fixtures/cli/cli-integration-test-app/fixtures/emit-command/prisma.config.document-family.ts
  • test/integration/test/fixtures/cli/cli-integration-test-app/fixtures/emit-command/prisma.config.invalid-contract.ts
  • test/integration/test/fixtures/cli/cli-integration-test-app/fixtures/emit-command/prisma.config.missing-output.ts
  • test/integration/test/fixtures/cli/cli-integration-test-app/fixtures/emit-command/prisma.config.mongo-contract-ts.ts
  • test/integration/test/fixtures/cli/cli-integration-test-app/fixtures/emit-command/prisma.config.mongo.ts
  • test/integration/test/fixtures/cli/cli-integration-test-app/fixtures/emit-command/prisma.config.no-contract.ts
  • test/integration/test/fixtures/cli/cli-integration-test-app/fixtures/emit-command/prisma.config.parity-psl.ts
  • test/integration/test/fixtures/cli/cli-integration-test-app/fixtures/emit-command/prisma.config.parity-ts.ts
  • test/integration/test/fixtures/cli/cli-integration-test-app/fixtures/emit-command/prisma.config.sync-source.ts
  • test/integration/test/fixtures/cli/cli-integration-test-app/fixtures/emit-command/prisma.config.ts
  • test/integration/test/fixtures/cli/cli-integration-test-app/fixtures/emit-contract/prisma.config.custom-output.ts
  • test/integration/test/fixtures/cli/cli-integration-test-app/fixtures/emit-contract/prisma.config.ts
  • test/integration/test/fixtures/cli/cli-integration-test-app/fixtures/verify-database/prisma.config.mysql-target.ts
  • test/integration/test/fixtures/cli/cli-integration-test-app/fixtures/verify-database/prisma.config.no-driver.ts
  • test/integration/test/fixtures/cli/cli-integration-test-app/fixtures/verify-database/prisma.config.ts
  • test/integration/test/fixtures/cli/cli-test-app/fixtures/lsp-emit-parity/prisma.config.ts
  • test/integration/test/fixtures/prisma.config.ts
  • test/integration/test/mongo/fixtures/prisma.config.ts
  • test/integration/test/namespaced-accessors/fixtures/prisma.config.ts
  • test/integration/test/ports/README.md
  • test/integration/test/ports/engines/queries/aggregation/avg/_fixture/decimal/prisma.config.ts
  • test/integration/test/ports/engines/queries/aggregation/avg/_fixture/numeric/prisma.config.ts
  • test/integration/test/ports/engines/queries/aggregation/count/_fixture/prisma.config.ts
  • test/integration/test/ports/engines/queries/aggregation/group_by/_fixture/main/prisma.config.ts
  • test/integration/test/ports/engines/queries/aggregation/group_by/_fixture/regression-21789/prisma.config.ts
  • test/integration/test/ports/engines/queries/aggregation/group_by_having/_fixture/common/prisma.config.ts
  • test/integration/test/ports/engines/queries/aggregation/group_by_having/_fixture/decimal/prisma.config.ts
  • test/integration/test/ports/engines/queries/aggregation/many_count_relation/_fixture/compound/prisma.config.ts
  • test/integration/test/ports/engines/queries/aggregation/many_count_relation/_fixture/nested/prisma.config.ts
  • test/integration/test/ports/engines/queries/aggregation/many_count_relation/_fixture/prisma.config.ts
  • test/integration/test/ports/engines/queries/aggregation/many_count_relation/_fixture/self/prisma.config.ts
  • test/integration/test/ports/engines/queries/aggregation/max/_fixture/common/prisma.config.ts
  • test/integration/test/ports/engines/queries/aggregation/max/_fixture/decimal/prisma.config.ts
  • test/integration/test/ports/engines/queries/aggregation/min/_fixture/common/prisma.config.ts
  • test/integration/test/ports/engines/queries/aggregation/min/_fixture/decimal/prisma.config.ts
  • test/integration/test/ports/engines/queries/aggregation/sum/_fixture/decimal/prisma.config.ts
  • test/integration/test/ports/engines/queries/aggregation/sum/_fixture/numeric/prisma.config.ts
  • test/integration/test/ports/engines/queries/aggregation/uniq-count-relation/_fixture/base/prisma.config.ts
  • test/integration/test/ports/engines/queries/aggregation/uniq-count-relation/_fixture/nested/prisma.config.ts
  • test/integration/test/ports/engines/queries/data_types/bigint/_fixture/prisma.config.ts
  • test/integration/test/ports/engines/queries/data_types/bool/_fixture/prisma.config.ts
  • test/integration/test/ports/engines/queries/data_types/bytes/_fixture/relations/prisma.config.ts
  • test/integration/test/ports/engines/queries/data_types/bytes/_fixture/scalars/prisma.config.ts
  • test/integration/test/ports/engines/queries/data_types/datetime/_fixture/prisma.config.ts
  • test/integration/test/ports/engines/queries/data_types/decimal/_fixture/prisma.config.ts
  • test/integration/test/ports/engines/queries/data_types/enum_type/_fixture/postgres/prisma.config.ts
  • test/integration/test/ports/engines/queries/data_types/float/_fixture/prisma.config.ts
  • test/integration/test/ports/engines/queries/data_types/int/_fixture/prisma.config.ts
  • test/integration/test/ports/engines/queries/data_types/json/_fixture/scalar/prisma.config.ts
  • test/integration/test/ports/engines/queries/data_types/native/postgres/_fixture/other/prisma.config.ts
  • test/integration/test/ports/engines/queries/data_types/native/postgres/_fixture/string/prisma.config.ts
  • test/integration/test/ports/engines/queries/data_types/string/_fixture/prisma.config.ts
  • test/integration/test/ports/engines/queries/data_types/through_relation/_fixture/common/prisma.config.ts
  • test/integration/test/ports/engines/queries/data_types/through_relation/_fixture/decimal/prisma.config.ts
  • test/integration/test/ports/engines/queries/data_types/through_relation/_fixture/enum/prisma.config.ts
  • test/integration/test/ports/engines/queries/data_types/through_relation/_fixture/json/prisma.config.ts
  • test/integration/test/ports/engines/queries/data_types/through_relation/_fixture/lists/prisma.config.ts
  • test/integration/test/ports/engines/queries/distinct/_fixture/prisma.config.ts
  • test/integration/test/ports/engines/queries/filters/bigint_filter/_fixture/prisma.config.ts
  • test/integration/test/ports/engines/queries/filters/bytes_filter/_fixture/prisma.config.ts
  • test/integration/test/ports/engines/queries/filters/decimal_filter/_fixture/prisma.config.ts
  • test/integration/test/ports/engines/queries/filters/field_reference/_fixture/decimal-list/prisma.config.ts
  • test/integration/test/ports/engines/queries/filters/field_reference/_fixture/enum/prisma.config.ts
  • test/integration/test/ports/engines/queries/filters/field_reference/_fixture/list/prisma.config.ts
  • test/integration/test/ports/engines/queries/filters/field_reference/_fixture/mixed/prisma.config.ts
  • test/integration/test/ports/engines/queries/filters/field_reference/bigint_filter/_fixture/prisma.config.ts
  • test/integration/test/ports/engines/queries/filters/field_reference/bytes_filter/_fixture/prisma.config.ts
  • test/integration/test/ports/engines/queries/filters/field_reference/datetime_filter/_fixture/prisma.config.ts
  • test/integration/test/ports/engines/queries/filters/field_reference/decimal_filter/_fixture/prisma.config.ts
  • test/integration/test/ports/engines/queries/filters/field_reference/failure/_fixture/common/prisma.config.ts
  • test/integration/test/ports/engines/queries/filters/field_reference/failure/_fixture/default/prisma.config.ts
  • test/integration/test/ports/engines/queries/filters/field_reference/failure/_fixture/list/prisma.config.ts
  • test/integration/test/ports/engines/queries/filters/field_reference/float_filter/_fixture/prisma.config.ts
  • test/integration/test/ports/engines/queries/filters/field_reference/having_filter/_fixture/prisma.config.ts
  • test/integration/test/ports/engines/queries/filters/field_reference/int_filter/_fixture/prisma.config.ts
  • test/integration/test/ports/engines/queries/filters/field_reference/json_filter/_fixture/list/prisma.config.ts
  • test/integration/test/ports/engines/queries/filters/field_reference/json_filter/_fixture/prisma.config.ts
  • test/integration/test/ports/engines/queries/filters/field_reference/relation_filter/_fixture/complex/prisma.config.ts
  • test/integration/test/ports/engines/queries/filters/field_reference/relation_filter/_fixture/one-to-many/prisma.config.ts
  • test/integration/test/ports/engines/queries/filters/field_reference/relation_filter/_fixture/one-to-one-list/prisma.config.ts
  • test/integration/test/ports/engines/queries/filters/field_reference/relation_filter/_fixture/one-to-one/prisma.config.ts
  • test/integration/test/ports/engines/queries/filters/field_reference/string_filter/_fixture/prisma.config.ts
  • test/integration/test/ports/engines/queries/filters/filter_regression/_fixture/compound-one-to-many/prisma.config.ts
  • test/integration/test/ports/engines/queries/filters/filter_regression/_fixture/many-to-many/prisma.config.ts
  • test/integration/test/ports/engines/queries/filters/filter_regression/_fixture/one-to-many/prisma.config.ts
  • test/integration/test/ports/engines/queries/filters/filters/_fixture/prisma.config.ts
  • test/integration/test/ports/engines/queries/filters/json/_fixture/optional/prisma.config.ts
  • test/integration/test/ports/engines/queries/filters/list_filters/_fixture/base/prisma.config.ts
  • test/integration/test/ports/engines/queries/filters/list_filters/_fixture/decimal/prisma.config.ts
  • test/integration/test/ports/engines/queries/filters/list_filters/_fixture/json/prisma.config.ts
  • test/integration/test/ports/engines/queries/filters/many_relation/_fixture/25103/prisma.config.ts
  • test/integration/test/ports/engines/queries/filters/many_relation/_fixture/l2-to-one/prisma.config.ts
  • test/integration/test/ports/engines/queries/filters/one2one_regression/_fixture/prisma.config.ts
  • test/integration/test/ports/engines/queries/filters/one_relation/_fixture/21356/prisma.config.ts
  • test/integration/test/ports/engines/queries/filters/one_relation/_fixture/21366/prisma.config.ts
  • test/integration/test/ports/prisma/functional/batching-bigint/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/batching-bytes/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/blog-update/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/bytes-upsert/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/chunking-query/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/composites-list-create/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/composites-list-createMany/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/composites-list-delete/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/composites-list-deleteMany/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/composites-list-findFirst/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/composites-list-findMany/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/composites-list-update/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/composites-list-updateMany/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/composites-list-upsert-create/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/composites-list-upsert-update/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/composites-object-create/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/composites-object-createMany/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/composites-object-delete/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/composites-object-deleteMany/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/composites-object-findFirst/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/composites-object-findMany/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/composites-object-update/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/composites-object-updateMany/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/composites-object-upsert-create/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/composites-object-upsert-update/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/composites-recursive/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/composites-selection/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/create-default-date/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/decimal-list/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/decimal-precision/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/decimal-scalar/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/default-selection/_fixture/mongo/prisma.config.ts
  • test/integration/test/ports/prisma/functional/default-selection/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/distinct/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/driver-adapters-error-forwarding/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/driver-adapters-team-orm-687-bytes/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/driver-adapters-validate-active-provider/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/driver-adapters-validate-active-provider/_fixture/sqlite/prisma.config.ts
  • test/integration/test/ports/prisma/functional/enum-array/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/enums/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/extended-where/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/filter-count-relations/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/find-unique-or-throw-batching/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/handle-int-overflow/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/interactive-transactions/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/issues-11974/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/issues-12378/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/issues-12557/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/issues-12572/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/issues-13089-dollar-in-search/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/issues-14271/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/issues-14954-date-batch/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/issues-15044/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/issues-15177/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/issues-16535-select-enum/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/issues-17005-args-type-conflict/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/issues-17030-args-type-conflict/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/issues-18970-invalid-date/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/issues-20261-group-by-shortcut/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/issues-21352-id-does-not-exist/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/issues-21454-type-in-json/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/issues-21631-batching-in-transaction/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/issues-22098-column-does-not-exist/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/issues-22610-parallel-batch/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/issues-23201-non-ascii-comments/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/issues-23902/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/issues-25404/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/issues-27455-bytes-id/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/issues-27511-include-enum-array/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/issues-28151-broken-nested-set/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/issues-28192-pg-historical-dates/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/issues-28591-mapped-enums/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/issues-29010-bigint-precision-relation-joins/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/issues-29174-jsonb-parameter-regression/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/issues-29176-cursor-parameter-regression/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/issues-29254-query-plan-cache-mutation/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/issues-29267-uint8array-in-json/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/issues-29309-datetime-cursor/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/issues-29331-query-plan-cache-bloat/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/issues-4004/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/issues-5952-decimal-batch/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/issues-TML-1664-invalid-enum-value-error/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/issues-TML-1664-unknown-enum-value-read-error/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/issues-unmapped-driver-error-user-facing/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/json-fields/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/large-floats/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/legacy-aggregate-raw/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/legacy-aggregations/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/legacy-json/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/legacy-malformed-id/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/legacy-optional-relation-filters/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/methods-count/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/methods-createMany/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/methods-createManyAndReturn/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/methods-findFirstOrThrow/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/methods-findUniqueOrThrow/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/methods-updateManyAndReturn/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/methods-upsert-native-atomic/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/methods-upsert-simple/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/mixed-string-uuid-datetime-list-inputs/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/multi-schema/_fixture/different-names/prisma.config.ts
  • test/integration/test/ports/prisma/functional/multi-schema/_fixture/identical-names/prisma.config.ts
  • test/integration/test/ports/prisma/functional/multi-schema/_fixture/no-map/prisma.config.ts
  • test/integration/test/ports/prisma/functional/multiple-types/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/optimistic-concurrency-control/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/referential-actions-set-default-1to1/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/referential-actions-set-default-1ton/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/relation-mode-17255-mixed-actions/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/relation-mode-17255-same-actions/_fixture/prisma.config.ts
  • test/integration/test/ports/prisma/functional/relation-mode-gh-1-to-1/_fixture/cascade-map/prisma.config.ts
  • test/integration/test/ports/prisma/functional/relation-mode-gh-1-to-1/_fixture/cascade-plain/prisma.config.ts
  • test/integration/test/ports/prisma/functional/relation-mode-gh-1-to-1/_fixture/noaction-map/prisma.config.ts
  • test/integration/test/ports/prisma/functional/relation-mode-gh-1-to-1/_fixture/noaction-plain/prisma.config.ts
  • test/integration/test/ports/prisma/functional/relation-mode-gh-1-to-1/_fixture/restrict-map/prisma.config.ts
  • test/integration/test/ports/prisma/functional/relation-mode-gh-1-to-1/_fixture/restrict-plain/prisma.config.ts
  • test/integration/test/ports/prisma/functional/relation-mode-gh-1-to-1/_fixture/setnull-map/prisma.config.ts
  • test/integration/test/ports/prisma/functional/relation-mode-gh-1-to-1/_fixture/setnull-plain/prisma.config.ts
  • test/integration/test/ports/prisma/functional/relation-mode-gh-1-to-n/_fixture/cascade-map/prisma.config.ts
  • test/integration/test/ports/prisma/functional/relation-mode-gh-1-to-n/_fixture/cascade-plain/prisma.config.ts
  • test/integration/test/ports/prisma/functional/relation-mode-gh-1-to-n/_fixture/noaction-map/prisma.config.ts
  • test/integration/test/ports/prisma/functional/relation-mode-gh-1-to-n/_fixture/noaction-plain/prisma.config.ts
  • test/integration/test/ports/prisma/functional/relation-mode-gh-1-to-n/_fixture/restrict-map/prisma.config.ts
  • test/integration/test/ports/prisma/functional/relation-mode-gh-1-to-n/_fixture/restrict-plain/prisma.config.ts
  • test/integration/test/ports/prisma/functional/relation-mode-gh-1-to-n/_fixture/setnull-map/prisma.config.ts
  • test/integration/test/ports/prisma/functional/relation-mode-gh-1-to-n/_fixture/setnull-plain/prisma.config.ts
  • test/integration/test/ports/prisma/functional/relation-mode-gh-m-to-n/_fixture/cascade-map/prisma.config.ts
  • test/integration/test/ports/prisma/functional/relation-mode-gh-m-to-n/_fixture/cascade-nomap/prisma.config.ts
  • test/integration/test/ports/prisma/functional/relation-mode-gh-m-to-n/_fixture/default-map/prisma.config.ts
  • test/integration/test/ports/prisma/functional/relation-mode-gh-m-to-n/_fixture/default-nomap/prisma.config.ts
  • test/integration/test/ports/prisma/functional/relation-mode-gh-m-to-n/_fixture/noaction-map/prisma.config.ts
  • test/integration/test/ports/prisma/functional/relation-mode-gh-m-to-n/_fixture/noaction-nomap/prisma.config.ts
  • test/integration/test/ports/prisma/functional/relation-mode-gh-m-to-n/_fixture/restrict-map/prisma.config.ts
  • test/integration/test/ports/prisma/functional/relation-mode-gh-m-to-n/_fixture/restrict-nomap/prisma.config.ts
  • test/integration/test/sql-builder/fixtures/prisma.config.no-pgvector.ts
  • test/integration/test/sql-builder/fixtures/prisma.config.ts
  • test/integration/test/sql-orm-client/fixtures/execution-defaulted-tags/prisma.config.ts
  • test/integration/test/sql-orm-client/fixtures/integer-representation-sqlite/prisma.config.ts
  • test/integration/test/sql-orm-client/fixtures/integer-representation/prisma.config.ts
  • test/integration/test/sql-orm-client/fixtures/junction-namespaces/prisma.config.ts
  • test/integration/test/sql-orm-client/fixtures/mn-psl/prisma.config.ts
  • test/integration/test/sql-orm-client/fixtures/non-identifier-names/prisma.config.ts
  • test/integration/test/sql-orm-client/fixtures/polymorphism/prisma.config.ts
  • test/integration/test/sql-orm-client/fixtures/prisma.config.ts
  • test/integration/test/sql-orm-client/fixtures/scalar-lists/prisma.config.ts
  • test/integration/test/sql-orm-client/fixtures/self-relations/prisma.config.ts
  • test/integration/test/temporal-defaults/_fixture-timestamp/prisma.config.ts
  • test/integration/test/temporal-defaults/_fixture/prisma.config.ts
  • test/integration/test/value-objects/fixtures/prisma.config.ts
  • upgrade-instructions/pending/rename-define-config/app/instructions.md
  • upgrade-instructions/pending/rename-define-config/extension/instructions.md

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Comment @coderabbitai help to get the list of available commands.

@pkg-pr-new

pkg-pr-new Bot commented Aug 25, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@prisma/orm-extension-arktype-json

npm i https://pkg.pr.new/@prisma/orm-extension-arktype-json@30129

@prisma/orm-extension-middleware-cache

npm i https://pkg.pr.new/@prisma/orm-extension-middleware-cache@30129

@prisma/orm-extension-paradedb

npm i https://pkg.pr.new/@prisma/orm-extension-paradedb@30129

@prisma/orm-extension-pgvector

npm i https://pkg.pr.new/@prisma/orm-extension-pgvector@30129

@prisma/orm-extension-postgis

npm i https://pkg.pr.new/@prisma/orm-extension-postgis@30129

@prisma/orm-extension-supabase

npm i https://pkg.pr.new/@prisma/orm-extension-supabase@30129

@prisma/orm-family-mongo

npm i https://pkg.pr.new/@prisma/orm-family-mongo@30129

@prisma/orm-family-sql

npm i https://pkg.pr.new/@prisma/orm-family-sql@30129

@prisma/orm-framework

npm i https://pkg.pr.new/@prisma/orm-framework@30129

@prisma/orm-mongo

npm i https://pkg.pr.new/@prisma/orm-mongo@30129

@prisma/orm-postgres

npm i https://pkg.pr.new/@prisma/orm-postgres@30129

@prisma/orm-sqlite

npm i https://pkg.pr.new/@prisma/orm-sqlite@30129

@prisma/orm-target-mongo

npm i https://pkg.pr.new/@prisma/orm-target-mongo@30129

@prisma/orm-target-postgres

npm i https://pkg.pr.new/@prisma/orm-target-postgres@30129

@prisma/orm-target-sqlite

npm i https://pkg.pr.new/@prisma/orm-target-sqlite@30129

@prisma/orm-toolchain

npm i https://pkg.pr.new/@prisma/orm-toolchain@30129

commit: 9ca8d58

@github-actions

github-actions Bot commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size
postgres / no-emit 189.61 KB (0%)
postgres / emit 159.96 KB (0%)
mongo / no-emit 109.45 KB (0%)
mongo / emit 91.8 KB (0%)
cf-worker / no-emit 212.67 KB (0%)
cf-worker / emit 179.97 KB (0%)

wmadden-electric and others added 5 commits August 26, 2026 14:57
The app entry is new; the extension entry replaces the incidental
changes: [] declaration, since the rename is a real user-facing step:
the deprecated engine alias goes away with the next engine release.

Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>
…ndow

The rc.8-to-rc.9 window shipped without the rename, so those files
return to main's content and the entry lands in the current in-flight
directory instead.

Co-Authored-By: Claude Fable 5 <[email protected]>
Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>
Co-Authored-By: Claude Fable 5 <[email protected]>
Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>
Co-Authored-By: Claude Fable 5 <[email protected]>
Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>
@wmadden-electric
wmadden-electric added this pull request to the merge queue Sep 22, 2026
Merged via the queue into main with commit d515917 Sep 22, 2026
26 checks passed
@wmadden-electric
wmadden-electric deleted the rename-define-config branch September 22, 2026 09:41
wmadden pushed a commit to veksa/prisma that referenced this pull request Sep 24, 2026
…ngine resolves its paths (prisma#30372)

## At a glance

The `orm` section of `prisma.config.ts` is declared once, with the
fields that are paths marked as such:

```ts
// packages/1-framework/3-tooling/config-loader/src/orm-section.ts
export const ormConfigSchema = configSchema({
  family: { kind: "'family'", ...descriptorFields, emission: 'object' },
  target: { kind: "'target'", ...targetLikeFields },
  adapter: { kind: "'adapter'", ...targetLikeFields },
  'driver?': { kind: "'driver'", ...targetLikeFields },
  'extensions?': [{ kind: "'extension'", ...targetLikeFields }, '[]'],
  'db?': { 'connection?': 'unknown' },
  'contract?': {
    source: { load: 'Function', 'inputs?': 'path[]', 'format?': 'string' },
    output: ['path', '=', () => 'src/prisma/contract.json'],
  },
  migrations: [{ dir: ['path', '=', () => './migrations'] }, '=', () => ({})],
  'formatter?': { 'indent?': "number.integer >= 1 | 'tab'", 'newline?': "'LF' | 'CRLF'" },
}).narrow(/* familyId and targetId agreement across descriptors */);
```

Given this project and this invocation:

```
exp/
  sub/
    prisma.config.ts   # orm: ormConfig({ contract: './contract.prisma', migrations: { dir: './migrations' } })
    contract.prisma
```

| Run from | Command | Before | After |
| --------- | ------------------------------------------------------ |
-------------------------------------------------------------- |
------------------------------ |
| `exp/sub` | `prisma contract emit --config ./prisma.config.ts` |
writes `exp/sub/contract.json` | same |
| `exp` | `prisma contract emit --config ./sub/prisma.config.ts` |
`CONTRACT.SOURCE_LOAD_FAILED`: looks for `exp/contract.prisma` | writes
`exp/sub/contract.json` |

Config files are unchanged.

## The decision

A relative path in `prisma.config.ts` is relative to the file that wrote
it. Only the ORM knows which of its fields are paths; only the CLI
engine knows which file wrote each value, because its chain merge
records that per key. The schema declaration puts the first where the
second can use it. The engine derives validation, a
`CLI.CONFIG_FIELD_INVALID` diagnostic per bad field naming the file to
fix, and the resolution of every `path` field, from the one declaration;
the ORM writes no validation, resolution, or path-anchoring code. This
is [prisma/prisma-cli ADR
0005](https://github.com/prisma/prisma-cli/blob/main/docs/architecture/adrs/0005-config-sections-declare-their-shape.md),
shipped in engine 0.6.0 by prisma/prisma-cli#279; every product that
mounts commands declares its section this way.

## Why it broke

The ORM's own `prisma` bin resolved config paths in its loader against
the config file. The unified `prisma` CLI loads the config through the
engine's loader, which handed the `orm` section over as written; the
ORM's command wrapper then resolved paths itself, and the only directory
it could see was the working directory. The same defect existed a second
time in `projectConfigPathFor`, which rebuilt `<cwd>/prisma.config.ts`
to find the project's `package.json` and, from a parent directory, read
the wrong manifest.

## What changes

- **`@internal/config-loader`** declares `ormConfigSchema` and
`ormConfigSection` (`defineConfigSection({ name: 'orm', schema })`). It
is the lowest package that can depend on the engine; `@internal/cli` and
`@internal/cli-telemetry` consume the section from it. Path defaults are
thunks, which arktype evaluates when the default is applied, so they
resolve against the config file like authored values.
- **Descriptors are declared references.** A control descriptor is a
runtime object the config file constructs: `create` closes over module
state, and its codec tables, contract serializer and migration hooks
rely on their prototypes and on `this`. The schema declares each
descriptor, and `db.connection`, with the engine's `reference(schema)`
(prisma/prisma-cli#284), so the command receives the object the config
file built. The schema checks only a descriptor's identifying fields:
`kind`, `id`, `familyId`, `version`, `create`, and `targetId` or
`emission`. Every value not declared a reference is copied before paths
are resolved and defaults applied. Cross-descriptor rules (`familyId`
and `targetId` agreement, the removed `extensionPacks` key) are one
function, which the schema's `narrow` and the loader both call.
- **A codec without params has no `paramsSchema`.** A codec that took no
params used to declare `paramsSchema = voidParamsSchema`, a shared
schema accepting only `undefined`, and `isParameterized` asked whether a
descriptor's schema was that exact object. A copied descriptor carries a
copy of that schema, so every codec on it reported itself parameterized,
which is how `db init` failed with `Invalid typeParams for codec
'pg/text@1'`. `paramsSchema` is now `StandardSchemaV1<P> | undefined`, a
codec without params sets it to `undefined`, and `isParameterized` is
`paramsSchema !== undefined`, which no copy can change. Type-param
validation still rejects `typeParams` for such a codec with
`RUNTIME.TYPE_PARAMS_INVALID`. `voidParamsSchema` is removed;
[`upgrade-instructions/pending/codec-without-params-schema/extension/`](https://github.com/prisma/orm/blob/feat/orm-config-schema/upgrade-instructions/pending/codec-without-params-schema/extension/instructions.md)
tells extension authors how to follow.
- **The ORM's bin** hands the engine each evaluated file with its
sections as written (`loadConfigFiles`); the engine validates the merged
section with that provenance before a command runs. `loadConfig` runs
the same schema for the language server and the vite plugin, wrapping
each field diagnostic as `CONFIG.VALIDATION_FAILED` with the subsection
it concerns, so `requireConfigSections` keeps working.
- **Commands** read absolute paths and `baseDir`. The command wrapper's
cwd finalisation, `finalize-config.ts`, `collectConfigIssues` and its
hand-written descriptor checks, and `projectConfigPathFor` are deleted.
The migration path helpers take only the config. Control API operations
that located the project through `configPath` take `projectDir`;
`resolveMigrationPaths` takes the config.
- **`@prisma/cli-engine` moves to 0.6.1** (0.6.0 plus
prisma/prisma-cli#280 and #284: a schema declares the values it keeps as
references) in `@internal/cli`, `@internal/config-loader`,
`@prisma/orm-toolchain`'s peer, the four extension packages, and the
integration test package. The `defineConfig` → `definePrismaConfig`
rename the bump requires landed separately in prisma#30129. Examples and
fixture apps consume published packages and keep their pins.
- **Diagnostics under the unified CLI change code.** A malformed `orm`
field is now reported by the engine as `CLI.CONFIG_FIELD_INVALID` (one
per field, `meta.section: 'orm'`, `meta.field` the dotted path,
`where.path` the config file that declared it) under
`CLI.CONFIG_SECTION_INVALID`. `CONFIG.VALIDATION_FAILED` remains what
the ORM's own loader raises for the language server and the vite plugin.
The error reference records the split; the two integration files that
asserted the old code are updated.
- **Docs**: `config-validation-and-normalization.mdc` now describes the
schema as the single home of structural rules,
`loadConfigFiles`/`loadConfig` as evaluation plus diagnostics, and path
resolution as the schema's job; the CLI Style Guide says relative paths
in the config file resolve against the file that wrote them, with
`--output-path` the one path relative to cwd; the loader README follows.
The arktype rule now says to read the arktype docs before building
validation machinery and never to read arktype's compiled node tree, and
`docs/reference/arktype-usage.md` records what a transformation does to
its input: any pipe or default makes arktype clone the whole input, and
the default clone rebuilds plain objects and class instances. The codec
authoring guide, the two codec ADRs and the package READMEs declare
codecs without params with `paramsSchema = undefined`.

## Tests

- `framework-components/test/materialize-codec.test.ts`: a descriptor
copied the way arktype's default clone copies it keeps `isParameterized`
for codecs with and without params (this test fails before the change),
and a codec without params rejects `typeParams`.
- `config-loader/test/orm-section.test.ts`: the schema accepts a valid
config, supplies the migrations dir and default contract output, records
`baseDir`, resolves inputs, output and migrations dir against the config
file, leaves absolute paths alone, keeps a descriptor's class instances
and functions, and the source's `load`, as the file built them
(closures, prototypes and `this` survive), reports missing descriptors
and descriptor field problems, family and target mismatches on target,
adapter, driver and extensions, the removed `extensionPacks` key,
contract, migrations and formatter problems, keeps fields the schema
does not name on descriptors and on the contract source, and never
throws on hostile input. `load.test.ts` still passes unchanged apart
from the finalise module going away.
- `@internal/cli`: `contract emit` and `migration plan` reached with
`--config sub/prisma.config.ts` from the parent read and write under
`sub/`, the plan test exercising the manifest walk from `baseDir`; the
bin loader hands the engine the requested file with paths as written;
ORM command tests seed the engine with a `prisma.config.ts` in the run
directory through one shared helper so the engine validates the seed as
it would a real file.

Verified locally against a build of prisma/prisma-cli#280 overlaid on
the installed engine:

| Package | Result |
| --- | --- |
| `@internal/config` | 5 tests |
| `@internal/config-loader` | 53 tests |
| `@internal/cli` | 116 files, 1484 tests |
| `@internal/cli-telemetry` (incl. the real-Postgres e2e) | 113 tests |
| `@internal/vite-plugin-contract-emit` | 31 tests |
| extensions (paradedb, pgvector, supabase, postgis) | 390 tests |
| integration | 788 files, 4224 tests |
| all package suites after the codec change | 83 tasks; the first run's
7 failures (tests that expected every codec to have a schema, and a
bundled comment naming an internal package) fixed and rerun green |
| repo | build, typecheck, lint, `lint:deps`, `lint:casts`, rules lints,
`fixtures:check`, upgrade coverage pass |

CI on this PR is red until `@prisma/[email protected]` is published and
the pin here moves to it; the earlier red run (270 integration failures)
was arktype's default clone rebuilding descriptors, which 0.6.1 fixes.
Verified locally with a 0.6.1 build: `config-loader` (53), the CLI
package (1484), and the config-related integration files (200) pass.

🤖 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**
* Configuration diagnostics now identify the affected field, section,
and config file.
* Relative paths in config files—including extended configs—resolve from
the file that declares them. Command-line output paths remain relative
to the working directory.
* Config loading retains details about each file in an extended
configuration chain.

* **Bug Fixes**
* Malformed configuration sections receive more specific diagnostics,
while commands can proceed when errors affect sections they do not read.

* **Breaking Changes**
* Legacy configuration-validation exports and config-path operation
options are no longer available.
* `voidParamsSchema` is no longer exported. Codecs without parameters
should set `paramsSchema` to `undefined`; non-empty type parameters are
rejected, while empty parameters are accepted.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>
Co-authored-by: Claude Fable 5.1 <[email protected]>
wmadden pushed a commit to prisma/prisma-cli that referenced this pull request Sep 27, 2026
#291)

## At a glance

```diff
-      exceptions: [
-        { familyPackage: "@prisma/composer-cli",  familyPin: "0.4.0", shellPin: "0.6.1", … },
-        { familyPackage: "@prisma/composer-cli",  familyPin: "0.5.0", shellPin: "0.6.1", channel: "dev", … },
-        { familyPackage: "@prisma/orm-toolchain", familyPin: "0.4.0", shellPin: "0.6.1", … },
-      ],
+      exceptions: [],
```

The release checks in `packages/cli/scripts/conformance.ts` refuse to
ship a `prisma` whose command families were built against a different
engine than the one it ships. While engine 0.6.1 was new, the families
could not peer it yet, so these three entries let that mismatch through.
Both families have now released against 0.6.1:

| Package | Version pinned in `prisma` 8.0.0-rc.17 | Engine it peers |
| --- | --- | --- |
| `@prisma/composer-cli` | 0.23.0 | 0.6.1 |
| `@prisma/orm-toolchain` | 8.0.0-rc.12 | 0.6.1 |

So the entries now describe installs that no longer happen. They have to
go: an entry left in place would let a real two-engine install through
the next time those exact versions meet.

## Checked

`pnpm check:conformance` reports "5 subject(s) checked, nothing to
report" on both the release channel and the dev channel
(`PUBLISH_CHANNEL=dev`), with the list empty. The dev builds
(`[email protected]`, `[email protected]`) also
peer 0.6.1. `pnpm lint` and `pnpm typecheck` pass.

## Also in this PR

The project ledger (`.drive/projects/prisma-cli-v8/deferred.md`) closes
three entries that were no longer true:

- The engine transition "in flight" entry now records that the
transitions through 0.6.1 are closed.
- The family path-resolution entry now records how it shipped: composer
through composer#262, and the orm section through prisma/orm#30372's
`configSchema` declaration, which superseded prisma/orm#30128. It also
records a check run from the published `prisma` 8.0.0-rc.17: root and
nested configs merge, paths resolve against the file that declares them,
and `prisma init` in a subdirectory skips the root-level steps.
- The `defineConfig` rename entry is marked fixed by prisma/orm#30129.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
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.

3 participants