diff --git a/package.json b/package.json index 194a38b3..4d0ee612 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "prisma-cli", - "version": "8.0.0-rc.19", + "version": "8.0.0-rc.20", "private": true, "engines": { "node": ">=24" diff --git a/packages/cli-conformance/package.json b/packages/cli-conformance/package.json index 1d4d62ba..6c7502a1 100644 --- a/packages/cli-conformance/package.json +++ b/packages/cli-conformance/package.json @@ -1,7 +1,7 @@ { "name": "@repo/cli-conformance", "private": true, - "version": "8.0.0-rc.19", + "version": "8.0.0-rc.20", "description": "Reusable conformance checks for the engine's consumers: import purity over built output, config-section validators that never throw, and verification of the tarballs a registry would receive. Depends on no package it checks.", "type": "module", "exports": { @@ -24,7 +24,7 @@ "test": "pnpm run typecheck && vitest run" }, "devDependencies": { - "@repo/tsconfig": "workspace:8.0.0-rc.19", + "@repo/tsconfig": "workspace:8.0.0-rc.20", "@types/node": "^22.19.19", "es-module-lexer": "^2.1.0", "tsx": "^4.22.4", diff --git a/packages/cli-engine/package.json b/packages/cli-engine/package.json index 37f30a35..2d15f45c 100644 --- a/packages/cli-engine/package.json +++ b/packages/cli-engine/package.json @@ -59,8 +59,8 @@ }, "devDependencies": { "@prisma/management-api-sdk": "1.80.0", - "@repo/cli-conformance": "workspace:8.0.0-rc.19", - "@repo/tsconfig": "workspace:8.0.0-rc.19", + "@repo/cli-conformance": "workspace:8.0.0-rc.20", + "@repo/tsconfig": "workspace:8.0.0-rc.20", "@types/node": "^22.19.19", "ci-info": "^4.3.1", "tsdown": "^0.21.10", diff --git a/packages/cli-telemetry/package.json b/packages/cli-telemetry/package.json index b1ced912..92756274 100644 --- a/packages/cli-telemetry/package.json +++ b/packages/cli-telemetry/package.json @@ -1,7 +1,7 @@ { "name": "@repo/cli-telemetry", "private": true, - "version": "8.0.0-rc.19", + "version": "8.0.0-rc.20", "description": "CLI telemetry child sender: the detached subprocess the engine hands a composed payload to, its system probes, and the POST", "type": "module", "sideEffects": [ @@ -35,7 +35,7 @@ "@vercel/detect-agent": "^1.2.3" }, "devDependencies": { - "@repo/tsconfig": "workspace:8.0.0-rc.19", + "@repo/tsconfig": "workspace:8.0.0-rc.20", "@types/node": "^22.19.19", "tsdown": "^0.21.10", "typescript": "^6.0.3", diff --git a/packages/cli/package.json b/packages/cli/package.json index ba369232..5f6da732 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@prisma/cli", - "version": "8.0.0-rc.19", + "version": "8.0.0-rc.20", "description": "Command-line interface for the Prisma Developer Platform.", "type": "module", "bin": { @@ -50,7 +50,7 @@ "dependencies": { "@manypkg/tools": "^2.1.2", "@prisma/cli-engine": "workspace:0.6.2", - "@prisma/composer-cli": "0.25.0", + "@prisma/composer-cli": "0.26.0", "@prisma/compute-sdk": "0.43.0", "@prisma/management-api-sdk": "1.80.0", "@prisma/orm-toolchain": "8.0.0-rc.14", @@ -62,11 +62,11 @@ "open": "^11.0.0" }, "devDependencies": { - "@prisma/composer": "0.25.0", + "@prisma/composer": "0.26.0", "@prisma/credentials-store": "^7.8.0", - "@repo/cli-conformance": "workspace:8.0.0-rc.19", - "@repo/cli-telemetry": "workspace:8.0.0-rc.19", - "@repo/tsconfig": "workspace:8.0.0-rc.19", + "@repo/cli-conformance": "workspace:8.0.0-rc.20", + "@repo/cli-telemetry": "workspace:8.0.0-rc.20", + "@repo/tsconfig": "workspace:8.0.0-rc.20", "@types/node": "^22.19.19", "@types/cross-spawn": "^6.0.6", "tsdown": "^0.21.10", diff --git a/packages/cli/scripts/conformance.ts b/packages/cli/scripts/conformance.ts index 0aad3038..d3f702d6 100644 --- a/packages/cli/scripts/conformance.ts +++ b/packages/cli/scripts/conformance.ts @@ -110,14 +110,6 @@ async function tarball(): Promise { enginePackage: "@prisma/cli-engine", familyPackages: ["@prisma/composer-cli", "@prisma/orm-toolchain"], exceptions: [ - { - familyPackage: "@prisma/composer-cli", - familyPin: "0.6.1", - shellPin: "0.6.2", - reason: "engine 0.6.2 must publish before composer-cli can peer it", - removeWhen: - "composer-cli releases peering 0.6.2 and the follow-up bump PR pins that release", - }, { familyPackage: "@prisma/orm-toolchain", familyPin: "0.6.1", diff --git a/packages/cli/tests/bin.test.ts b/packages/cli/tests/bin.test.ts index 689c69ef..82aa6f69 100644 --- a/packages/cli/tests/bin.test.ts +++ b/packages/cli/tests/bin.test.ts @@ -34,12 +34,20 @@ const MISSING_PRISMA_CONFIG_PATH = join( "missing-prisma.config.ts", ); -/** A prisma.config.ts whose only section is composer's. */ -const COMPOSER_SECTION_CONFIG_PATH = join( +/** A composer section that still carries the retired `configPath`. */ +const COMPOSER_CONFIG_PATH_CONFIG_PATH = join( dirname(fileURLToPath(import.meta.url)), "fixtures", "config", - "composer-section.config.ts", + "composer-config-path.config.ts", +); + +/** A composer section built with `@prisma/composer/config`. */ +const COMPOSER_VALID_CONFIG_PATH = join( + dirname(fileURLToPath(import.meta.url)), + "fixtures", + "config", + "composer-valid.config.ts", ); const SEMVER_PREFIX = /^\d+\.\d+\.\d+/; @@ -492,7 +500,10 @@ describe("buildCli", () => { * stdout is not a TTY here, so the stream is JSON, and JSON escapes * every separator in a Windows path — no path the CLI printed is a * substring of the stream that carried it. */ - function resultError(stdoutText: string): Diagnostic { + function resultFailure(stdoutText: string): { + readonly error: Diagnostic; + readonly diagnostics: readonly Diagnostic[]; + } { const frames = stdoutText .split("\n") .filter((line) => line !== "") @@ -501,81 +512,74 @@ describe("buildCli", () => { if (last?.kind !== "result" || last.envelope.ok) { throw new Error(`expected a failed result frame, got: ${stdoutText}`); } - return last.envelope.error; + return { + error: last.envelope.error, + diagnostics: last.envelope.diagnostics, + }; } - /** Composer's `dev` through the real bin, against the fixture whose - * composer section names a config file that is not there. */ - async function runComposerDev(): Promise<{ + /** Composer's `dev` through the real bin, reading the given config. */ + async function runComposerDev(configPath: string): Promise<{ readonly exitCode: number; readonly error: Diagnostic; + readonly diagnostics: readonly Diagnostic[]; }> { const proc = makeProcess({ - argv: [ - "node", - "bin.js", - "dev", - "--config", - COMPOSER_SECTION_CONFIG_PATH, - "src/service.ts", - ], + argv: ["node", "bin.js", "dev", "--config", configPath, "src/service.ts"], }); const exitCode = await main(proc); - return { exitCode, error: resultError(proc.stdoutText) }; + return { exitCode, ...resultFailure(proc.stdoutText) }; } /** * The mount's config wiring, end to end: the section name composer's - * family declares, read by the bin's real disk loader, reaching - * composer's own handler as the path it acts on. - * - * Every platform but Windows. `dev` is the only composer command - * that reaches config discovery without credentials — `deploy` stops - * at the credential check — and it refuses Windows before it reads - * the section it was handed, so no shipped command can show the - * section arriving there. The test after this one pins what Windows - * can still show. + * family declares, read by the bin's real disk loader and checked by + * composer's own validator before any handler runs, so every + * platform sees the same refusal. */ - it.skipIf(process.platform === "win32")( - "hands the composer section of prisma.config.ts to the composer family", - async () => { - const { exitCode, error } = await runComposerDev(); - - expect(exitCode).toBe(2); - expect(error.code).toBe("CONFIG.FILE_MISSING"); - // Composer resolves the section's relative path against the - // prisma.config.ts that declared it, not against the cwd. - expect(error.where?.path).toBe( - join( - dirname(COMPOSER_SECTION_CONFIG_PATH), - "named-by-the-section.config.ts", - ), - ); - expect(error.why).toContain("there is no walk to fall back on"); - }, - ); + it("refuses a composer section that still names a config file", async () => { + const { exitCode, error, diagnostics } = await runComposerDev( + COMPOSER_CONFIG_PATH_CONFIG_PATH, + ); + + expect(exitCode).toBe(2); + expect(error).toMatchObject({ + code: "CLI.CONFIG_SECTION_INVALID", + summary: `The 'composer' section of ${COMPOSER_CONFIG_PATH_CONFIG_PATH} is invalid.`, + }); + expect(diagnostics).toEqual([ + expect.objectContaining({ + code: "CONFIG.FIELD_RETIRED", + severity: "error", + meta: { field: "configPath" }, + where: { path: COMPOSER_CONFIG_PATH_CONFIG_PATH }, + }), + ]); + }); /** - * What Windows still shows: the bin evaluated the config file, the - * engine accepted its `composer` section, and the command reached - * composer's own operation — which then refuses the platform. A - * mis-wired section would fail here as a config diagnostic instead. - * What it does not show is the section's path reaching composer's - * config discovery, since the refusal comes first. - * - * When composer supports Windows this test fails, and the pair - * collapses back into the one above. + * `dev --help` never evaluates the config, so a valid section shows + * only on a run that validates it: composer's validator accepts the + * section and the handler runs. Its first step imports the entry the + * host passed, which does not exist; on Windows the handler refuses + * the platform before that. */ - it.runIf(process.platform === "win32")( - "on Windows, composer's dev refuses the platform before it reads the section", - async () => { - const { exitCode, error } = await runComposerDev(); + it("hands a valid composer section to composer's dev", async () => { + const { exitCode, error } = await runComposerDev( + COMPOSER_VALID_CONFIG_PATH, + ); - expect(exitCode).toBe(2); - expect(error.code).toBe("DEV.PLATFORM_UNSUPPORTED"); - }, - ); + expect(exitCode).toBe(2); + expect(error).toMatchObject( + process.platform === "win32" + ? { code: "DEV.PLATFORM_UNSUPPORTED" } + : { + code: "COMPOSE.ENTRY_UNLOADABLE", + summary: expect.stringContaining(join("src", "service.ts")), + }, + ); + }); it("runs --version through the real tree, printing the version with exit 0", async () => { const proc = makeProcess({ diff --git a/packages/cli/tests/fixtures/config/composer-section.config.ts b/packages/cli/tests/fixtures/config/composer-config-path.config.ts similarity index 82% rename from packages/cli/tests/fixtures/config/composer-section.config.ts rename to packages/cli/tests/fixtures/config/composer-config-path.config.ts index cbe4c293..fa5cfa37 100644 --- a/packages/cli/tests/fixtures/config/composer-section.config.ts +++ b/packages/cli/tests/fixtures/config/composer-config-path.config.ts @@ -4,6 +4,6 @@ import { definePrismaConfig } from "@prisma/cli-engine"; // appearing in one of this repository's directories above these // fixtures can never join a test's chain. export default definePrismaConfig({ - composer: { configPath: "./named-by-the-section.config.ts" }, + composer: { configPath: "./prisma-composer.config.ts" }, parent: false, }); diff --git a/packages/cli/tests/fixtures/config/composer-valid.config.ts b/packages/cli/tests/fixtures/config/composer-valid.config.ts new file mode 100644 index 00000000..d4a31786 --- /dev/null +++ b/packages/cli/tests/fixtures/config/composer-valid.config.ts @@ -0,0 +1,18 @@ +import { definePrismaConfig } from "@prisma/cli-engine"; +import { defineConfig as composer } from "@prisma/composer/config"; +import { nodeBuild } from "@prisma/composer/node/control"; + +const build = nodeBuild(); + +export default definePrismaConfig({ + composer: composer({ + extensions: [build], + state: { + extension: build.id, + create: () => { + throw new Error("no command in these tests reaches the state store"); + }, + }, + }), + parent: false, +}); diff --git a/packages/compute/package.json b/packages/compute/package.json index 5a6df494..3a75078b 100644 --- a/packages/compute/package.json +++ b/packages/compute/package.json @@ -42,7 +42,7 @@ "test": "vitest run" }, "devDependencies": { - "@repo/tsconfig": "workspace:8.0.0-rc.19", + "@repo/tsconfig": "workspace:8.0.0-rc.20", "@types/node": "^22.19.19", "tsdown": "^0.21.10", "typescript": "^6.0.3", diff --git a/packages/prisma/package.json b/packages/prisma/package.json index 34417d55..3361fe89 100644 --- a/packages/prisma/package.json +++ b/packages/prisma/package.json @@ -1,6 +1,6 @@ { "name": "prisma", - "version": "8.0.0-rc.19", + "version": "8.0.0-rc.20", "description": "The Prisma CLI: one binary for the ORM, Composer, and the Prisma Developer Platform.", "type": "module", "bin": { @@ -51,7 +51,7 @@ "dependencies": { "@manypkg/tools": "^2.1.2", "@prisma/cli-engine": "workspace:0.6.2", - "@prisma/composer-cli": "0.25.0", + "@prisma/composer-cli": "0.26.0", "@prisma/compute-sdk": "0.43.0", "@prisma/management-api-sdk": "1.80.0", "@prisma/orm-toolchain": "8.0.0-rc.14", @@ -63,10 +63,10 @@ "open": "^11.0.0" }, "devDependencies": { - "@prisma/cli": "workspace:8.0.0-rc.19", + "@prisma/cli": "workspace:8.0.0-rc.20", "@prisma/credentials-store": "^7.8.0", - "@repo/cli-telemetry": "workspace:8.0.0-rc.19", - "@repo/tsconfig": "workspace:8.0.0-rc.19", + "@repo/cli-telemetry": "workspace:8.0.0-rc.20", + "@repo/tsconfig": "workspace:8.0.0-rc.20", "@types/node": "^22.19.19", "tsdown": "^0.21.10", "typescript": "^6.0.3", diff --git a/packages/tsconfig/package.json b/packages/tsconfig/package.json index 816ac896..ad43a0f8 100644 --- a/packages/tsconfig/package.json +++ b/packages/tsconfig/package.json @@ -1,7 +1,7 @@ { "name": "@repo/tsconfig", "private": true, - "version": "8.0.0-rc.19", + "version": "8.0.0-rc.20", "description": "Base tsconfig providing package for the monorepo", "license": "Apache-2.0", "files": [ diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3bb09696..9fc6801d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -30,8 +30,8 @@ importers: specifier: workspace:0.6.2 version: link:../cli-engine '@prisma/composer-cli': - specifier: 0.25.0 - version: 0.25.0(@prisma/cli-engine@packages+cli-engine)(@types/node@22.19.19)(@vercel/nft@1.10.2(rollup@4.62.2))(magicast@0.5.3)(mongodb@6.21.0(@aws-sdk/credential-providers@3.1107.0))(pg@8.23.0)(typescript@6.0.3)(vite@7.3.5(@types/node@22.19.19)(jiti@2.7.0)(tsx@4.22.4)(yaml@2.9.0))(vitest@4.1.8(@types/node@22.19.19)(vite@7.3.5(@types/node@22.19.19)(jiti@2.7.0)(tsx@4.22.4)(yaml@2.9.0)))(ws@8.21.0) + specifier: 0.26.0 + version: 0.26.0(@prisma/cli-engine@packages+cli-engine)(@types/node@22.19.19)(@vercel/nft@1.10.2(rollup@4.62.2))(mongodb@6.21.0(@aws-sdk/credential-providers@3.1107.0))(pg@8.23.0)(typescript@6.0.3)(vite@7.3.5(@types/node@22.19.19)(jiti@2.7.0)(tsx@4.22.4)(yaml@2.9.0))(vitest@4.1.8(@types/node@22.19.19)(vite@7.3.5(@types/node@22.19.19)(jiti@2.7.0)(tsx@4.22.4)(yaml@2.9.0)))(ws@8.21.0) '@prisma/compute-sdk': specifier: 0.43.0 version: 0.43.0(@prisma/management-api-sdk@1.80.0)(rollup@4.62.2) @@ -61,19 +61,19 @@ importers: version: 11.0.0 devDependencies: '@prisma/composer': - specifier: 0.25.0 - version: 0.25.0(@types/node@22.19.19)(@vercel/nft@1.10.2(rollup@4.62.2))(magicast@0.5.3)(mongodb@6.21.0(@aws-sdk/credential-providers@3.1107.0))(pg@8.23.0)(typescript@6.0.3)(vite@7.3.5(@types/node@22.19.19)(jiti@2.7.0)(tsx@4.22.4)(yaml@2.9.0))(vitest@4.1.8(@types/node@22.19.19)(vite@7.3.5(@types/node@22.19.19)(jiti@2.7.0)(tsx@4.22.4)(yaml@2.9.0)))(ws@8.21.0) + specifier: 0.26.0 + version: 0.26.0(@types/node@22.19.19)(@vercel/nft@1.10.2(rollup@4.62.2))(mongodb@6.21.0(@aws-sdk/credential-providers@3.1107.0))(pg@8.23.0)(typescript@6.0.3)(vite@7.3.5(@types/node@22.19.19)(jiti@2.7.0)(tsx@4.22.4)(yaml@2.9.0))(vitest@4.1.8(@types/node@22.19.19)(vite@7.3.5(@types/node@22.19.19)(jiti@2.7.0)(tsx@4.22.4)(yaml@2.9.0)))(ws@8.21.0) '@prisma/credentials-store': specifier: ^7.8.0 version: 7.8.0 '@repo/cli-conformance': - specifier: workspace:8.0.0-rc.19 + specifier: workspace:8.0.0-rc.20 version: link:../cli-conformance '@repo/cli-telemetry': - specifier: workspace:8.0.0-rc.19 + specifier: workspace:8.0.0-rc.20 version: link:../cli-telemetry '@repo/tsconfig': - specifier: workspace:8.0.0-rc.19 + specifier: workspace:8.0.0-rc.20 version: link:../tsconfig '@types/cross-spawn': specifier: ^6.0.6 @@ -97,7 +97,7 @@ importers: packages/cli-conformance: devDependencies: '@repo/tsconfig': - specifier: workspace:8.0.0-rc.19 + specifier: workspace:8.0.0-rc.20 version: link:../tsconfig '@types/node': specifier: ^22.19.19 @@ -143,10 +143,10 @@ importers: specifier: 1.80.0 version: 1.80.0 '@repo/cli-conformance': - specifier: workspace:8.0.0-rc.19 + specifier: workspace:8.0.0-rc.20 version: link:../cli-conformance '@repo/tsconfig': - specifier: workspace:8.0.0-rc.19 + specifier: workspace:8.0.0-rc.20 version: link:../tsconfig '@types/node': specifier: ^22.19.19 @@ -171,7 +171,7 @@ importers: version: 1.2.4 devDependencies: '@repo/tsconfig': - specifier: workspace:8.0.0-rc.19 + specifier: workspace:8.0.0-rc.20 version: link:../tsconfig '@types/node': specifier: ^22.19.19 @@ -189,7 +189,7 @@ importers: packages/compute: devDependencies: '@repo/tsconfig': - specifier: workspace:8.0.0-rc.19 + specifier: workspace:8.0.0-rc.20 version: link:../tsconfig '@types/node': specifier: ^22.19.19 @@ -213,8 +213,8 @@ importers: specifier: workspace:0.6.2 version: link:../cli-engine '@prisma/composer-cli': - specifier: 0.25.0 - version: 0.25.0(@prisma/cli-engine@packages+cli-engine)(@types/node@22.19.19)(@vercel/nft@1.10.2(rollup@4.62.2))(magicast@0.5.3)(mongodb@6.21.0(@aws-sdk/credential-providers@3.1107.0))(pg@8.23.0)(typescript@6.0.3)(vite@7.3.5(@types/node@22.19.19)(jiti@2.7.0)(tsx@4.22.4)(yaml@2.9.0))(vitest@4.1.8(@types/node@22.19.19)(vite@7.3.5(@types/node@22.19.19)(jiti@2.7.0)(tsx@4.22.4)(yaml@2.9.0)))(ws@8.21.0) + specifier: 0.26.0 + version: 0.26.0(@prisma/cli-engine@packages+cli-engine)(@types/node@22.19.19)(@vercel/nft@1.10.2(rollup@4.62.2))(mongodb@6.21.0(@aws-sdk/credential-providers@3.1107.0))(pg@8.23.0)(typescript@6.0.3)(vite@7.3.5(@types/node@22.19.19)(jiti@2.7.0)(tsx@4.22.4)(yaml@2.9.0))(vitest@4.1.8(@types/node@22.19.19)(vite@7.3.5(@types/node@22.19.19)(jiti@2.7.0)(tsx@4.22.4)(yaml@2.9.0)))(ws@8.21.0) '@prisma/compute-sdk': specifier: 0.43.0 version: 0.43.0(@prisma/management-api-sdk@1.80.0)(rollup@4.62.2) @@ -244,16 +244,16 @@ importers: version: 11.0.0 devDependencies: '@prisma/cli': - specifier: workspace:8.0.0-rc.19 + specifier: workspace:8.0.0-rc.20 version: link:../cli '@prisma/credentials-store': specifier: ^7.8.0 version: 7.8.0 '@repo/cli-telemetry': - specifier: workspace:8.0.0-rc.19 + specifier: workspace:8.0.0-rc.20 version: link:../cli-telemetry '@repo/tsconfig': - specifier: workspace:8.0.0-rc.19 + specifier: workspace:8.0.0-rc.20 version: link:../tsconfig '@types/node': specifier: ^22.19.19 @@ -1301,15 +1301,14 @@ packages: '@oxc-project/types@0.146.0': resolution: {integrity: sha512-XC0QsnnhVe7sLIWmYmdPw7x5P0h4W8vUU3Nv1ySgWXtvCz8NizoAEpGXA0sOYoJQV2Rl13LgURAHQ5cI5ILCSA==} - '@prisma/composer-cli@0.25.0': - resolution: {integrity: sha512-f/v2S7eeCV7Nvqkb7+/BhHKfT3rtLq4nD/icE15FdkoN8CVysZZd2mUJXyBaAz6835lP3KfP9KGsIH7qnnTFpw==} + '@prisma/composer-cli@0.26.0': + resolution: {integrity: sha512-oBMN5FaAj0nyYGuVxfAaOMH4+74myWfb0YcPZAi4CndSe/WeAWyMWu4tieSe67o0lcED77dKaRb57cMDfrdvVg==} engines: {node: '>=22.18.0'} - hasBin: true peerDependencies: - '@prisma/cli-engine': 0.6.1 + '@prisma/cli-engine': 0.6.2 - '@prisma/composer@0.25.0': - resolution: {integrity: sha512-il4IFTKvmLTU8LSLSqJD/q8EzEqUuIw+ZPJ4v7ZJd1yMW0uiwWnD5knrbVgftXytbTTjzgzgaO8Fq6s8+d9r1A==} + '@prisma/composer@0.26.0': + resolution: {integrity: sha512-ttALY7KPD8NkecI4vJP0q50FkD7Q7v77TftU34gBA312hqyJKxD3hk4wY6H+NmDBfQAW7VDq8JCv1hGxx/aXJw==} engines: {node: '>=22.18.0'} '@prisma/compute-sdk@0.43.0': @@ -4013,12 +4012,11 @@ snapshots: '@oxc-project/types@0.146.0': {} - '@prisma/composer-cli@0.25.0(@prisma/cli-engine@packages+cli-engine)(@types/node@22.19.19)(@vercel/nft@1.10.2(rollup@4.62.2))(magicast@0.5.3)(mongodb@6.21.0(@aws-sdk/credential-providers@3.1107.0))(pg@8.23.0)(typescript@6.0.3)(vite@7.3.5(@types/node@22.19.19)(jiti@2.7.0)(tsx@4.22.4)(yaml@2.9.0))(vitest@4.1.8(@types/node@22.19.19)(vite@7.3.5(@types/node@22.19.19)(jiti@2.7.0)(tsx@4.22.4)(yaml@2.9.0)))(ws@8.21.0)': + '@prisma/composer-cli@0.26.0(@prisma/cli-engine@packages+cli-engine)(@types/node@22.19.19)(@vercel/nft@1.10.2(rollup@4.62.2))(mongodb@6.21.0(@aws-sdk/credential-providers@3.1107.0))(pg@8.23.0)(typescript@6.0.3)(vite@7.3.5(@types/node@22.19.19)(jiti@2.7.0)(tsx@4.22.4)(yaml@2.9.0))(vitest@4.1.8(@types/node@22.19.19)(vite@7.3.5(@types/node@22.19.19)(jiti@2.7.0)(tsx@4.22.4)(yaml@2.9.0)))(ws@8.21.0)': dependencies: '@prisma/cli-engine': link:packages/cli-engine - '@prisma/composer': 0.25.0(@types/node@22.19.19)(@vercel/nft@1.10.2(rollup@4.62.2))(magicast@0.5.3)(mongodb@6.21.0(@aws-sdk/credential-providers@3.1107.0))(pg@8.23.0)(typescript@6.0.3)(vite@7.3.5(@types/node@22.19.19)(jiti@2.7.0)(tsx@4.22.4)(yaml@2.9.0))(vitest@4.1.8(@types/node@22.19.19)(vite@7.3.5(@types/node@22.19.19)(jiti@2.7.0)(tsx@4.22.4)(yaml@2.9.0)))(ws@8.21.0) + '@prisma/composer': 0.26.0(@types/node@22.19.19)(@vercel/nft@1.10.2(rollup@4.62.2))(mongodb@6.21.0(@aws-sdk/credential-providers@3.1107.0))(pg@8.23.0)(typescript@6.0.3)(vite@7.3.5(@types/node@22.19.19)(jiti@2.7.0)(tsx@4.22.4)(yaml@2.9.0))(vitest@4.1.8(@types/node@22.19.19)(vite@7.3.5(@types/node@22.19.19)(jiti@2.7.0)(tsx@4.22.4)(yaml@2.9.0)))(ws@8.21.0) alchemy: 2.0.0-beta.78(@types/node@22.19.19)(@vercel/nft@1.10.2(rollup@4.62.2))(effect@4.0.0-rc.115)(mongodb@6.21.0(@aws-sdk/credential-providers@3.1107.0))(pg@8.23.0)(typescript@6.0.3)(vite@7.3.5(@types/node@22.19.19)(jiti@2.7.0)(tsx@4.22.4)(yaml@2.9.0))(vitest@4.1.8(@types/node@22.19.19)(vite@7.3.5(@types/node@22.19.19)(jiti@2.7.0)(tsx@4.22.4)(yaml@2.9.0)))(ws@8.21.0) - c12: 3.3.4(magicast@0.5.3) cross-spawn: 7.0.6 effect: 4.0.0-rc.115 esbuild: 0.28.2 @@ -4035,7 +4033,6 @@ snapshots: - bufferutil - drizzle-kit - drizzle-orm - - magicast - mongodb - mysql2 - pg @@ -4047,7 +4044,7 @@ snapshots: - vitest - ws - '@prisma/composer@0.25.0(@types/node@22.19.19)(@vercel/nft@1.10.2(rollup@4.62.2))(magicast@0.5.3)(mongodb@6.21.0(@aws-sdk/credential-providers@3.1107.0))(pg@8.23.0)(typescript@6.0.3)(vite@7.3.5(@types/node@22.19.19)(jiti@2.7.0)(tsx@4.22.4)(yaml@2.9.0))(vitest@4.1.8(@types/node@22.19.19)(vite@7.3.5(@types/node@22.19.19)(jiti@2.7.0)(tsx@4.22.4)(yaml@2.9.0)))(ws@8.21.0)': + '@prisma/composer@0.26.0(@types/node@22.19.19)(@vercel/nft@1.10.2(rollup@4.62.2))(mongodb@6.21.0(@aws-sdk/credential-providers@3.1107.0))(pg@8.23.0)(typescript@6.0.3)(vite@7.3.5(@types/node@22.19.19)(jiti@2.7.0)(tsx@4.22.4)(yaml@2.9.0))(vitest@4.1.8(@types/node@22.19.19)(vite@7.3.5(@types/node@22.19.19)(jiti@2.7.0)(tsx@4.22.4)(yaml@2.9.0)))(ws@8.21.0)': dependencies: '@effect/sql-d1': 4.0.0-rc.115(effect@4.0.0-rc.115) '@effect/sql-sqlite-do': 4.0.0-rc.115(effect@4.0.0-rc.115) @@ -4056,7 +4053,6 @@ snapshots: '@standard-schema/spec': 1.1.0 alchemy: 2.0.0-beta.78(@types/node@22.19.19)(@vercel/nft@1.10.2(rollup@4.62.2))(effect@4.0.0-rc.115)(mongodb@6.21.0(@aws-sdk/credential-providers@3.1107.0))(pg@8.23.0)(typescript@6.0.3)(vite@7.3.5(@types/node@22.19.19)(jiti@2.7.0)(tsx@4.22.4)(yaml@2.9.0))(vitest@4.1.8(@types/node@22.19.19)(vite@7.3.5(@types/node@22.19.19)(jiti@2.7.0)(tsx@4.22.4)(yaml@2.9.0)))(ws@8.21.0) arktype: 2.2.3 - c12: 3.3.4(magicast@0.5.3) cross-spawn: 7.0.6 effect: 4.0.0-rc.115 esbuild: 0.28.2 @@ -4073,7 +4069,6 @@ snapshots: - bufferutil - drizzle-kit - drizzle-orm - - magicast - mongodb - mysql2 - pg diff --git a/skills/prisma-platform-core-concepts/SKILL.md b/skills/prisma-platform-core-concepts/SKILL.md index c24971fb..74ca3d3f 100644 --- a/skills/prisma-platform-core-concepts/SKILL.md +++ b/skills/prisma-platform-core-concepts/SKILL.md @@ -2,7 +2,7 @@ name: prisma-platform-core-concepts metadata: library: "prisma" - library_version: "8.0.0-rc.19" + library_version: "8.0.0-rc.20" version: 2026.9.2 description: >- Use when hosting, deploying, or operating an app on the Prisma Platform: @@ -71,26 +71,42 @@ packages (`prisma-composer-core-concepts` in `@prisma/composer`, `prisma-orm-core-concepts` in `@prisma/orm-postgres`), so they appear after this install plus `prisma skills sync`, not before. -Two config files with different owners: - -1. `prisma.config.ts` configures the CLI. Each top-level key is a section - owned by one product, and this CLI recognises exactly three: `orm`, - `composer`, and `skills`. The composed shape: - - ```ts - import { definePrismaConfig } from "prisma/config"; - import { defineConfig } from "@prisma/orm-postgres/config"; - - export default definePrismaConfig({ - orm: defineConfig({ contract: "./src/prisma/contract.prisma" }), - skills: { agents: ["claude"] }, - }); - ``` +One config file, `prisma.config.ts`, configures the CLI and every product +it runs. Each top-level key is a section owned by one product, and this CLI +recognises exactly three: `orm`, `composer`, and `skills`. The composed +shape: + +```ts +import { definePrismaConfig } from "prisma/config"; +import { defineConfig as composer } from "@prisma/composer/config"; +import { nodeBuild } from "@prisma/composer/node/control"; +import { + prismaCloud, + prismaState, +} from "@prisma/composer-prisma-cloud/control"; +import { defineConfig as orm } from "@prisma/orm-postgres/config"; + +export default definePrismaConfig({ + composer: composer({ + extensions: [prismaCloud(), nodeBuild()], + state: prismaState(), + }), + orm: orm({ contract: "./src/prisma/contract.prisma" }), + skills: { agents: ["claude"] }, +}); +``` -2. `prisma-composer.config.ts` configures Composer itself and is a separate, - mandatory file for `dev` and `deploy`: without it `dev` fails with - `CONFIG.FILE_MISSING`. Its contents belong to - `prisma-composer-core-concepts`. +`dev` and `deploy` read the `composer` section and nothing else; what goes +in it belongs to `prisma-composer-core-concepts`. A separate +`prisma-composer.config.ts` is no longer read, and the old setup is refused, +never silently ignored: `CONFIG.SECTION_MISSING` when no loaded +`prisma.config.ts` declares a `composer` section, `CONFIG.FIELD_RETIRED` +when the section still has `configPath`, and `CONFIG.FILE_RETIRED` when a +`prisma-composer.config.*` sits next to the declaring `prisma.config.ts`. +All three arrive under the CLI's `CLI.CONFIG_SECTION_INVALID`. For +`CONFIG.SECTION_MISSING`, write the section. For the other two, move the +old file's `extensions` and `state` into the section, then delete the +`configPath` field or the old file. ## The resource model