From 06b92d3e73bb602f87be0ec6797d1fbff476a7e7 Mon Sep 17 00:00:00 2001 From: Steven McClankerton Date: Tue, 1 Sep 2026 17:09:23 +0000 Subject: [PATCH 1/2] fix(cli): rename user-visible CLI strings from Prisma Next to Prisma 8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The product was renamed to Prisma 8, but orm init/lsp help text, the orm group brief, the scaffolded quick-reference and README templates, the telemetry first-run notice, config-validation diagnostics, and install-fallback warnings still introduced themselves as "Prisma Next" (and, in one case on main, "Prisma ORM" — the predecessor's name). Renames every user-visible occurrence to "Prisma 8" and adds regression coverage: a strengthened e2e test that reads back every path orm init writes, and a package-level test asserting the real BIN_GROUPS briefs, which the integration harness's synthesized groups could not catch. Fixes #30062 Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01UcqoY3CKfnubdZt5YQk2Rq Signed-off-by: Steven McClankerton --- .../init/templates/quick-reference-mongo.md | 16 ++-- .../templates/quick-reference-postgres.md | 12 +-- .../commands/init/templates/readme-mongo.md | 10 +-- .../init/templates/readme-postgres.md | 10 +-- .../1-framework/3-tooling/cli/src/orm/cli.ts | 2 +- .../3-tooling/cli/src/orm/config-section.ts | 6 +- .../3-tooling/cli/src/orm/init-packages.ts | 2 +- .../3-tooling/cli/src/orm/init-scaffold.ts | 2 +- .../1-framework/3-tooling/cli/src/orm/init.ts | 4 +- .../1-framework/3-tooling/cli/src/orm/lsp.ts | 4 +- .../cli/src/orm/telemetry/reporting.ts | 2 +- .../init/__snapshots__/templates.test.ts.snap | 76 +++++++++--------- .../3-tooling/cli/test/orm/cli.test.ts | 13 ++++ .../cli/test/orm/config-section.test.ts | 4 +- ...li.rename-user-visible-strings.e2e.test.ts | 78 +++++++++++++++++++ 15 files changed, 166 insertions(+), 75 deletions(-) create mode 100644 test/integration/test/cli.rename-user-visible-strings.e2e.test.ts diff --git a/packages/1-framework/3-tooling/cli/src/commands/init/templates/quick-reference-mongo.md b/packages/1-framework/3-tooling/cli/src/commands/init/templates/quick-reference-mongo.md index fc769308e403..3dea394a041a 100644 --- a/packages/1-framework/3-tooling/cli/src/commands/init/templates/quick-reference-mongo.md +++ b/packages/1-framework/3-tooling/cli/src/commands/init/templates/quick-reference-mongo.md @@ -1,8 +1,8 @@ -# Welcome to Prisma Next! +# Welcome to Prisma 8! -Prisma Next lets you query your database in simple, easy-to-read TypeScript. Define what your data looks like, and Prisma Next gives you a fully typed client — with autocomplete for every collection, field, and relation. +Prisma 8 lets you query your database in simple, easy-to-read TypeScript. Define what your data looks like, and Prisma 8 gives you a fully typed client — with autocomplete for every collection, field, and relation. -This project is set up for MongoDB. Prisma Next also supports other databases. +This project is set up for MongoDB. Prisma 8 also supports other databases. {{requirements}} @@ -34,7 +34,7 @@ Your contract has two companion files in the same directory: Commit both files to git. When you change your contract, run `{{pkgRun}} contract emit` to update them. -If you use a framework like Next.js or Vite, the Prisma Next plugin will do this for you automatically. +If you use a framework like Next.js or Vite, the Prisma 8 plugin will do this for you automatically. ## Configuration @@ -97,14 +97,14 @@ Multi-document transactions and change streams require MongoDB to run as a **rep - **`mongodb-memory-server`:** use `MongoMemoryReplSet` instead of `MongoMemoryServer` in tests. - **MongoDB Atlas:** every Atlas cluster is already a replica set. -The transaction API (`db.transaction(...)`) is on the roadmap and tracked under [TML-2313](https://linear.app/prisma-company/issue/TML-2313/mongo-dev-replica-set-story-is-missing-transactions-change-streams). Prisma Next's Mongo facade does not expose it yet — until that ticket lands, drive transactions yourself with a raw `MongoClient` using the escape hatch in the next section. +The transaction API (`db.transaction(...)`) is on the roadmap and tracked under [TML-2313](https://linear.app/prisma-company/issue/TML-2313/mongo-dev-replica-set-story-is-missing-transactions-change-streams). Prisma 8's Mongo facade does not expose it yet — until that ticket lands, drive transactions yourself with a raw `MongoClient` using the escape hatch in the next section. ## Escape hatches The ORM covers the common cases. For the rest, two escape hatches are designed in: - **Typed raw aggregations — `db.query`.** The facade exposes `db.query`, a typed builder for aggregation pipelines that runs through the same runtime + middleware + codec stack as `db.orm`. Reach for it when the ORM can't express a `$lookup`/`$facet`/`$graphLookup`/window-function pipeline. -- **Direct `mongodb` driver control — `mongoClient` binding.** Construct your own `MongoClient` and pass it to `mongo({ mongoClient, dbName, contractJson })`. Your code keeps the `MongoClient` reference and uses it directly (transactions, change streams, sessions, anything Prisma Next doesn't surface yet); the same `db` object continues to give you the typed ORM. +- **Direct `mongodb` driver control — `mongoClient` binding.** Construct your own `MongoClient` and pass it to `mongo({ mongoClient, dbName, contractJson })`. Your code keeps the `MongoClient` reference and uses it directly (transactions, change streams, sessions, anything Prisma 8 doesn't surface yet); the same `db` object continues to give you the typed ORM. `db.runtime()` is **not** the escape hatch — it returns the internal executor (`MongoRuntime`), not a `mongodb` `MongoClient` or `Db`. Use `db.query` for raw aggregations and the `mongoClient` binding for direct driver control. @@ -113,5 +113,5 @@ The ORM covers the common cases. For the rest, two escape hatches are designed i If this project lives inside a pnpm workspace, a few things are worth knowing: - **Catalogs.** When the workspace's `pnpm-workspace.yaml` defines a `catalogs` entry for `prisma` or `{{pkg}}`, pnpm uses the catalog version everywhere — `init` does too. If you wanted the published `latest` instead, update or remove the catalog entry, then re-run `pnpm install`. -- **`pnpm dlx`.** `pnpm dlx prisma@next orm init …` works in any directory. Inside a workspace, pnpm still resolves dependencies through the workspace's catalog/overrides rather than the registry; expect the installed Prisma Next packages to reflect the workspace's catalog rather than `latest`. -- **`pnpm` → `npm` fallback.** If `pnpm` ever fails to install Prisma Next with a `workspace:*` or `catalog:` resolution error (a leak in a published artefact), `init` falls back to `npm install` and surfaces a warning. Once the offending package republishes a clean version you can switch back with `pnpm install`. +- **`pnpm dlx`.** `pnpm dlx prisma@next orm init …` works in any directory. Inside a workspace, pnpm still resolves dependencies through the workspace's catalog/overrides rather than the registry; expect the installed Prisma 8 packages to reflect the workspace's catalog rather than `latest`. +- **`pnpm` → `npm` fallback.** If `pnpm` ever fails to install Prisma 8 with a `workspace:*` or `catalog:` resolution error (a leak in a published artefact), `init` falls back to `npm install` and surfaces a warning. Once the offending package republishes a clean version you can switch back with `pnpm install`. diff --git a/packages/1-framework/3-tooling/cli/src/commands/init/templates/quick-reference-postgres.md b/packages/1-framework/3-tooling/cli/src/commands/init/templates/quick-reference-postgres.md index bd1f866ddf10..d99757909579 100644 --- a/packages/1-framework/3-tooling/cli/src/commands/init/templates/quick-reference-postgres.md +++ b/packages/1-framework/3-tooling/cli/src/commands/init/templates/quick-reference-postgres.md @@ -1,8 +1,8 @@ -# Welcome to Prisma Next! +# Welcome to Prisma 8! -Prisma Next lets you query your database in simple, easy-to-read TypeScript. Define what your data looks like, and Prisma Next gives you a fully typed client — with autocomplete for every table, column, and relation. +Prisma 8 lets you query your database in simple, easy-to-read TypeScript. Define what your data looks like, and Prisma 8 gives you a fully typed client — with autocomplete for every table, column, and relation. -This project is set up for PostgreSQL. Prisma Next also supports other databases. +This project is set up for PostgreSQL. Prisma 8 also supports other databases. {{requirements}} @@ -32,7 +32,7 @@ Your contract has two companion files in the same directory: Commit both files to git. When you change your contract, run `{{pkgRun}} contract emit` to update them. -If you use a framework like Next.js or Vite, the Prisma Next plugin will do this for you automatically. +If you use a framework like Next.js or Vite, the Prisma 8 plugin will do this for you automatically. ## Configuration @@ -92,5 +92,5 @@ You can customize how your environment variables are loaded by changing or remov If this project lives inside a pnpm workspace, a few things are worth knowing: - **Catalogs.** When the workspace's `pnpm-workspace.yaml` defines a `catalogs` entry for `prisma` or `{{pkg}}`, pnpm uses the catalog version everywhere — `init` does too. If you wanted the published `latest` instead, update or remove the catalog entry, then re-run `pnpm install`. -- **`pnpm dlx`.** `pnpm dlx prisma@next orm init …` works in any directory. Inside a workspace, pnpm still resolves dependencies through the workspace's catalog/overrides rather than the registry; expect the installed Prisma Next packages to reflect the workspace's catalog rather than `latest`. -- **`pnpm` → `npm` fallback.** If `pnpm` ever fails to install Prisma Next with a `workspace:*` or `catalog:` resolution error (a leak in a published artefact), `init` falls back to `npm install` and surfaces a warning. Once the offending package republishes a clean version you can switch back with `pnpm install`. +- **`pnpm dlx`.** `pnpm dlx prisma@next orm init …` works in any directory. Inside a workspace, pnpm still resolves dependencies through the workspace's catalog/overrides rather than the registry; expect the installed Prisma 8 packages to reflect the workspace's catalog rather than `latest`. +- **`pnpm` → `npm` fallback.** If `pnpm` ever fails to install Prisma 8 with a `workspace:*` or `catalog:` resolution error (a leak in a published artefact), `init` falls back to `npm install` and surfaces a warning. Once the offending package republishes a clean version you can switch back with `pnpm install`. diff --git a/packages/1-framework/3-tooling/cli/src/commands/init/templates/readme-mongo.md b/packages/1-framework/3-tooling/cli/src/commands/init/templates/readme-mongo.md index dab43022425c..3e4deb51c228 100644 --- a/packages/1-framework/3-tooling/cli/src/commands/init/templates/readme-mongo.md +++ b/packages/1-framework/3-tooling/cli/src/commands/init/templates/readme-mongo.md @@ -9,7 +9,7 @@ Generated by `prisma orm init` with the Minimal template. ## Available scripts -- `{{runDev}}` — run the Prisma Next sample script +- `{{runDev}}` — run the Prisma 8 sample script ### Database and migrations @@ -21,15 +21,15 @@ Generated by `prisma orm init` with the Minimal template. - `{{runMigrate}}` — apply the planned MongoDB migration - `{{runDbSeed}}` — insert sample users manually -## Prisma Next +## Prisma 8 -Prisma Next setup is scaffolded in: +Prisma 8 setup is scaffolded in: - `{{contractPath}}` - `prisma.config.ts` - `prisma/db.ts` - `src/lib/prisma.ts` -For provider-specific Prisma Next reference docs, see `prisma-next.md`. Prisma Next skills live in the upstream `skills/` directory: https://github.com/prisma/prisma/tree/main/skills. +For provider-specific Prisma 8 reference docs, see `prisma-next.md`. Prisma 8 skills live in the upstream `skills/` directory: https://github.com/prisma/prisma/tree/main/skills. -Node-based Prisma Next projects expect Node.js 24 LTS or newer. +Node-based Prisma 8 projects expect Node.js 24 LTS or newer. diff --git a/packages/1-framework/3-tooling/cli/src/commands/init/templates/readme-postgres.md b/packages/1-framework/3-tooling/cli/src/commands/init/templates/readme-postgres.md index 1d5cd787b303..2080e6f5ae51 100644 --- a/packages/1-framework/3-tooling/cli/src/commands/init/templates/readme-postgres.md +++ b/packages/1-framework/3-tooling/cli/src/commands/init/templates/readme-postgres.md @@ -9,7 +9,7 @@ Generated by `prisma orm init` with the Minimal template. ## Available scripts -- `{{runDev}}` — run the Prisma Next sample script +- `{{runDev}}` — run the Prisma 8 sample script ### Database and migrations @@ -20,15 +20,15 @@ Generated by `prisma orm init` with the Minimal template. - `{{runMigrate}}` — apply a planned migration - `{{runDbSeed}}` — insert sample users manually (run after `db:init`) -## Prisma Next +## Prisma 8 -Prisma Next setup is scaffolded in: +Prisma 8 setup is scaffolded in: - `{{contractPath}}` - `prisma.config.ts` - `prisma/db.ts` - `src/lib/prisma.ts` -For provider-specific Prisma Next reference docs, see `prisma-next.md`. Prisma Next skills live in the upstream `skills/` directory: https://github.com/prisma/prisma/tree/main/skills. +For provider-specific Prisma 8 reference docs, see `prisma-next.md`. Prisma 8 skills live in the upstream `skills/` directory: https://github.com/prisma/prisma/tree/main/skills. -Node-based Prisma Next projects expect Node.js 24 LTS or newer. +Node-based Prisma 8 projects expect Node.js 24 LTS or newer. diff --git a/packages/1-framework/3-tooling/cli/src/orm/cli.ts b/packages/1-framework/3-tooling/cli/src/orm/cli.ts index cd3a69d8a6a1..b3bb32c30769 100644 --- a/packages/1-framework/3-tooling/cli/src/orm/cli.ts +++ b/packages/1-framework/3-tooling/cli/src/orm/cli.ts @@ -55,7 +55,7 @@ const telemetry = telemetryCommandGroup({ docsUrl: TELEMETRY_DOCS_URL }); export const BIN_GROUPS = { orm: { - brief: 'Initialize a Prisma ORM project', + brief: 'Initialize a Prisma 8 project', description: 'Project initialization for the ORM. The other ORM commands mount under\n' + 'their workflow groups (contract, db, migration); only init lives here.', diff --git a/packages/1-framework/3-tooling/cli/src/orm/config-section.ts b/packages/1-framework/3-tooling/cli/src/orm/config-section.ts index f41b11849437..e1f318ab7f6f 100644 --- a/packages/1-framework/3-tooling/cli/src/orm/config-section.ts +++ b/packages/1-framework/3-tooling/cli/src/orm/config-section.ts @@ -40,7 +40,7 @@ function sectionAbsentDiagnostic(): Diagnostic { return { code: 'CONFIG.FILE_NOT_FOUND', severity: 'error', - summary: 'No Prisma Next configuration was loaded', + summary: 'No Prisma 8 configuration was loaded', why: `The ${ORM_CONFIG_SECTION_NAME} config section is absent, so prisma.config.ts was never evaluated.`, nextActions: [MISSING_CONFIG_ACTION], }; @@ -50,7 +50,7 @@ function notAnObjectDiagnostic(): Diagnostic { return { code: 'CONFIG.VALIDATION_FAILED', severity: 'error', - summary: 'Prisma Next configuration must be an object', + summary: 'Prisma 8 configuration must be an object', why: `The ${ORM_CONFIG_SECTION_NAME} config section is not an object, so no section can be read from it.`, nextActions: [ { kind: 'edit-file', label: 'Export a configuration object from prisma.config.ts' }, @@ -62,7 +62,7 @@ function unreadableDiagnostic(error: unknown): Diagnostic { return { code: 'CONFIG.VALIDATION_FAILED', severity: 'error', - summary: 'Prisma Next configuration could not be inspected', + summary: 'Prisma 8 configuration could not be inspected', why: error instanceof Error ? error.message : String(error), nextActions: [ { diff --git a/packages/1-framework/3-tooling/cli/src/orm/init-packages.ts b/packages/1-framework/3-tooling/cli/src/orm/init-packages.ts index 20b174bb0c44..3da7696416ab 100644 --- a/packages/1-framework/3-tooling/cli/src/orm/init-packages.ts +++ b/packages/1-framework/3-tooling/cli/src/orm/init-packages.ts @@ -44,7 +44,7 @@ function pnpmLeakedASpecifier(failure: CliStructuredError): boolean { function fallbackWarning(failure: CliStructuredError): string { const firstLine = redactSecrets(metaString(failure, 'stderrTail')).trim().split('\n')[0] ?? ''; return [ - 'pnpm could not install: a published Prisma Next dependency leaked a `workspace:*` or `catalog:` specifier.', + 'pnpm could not install: a published Prisma 8 dependency leaked a `workspace:*` or `catalog:` specifier.', 'Falling back to npm so init can complete.', firstLine === '' ? '' : ` pnpm error: ${firstLine}`, 'Both installs ran under npm, which writes a package-lock.json beside the pnpm lockfile — delete whichever of the two you do not want to keep.', diff --git a/packages/1-framework/3-tooling/cli/src/orm/init-scaffold.ts b/packages/1-framework/3-tooling/cli/src/orm/init-scaffold.ts index ff9ffeef962f..1ebb99eb432a 100644 --- a/packages/1-framework/3-tooling/cli/src/orm/init-scaffold.ts +++ b/packages/1-framework/3-tooling/cli/src/orm/init-scaffold.ts @@ -201,7 +201,7 @@ function planScaffold(ctx: { if (existsSync(join(cwd, ENV_EXAMPLE_FILE))) { warnings.push( - `${ENV_EXAMPLE_FILE} already existed and was replaced with the Prisma Next template.`, + `${ENV_EXAMPLE_FILE} already existed and was replaced with the Prisma 8 template.`, ); } diff --git a/packages/1-framework/3-tooling/cli/src/orm/init.ts b/packages/1-framework/3-tooling/cli/src/orm/init.ts index 594ca06e3b30..8ba5aafe399c 100644 --- a/packages/1-framework/3-tooling/cli/src/orm/init.ts +++ b/packages/1-framework/3-tooling/cli/src/orm/init.ts @@ -65,7 +65,7 @@ export interface InitCommandDependencies { export const createInitCommand = (injected: InitCommandDependencies) => defineOrmCommand({ help: { - summary: 'Initialize a new Prisma Next project', + summary: 'Initialize a new Prisma 8 project', description: 'Scaffolds config, schema, and runtime files, installs dependencies,\n' + 'and emits the contract. Gets you from zero to typed queries in one step.\n' + @@ -188,7 +188,7 @@ export const createInitCommand = (injected: InitCommandDependencies) => { why: `The success document failed schema validation: ${String(validated)}`, nextActions: [ - chooseAction('This is a bug in Prisma Next. Please report it with `-v` output.'), + chooseAction('This is a bug in Prisma 8. Please report it with `-v` output.'), ], docsUrl: docsUrlFor('CLI.INIT_INVALID_OUTPUT_DOCUMENT'), }, diff --git a/packages/1-framework/3-tooling/cli/src/orm/lsp.ts b/packages/1-framework/3-tooling/cli/src/orm/lsp.ts index 7c7f397e4f36..3fbb38e0f17c 100644 --- a/packages/1-framework/3-tooling/cli/src/orm/lsp.ts +++ b/packages/1-framework/3-tooling/cli/src/orm/lsp.ts @@ -16,11 +16,11 @@ function signalExitCode(reason: unknown): number { export const lspCommand = defineServerCommand({ help: { - summary: 'Start the Prisma Next language server', + summary: 'Start the Prisma 8 language server', description: 'Launches a Language Server Protocol server that publishes PSL parse diagnostics\n' + 'and handles whole-document PSL formatting for the schema inputs declared in\n' + - 'your config (contract.source.inputs). Formatting uses the Prisma Next PSL\n' + + 'your config (contract.source.inputs). Formatting uses the Prisma 8 PSL\n' + 'formatter and the formatter block from the project config.\n' + 'Communicates over stdio; intended to be spawned by an\n' + 'editor, not run interactively. The server keeps running until the editor client\n' + diff --git a/packages/1-framework/3-tooling/cli/src/orm/telemetry/reporting.ts b/packages/1-framework/3-tooling/cli/src/orm/telemetry/reporting.ts index 4b9af54f2a11..7e1e516b7c02 100644 --- a/packages/1-framework/3-tooling/cli/src/orm/telemetry/reporting.ts +++ b/packages/1-framework/3-tooling/cli/src/orm/telemetry/reporting.ts @@ -25,7 +25,7 @@ function senderPath(): string { function firstRunNotice(configPath: string): string { return [ - 'Prisma Next collects anonymous CLI usage data, enabled by default.', + 'Prisma 8 collects anonymous CLI usage data, enabled by default.', "What's collected and why: https://prisma-next.dev/docs/cli/telemetry.", 'Opt out: run "prisma telemetry disable", set DO_NOT_TRACK=1 or', `PRISMA_NEXT_DISABLE_TELEMETRY=1, or set "enableTelemetry": false in ${configPath}.`, diff --git a/packages/1-framework/3-tooling/cli/test/commands/init/__snapshots__/templates.test.ts.snap b/packages/1-framework/3-tooling/cli/test/commands/init/__snapshots__/templates.test.ts.snap index fe19d86975fb..85d130be0672 100644 --- a/packages/1-framework/3-tooling/cli/test/commands/init/__snapshots__/templates.test.ts.snap +++ b/packages/1-framework/3-tooling/cli/test/commands/init/__snapshots__/templates.test.ts.snap @@ -12,7 +12,7 @@ Generated by \`prisma orm init\` with the Minimal template. ## Available scripts -- \`pnpm run dev\` — run the Prisma Next sample script +- \`pnpm run dev\` — run the Prisma 8 sample script ### Database and migrations @@ -24,18 +24,18 @@ Generated by \`prisma orm init\` with the Minimal template. - \`pnpm run migrate\` — apply the planned MongoDB migration - \`pnpm run db:seed\` — insert sample users manually -## Prisma Next +## Prisma 8 -Prisma Next setup is scaffolded in: +Prisma 8 setup is scaffolded in: - \`prisma/contract.ts\` - \`prisma.config.ts\` - \`prisma/db.ts\` - \`src/lib/prisma.ts\` -For provider-specific Prisma Next reference docs, see \`prisma-next.md\`. Prisma Next skills live in the upstream \`skills/\` directory: https://github.com/prisma/prisma/tree/main/skills. +For provider-specific Prisma 8 reference docs, see \`prisma-next.md\`. Prisma 8 skills live in the upstream \`skills/\` directory: https://github.com/prisma/prisma/tree/main/skills. -Node-based Prisma Next projects expect Node.js 24 LTS or newer. +Node-based Prisma 8 projects expect Node.js 24 LTS or newer. " `; @@ -51,7 +51,7 @@ Generated by \`prisma orm init\` with the Minimal template. ## Available scripts -- \`pnpm run dev\` — run the Prisma Next sample script +- \`pnpm run dev\` — run the Prisma 8 sample script ### Database and migrations @@ -62,18 +62,18 @@ Generated by \`prisma orm init\` with the Minimal template. - \`pnpm run migrate\` — apply a planned migration - \`pnpm run db:seed\` — insert sample users manually (run after \`db:init\`) -## Prisma Next +## Prisma 8 -Prisma Next setup is scaffolded in: +Prisma 8 setup is scaffolded in: - \`prisma/contract.prisma\` - \`prisma.config.ts\` - \`prisma/db.ts\` - \`src/lib/prisma.ts\` -For provider-specific Prisma Next reference docs, see \`prisma-next.md\`. Prisma Next skills live in the upstream \`skills/\` directory: https://github.com/prisma/prisma/tree/main/skills. +For provider-specific Prisma 8 reference docs, see \`prisma-next.md\`. Prisma 8 skills live in the upstream \`skills/\` directory: https://github.com/prisma/prisma/tree/main/skills. -Node-based Prisma Next projects expect Node.js 24 LTS or newer. +Node-based Prisma 8 projects expect Node.js 24 LTS or newer. " `; @@ -107,11 +107,11 @@ export const db = mongo({ `; exports[`templates > per-cell snapshots (FR5.4) > mongo + psl > quickReferenceMd is stable 1`] = ` -"# Welcome to Prisma Next! +"# Welcome to Prisma 8! -Prisma Next lets you query your database in simple, easy-to-read TypeScript. Define what your data looks like, and Prisma Next gives you a fully typed client — with autocomplete for every collection, field, and relation. +Prisma 8 lets you query your database in simple, easy-to-read TypeScript. Define what your data looks like, and Prisma 8 gives you a fully typed client — with autocomplete for every collection, field, and relation. -This project is set up for MongoDB. Prisma Next also supports other databases. +This project is set up for MongoDB. Prisma 8 also supports other databases. ## Requirements @@ -154,7 +154,7 @@ Your contract has two companion files in the same directory: Commit both files to git. When you change your contract, run \`pnpm prisma contract emit\` to update them. -If you use a framework like Next.js or Vite, the Prisma Next plugin will do this for you automatically. +If you use a framework like Next.js or Vite, the Prisma 8 plugin will do this for you automatically. ## Configuration @@ -217,14 +217,14 @@ Multi-document transactions and change streams require MongoDB to run as a **rep - **\`mongodb-memory-server\`:** use \`MongoMemoryReplSet\` instead of \`MongoMemoryServer\` in tests. - **MongoDB Atlas:** every Atlas cluster is already a replica set. -The transaction API (\`db.transaction(...)\`) is on the roadmap and tracked under [TML-2313](https://linear.app/prisma-company/issue/TML-2313/mongo-dev-replica-set-story-is-missing-transactions-change-streams). Prisma Next's Mongo facade does not expose it yet — until that ticket lands, drive transactions yourself with a raw \`MongoClient\` using the escape hatch in the next section. +The transaction API (\`db.transaction(...)\`) is on the roadmap and tracked under [TML-2313](https://linear.app/prisma-company/issue/TML-2313/mongo-dev-replica-set-story-is-missing-transactions-change-streams). Prisma 8's Mongo facade does not expose it yet — until that ticket lands, drive transactions yourself with a raw \`MongoClient\` using the escape hatch in the next section. ## Escape hatches The ORM covers the common cases. For the rest, two escape hatches are designed in: - **Typed raw aggregations — \`db.query\`.** The facade exposes \`db.query\`, a typed builder for aggregation pipelines that runs through the same runtime + middleware + codec stack as \`db.orm\`. Reach for it when the ORM can't express a \`$lookup\`/\`$facet\`/\`$graphLookup\`/window-function pipeline. -- **Direct \`mongodb\` driver control — \`mongoClient\` binding.** Construct your own \`MongoClient\` and pass it to \`mongo({ mongoClient, dbName, contractJson })\`. Your code keeps the \`MongoClient\` reference and uses it directly (transactions, change streams, sessions, anything Prisma Next doesn't surface yet); the same \`db\` object continues to give you the typed ORM. +- **Direct \`mongodb\` driver control — \`mongoClient\` binding.** Construct your own \`MongoClient\` and pass it to \`mongo({ mongoClient, dbName, contractJson })\`. Your code keeps the \`MongoClient\` reference and uses it directly (transactions, change streams, sessions, anything Prisma 8 doesn't surface yet); the same \`db\` object continues to give you the typed ORM. \`db.runtime()\` is **not** the escape hatch — it returns the internal executor (\`MongoRuntime\`), not a \`mongodb\` \`MongoClient\` or \`Db\`. Use \`db.query\` for raw aggregations and the \`mongoClient\` binding for direct driver control. @@ -233,8 +233,8 @@ The ORM covers the common cases. For the rest, two escape hatches are designed i If this project lives inside a pnpm workspace, a few things are worth knowing: - **Catalogs.** When the workspace's \`pnpm-workspace.yaml\` defines a \`catalogs\` entry for \`prisma\` or \`@internal/mongo\`, pnpm uses the catalog version everywhere — \`init\` does too. If you wanted the published \`latest\` instead, update or remove the catalog entry, then re-run \`pnpm install\`. -- **\`pnpm dlx\`.** \`pnpm dlx prisma@next orm init …\` works in any directory. Inside a workspace, pnpm still resolves dependencies through the workspace's catalog/overrides rather than the registry; expect the installed Prisma Next packages to reflect the workspace's catalog rather than \`latest\`. -- **\`pnpm\` → \`npm\` fallback.** If \`pnpm\` ever fails to install Prisma Next with a \`workspace:*\` or \`catalog:\` resolution error (a leak in a published artefact), \`init\` falls back to \`npm install\` and surfaces a warning. Once the offending package republishes a clean version you can switch back with \`pnpm install\`. +- **\`pnpm dlx\`.** \`pnpm dlx prisma@next orm init …\` works in any directory. Inside a workspace, pnpm still resolves dependencies through the workspace's catalog/overrides rather than the registry; expect the installed Prisma 8 packages to reflect the workspace's catalog rather than \`latest\`. +- **\`pnpm\` → \`npm\` fallback.** If \`pnpm\` ever fails to install Prisma 8 with a \`workspace:*\` or \`catalog:\` resolution error (a leak in a published artefact), \`init\` falls back to \`npm install\` and surfaces a warning. Once the offending package republishes a clean version you can switch back with \`pnpm install\`. " `; @@ -291,11 +291,11 @@ export const db = mongo({ `; exports[`templates > per-cell snapshots (FR5.4) > mongo + typescript > quickReferenceMd is stable 1`] = ` -"# Welcome to Prisma Next! +"# Welcome to Prisma 8! -Prisma Next lets you query your database in simple, easy-to-read TypeScript. Define what your data looks like, and Prisma Next gives you a fully typed client — with autocomplete for every collection, field, and relation. +Prisma 8 lets you query your database in simple, easy-to-read TypeScript. Define what your data looks like, and Prisma 8 gives you a fully typed client — with autocomplete for every collection, field, and relation. -This project is set up for MongoDB. Prisma Next also supports other databases. +This project is set up for MongoDB. Prisma 8 also supports other databases. ## Requirements @@ -349,7 +349,7 @@ Your contract has two companion files in the same directory: Commit both files to git. When you change your contract, run \`pnpm prisma contract emit\` to update them. -If you use a framework like Next.js or Vite, the Prisma Next plugin will do this for you automatically. +If you use a framework like Next.js or Vite, the Prisma 8 plugin will do this for you automatically. ## Configuration @@ -412,14 +412,14 @@ Multi-document transactions and change streams require MongoDB to run as a **rep - **\`mongodb-memory-server\`:** use \`MongoMemoryReplSet\` instead of \`MongoMemoryServer\` in tests. - **MongoDB Atlas:** every Atlas cluster is already a replica set. -The transaction API (\`db.transaction(...)\`) is on the roadmap and tracked under [TML-2313](https://linear.app/prisma-company/issue/TML-2313/mongo-dev-replica-set-story-is-missing-transactions-change-streams). Prisma Next's Mongo facade does not expose it yet — until that ticket lands, drive transactions yourself with a raw \`MongoClient\` using the escape hatch in the next section. +The transaction API (\`db.transaction(...)\`) is on the roadmap and tracked under [TML-2313](https://linear.app/prisma-company/issue/TML-2313/mongo-dev-replica-set-story-is-missing-transactions-change-streams). Prisma 8's Mongo facade does not expose it yet — until that ticket lands, drive transactions yourself with a raw \`MongoClient\` using the escape hatch in the next section. ## Escape hatches The ORM covers the common cases. For the rest, two escape hatches are designed in: - **Typed raw aggregations — \`db.query\`.** The facade exposes \`db.query\`, a typed builder for aggregation pipelines that runs through the same runtime + middleware + codec stack as \`db.orm\`. Reach for it when the ORM can't express a \`$lookup\`/\`$facet\`/\`$graphLookup\`/window-function pipeline. -- **Direct \`mongodb\` driver control — \`mongoClient\` binding.** Construct your own \`MongoClient\` and pass it to \`mongo({ mongoClient, dbName, contractJson })\`. Your code keeps the \`MongoClient\` reference and uses it directly (transactions, change streams, sessions, anything Prisma Next doesn't surface yet); the same \`db\` object continues to give you the typed ORM. +- **Direct \`mongodb\` driver control — \`mongoClient\` binding.** Construct your own \`MongoClient\` and pass it to \`mongo({ mongoClient, dbName, contractJson })\`. Your code keeps the \`MongoClient\` reference and uses it directly (transactions, change streams, sessions, anything Prisma 8 doesn't surface yet); the same \`db\` object continues to give you the typed ORM. \`db.runtime()\` is **not** the escape hatch — it returns the internal executor (\`MongoRuntime\`), not a \`mongodb\` \`MongoClient\` or \`Db\`. Use \`db.query\` for raw aggregations and the \`mongoClient\` binding for direct driver control. @@ -428,8 +428,8 @@ The ORM covers the common cases. For the rest, two escape hatches are designed i If this project lives inside a pnpm workspace, a few things are worth knowing: - **Catalogs.** When the workspace's \`pnpm-workspace.yaml\` defines a \`catalogs\` entry for \`prisma\` or \`@internal/mongo\`, pnpm uses the catalog version everywhere — \`init\` does too. If you wanted the published \`latest\` instead, update or remove the catalog entry, then re-run \`pnpm install\`. -- **\`pnpm dlx\`.** \`pnpm dlx prisma@next orm init …\` works in any directory. Inside a workspace, pnpm still resolves dependencies through the workspace's catalog/overrides rather than the registry; expect the installed Prisma Next packages to reflect the workspace's catalog rather than \`latest\`. -- **\`pnpm\` → \`npm\` fallback.** If \`pnpm\` ever fails to install Prisma Next with a \`workspace:*\` or \`catalog:\` resolution error (a leak in a published artefact), \`init\` falls back to \`npm install\` and surfaces a warning. Once the offending package republishes a clean version you can switch back with \`pnpm install\`. +- **\`pnpm dlx\`.** \`pnpm dlx prisma@next orm init …\` works in any directory. Inside a workspace, pnpm still resolves dependencies through the workspace's catalog/overrides rather than the registry; expect the installed Prisma 8 packages to reflect the workspace's catalog rather than \`latest\`. +- **\`pnpm\` → \`npm\` fallback.** If \`pnpm\` ever fails to install Prisma 8 with a \`workspace:*\` or \`catalog:\` resolution error (a leak in a published artefact), \`init\` falls back to \`npm install\` and surfaces a warning. Once the offending package republishes a clean version you can switch back with \`pnpm install\`. " `; @@ -501,11 +501,11 @@ export const db = postgres({ `; exports[`templates > per-cell snapshots (FR5.4) > postgres + psl > quickReferenceMd is stable 1`] = ` -"# Welcome to Prisma Next! +"# Welcome to Prisma 8! -Prisma Next lets you query your database in simple, easy-to-read TypeScript. Define what your data looks like, and Prisma Next gives you a fully typed client — with autocomplete for every table, column, and relation. +Prisma 8 lets you query your database in simple, easy-to-read TypeScript. Define what your data looks like, and Prisma 8 gives you a fully typed client — with autocomplete for every table, column, and relation. -This project is set up for PostgreSQL. Prisma Next also supports other databases. +This project is set up for PostgreSQL. Prisma 8 also supports other databases. ## Requirements @@ -545,7 +545,7 @@ Your contract has two companion files in the same directory: Commit both files to git. When you change your contract, run \`pnpm prisma contract emit\` to update them. -If you use a framework like Next.js or Vite, the Prisma Next plugin will do this for you automatically. +If you use a framework like Next.js or Vite, the Prisma 8 plugin will do this for you automatically. ## Configuration @@ -605,8 +605,8 @@ pnpm prisma migration status # Show migration status If this project lives inside a pnpm workspace, a few things are worth knowing: - **Catalogs.** When the workspace's \`pnpm-workspace.yaml\` defines a \`catalogs\` entry for \`prisma\` or \`@internal/postgres\`, pnpm uses the catalog version everywhere — \`init\` does too. If you wanted the published \`latest\` instead, update or remove the catalog entry, then re-run \`pnpm install\`. -- **\`pnpm dlx\`.** \`pnpm dlx prisma@next orm init …\` works in any directory. Inside a workspace, pnpm still resolves dependencies through the workspace's catalog/overrides rather than the registry; expect the installed Prisma Next packages to reflect the workspace's catalog rather than \`latest\`. -- **\`pnpm\` → \`npm\` fallback.** If \`pnpm\` ever fails to install Prisma Next with a \`workspace:*\` or \`catalog:\` resolution error (a leak in a published artefact), \`init\` falls back to \`npm install\` and surfaces a warning. Once the offending package republishes a clean version you can switch back with \`pnpm install\`. +- **\`pnpm dlx\`.** \`pnpm dlx prisma@next orm init …\` works in any directory. Inside a workspace, pnpm still resolves dependencies through the workspace's catalog/overrides rather than the registry; expect the installed Prisma 8 packages to reflect the workspace's catalog rather than \`latest\`. +- **\`pnpm\` → \`npm\` fallback.** If \`pnpm\` ever fails to install Prisma 8 with a \`workspace:*\` or \`catalog:\` resolution error (a leak in a published artefact), \`init\` falls back to \`npm install\` and surfaces a warning. Once the offending package republishes a clean version you can switch back with \`pnpm install\`. " `; @@ -665,11 +665,11 @@ export const db = postgres({ `; exports[`templates > per-cell snapshots (FR5.4) > postgres + typescript > quickReferenceMd is stable 1`] = ` -"# Welcome to Prisma Next! +"# Welcome to Prisma 8! -Prisma Next lets you query your database in simple, easy-to-read TypeScript. Define what your data looks like, and Prisma Next gives you a fully typed client — with autocomplete for every table, column, and relation. +Prisma 8 lets you query your database in simple, easy-to-read TypeScript. Define what your data looks like, and Prisma 8 gives you a fully typed client — with autocomplete for every table, column, and relation. -This project is set up for PostgreSQL. Prisma Next also supports other databases. +This project is set up for PostgreSQL. Prisma 8 also supports other databases. ## Requirements @@ -720,7 +720,7 @@ Your contract has two companion files in the same directory: Commit both files to git. When you change your contract, run \`pnpm prisma contract emit\` to update them. -If you use a framework like Next.js or Vite, the Prisma Next plugin will do this for you automatically. +If you use a framework like Next.js or Vite, the Prisma 8 plugin will do this for you automatically. ## Configuration @@ -780,8 +780,8 @@ pnpm prisma migration status # Show migration status If this project lives inside a pnpm workspace, a few things are worth knowing: - **Catalogs.** When the workspace's \`pnpm-workspace.yaml\` defines a \`catalogs\` entry for \`prisma\` or \`@internal/postgres\`, pnpm uses the catalog version everywhere — \`init\` does too. If you wanted the published \`latest\` instead, update or remove the catalog entry, then re-run \`pnpm install\`. -- **\`pnpm dlx\`.** \`pnpm dlx prisma@next orm init …\` works in any directory. Inside a workspace, pnpm still resolves dependencies through the workspace's catalog/overrides rather than the registry; expect the installed Prisma Next packages to reflect the workspace's catalog rather than \`latest\`. -- **\`pnpm\` → \`npm\` fallback.** If \`pnpm\` ever fails to install Prisma Next with a \`workspace:*\` or \`catalog:\` resolution error (a leak in a published artefact), \`init\` falls back to \`npm install\` and surfaces a warning. Once the offending package republishes a clean version you can switch back with \`pnpm install\`. +- **\`pnpm dlx\`.** \`pnpm dlx prisma@next orm init …\` works in any directory. Inside a workspace, pnpm still resolves dependencies through the workspace's catalog/overrides rather than the registry; expect the installed Prisma 8 packages to reflect the workspace's catalog rather than \`latest\`. +- **\`pnpm\` → \`npm\` fallback.** If \`pnpm\` ever fails to install Prisma 8 with a \`workspace:*\` or \`catalog:\` resolution error (a leak in a published artefact), \`init\` falls back to \`npm install\` and surfaces a warning. Once the offending package republishes a clean version you can switch back with \`pnpm install\`. " `; diff --git a/packages/1-framework/3-tooling/cli/test/orm/cli.test.ts b/packages/1-framework/3-tooling/cli/test/orm/cli.test.ts index 56e2c9938e86..ec5269dae4ad 100644 --- a/packages/1-framework/3-tooling/cli/test/orm/cli.test.ts +++ b/packages/1-framework/3-tooling/cli/test/orm/cli.test.ts @@ -114,6 +114,19 @@ describe('createOrmCli', () => { }); }); +describe('rendered command-group briefs (orm/#30062)', () => { + it('top-level and orm-group help carry neither Prisma Next nor Prisma ORM', async () => { + const loader = recordingLoader(); + + const topLevel = await harness(loader.loadConfig).run(['--help']); + const ormGroup = await harness(loader.loadConfig).run(['orm', '--help']); + + const rendered = topLevel.stdout + topLevel.stderr + ormGroup.stdout + ormGroup.stderr; + expect(rendered).not.toContain('Prisma Next'); + expect(rendered).not.toContain('Prisma ORM'); + }); +}); + describe("the engine's telemetry command group", () => { it('mounts the three consent commands and their group, mirroring the unified bin', () => { expect(Object.keys(BIN_COMMANDS)).toEqual( diff --git a/packages/1-framework/3-tooling/cli/test/orm/config-section.test.ts b/packages/1-framework/3-tooling/cli/test/orm/config-section.test.ts index 04e1a762f11e..b30da425cc37 100644 --- a/packages/1-framework/3-tooling/cli/test/orm/config-section.test.ts +++ b/packages/1-framework/3-tooling/cli/test/orm/config-section.test.ts @@ -66,7 +66,7 @@ describe('ormConfigSection', () => { { code: 'CONFIG.FILE_NOT_FOUND', severity: 'error', - summary: 'No Prisma Next configuration was loaded', + summary: 'No Prisma 8 configuration was loaded', why: 'The orm config section is absent, so prisma.config.ts was never evaluated.', nextActions: [ { @@ -175,7 +175,7 @@ describe('ormConfigSection', () => { { code: 'CONFIG.VALIDATION_FAILED', severity: 'error', - summary: 'Prisma Next configuration must be an object', + summary: 'Prisma 8 configuration must be an object', why: 'The orm config section is not an object, so no section can be read from it.', nextActions: [ { diff --git a/test/integration/test/cli.rename-user-visible-strings.e2e.test.ts b/test/integration/test/cli.rename-user-visible-strings.e2e.test.ts new file mode 100644 index 000000000000..f4f9d3864efc --- /dev/null +++ b/test/integration/test/cli.rename-user-visible-strings.e2e.test.ts @@ -0,0 +1,78 @@ +import { existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from 'node:fs'; +import { join } from 'node:path'; +import { ormCommandFamily } from '@internal/cli'; +import { createTestCli } from '@prisma/cli-engine/testing'; +import { afterEach, describe, expect, it } from 'vitest'; +import { createIntegrationTestDir, ormEngineMount } from './utils/cli-test-helpers'; + +interface InitDocument { + readonly filesWritten: readonly string[]; +} + +describe('user-visible strings after the Prisma 8 rename (orm/#30062)', () => { + function harness() { + const { commands, groups } = ormEngineMount(); + return createTestCli({ commandFamilies: [ormCommandFamily], commands, groups }); + } + + it('orm init --help does not say Prisma Next', async () => { + const run = await harness().run(['orm', 'init', '--help']); + + expect(run.stdout + run.stderr).not.toContain('Prisma Next'); + }); + + it('lsp --help does not say Prisma Next', async () => { + const run = await harness().run(['lsp', '--help']); + + expect(run.stdout + run.stderr).not.toContain('Prisma Next'); + }); + + describe('orm init scaffold', () => { + let testDir: string; + + afterEach(() => { + if (testDir !== undefined && existsSync(testDir)) { + rmSync(testDir, { recursive: true, force: true }); + } + }); + + it('writes a quick-reference file that does not say Prisma Next', async () => { + testDir = createIntegrationTestDir(); + + const run = await harness().run( + ['orm', 'init', '--target', 'postgres', '--authoring', 'psl', '--skip-install'], + { cwd: testDir }, + ); + + expect(run.exitCode, run.stderr).toBe(0); + const quickReferencePath = join(testDir, 'prisma-next.md'); + expect(existsSync(quickReferencePath)).toBe(true); + const quickReference = readFileSync(quickReferencePath, 'utf-8'); + expect(quickReference).not.toContain('Prisma Next'); + }); + + it('writes every scaffolded file and next step without Prisma Next', async () => { + testDir = createIntegrationTestDir(); + mkdirSync(join(testDir, 'src'), { recursive: true }); + writeFileSync(join(testDir, 'src/index.ts'), 'export {}\n', 'utf-8'); + + const run = await harness().run( + ['orm', 'init', '--target', 'postgres', '--authoring', 'psl', '--skip-install'], + { cwd: testDir }, + ); + + expect(run.exitCode, run.stderr).toBe(0); + const document = run.presented?.data as InitDocument | undefined; + expect(document?.filesWritten).toContain('prisma-next.md'); + expect(document?.filesWritten).toContain('README.md'); + + for (const relPath of document?.filesWritten ?? []) { + const content = readFileSync(join(testDir, relPath), 'utf-8'); + expect(content, relPath).not.toContain('Prisma Next'); + } + + expect(JSON.stringify(run.presented)).not.toContain('Prisma Next'); + expect(run.presented?.presentation.json).toBeDefined(); + }); + }); +}); From 12f690e8ee46318e2cb63403181710796885390a Mon Sep 17 00:00:00 2001 From: Steven McClankerton Date: Wed, 2 Sep 2026 08:04:10 +0000 Subject: [PATCH 2/2] fix(cli): use "Prisma ORM" for user-visible CLI strings Renames the remaining "Prisma Next" occurrences in user-visible CLI surfaces to "Prisma ORM": command briefs and help text, the scaffolded quick-reference and README templates, the telemetry consent notice, config-validation diagnostics, and install-fallback warnings. "Prisma ORM" is version-independent, so these strings do not need revisiting at each major release. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01UcqoY3CKfnubdZt5YQk2Rq Signed-off-by: Steven McClankerton --- .../src/commands/init/hygiene-gitignore.ts | 2 +- .../init/templates/quick-reference-mongo.md | 16 ++-- .../templates/quick-reference-postgres.md | 12 +-- .../commands/init/templates/readme-mongo.md | 10 +-- .../init/templates/readme-postgres.md | 10 +-- .../3-tooling/cli/src/control-api/client.ts | 2 +- .../cli/src/control-api/operations/migrate.ts | 2 +- .../3-tooling/cli/src/control-api/types.ts | 2 +- .../3-tooling/cli/src/exports/control-api.ts | 2 +- .../1-framework/3-tooling/cli/src/orm/cli.ts | 2 +- .../3-tooling/cli/src/orm/config-section.ts | 6 +- .../3-tooling/cli/src/orm/define-command.ts | 2 +- .../3-tooling/cli/src/orm/init-packages.ts | 2 +- .../3-tooling/cli/src/orm/init-scaffold.ts | 4 +- .../1-framework/3-tooling/cli/src/orm/init.ts | 4 +- .../3-tooling/cli/src/orm/load-config.ts | 2 +- .../1-framework/3-tooling/cli/src/orm/lsp.ts | 4 +- .../cli/src/orm/telemetry/reporting.ts | 2 +- .../init/__snapshots__/templates.test.ts.snap | 76 +++++++++--------- .../3-tooling/cli/test/orm/cli.test.ts | 13 ---- .../cli/test/orm/config-section.test.ts | 4 +- ...li.rename-user-visible-strings.e2e.test.ts | 78 ------------------- 22 files changed, 83 insertions(+), 174 deletions(-) delete mode 100644 test/integration/test/cli.rename-user-visible-strings.e2e.test.ts diff --git a/packages/1-framework/3-tooling/cli/src/commands/init/hygiene-gitignore.ts b/packages/1-framework/3-tooling/cli/src/commands/init/hygiene-gitignore.ts index cdb3c4636f17..d87a6a5c0d2d 100644 --- a/packages/1-framework/3-tooling/cli/src/commands/init/hygiene-gitignore.ts +++ b/packages/1-framework/3-tooling/cli/src/commands/init/hygiene-gitignore.ts @@ -1,5 +1,5 @@ /** - * The minimal `.gitignore` lines a Prisma Next scaffold needs (FR3.3). + * The minimal `.gitignore` lines a Prisma ORM scaffold needs (FR3.3). * Order matches what Node tooling typically writes today. * * `node_modules/` first because it's the byte-largest miss; `dist/` diff --git a/packages/1-framework/3-tooling/cli/src/commands/init/templates/quick-reference-mongo.md b/packages/1-framework/3-tooling/cli/src/commands/init/templates/quick-reference-mongo.md index 3dea394a041a..964b91355dbb 100644 --- a/packages/1-framework/3-tooling/cli/src/commands/init/templates/quick-reference-mongo.md +++ b/packages/1-framework/3-tooling/cli/src/commands/init/templates/quick-reference-mongo.md @@ -1,8 +1,8 @@ -# Welcome to Prisma 8! +# Welcome to Prisma ORM! -Prisma 8 lets you query your database in simple, easy-to-read TypeScript. Define what your data looks like, and Prisma 8 gives you a fully typed client — with autocomplete for every collection, field, and relation. +Prisma ORM lets you query your database in simple, easy-to-read TypeScript. Define what your data looks like, and Prisma ORM gives you a fully typed client — with autocomplete for every collection, field, and relation. -This project is set up for MongoDB. Prisma 8 also supports other databases. +This project is set up for MongoDB. Prisma ORM also supports other databases. {{requirements}} @@ -34,7 +34,7 @@ Your contract has two companion files in the same directory: Commit both files to git. When you change your contract, run `{{pkgRun}} contract emit` to update them. -If you use a framework like Next.js or Vite, the Prisma 8 plugin will do this for you automatically. +If you use a framework like Next.js or Vite, the Prisma ORM plugin will do this for you automatically. ## Configuration @@ -97,14 +97,14 @@ Multi-document transactions and change streams require MongoDB to run as a **rep - **`mongodb-memory-server`:** use `MongoMemoryReplSet` instead of `MongoMemoryServer` in tests. - **MongoDB Atlas:** every Atlas cluster is already a replica set. -The transaction API (`db.transaction(...)`) is on the roadmap and tracked under [TML-2313](https://linear.app/prisma-company/issue/TML-2313/mongo-dev-replica-set-story-is-missing-transactions-change-streams). Prisma 8's Mongo facade does not expose it yet — until that ticket lands, drive transactions yourself with a raw `MongoClient` using the escape hatch in the next section. +The transaction API (`db.transaction(...)`) is on the roadmap and tracked under [TML-2313](https://linear.app/prisma-company/issue/TML-2313/mongo-dev-replica-set-story-is-missing-transactions-change-streams). Prisma ORM's Mongo facade does not expose it yet — until that ticket lands, drive transactions yourself with a raw `MongoClient` using the escape hatch in the next section. ## Escape hatches The ORM covers the common cases. For the rest, two escape hatches are designed in: - **Typed raw aggregations — `db.query`.** The facade exposes `db.query`, a typed builder for aggregation pipelines that runs through the same runtime + middleware + codec stack as `db.orm`. Reach for it when the ORM can't express a `$lookup`/`$facet`/`$graphLookup`/window-function pipeline. -- **Direct `mongodb` driver control — `mongoClient` binding.** Construct your own `MongoClient` and pass it to `mongo({ mongoClient, dbName, contractJson })`. Your code keeps the `MongoClient` reference and uses it directly (transactions, change streams, sessions, anything Prisma 8 doesn't surface yet); the same `db` object continues to give you the typed ORM. +- **Direct `mongodb` driver control — `mongoClient` binding.** Construct your own `MongoClient` and pass it to `mongo({ mongoClient, dbName, contractJson })`. Your code keeps the `MongoClient` reference and uses it directly (transactions, change streams, sessions, anything Prisma ORM doesn't surface yet); the same `db` object continues to give you the typed ORM. `db.runtime()` is **not** the escape hatch — it returns the internal executor (`MongoRuntime`), not a `mongodb` `MongoClient` or `Db`. Use `db.query` for raw aggregations and the `mongoClient` binding for direct driver control. @@ -113,5 +113,5 @@ The ORM covers the common cases. For the rest, two escape hatches are designed i If this project lives inside a pnpm workspace, a few things are worth knowing: - **Catalogs.** When the workspace's `pnpm-workspace.yaml` defines a `catalogs` entry for `prisma` or `{{pkg}}`, pnpm uses the catalog version everywhere — `init` does too. If you wanted the published `latest` instead, update or remove the catalog entry, then re-run `pnpm install`. -- **`pnpm dlx`.** `pnpm dlx prisma@next orm init …` works in any directory. Inside a workspace, pnpm still resolves dependencies through the workspace's catalog/overrides rather than the registry; expect the installed Prisma 8 packages to reflect the workspace's catalog rather than `latest`. -- **`pnpm` → `npm` fallback.** If `pnpm` ever fails to install Prisma 8 with a `workspace:*` or `catalog:` resolution error (a leak in a published artefact), `init` falls back to `npm install` and surfaces a warning. Once the offending package republishes a clean version you can switch back with `pnpm install`. +- **`pnpm dlx`.** `pnpm dlx prisma@next orm init …` works in any directory. Inside a workspace, pnpm still resolves dependencies through the workspace's catalog/overrides rather than the registry; expect the installed Prisma ORM packages to reflect the workspace's catalog rather than `latest`. +- **`pnpm` → `npm` fallback.** If `pnpm` ever fails to install Prisma ORM with a `workspace:*` or `catalog:` resolution error (a leak in a published artefact), `init` falls back to `npm install` and surfaces a warning. Once the offending package republishes a clean version you can switch back with `pnpm install`. diff --git a/packages/1-framework/3-tooling/cli/src/commands/init/templates/quick-reference-postgres.md b/packages/1-framework/3-tooling/cli/src/commands/init/templates/quick-reference-postgres.md index d99757909579..14f98620d6c5 100644 --- a/packages/1-framework/3-tooling/cli/src/commands/init/templates/quick-reference-postgres.md +++ b/packages/1-framework/3-tooling/cli/src/commands/init/templates/quick-reference-postgres.md @@ -1,8 +1,8 @@ -# Welcome to Prisma 8! +# Welcome to Prisma ORM! -Prisma 8 lets you query your database in simple, easy-to-read TypeScript. Define what your data looks like, and Prisma 8 gives you a fully typed client — with autocomplete for every table, column, and relation. +Prisma ORM lets you query your database in simple, easy-to-read TypeScript. Define what your data looks like, and Prisma ORM gives you a fully typed client — with autocomplete for every table, column, and relation. -This project is set up for PostgreSQL. Prisma 8 also supports other databases. +This project is set up for PostgreSQL. Prisma ORM also supports other databases. {{requirements}} @@ -32,7 +32,7 @@ Your contract has two companion files in the same directory: Commit both files to git. When you change your contract, run `{{pkgRun}} contract emit` to update them. -If you use a framework like Next.js or Vite, the Prisma 8 plugin will do this for you automatically. +If you use a framework like Next.js or Vite, the Prisma ORM plugin will do this for you automatically. ## Configuration @@ -92,5 +92,5 @@ You can customize how your environment variables are loaded by changing or remov If this project lives inside a pnpm workspace, a few things are worth knowing: - **Catalogs.** When the workspace's `pnpm-workspace.yaml` defines a `catalogs` entry for `prisma` or `{{pkg}}`, pnpm uses the catalog version everywhere — `init` does too. If you wanted the published `latest` instead, update or remove the catalog entry, then re-run `pnpm install`. -- **`pnpm dlx`.** `pnpm dlx prisma@next orm init …` works in any directory. Inside a workspace, pnpm still resolves dependencies through the workspace's catalog/overrides rather than the registry; expect the installed Prisma 8 packages to reflect the workspace's catalog rather than `latest`. -- **`pnpm` → `npm` fallback.** If `pnpm` ever fails to install Prisma 8 with a `workspace:*` or `catalog:` resolution error (a leak in a published artefact), `init` falls back to `npm install` and surfaces a warning. Once the offending package republishes a clean version you can switch back with `pnpm install`. +- **`pnpm dlx`.** `pnpm dlx prisma@next orm init …` works in any directory. Inside a workspace, pnpm still resolves dependencies through the workspace's catalog/overrides rather than the registry; expect the installed Prisma ORM packages to reflect the workspace's catalog rather than `latest`. +- **`pnpm` → `npm` fallback.** If `pnpm` ever fails to install Prisma ORM with a `workspace:*` or `catalog:` resolution error (a leak in a published artefact), `init` falls back to `npm install` and surfaces a warning. Once the offending package republishes a clean version you can switch back with `pnpm install`. diff --git a/packages/1-framework/3-tooling/cli/src/commands/init/templates/readme-mongo.md b/packages/1-framework/3-tooling/cli/src/commands/init/templates/readme-mongo.md index 3e4deb51c228..6496cdc89560 100644 --- a/packages/1-framework/3-tooling/cli/src/commands/init/templates/readme-mongo.md +++ b/packages/1-framework/3-tooling/cli/src/commands/init/templates/readme-mongo.md @@ -9,7 +9,7 @@ Generated by `prisma orm init` with the Minimal template. ## Available scripts -- `{{runDev}}` — run the Prisma 8 sample script +- `{{runDev}}` — run the Prisma ORM sample script ### Database and migrations @@ -21,15 +21,15 @@ Generated by `prisma orm init` with the Minimal template. - `{{runMigrate}}` — apply the planned MongoDB migration - `{{runDbSeed}}` — insert sample users manually -## Prisma 8 +## Prisma ORM -Prisma 8 setup is scaffolded in: +Prisma ORM setup is scaffolded in: - `{{contractPath}}` - `prisma.config.ts` - `prisma/db.ts` - `src/lib/prisma.ts` -For provider-specific Prisma 8 reference docs, see `prisma-next.md`. Prisma 8 skills live in the upstream `skills/` directory: https://github.com/prisma/prisma/tree/main/skills. +For provider-specific Prisma ORM reference docs, see `prisma-next.md`. Prisma ORM skills live in the upstream `skills/` directory: https://github.com/prisma/prisma/tree/main/skills. -Node-based Prisma 8 projects expect Node.js 24 LTS or newer. +Node-based Prisma ORM projects expect Node.js 24 LTS or newer. diff --git a/packages/1-framework/3-tooling/cli/src/commands/init/templates/readme-postgres.md b/packages/1-framework/3-tooling/cli/src/commands/init/templates/readme-postgres.md index 2080e6f5ae51..55b875a8ea3d 100644 --- a/packages/1-framework/3-tooling/cli/src/commands/init/templates/readme-postgres.md +++ b/packages/1-framework/3-tooling/cli/src/commands/init/templates/readme-postgres.md @@ -9,7 +9,7 @@ Generated by `prisma orm init` with the Minimal template. ## Available scripts -- `{{runDev}}` — run the Prisma 8 sample script +- `{{runDev}}` — run the Prisma ORM sample script ### Database and migrations @@ -20,15 +20,15 @@ Generated by `prisma orm init` with the Minimal template. - `{{runMigrate}}` — apply a planned migration - `{{runDbSeed}}` — insert sample users manually (run after `db:init`) -## Prisma 8 +## Prisma ORM -Prisma 8 setup is scaffolded in: +Prisma ORM setup is scaffolded in: - `{{contractPath}}` - `prisma.config.ts` - `prisma/db.ts` - `src/lib/prisma.ts` -For provider-specific Prisma 8 reference docs, see `prisma-next.md`. Prisma 8 skills live in the upstream `skills/` directory: https://github.com/prisma/prisma/tree/main/skills. +For provider-specific Prisma ORM reference docs, see `prisma-next.md`. Prisma ORM skills live in the upstream `skills/` directory: https://github.com/prisma/prisma/tree/main/skills. -Node-based Prisma 8 projects expect Node.js 24 LTS or newer. +Node-based Prisma ORM projects expect Node.js 24 LTS or newer. diff --git a/packages/1-framework/3-tooling/cli/src/control-api/client.ts b/packages/1-framework/3-tooling/cli/src/control-api/client.ts index 1a28bb930321..b61d5dbbee06 100644 --- a/packages/1-framework/3-tooling/cli/src/control-api/client.ts +++ b/packages/1-framework/3-tooling/cli/src/control-api/client.ts @@ -57,7 +57,7 @@ import type { } from './types'; /** - * Creates a programmatic control client for Prisma Next operations. + * Creates a programmatic control client for Prisma ORM operations. * * The client accepts framework component descriptors at creation time, * manages driver lifecycle via connect()/close(), and exposes domain diff --git a/packages/1-framework/3-tooling/cli/src/control-api/operations/migrate.ts b/packages/1-framework/3-tooling/cli/src/control-api/operations/migrate.ts index 34578b795262..d9d6df5647d7 100644 --- a/packages/1-framework/3-tooling/cli/src/control-api/operations/migrate.ts +++ b/packages/1-framework/3-tooling/cli/src/control-api/operations/migrate.ts @@ -413,7 +413,7 @@ export function planSpacePath({ // migration packages at all. Advancing the marker without migrations // (the db-init aggregate planner's declared-state strategy, mirrored // here) is valid exclusively when every element the space declares is - // externally managed — nothing Prisma Next owns exists in such a space + // externally managed — nothing Prisma ORM owns exists in such a space // (e.g. Supabase's auth/storage), so its declared state needs no // migration to be true, and there is no command that could author an // edge for it. A space that declares a managed element but ships no diff --git a/packages/1-framework/3-tooling/cli/src/control-api/types.ts b/packages/1-framework/3-tooling/cli/src/control-api/types.ts index 091700537f4e..fef9cfeca4ed 100644 --- a/packages/1-framework/3-tooling/cli/src/control-api/types.ts +++ b/packages/1-framework/3-tooling/cli/src/control-api/types.ts @@ -841,7 +841,7 @@ export interface ContractEmitResult { // ============================================================================ /** - * Programmatic control client for Prisma Next operations. + * Programmatic control client for Prisma ORM operations. * * Lifecycle: `connect(connection)` before operations, `close()` when done. * Both `init()` and `connect()` are auto-called by operations if needed, diff --git a/packages/1-framework/3-tooling/cli/src/exports/control-api.ts b/packages/1-framework/3-tooling/cli/src/exports/control-api.ts index 7b88d5021c87..3752c11eaed6 100644 --- a/packages/1-framework/3-tooling/cli/src/exports/control-api.ts +++ b/packages/1-framework/3-tooling/cli/src/exports/control-api.ts @@ -1,5 +1,5 @@ /** - * Programmatic Control API for Prisma Next. + * Programmatic Control API for Prisma ORM. * * This module exports the control client factory and types for programmatic * access to control-plane operations without using the CLI. diff --git a/packages/1-framework/3-tooling/cli/src/orm/cli.ts b/packages/1-framework/3-tooling/cli/src/orm/cli.ts index b3bb32c30769..cd3a69d8a6a1 100644 --- a/packages/1-framework/3-tooling/cli/src/orm/cli.ts +++ b/packages/1-framework/3-tooling/cli/src/orm/cli.ts @@ -55,7 +55,7 @@ const telemetry = telemetryCommandGroup({ docsUrl: TELEMETRY_DOCS_URL }); export const BIN_GROUPS = { orm: { - brief: 'Initialize a Prisma 8 project', + brief: 'Initialize a Prisma ORM project', description: 'Project initialization for the ORM. The other ORM commands mount under\n' + 'their workflow groups (contract, db, migration); only init lives here.', diff --git a/packages/1-framework/3-tooling/cli/src/orm/config-section.ts b/packages/1-framework/3-tooling/cli/src/orm/config-section.ts index e1f318ab7f6f..cb0d885eba06 100644 --- a/packages/1-framework/3-tooling/cli/src/orm/config-section.ts +++ b/packages/1-framework/3-tooling/cli/src/orm/config-section.ts @@ -40,7 +40,7 @@ function sectionAbsentDiagnostic(): Diagnostic { return { code: 'CONFIG.FILE_NOT_FOUND', severity: 'error', - summary: 'No Prisma 8 configuration was loaded', + summary: 'No Prisma ORM configuration was loaded', why: `The ${ORM_CONFIG_SECTION_NAME} config section is absent, so prisma.config.ts was never evaluated.`, nextActions: [MISSING_CONFIG_ACTION], }; @@ -50,7 +50,7 @@ function notAnObjectDiagnostic(): Diagnostic { return { code: 'CONFIG.VALIDATION_FAILED', severity: 'error', - summary: 'Prisma 8 configuration must be an object', + summary: 'Prisma ORM configuration must be an object', why: `The ${ORM_CONFIG_SECTION_NAME} config section is not an object, so no section can be read from it.`, nextActions: [ { kind: 'edit-file', label: 'Export a configuration object from prisma.config.ts' }, @@ -62,7 +62,7 @@ function unreadableDiagnostic(error: unknown): Diagnostic { return { code: 'CONFIG.VALIDATION_FAILED', severity: 'error', - summary: 'Prisma 8 configuration could not be inspected', + summary: 'Prisma ORM configuration could not be inspected', why: error instanceof Error ? error.message : String(error), nextActions: [ { diff --git a/packages/1-framework/3-tooling/cli/src/orm/define-command.ts b/packages/1-framework/3-tooling/cli/src/orm/define-command.ts index 368cf67f8bdc..391292999705 100644 --- a/packages/1-framework/3-tooling/cli/src/orm/define-command.ts +++ b/packages/1-framework/3-tooling/cli/src/orm/define-command.ts @@ -27,7 +27,7 @@ import { normalizeError } from './normalize-error'; * * An `InternalError` is the one thing this boundary does not convert. Its own contract says never * to catch it outside the outermost boundary: it means an invariant broke, which is a bug in - * Prisma Next rather than something the user did. Re-throwing lets the engine settle it as a bug + * Prisma ORM rather than something the user did. Re-throwing lets the engine settle it as a bug * at exit 1, where converting it would report the same number as a bad connection string. */ function isRecord(value: unknown): value is Record { diff --git a/packages/1-framework/3-tooling/cli/src/orm/init-packages.ts b/packages/1-framework/3-tooling/cli/src/orm/init-packages.ts index 3da7696416ab..f8297ee2f009 100644 --- a/packages/1-framework/3-tooling/cli/src/orm/init-packages.ts +++ b/packages/1-framework/3-tooling/cli/src/orm/init-packages.ts @@ -44,7 +44,7 @@ function pnpmLeakedASpecifier(failure: CliStructuredError): boolean { function fallbackWarning(failure: CliStructuredError): string { const firstLine = redactSecrets(metaString(failure, 'stderrTail')).trim().split('\n')[0] ?? ''; return [ - 'pnpm could not install: a published Prisma 8 dependency leaked a `workspace:*` or `catalog:` specifier.', + 'pnpm could not install: a published Prisma ORM dependency leaked a `workspace:*` or `catalog:` specifier.', 'Falling back to npm so init can complete.', firstLine === '' ? '' : ` pnpm error: ${firstLine}`, 'Both installs ran under npm, which writes a package-lock.json beside the pnpm lockfile — delete whichever of the two you do not want to keep.', diff --git a/packages/1-framework/3-tooling/cli/src/orm/init-scaffold.ts b/packages/1-framework/3-tooling/cli/src/orm/init-scaffold.ts index 1ebb99eb432a..c30568c7737b 100644 --- a/packages/1-framework/3-tooling/cli/src/orm/init-scaffold.ts +++ b/packages/1-framework/3-tooling/cli/src/orm/init-scaffold.ts @@ -51,7 +51,7 @@ const ENV_EXAMPLE_FILE = '.env.example'; * one of these is the destructive act consent is asked for. * * `.env.example` is written the same way but deliberately left out: it is a - * conventional filename in projects that have never seen Prisma Next, and a + * conventional filename in projects that have never seen Prisma ORM, and a * consent token demanded for it would fire on first runs. The scaffold warns * when it replaces one instead. */ @@ -201,7 +201,7 @@ function planScaffold(ctx: { if (existsSync(join(cwd, ENV_EXAMPLE_FILE))) { warnings.push( - `${ENV_EXAMPLE_FILE} already existed and was replaced with the Prisma 8 template.`, + `${ENV_EXAMPLE_FILE} already existed and was replaced with the Prisma ORM template.`, ); } diff --git a/packages/1-framework/3-tooling/cli/src/orm/init.ts b/packages/1-framework/3-tooling/cli/src/orm/init.ts index 8ba5aafe399c..4be9a78fa422 100644 --- a/packages/1-framework/3-tooling/cli/src/orm/init.ts +++ b/packages/1-framework/3-tooling/cli/src/orm/init.ts @@ -65,7 +65,7 @@ export interface InitCommandDependencies { export const createInitCommand = (injected: InitCommandDependencies) => defineOrmCommand({ help: { - summary: 'Initialize a new Prisma 8 project', + summary: 'Initialize a new Prisma ORM project', description: 'Scaffolds config, schema, and runtime files, installs dependencies,\n' + 'and emits the contract. Gets you from zero to typed queries in one step.\n' + @@ -188,7 +188,7 @@ export const createInitCommand = (injected: InitCommandDependencies) => { why: `The success document failed schema validation: ${String(validated)}`, nextActions: [ - chooseAction('This is a bug in Prisma 8. Please report it with `-v` output.'), + chooseAction('This is a bug in Prisma ORM. Please report it with `-v` output.'), ], docsUrl: docsUrlFor('CLI.INIT_INVALID_OUTPUT_DOCUMENT'), }, diff --git a/packages/1-framework/3-tooling/cli/src/orm/load-config.ts b/packages/1-framework/3-tooling/cli/src/orm/load-config.ts index fc9037ed33c3..e8221f2a7b50 100644 --- a/packages/1-framework/3-tooling/cli/src/orm/load-config.ts +++ b/packages/1-framework/3-tooling/cli/src/orm/load-config.ts @@ -20,7 +20,7 @@ export interface LoadOrmConfigOptions { * The engine ships its own synchronous loader, but the bin owns the load: the * ORM's c12 loader evaluates the module asynchronously and finalizes paths * against the config file's own directory. It reads the same shape the engine - * does — defineConfig from `@prisma/cli-engine` with the whole Prisma Next + * does — defineConfig from `@prisma/cli-engine` with the whole Prisma ORM * configuration nested as the single `orm` section. * * Only failures that prevent evaluation entirely are diagnostics here, and diff --git a/packages/1-framework/3-tooling/cli/src/orm/lsp.ts b/packages/1-framework/3-tooling/cli/src/orm/lsp.ts index 3fbb38e0f17c..e35d6e820a06 100644 --- a/packages/1-framework/3-tooling/cli/src/orm/lsp.ts +++ b/packages/1-framework/3-tooling/cli/src/orm/lsp.ts @@ -16,11 +16,11 @@ function signalExitCode(reason: unknown): number { export const lspCommand = defineServerCommand({ help: { - summary: 'Start the Prisma 8 language server', + summary: 'Start the Prisma ORM language server', description: 'Launches a Language Server Protocol server that publishes PSL parse diagnostics\n' + 'and handles whole-document PSL formatting for the schema inputs declared in\n' + - 'your config (contract.source.inputs). Formatting uses the Prisma 8 PSL\n' + + 'your config (contract.source.inputs). Formatting uses the Prisma ORM PSL\n' + 'formatter and the formatter block from the project config.\n' + 'Communicates over stdio; intended to be spawned by an\n' + 'editor, not run interactively. The server keeps running until the editor client\n' + diff --git a/packages/1-framework/3-tooling/cli/src/orm/telemetry/reporting.ts b/packages/1-framework/3-tooling/cli/src/orm/telemetry/reporting.ts index 7e1e516b7c02..053615bc7bf9 100644 --- a/packages/1-framework/3-tooling/cli/src/orm/telemetry/reporting.ts +++ b/packages/1-framework/3-tooling/cli/src/orm/telemetry/reporting.ts @@ -25,7 +25,7 @@ function senderPath(): string { function firstRunNotice(configPath: string): string { return [ - 'Prisma 8 collects anonymous CLI usage data, enabled by default.', + 'Prisma ORM collects anonymous CLI usage data, enabled by default.', "What's collected and why: https://prisma-next.dev/docs/cli/telemetry.", 'Opt out: run "prisma telemetry disable", set DO_NOT_TRACK=1 or', `PRISMA_NEXT_DISABLE_TELEMETRY=1, or set "enableTelemetry": false in ${configPath}.`, diff --git a/packages/1-framework/3-tooling/cli/test/commands/init/__snapshots__/templates.test.ts.snap b/packages/1-framework/3-tooling/cli/test/commands/init/__snapshots__/templates.test.ts.snap index 85d130be0672..b6bf7bc5b910 100644 --- a/packages/1-framework/3-tooling/cli/test/commands/init/__snapshots__/templates.test.ts.snap +++ b/packages/1-framework/3-tooling/cli/test/commands/init/__snapshots__/templates.test.ts.snap @@ -12,7 +12,7 @@ Generated by \`prisma orm init\` with the Minimal template. ## Available scripts -- \`pnpm run dev\` — run the Prisma 8 sample script +- \`pnpm run dev\` — run the Prisma ORM sample script ### Database and migrations @@ -24,18 +24,18 @@ Generated by \`prisma orm init\` with the Minimal template. - \`pnpm run migrate\` — apply the planned MongoDB migration - \`pnpm run db:seed\` — insert sample users manually -## Prisma 8 +## Prisma ORM -Prisma 8 setup is scaffolded in: +Prisma ORM setup is scaffolded in: - \`prisma/contract.ts\` - \`prisma.config.ts\` - \`prisma/db.ts\` - \`src/lib/prisma.ts\` -For provider-specific Prisma 8 reference docs, see \`prisma-next.md\`. Prisma 8 skills live in the upstream \`skills/\` directory: https://github.com/prisma/prisma/tree/main/skills. +For provider-specific Prisma ORM reference docs, see \`prisma-next.md\`. Prisma ORM skills live in the upstream \`skills/\` directory: https://github.com/prisma/prisma/tree/main/skills. -Node-based Prisma 8 projects expect Node.js 24 LTS or newer. +Node-based Prisma ORM projects expect Node.js 24 LTS or newer. " `; @@ -51,7 +51,7 @@ Generated by \`prisma orm init\` with the Minimal template. ## Available scripts -- \`pnpm run dev\` — run the Prisma 8 sample script +- \`pnpm run dev\` — run the Prisma ORM sample script ### Database and migrations @@ -62,18 +62,18 @@ Generated by \`prisma orm init\` with the Minimal template. - \`pnpm run migrate\` — apply a planned migration - \`pnpm run db:seed\` — insert sample users manually (run after \`db:init\`) -## Prisma 8 +## Prisma ORM -Prisma 8 setup is scaffolded in: +Prisma ORM setup is scaffolded in: - \`prisma/contract.prisma\` - \`prisma.config.ts\` - \`prisma/db.ts\` - \`src/lib/prisma.ts\` -For provider-specific Prisma 8 reference docs, see \`prisma-next.md\`. Prisma 8 skills live in the upstream \`skills/\` directory: https://github.com/prisma/prisma/tree/main/skills. +For provider-specific Prisma ORM reference docs, see \`prisma-next.md\`. Prisma ORM skills live in the upstream \`skills/\` directory: https://github.com/prisma/prisma/tree/main/skills. -Node-based Prisma 8 projects expect Node.js 24 LTS or newer. +Node-based Prisma ORM projects expect Node.js 24 LTS or newer. " `; @@ -107,11 +107,11 @@ export const db = mongo({ `; exports[`templates > per-cell snapshots (FR5.4) > mongo + psl > quickReferenceMd is stable 1`] = ` -"# Welcome to Prisma 8! +"# Welcome to Prisma ORM! -Prisma 8 lets you query your database in simple, easy-to-read TypeScript. Define what your data looks like, and Prisma 8 gives you a fully typed client — with autocomplete for every collection, field, and relation. +Prisma ORM lets you query your database in simple, easy-to-read TypeScript. Define what your data looks like, and Prisma ORM gives you a fully typed client — with autocomplete for every collection, field, and relation. -This project is set up for MongoDB. Prisma 8 also supports other databases. +This project is set up for MongoDB. Prisma ORM also supports other databases. ## Requirements @@ -154,7 +154,7 @@ Your contract has two companion files in the same directory: Commit both files to git. When you change your contract, run \`pnpm prisma contract emit\` to update them. -If you use a framework like Next.js or Vite, the Prisma 8 plugin will do this for you automatically. +If you use a framework like Next.js or Vite, the Prisma ORM plugin will do this for you automatically. ## Configuration @@ -217,14 +217,14 @@ Multi-document transactions and change streams require MongoDB to run as a **rep - **\`mongodb-memory-server\`:** use \`MongoMemoryReplSet\` instead of \`MongoMemoryServer\` in tests. - **MongoDB Atlas:** every Atlas cluster is already a replica set. -The transaction API (\`db.transaction(...)\`) is on the roadmap and tracked under [TML-2313](https://linear.app/prisma-company/issue/TML-2313/mongo-dev-replica-set-story-is-missing-transactions-change-streams). Prisma 8's Mongo facade does not expose it yet — until that ticket lands, drive transactions yourself with a raw \`MongoClient\` using the escape hatch in the next section. +The transaction API (\`db.transaction(...)\`) is on the roadmap and tracked under [TML-2313](https://linear.app/prisma-company/issue/TML-2313/mongo-dev-replica-set-story-is-missing-transactions-change-streams). Prisma ORM's Mongo facade does not expose it yet — until that ticket lands, drive transactions yourself with a raw \`MongoClient\` using the escape hatch in the next section. ## Escape hatches The ORM covers the common cases. For the rest, two escape hatches are designed in: - **Typed raw aggregations — \`db.query\`.** The facade exposes \`db.query\`, a typed builder for aggregation pipelines that runs through the same runtime + middleware + codec stack as \`db.orm\`. Reach for it when the ORM can't express a \`$lookup\`/\`$facet\`/\`$graphLookup\`/window-function pipeline. -- **Direct \`mongodb\` driver control — \`mongoClient\` binding.** Construct your own \`MongoClient\` and pass it to \`mongo({ mongoClient, dbName, contractJson })\`. Your code keeps the \`MongoClient\` reference and uses it directly (transactions, change streams, sessions, anything Prisma 8 doesn't surface yet); the same \`db\` object continues to give you the typed ORM. +- **Direct \`mongodb\` driver control — \`mongoClient\` binding.** Construct your own \`MongoClient\` and pass it to \`mongo({ mongoClient, dbName, contractJson })\`. Your code keeps the \`MongoClient\` reference and uses it directly (transactions, change streams, sessions, anything Prisma ORM doesn't surface yet); the same \`db\` object continues to give you the typed ORM. \`db.runtime()\` is **not** the escape hatch — it returns the internal executor (\`MongoRuntime\`), not a \`mongodb\` \`MongoClient\` or \`Db\`. Use \`db.query\` for raw aggregations and the \`mongoClient\` binding for direct driver control. @@ -233,8 +233,8 @@ The ORM covers the common cases. For the rest, two escape hatches are designed i If this project lives inside a pnpm workspace, a few things are worth knowing: - **Catalogs.** When the workspace's \`pnpm-workspace.yaml\` defines a \`catalogs\` entry for \`prisma\` or \`@internal/mongo\`, pnpm uses the catalog version everywhere — \`init\` does too. If you wanted the published \`latest\` instead, update or remove the catalog entry, then re-run \`pnpm install\`. -- **\`pnpm dlx\`.** \`pnpm dlx prisma@next orm init …\` works in any directory. Inside a workspace, pnpm still resolves dependencies through the workspace's catalog/overrides rather than the registry; expect the installed Prisma 8 packages to reflect the workspace's catalog rather than \`latest\`. -- **\`pnpm\` → \`npm\` fallback.** If \`pnpm\` ever fails to install Prisma 8 with a \`workspace:*\` or \`catalog:\` resolution error (a leak in a published artefact), \`init\` falls back to \`npm install\` and surfaces a warning. Once the offending package republishes a clean version you can switch back with \`pnpm install\`. +- **\`pnpm dlx\`.** \`pnpm dlx prisma@next orm init …\` works in any directory. Inside a workspace, pnpm still resolves dependencies through the workspace's catalog/overrides rather than the registry; expect the installed Prisma ORM packages to reflect the workspace's catalog rather than \`latest\`. +- **\`pnpm\` → \`npm\` fallback.** If \`pnpm\` ever fails to install Prisma ORM with a \`workspace:*\` or \`catalog:\` resolution error (a leak in a published artefact), \`init\` falls back to \`npm install\` and surfaces a warning. Once the offending package republishes a clean version you can switch back with \`pnpm install\`. " `; @@ -291,11 +291,11 @@ export const db = mongo({ `; exports[`templates > per-cell snapshots (FR5.4) > mongo + typescript > quickReferenceMd is stable 1`] = ` -"# Welcome to Prisma 8! +"# Welcome to Prisma ORM! -Prisma 8 lets you query your database in simple, easy-to-read TypeScript. Define what your data looks like, and Prisma 8 gives you a fully typed client — with autocomplete for every collection, field, and relation. +Prisma ORM lets you query your database in simple, easy-to-read TypeScript. Define what your data looks like, and Prisma ORM gives you a fully typed client — with autocomplete for every collection, field, and relation. -This project is set up for MongoDB. Prisma 8 also supports other databases. +This project is set up for MongoDB. Prisma ORM also supports other databases. ## Requirements @@ -349,7 +349,7 @@ Your contract has two companion files in the same directory: Commit both files to git. When you change your contract, run \`pnpm prisma contract emit\` to update them. -If you use a framework like Next.js or Vite, the Prisma 8 plugin will do this for you automatically. +If you use a framework like Next.js or Vite, the Prisma ORM plugin will do this for you automatically. ## Configuration @@ -412,14 +412,14 @@ Multi-document transactions and change streams require MongoDB to run as a **rep - **\`mongodb-memory-server\`:** use \`MongoMemoryReplSet\` instead of \`MongoMemoryServer\` in tests. - **MongoDB Atlas:** every Atlas cluster is already a replica set. -The transaction API (\`db.transaction(...)\`) is on the roadmap and tracked under [TML-2313](https://linear.app/prisma-company/issue/TML-2313/mongo-dev-replica-set-story-is-missing-transactions-change-streams). Prisma 8's Mongo facade does not expose it yet — until that ticket lands, drive transactions yourself with a raw \`MongoClient\` using the escape hatch in the next section. +The transaction API (\`db.transaction(...)\`) is on the roadmap and tracked under [TML-2313](https://linear.app/prisma-company/issue/TML-2313/mongo-dev-replica-set-story-is-missing-transactions-change-streams). Prisma ORM's Mongo facade does not expose it yet — until that ticket lands, drive transactions yourself with a raw \`MongoClient\` using the escape hatch in the next section. ## Escape hatches The ORM covers the common cases. For the rest, two escape hatches are designed in: - **Typed raw aggregations — \`db.query\`.** The facade exposes \`db.query\`, a typed builder for aggregation pipelines that runs through the same runtime + middleware + codec stack as \`db.orm\`. Reach for it when the ORM can't express a \`$lookup\`/\`$facet\`/\`$graphLookup\`/window-function pipeline. -- **Direct \`mongodb\` driver control — \`mongoClient\` binding.** Construct your own \`MongoClient\` and pass it to \`mongo({ mongoClient, dbName, contractJson })\`. Your code keeps the \`MongoClient\` reference and uses it directly (transactions, change streams, sessions, anything Prisma 8 doesn't surface yet); the same \`db\` object continues to give you the typed ORM. +- **Direct \`mongodb\` driver control — \`mongoClient\` binding.** Construct your own \`MongoClient\` and pass it to \`mongo({ mongoClient, dbName, contractJson })\`. Your code keeps the \`MongoClient\` reference and uses it directly (transactions, change streams, sessions, anything Prisma ORM doesn't surface yet); the same \`db\` object continues to give you the typed ORM. \`db.runtime()\` is **not** the escape hatch — it returns the internal executor (\`MongoRuntime\`), not a \`mongodb\` \`MongoClient\` or \`Db\`. Use \`db.query\` for raw aggregations and the \`mongoClient\` binding for direct driver control. @@ -428,8 +428,8 @@ The ORM covers the common cases. For the rest, two escape hatches are designed i If this project lives inside a pnpm workspace, a few things are worth knowing: - **Catalogs.** When the workspace's \`pnpm-workspace.yaml\` defines a \`catalogs\` entry for \`prisma\` or \`@internal/mongo\`, pnpm uses the catalog version everywhere — \`init\` does too. If you wanted the published \`latest\` instead, update or remove the catalog entry, then re-run \`pnpm install\`. -- **\`pnpm dlx\`.** \`pnpm dlx prisma@next orm init …\` works in any directory. Inside a workspace, pnpm still resolves dependencies through the workspace's catalog/overrides rather than the registry; expect the installed Prisma 8 packages to reflect the workspace's catalog rather than \`latest\`. -- **\`pnpm\` → \`npm\` fallback.** If \`pnpm\` ever fails to install Prisma 8 with a \`workspace:*\` or \`catalog:\` resolution error (a leak in a published artefact), \`init\` falls back to \`npm install\` and surfaces a warning. Once the offending package republishes a clean version you can switch back with \`pnpm install\`. +- **\`pnpm dlx\`.** \`pnpm dlx prisma@next orm init …\` works in any directory. Inside a workspace, pnpm still resolves dependencies through the workspace's catalog/overrides rather than the registry; expect the installed Prisma ORM packages to reflect the workspace's catalog rather than \`latest\`. +- **\`pnpm\` → \`npm\` fallback.** If \`pnpm\` ever fails to install Prisma ORM with a \`workspace:*\` or \`catalog:\` resolution error (a leak in a published artefact), \`init\` falls back to \`npm install\` and surfaces a warning. Once the offending package republishes a clean version you can switch back with \`pnpm install\`. " `; @@ -501,11 +501,11 @@ export const db = postgres({ `; exports[`templates > per-cell snapshots (FR5.4) > postgres + psl > quickReferenceMd is stable 1`] = ` -"# Welcome to Prisma 8! +"# Welcome to Prisma ORM! -Prisma 8 lets you query your database in simple, easy-to-read TypeScript. Define what your data looks like, and Prisma 8 gives you a fully typed client — with autocomplete for every table, column, and relation. +Prisma ORM lets you query your database in simple, easy-to-read TypeScript. Define what your data looks like, and Prisma ORM gives you a fully typed client — with autocomplete for every table, column, and relation. -This project is set up for PostgreSQL. Prisma 8 also supports other databases. +This project is set up for PostgreSQL. Prisma ORM also supports other databases. ## Requirements @@ -545,7 +545,7 @@ Your contract has two companion files in the same directory: Commit both files to git. When you change your contract, run \`pnpm prisma contract emit\` to update them. -If you use a framework like Next.js or Vite, the Prisma 8 plugin will do this for you automatically. +If you use a framework like Next.js or Vite, the Prisma ORM plugin will do this for you automatically. ## Configuration @@ -605,8 +605,8 @@ pnpm prisma migration status # Show migration status If this project lives inside a pnpm workspace, a few things are worth knowing: - **Catalogs.** When the workspace's \`pnpm-workspace.yaml\` defines a \`catalogs\` entry for \`prisma\` or \`@internal/postgres\`, pnpm uses the catalog version everywhere — \`init\` does too. If you wanted the published \`latest\` instead, update or remove the catalog entry, then re-run \`pnpm install\`. -- **\`pnpm dlx\`.** \`pnpm dlx prisma@next orm init …\` works in any directory. Inside a workspace, pnpm still resolves dependencies through the workspace's catalog/overrides rather than the registry; expect the installed Prisma 8 packages to reflect the workspace's catalog rather than \`latest\`. -- **\`pnpm\` → \`npm\` fallback.** If \`pnpm\` ever fails to install Prisma 8 with a \`workspace:*\` or \`catalog:\` resolution error (a leak in a published artefact), \`init\` falls back to \`npm install\` and surfaces a warning. Once the offending package republishes a clean version you can switch back with \`pnpm install\`. +- **\`pnpm dlx\`.** \`pnpm dlx prisma@next orm init …\` works in any directory. Inside a workspace, pnpm still resolves dependencies through the workspace's catalog/overrides rather than the registry; expect the installed Prisma ORM packages to reflect the workspace's catalog rather than \`latest\`. +- **\`pnpm\` → \`npm\` fallback.** If \`pnpm\` ever fails to install Prisma ORM with a \`workspace:*\` or \`catalog:\` resolution error (a leak in a published artefact), \`init\` falls back to \`npm install\` and surfaces a warning. Once the offending package republishes a clean version you can switch back with \`pnpm install\`. " `; @@ -665,11 +665,11 @@ export const db = postgres({ `; exports[`templates > per-cell snapshots (FR5.4) > postgres + typescript > quickReferenceMd is stable 1`] = ` -"# Welcome to Prisma 8! +"# Welcome to Prisma ORM! -Prisma 8 lets you query your database in simple, easy-to-read TypeScript. Define what your data looks like, and Prisma 8 gives you a fully typed client — with autocomplete for every table, column, and relation. +Prisma ORM lets you query your database in simple, easy-to-read TypeScript. Define what your data looks like, and Prisma ORM gives you a fully typed client — with autocomplete for every table, column, and relation. -This project is set up for PostgreSQL. Prisma 8 also supports other databases. +This project is set up for PostgreSQL. Prisma ORM also supports other databases. ## Requirements @@ -720,7 +720,7 @@ Your contract has two companion files in the same directory: Commit both files to git. When you change your contract, run \`pnpm prisma contract emit\` to update them. -If you use a framework like Next.js or Vite, the Prisma 8 plugin will do this for you automatically. +If you use a framework like Next.js or Vite, the Prisma ORM plugin will do this for you automatically. ## Configuration @@ -780,8 +780,8 @@ pnpm prisma migration status # Show migration status If this project lives inside a pnpm workspace, a few things are worth knowing: - **Catalogs.** When the workspace's \`pnpm-workspace.yaml\` defines a \`catalogs\` entry for \`prisma\` or \`@internal/postgres\`, pnpm uses the catalog version everywhere — \`init\` does too. If you wanted the published \`latest\` instead, update or remove the catalog entry, then re-run \`pnpm install\`. -- **\`pnpm dlx\`.** \`pnpm dlx prisma@next orm init …\` works in any directory. Inside a workspace, pnpm still resolves dependencies through the workspace's catalog/overrides rather than the registry; expect the installed Prisma 8 packages to reflect the workspace's catalog rather than \`latest\`. -- **\`pnpm\` → \`npm\` fallback.** If \`pnpm\` ever fails to install Prisma 8 with a \`workspace:*\` or \`catalog:\` resolution error (a leak in a published artefact), \`init\` falls back to \`npm install\` and surfaces a warning. Once the offending package republishes a clean version you can switch back with \`pnpm install\`. +- **\`pnpm dlx\`.** \`pnpm dlx prisma@next orm init …\` works in any directory. Inside a workspace, pnpm still resolves dependencies through the workspace's catalog/overrides rather than the registry; expect the installed Prisma ORM packages to reflect the workspace's catalog rather than \`latest\`. +- **\`pnpm\` → \`npm\` fallback.** If \`pnpm\` ever fails to install Prisma ORM with a \`workspace:*\` or \`catalog:\` resolution error (a leak in a published artefact), \`init\` falls back to \`npm install\` and surfaces a warning. Once the offending package republishes a clean version you can switch back with \`pnpm install\`. " `; diff --git a/packages/1-framework/3-tooling/cli/test/orm/cli.test.ts b/packages/1-framework/3-tooling/cli/test/orm/cli.test.ts index ec5269dae4ad..56e2c9938e86 100644 --- a/packages/1-framework/3-tooling/cli/test/orm/cli.test.ts +++ b/packages/1-framework/3-tooling/cli/test/orm/cli.test.ts @@ -114,19 +114,6 @@ describe('createOrmCli', () => { }); }); -describe('rendered command-group briefs (orm/#30062)', () => { - it('top-level and orm-group help carry neither Prisma Next nor Prisma ORM', async () => { - const loader = recordingLoader(); - - const topLevel = await harness(loader.loadConfig).run(['--help']); - const ormGroup = await harness(loader.loadConfig).run(['orm', '--help']); - - const rendered = topLevel.stdout + topLevel.stderr + ormGroup.stdout + ormGroup.stderr; - expect(rendered).not.toContain('Prisma Next'); - expect(rendered).not.toContain('Prisma ORM'); - }); -}); - describe("the engine's telemetry command group", () => { it('mounts the three consent commands and their group, mirroring the unified bin', () => { expect(Object.keys(BIN_COMMANDS)).toEqual( diff --git a/packages/1-framework/3-tooling/cli/test/orm/config-section.test.ts b/packages/1-framework/3-tooling/cli/test/orm/config-section.test.ts index b30da425cc37..37d40fe70b12 100644 --- a/packages/1-framework/3-tooling/cli/test/orm/config-section.test.ts +++ b/packages/1-framework/3-tooling/cli/test/orm/config-section.test.ts @@ -66,7 +66,7 @@ describe('ormConfigSection', () => { { code: 'CONFIG.FILE_NOT_FOUND', severity: 'error', - summary: 'No Prisma 8 configuration was loaded', + summary: 'No Prisma ORM configuration was loaded', why: 'The orm config section is absent, so prisma.config.ts was never evaluated.', nextActions: [ { @@ -175,7 +175,7 @@ describe('ormConfigSection', () => { { code: 'CONFIG.VALIDATION_FAILED', severity: 'error', - summary: 'Prisma 8 configuration must be an object', + summary: 'Prisma ORM configuration must be an object', why: 'The orm config section is not an object, so no section can be read from it.', nextActions: [ { diff --git a/test/integration/test/cli.rename-user-visible-strings.e2e.test.ts b/test/integration/test/cli.rename-user-visible-strings.e2e.test.ts deleted file mode 100644 index f4f9d3864efc..000000000000 --- a/test/integration/test/cli.rename-user-visible-strings.e2e.test.ts +++ /dev/null @@ -1,78 +0,0 @@ -import { existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from 'node:fs'; -import { join } from 'node:path'; -import { ormCommandFamily } from '@internal/cli'; -import { createTestCli } from '@prisma/cli-engine/testing'; -import { afterEach, describe, expect, it } from 'vitest'; -import { createIntegrationTestDir, ormEngineMount } from './utils/cli-test-helpers'; - -interface InitDocument { - readonly filesWritten: readonly string[]; -} - -describe('user-visible strings after the Prisma 8 rename (orm/#30062)', () => { - function harness() { - const { commands, groups } = ormEngineMount(); - return createTestCli({ commandFamilies: [ormCommandFamily], commands, groups }); - } - - it('orm init --help does not say Prisma Next', async () => { - const run = await harness().run(['orm', 'init', '--help']); - - expect(run.stdout + run.stderr).not.toContain('Prisma Next'); - }); - - it('lsp --help does not say Prisma Next', async () => { - const run = await harness().run(['lsp', '--help']); - - expect(run.stdout + run.stderr).not.toContain('Prisma Next'); - }); - - describe('orm init scaffold', () => { - let testDir: string; - - afterEach(() => { - if (testDir !== undefined && existsSync(testDir)) { - rmSync(testDir, { recursive: true, force: true }); - } - }); - - it('writes a quick-reference file that does not say Prisma Next', async () => { - testDir = createIntegrationTestDir(); - - const run = await harness().run( - ['orm', 'init', '--target', 'postgres', '--authoring', 'psl', '--skip-install'], - { cwd: testDir }, - ); - - expect(run.exitCode, run.stderr).toBe(0); - const quickReferencePath = join(testDir, 'prisma-next.md'); - expect(existsSync(quickReferencePath)).toBe(true); - const quickReference = readFileSync(quickReferencePath, 'utf-8'); - expect(quickReference).not.toContain('Prisma Next'); - }); - - it('writes every scaffolded file and next step without Prisma Next', async () => { - testDir = createIntegrationTestDir(); - mkdirSync(join(testDir, 'src'), { recursive: true }); - writeFileSync(join(testDir, 'src/index.ts'), 'export {}\n', 'utf-8'); - - const run = await harness().run( - ['orm', 'init', '--target', 'postgres', '--authoring', 'psl', '--skip-install'], - { cwd: testDir }, - ); - - expect(run.exitCode, run.stderr).toBe(0); - const document = run.presented?.data as InitDocument | undefined; - expect(document?.filesWritten).toContain('prisma-next.md'); - expect(document?.filesWritten).toContain('README.md'); - - for (const relPath of document?.filesWritten ?? []) { - const content = readFileSync(join(testDir, relPath), 'utf-8'); - expect(content, relPath).not.toContain('Prisma Next'); - } - - expect(JSON.stringify(run.presented)).not.toContain('Prisma Next'); - expect(run.presented?.presentation.json).toBeDefined(); - }); - }); -});