diff --git a/docs/reference/error-reference.md b/docs/reference/error-reference.md index 5996d976f..bb11eb70c 100644 --- a/docs/reference/error-reference.md +++ b/docs/reference/error-reference.md @@ -144,7 +144,7 @@ The user typed a retired command path, or a retired flag on a surviving command, ### CLI.CONFIG_MISSING_MARKER -The evaluated `prisma.config.ts` default export carries no `$prismaConfig` version marker — most likely a Prisma 7 config, which uses the same filename — so the loader stops rather than misread it; the fix is to wrap the exported object in `definePrismaConfig`. Raised by the config loader for any command with a `needs.config` section. The file's absolute path is in `where.path`. Meta: none. +The evaluated `prisma.config.ts` default export carries no `$prismaConfig` version marker — most likely a Prisma 7 config, which uses the same filename — so the loader stops rather than misread it; the fix is to wrap the exported object in `definePrismaConfig`. A project that still uses Prisma ORM 6 or 7 cannot do that, because its own CLI reads the same file and rejects the wrapped one, so a second next action says to leave the file alone, write this CLI's config in a separate file in the same directory, and pass that file with `--config`; automatic discovery never collects a `prisma.config.ts` beside a file named that way, though it still collects one in a directory above it unless the named file sets `parent: false`. Raised by the config loader for any command with a `needs.config` section. The file's absolute path is in `where.path`. Meta: none. ### CLI.CONFIG_NOT_FOUND diff --git a/packages/cli-engine/package.json b/packages/cli-engine/package.json index 40027602f..cef0a6d9c 100644 --- a/packages/cli-engine/package.json +++ b/packages/cli-engine/package.json @@ -1,6 +1,6 @@ { "name": "@prisma/cli-engine", - "version": "0.10.4", + "version": "0.10.5", "description": "The execution engine of the unified Prisma CLI.", "type": "module", "exports": { diff --git a/packages/cli-engine/src/config-loader.ts b/packages/cli-engine/src/config-loader.ts index 80a92300f..49daee152 100644 --- a/packages/cli-engine/src/config-loader.ts +++ b/packages/cli-engine/src/config-loader.ts @@ -121,6 +121,11 @@ function missingMarkerDiagnostic(path: string): Diagnostic { label: "Migrate the file: wrap the exported object in definePrismaConfig from @prisma/cli-engine and export the result as the default export.", }, + { + kind: "user-choice", + label: + "Or, if this project still uses Prisma ORM 6 or 7 and the file belongs to that version's CLI, leave it as it is: write the config for this CLI in a separate file in the same directory and pass its path with --config.", + }, ], where: { path }, }; diff --git a/packages/cli-engine/tests/config.test.ts b/packages/cli-engine/tests/config.test.ts index 1bef4ac3c..00fe2a7c1 100644 --- a/packages/cli-engine/tests/config.test.ts +++ b/packages/cli-engine/tests/config.test.ts @@ -123,6 +123,11 @@ describe("loadConfig", { timeout: 60_000 }, () => { label: "Migrate the file: wrap the exported object in definePrismaConfig from @prisma/cli-engine and export the result as the default export.", }, + { + kind: "user-choice", + label: + "Or, if this project still uses Prisma ORM 6 or 7 and the file belongs to that version's CLI, leave it as it is: write the config for this CLI in a separate file in the same directory and pass its path with --config.", + }, ], where: { path: join(FIXTURES, "unmarked", "prisma.config.ts") }, }, diff --git a/packages/cli/package.json b/packages/cli/package.json index 5dd4dfdf6..ee9ed1629 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -49,7 +49,7 @@ }, "dependencies": { "@manypkg/tools": "^2.1.2", - "@prisma/cli-engine": "workspace:0.10.4", + "@prisma/cli-engine": "workspace:0.10.5", "@prisma/composer-cli": "0.40.0", "@prisma/compute-sdk": "0.43.0", "@prisma/management-api-sdk": "1.101.0", diff --git a/packages/cli/scripts/conformance.ts b/packages/cli/scripts/conformance.ts index f3feb3077..0b43ceab2 100644 --- a/packages/cli/scripts/conformance.ts +++ b/packages/cli/scripts/conformance.ts @@ -120,7 +120,28 @@ async function tarball(): Promise { shellPackage: "@prisma/cli", enginePackage: "@prisma/cli-engine", familyPackages: ["@prisma/composer-cli", "@prisma/orm-toolchain"], - exceptions: [], + exceptions: [ + { + familyPackage: "@prisma/composer-cli", + familyPin: "0.10.4", + shellPin: "0.10.5", + channel: "dev", + reason: + "engine 0.10.5 adds a next action to CLI.CONFIG_MISSING_MARKER; composer-cli still peers 0.10.4", + removeWhen: + "composer-cli releases peering 0.10.5 and the follow-up bump PR pins that release", + }, + { + familyPackage: "@prisma/orm-toolchain", + familyPin: "0.10.4", + shellPin: "0.10.5", + channel: "dev", + reason: + "engine 0.10.5 adds a next action to CLI.CONFIG_MISSING_MARKER; orm-toolchain still peers 0.10.4", + removeWhen: + "orm-toolchain releases peering 0.10.5 and the follow-up bump PR pins that release", + }, + ], channel: CHANNEL, sandboxDir: join(WORK_DIR, "sandbox"), }, diff --git a/packages/prisma/package.json b/packages/prisma/package.json index 5af04fdd7..58a477487 100644 --- a/packages/prisma/package.json +++ b/packages/prisma/package.json @@ -50,7 +50,7 @@ }, "dependencies": { "@manypkg/tools": "^2.1.2", - "@prisma/cli-engine": "workspace:0.10.4", + "@prisma/cli-engine": "workspace:0.10.5", "@prisma/composer-cli": "0.40.0", "@prisma/compute-sdk": "0.43.0", "@prisma/management-api-sdk": "1.101.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f78c10ffc..dba1381d1 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -27,7 +27,7 @@ importers: specifier: ^2.1.2 version: 2.1.2 '@prisma/cli-engine': - specifier: workspace:0.10.4 + specifier: workspace:0.10.5 version: link:../cli-engine '@prisma/composer-cli': specifier: 0.40.0 @@ -213,7 +213,7 @@ importers: specifier: ^2.1.2 version: 2.1.2 '@prisma/cli-engine': - specifier: workspace:0.10.4 + specifier: workspace:0.10.5 version: link:../cli-engine '@prisma/composer-cli': specifier: 0.40.0