Next-generation ORM for Node.js & TypeScript | PostgreSQL, MySQL, MariaDB, SQL Server, SQLite, MongoDB and CockroachDB
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
feat(config): the orm section is declared once as a schema, and the engine resolves its paths (#30372) ## At a glance The `orm` section of `prisma.config.ts` is declared once, with the fields that are paths marked as such: ```ts // packages/1-framework/3-tooling/config-loader/src/orm-section.ts export const ormConfigSchema = configSchema({ family: { kind: "'family'", ...descriptorFields, emission: 'object' }, target: { kind: "'target'", ...targetLikeFields }, adapter: { kind: "'adapter'", ...targetLikeFields }, 'driver?': { kind: "'driver'", ...targetLikeFields }, 'extensions?': [{ kind: "'extension'", ...targetLikeFields }, '[]'], 'db?': { 'connection?': 'unknown' }, 'contract?': { source: { load: 'Function', 'inputs?': 'path[]', 'format?': 'string' }, output: ['path', '=', () => 'src/prisma/contract.json'], }, migrations: [{ dir: ['path', '=', () => './migrations'] }, '=', () => ({})], 'formatter?': { 'indent?': "number.integer >= 1 | 'tab'", 'newline?': "'LF' | 'CRLF'" }, }).narrow(/* familyId and targetId agreement across descriptors */); ``` Given this project and this invocation: ``` exp/ sub/ prisma.config.ts # orm: ormConfig({ contract: './contract.prisma', migrations: { dir: './migrations' } }) contract.prisma ``` | Run from | Command | Before | After | | --------- | ------------------------------------------------------ | -------------------------------------------------------------- | ------------------------------ | | `exp/sub` | `prisma contract emit --config ./prisma.config.ts` | writes `exp/sub/contract.json` | same | | `exp` | `prisma contract emit --config ./sub/prisma.config.ts` | `CONTRACT.SOURCE_LOAD_FAILED`: looks for `exp/contract.prisma` | writes `exp/sub/contract.json` | Config files are unchanged. ## The decision A relative path in `prisma.config.ts` is relative to the file that wrote it. Only the ORM knows which of its fields are paths; only the CLI engine knows which file wrote each value, because its chain merge records that per key. The schema declaration puts the first where the second can use it. The engine derives validation, a `CLI.CONFIG_FIELD_INVALID` diagnostic per bad field naming the file to fix, and the resolution of every `path` field, from the one declaration; the ORM writes no validation, resolution, or path-anchoring code. This is [prisma/prisma-cli ADR 0005](https://github.com/prisma/prisma-cli/blob/main/docs/architecture/adrs/0005-config-sections-declare-their-shape.md), shipped in engine 0.6.0 by prisma/prisma-cli#279; every product that mounts commands declares its section this way. ## Why it broke The ORM's own `prisma` bin resolved config paths in its loader against the config file. The unified `prisma` CLI loads the config through the engine's loader, which handed the `orm` section over as written; the ORM's command wrapper then resolved paths itself, and the only directory it could see was the working directory. The same defect existed a second time in `projectConfigPathFor`, which rebuilt `<cwd>/prisma.config.ts` to find the project's `package.json` and, from a parent directory, read the wrong manifest. ## What changes - **`@internal/config-loader`** declares `ormConfigSchema` and `ormConfigSection` (`defineConfigSection({ name: 'orm', schema })`). It is the lowest package that can depend on the engine; `@internal/cli` and `@internal/cli-telemetry` consume the section from it. Path defaults are thunks, which arktype evaluates when the default is applied, so they resolve against the config file like authored values. - **Descriptors are declared references.** A control descriptor is a runtime object the config file constructs: `create` closes over module state, and its codec tables, contract serializer and migration hooks rely on their prototypes and on `this`. The schema declares each descriptor, and `db.connection`, with the engine's `reference(schema)` (prisma/prisma-cli#284), so the command receives the object the config file built. The schema checks only a descriptor's identifying fields: `kind`, `id`, `familyId`, `version`, `create`, and `targetId` or `emission`. Every value not declared a reference is copied before paths are resolved and defaults applied. Cross-descriptor rules (`familyId` and `targetId` agreement, the removed `extensionPacks` key) are one function, which the schema's `narrow` and the loader both call. - **A codec without params has no `paramsSchema`.** A codec that took no params used to declare `paramsSchema = voidParamsSchema`, a shared schema accepting only `undefined`, and `isParameterized` asked whether a descriptor's schema was that exact object. A copied descriptor carries a copy of that schema, so every codec on it reported itself parameterized, which is how `db init` failed with `Invalid typeParams for codec 'pg/text@1'`. `paramsSchema` is now `StandardSchemaV1<P> | undefined`, a codec without params sets it to `undefined`, and `isParameterized` is `paramsSchema !== undefined`, which no copy can change. Type-param validation still rejects `typeParams` for such a codec with `RUNTIME.TYPE_PARAMS_INVALID`. `voidParamsSchema` is removed; [`upgrade-instructions/pending/codec-without-params-schema/extension/`](https://github.com/prisma/orm/blob/feat/orm-config-schema/upgrade-instructions/pending/codec-without-params-schema/extension/instructions.md) tells extension authors how to follow. - **The ORM's bin** hands the engine each evaluated file with its sections as written (`loadConfigFiles`); the engine validates the merged section with that provenance before a command runs. `loadConfig` runs the same schema for the language server and the vite plugin, wrapping each field diagnostic as `CONFIG.VALIDATION_FAILED` with the subsection it concerns, so `requireConfigSections` keeps working. - **Commands** read absolute paths and `baseDir`. The command wrapper's cwd finalisation, `finalize-config.ts`, `collectConfigIssues` and its hand-written descriptor checks, and `projectConfigPathFor` are deleted. The migration path helpers take only the config. Control API operations that located the project through `configPath` take `projectDir`; `resolveMigrationPaths` takes the config. - **`@prisma/cli-engine` moves to 0.6.1** (0.6.0 plus prisma/prisma-cli#280 and #284: a schema declares the values it keeps as references) in `@internal/cli`, `@internal/config-loader`, `@prisma/orm-toolchain`'s peer, the four extension packages, and the integration test package. The `defineConfig` → `definePrismaConfig` rename the bump requires landed separately in #30129. Examples and fixture apps consume published packages and keep their pins. - **Diagnostics under the unified CLI change code.** A malformed `orm` field is now reported by the engine as `CLI.CONFIG_FIELD_INVALID` (one per field, `meta.section: 'orm'`, `meta.field` the dotted path, `where.path` the config file that declared it) under `CLI.CONFIG_SECTION_INVALID`. `CONFIG.VALIDATION_FAILED` remains what the ORM's own loader raises for the language server and the vite plugin. The error reference records the split; the two integration files that asserted the old code are updated. - **Docs**: `config-validation-and-normalization.mdc` now describes the schema as the single home of structural rules, `loadConfigFiles`/`loadConfig` as evaluation plus diagnostics, and path resolution as the schema's job; the CLI Style Guide says relative paths in the config file resolve against the file that wrote them, with `--output-path` the one path relative to cwd; the loader README follows. The arktype rule now says to read the arktype docs before building validation machinery and never to read arktype's compiled node tree, and `docs/reference/arktype-usage.md` records what a transformation does to its input: any pipe or default makes arktype clone the whole input, and the default clone rebuilds plain objects and class instances. The codec authoring guide, the two codec ADRs and the package READMEs declare codecs without params with `paramsSchema = undefined`. ## Tests - `framework-components/test/materialize-codec.test.ts`: a descriptor copied the way arktype's default clone copies it keeps `isParameterized` for codecs with and without params (this test fails before the change), and a codec without params rejects `typeParams`. - `config-loader/test/orm-section.test.ts`: the schema accepts a valid config, supplies the migrations dir and default contract output, records `baseDir`, resolves inputs, output and migrations dir against the config file, leaves absolute paths alone, keeps a descriptor's class instances and functions, and the source's `load`, as the file built them (closures, prototypes and `this` survive), reports missing descriptors and descriptor field problems, family and target mismatches on target, adapter, driver and extensions, the removed `extensionPacks` key, contract, migrations and formatter problems, keeps fields the schema does not name on descriptors and on the contract source, and never throws on hostile input. `load.test.ts` still passes unchanged apart from the finalise module going away. - `@internal/cli`: `contract emit` and `migration plan` reached with `--config sub/prisma.config.ts` from the parent read and write under `sub/`, the plan test exercising the manifest walk from `baseDir`; the bin loader hands the engine the requested file with paths as written; ORM command tests seed the engine with a `prisma.config.ts` in the run directory through one shared helper so the engine validates the seed as it would a real file. Verified locally against a build of prisma/prisma-cli#280 overlaid on the installed engine: | Package | Result | | --- | --- | | `@internal/config` | 5 tests | | `@internal/config-loader` | 53 tests | | `@internal/cli` | 116 files, 1484 tests | | `@internal/cli-telemetry` (incl. the real-Postgres e2e) | 113 tests | | `@internal/vite-plugin-contract-emit` | 31 tests | | extensions (paradedb, pgvector, supabase, postgis) | 390 tests | | integration | 788 files, 4224 tests | | all package suites after the codec change | 83 tasks; the first run's 7 failures (tests that expected every codec to have a schema, and a bundled comment naming an internal package) fixed and rerun green | | repo | build, typecheck, lint, `lint:deps`, `lint:casts`, rules lints, `fixtures:check`, upgrade coverage pass | CI on this PR is red until `@prisma/cli-engine@0.6.1` is published and the pin here moves to it; the earlier red run (270 integration failures) was arktype's default clone rebuilding descriptors, which 0.6.1 fixes. Verified locally with a 0.6.1 build: `config-loader` (53), the CLI package (1484), and the config-related integration files (200) pass. 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Configuration diagnostics now identify the affected field, section, and config file. * Relative paths in config files—including extended configs—resolve from the file that declares them. Command-line output paths remain relative to the working directory. * Config loading retains details about each file in an extended configuration chain. * **Bug Fixes** * Malformed configuration sections receive more specific diagnostics, while commands can proceed when errors affect sections they do not read. * **Breaking Changes** * Legacy configuration-validation exports and config-path operation options are no longer available. * `voidParamsSchema` is no longer exported. Codecs without parameters should set `paramsSchema` to `undefined`; non-empty type parameters are rejected, while empty parameters are accepted. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io> Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> | 22 小时前 | |
Base agent worktrees on freshly fetched origin/main (#30080) The WorktreeCreate hook created every agent worktree from the main checkout's HEAD, with no fetch. That checkout is routinely stale (nothing pulls it), so agent sessions regularly started one or more commits behind origin/main and analyzed or built against outdated code. The hook now runs `git fetch origin main` and branches the worktree from `origin/main` instead of `HEAD`. If the fetch fails (for example offline), worktree creation fails loudly instead of silently starting from a stale base. 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Worktrees are now created from the latest `origin/main`, ensuring new branches start with up-to-date code. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io> | 1 个月前 | |
refactor: rename every user-facing prisma-next identifier to Prisma 8 (#30262) ## Linked issue n/a — no Linear ticket. Completes the rename that #30248 started for prose; builds on #30261. ## At a glance Every `prisma-next` identifier a user can see is renamed. Before and after, for a scaffolded project: ```text // use prisma-next → // use prisma-8 (schema header) prisma-next.md → prisma-8.md (primer at the project root) PRISMA_NEXT_DISABLE_TELEMETRY → PRISMA_DISABLE_TELEMETRY (and every other PRISMA_NEXT_* variable) ~/.config/prisma-next/ → ~/.config/prisma-8/ (per-user telemetry config) prisma-next contract emit → prisma contract emit (CLI invocations in docs, fixtures, recordings) ``` ## Summary After #30248 the product was called Prisma 8 in prose, but the working name was still written into user projects and printed by the CLI: the schema header, the primer file, the environment variables, the per-user config directory, the language-server diagnostic source, the Standard Schema vendor string, the contract brand symbol, the advisory-lock domain, and about 650 fixture and doc files that spelled out `prisma-next …` commands. This PR renames all of it in one pass and tightens the legacy-name lint so the only occurrences left are the ones with a reason. ## Decision One commit. The mapping: | Surface | Before | After | |---|---|---| | Schema header | `// use prisma-next` | `// use prisma-8` | | Primer file `init` writes | `prisma-next.md` | `prisma-8.md` | | CLI environment variables | `PRISMA_NEXT_*` | `PRISMA_*` | | Per-user config directory | `prisma-next/` | `prisma-8/` | | Language-server diagnostic source | `prisma-next` | `prisma` | | Standard Schema vendor, VS Code publisher | `prisma-next` | `prisma` | | Contract brand symbol | `__prisma_next_brand__` | `__prisma_8_brand__` | | Postgres advisory-lock domain | `prisma_next.contract.marker` | `prisma_8.contract.marker` | | Example database names | `prisma_next_*` | `prisma_8_*` | | README banner image | `images/prisma-next.png` | `images/prisma-8.png` | | Telemetry docs URL | `prisma-next.dev/docs/…` | `www.prisma.io/docs/…` | | New-issue links | `github.com/prisma/prisma-next/issues/new` | `github.com/prisma/orm/issues/new` | | CLI invocations in prose, fixtures, and recordings | `prisma-next db verify` | `prisma db verify` | `prisma-8` is the slug the repo already uses for the skill, the examples, and the upgrade directories, so it is the slug for everything that needs one. Environment variables drop the infix entirely because `PRISMA_*` is what users expect and nothing else in the repo claims those names. What keeps the old name, each with a lint allowance that says why: - **Dated records**: changelog, release notes, ADRs, shipped upgrade instructions, gotcha logs, the framework-gaps review, and the `projects/` and `drive/` write-ups. - **Pinned links** into the old repository by number, Linear slugs, and links to ADRs whose filenames carry the name. - **`@cipherstash/prisma-next`**, a third party's published package name. - **Retirement proofs**: the list of old skill directories `init` deletes, and the tests asserting that no `prisma-next` bin or skill directory is installed any more. ## Behavior changes & evidence - **Schema header.** The inferred-schema printer and the `init` templates write `// use prisma-8`. The language server accepts both headers, so existing schemas keep their diagnostics and completion, and its Format action rewrites the old header to the new one. [packages/1-framework/3-tooling/language-server/src/schema-directive.ts](packages/1-framework/3-tooling/language-server/src/schema-directive.ts), [packages/1-framework/2-authoring/psl-printer/src/ast-to-print-document.ts](packages/1-framework/2-authoring/psl-printer/src/ast-to-print-document.ts). Evidence: the `renameLegacyDirective` tests, the server test that formats a legacy-headed schema, and the psl-printer tests. - **Environment variables.** Telemetry gating, the endpoint override, and the debug switch read the new names. `PRISMA_NEXT_DISABLE_TELEMETRY` is still honoured as an opt-out so nobody is silently opted back in; the endpoint and debug spellings are not. [packages/1-framework/3-tooling/cli-telemetry/src/gating.ts](packages/1-framework/3-tooling/cli-telemetry/src/gating.ts). Evidence: cli-telemetry gating tests. - **Per-user config directory.** [packages/1-framework/3-tooling/cli-telemetry/src/user-config.ts](packages/1-framework/3-tooling/cli-telemetry/src/user-config.ts). Existing users see the telemetry consent prompt once more; nothing else is lost. - **Primer file.** [packages/1-framework/3-tooling/cli/src/orm/init-scaffold.ts](packages/1-framework/3-tooling/cli/src/orm/init-scaffold.ts). Evidence: init-scaffold tests and template snapshots. - **Advisory-lock domain.** A CLI on this version and one on the previous version take different locks for the same marker. Both versions running migrations against one database at the same moment is already unsupported. - **Upgrade instructions.** Entries for the header, the environment variables, and the primer file are recorded in the rc.9 → rc.10 app and extension instructions with detection patterns, so the published upgrade skill applies the rename. ## Testing performed - `pnpm test` in cli (1437), cli-telemetry (112), language-server (312), psl-printer (63), framework-components (672), target-postgres (1607), vite-plugin-contract-emit (31), emitter (231), and `pnpm test:scripts` (507): all pass after `pnpm build`. The language-server tests hard-coded the old header's length in semantic-token arrays and span offsets; those expectations are updated. - Committed migration steps and their content-addressed contract snapshots are left untouched, since rewriting them would break their hashes; the lint treats them as dated records. - `pnpm lint:legacy-name` passes with the tightened allowances; `node --test scripts/lint-legacy-name.test.mjs` passes (14 tests, including new negative cases for the header, primer, and skill names). - `pnpm check:upgrade-coverage --mode pr --prev origin/main` passes. ## Skill update `skills/prisma-8` references and the two rc.9 → rc.10 upgrade instruction files are updated in this PR. ## Checklist - [x] All commits are signed off (`git commit -s`) per the [DCO](../CONTRIBUTING.md#developer-certificate-of-origin-dco). - [x] I read [CONTRIBUTING.md](../CONTRIBUTING.md) and the change is scoped to one logical concern. - [x] Tests are updated. - [ ] The PR title is in `TML-NNNN: <sentence-case title>` form. No Linear ticket exists for this change. - [x] The **Skill update** section above is filled in. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io> Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> | 13 天前 | |
ci: the DCO app checks merge-queue commits, so remove the placeholder DCO workflow (#30419) ## At a glance The merge-queue commits for #30392, #30397 and #30410 each carry two `DCO` results: ```text DCO dco success <- the DCO app; the ruleset requires this one DCO github-actions success <- .github/workflows/dco.yml; ignored ``` After this PR only the app's result remains. ## What this PR changes 1. Deletes `.github/workflows/dco.yml`. 2. `docs/oss/ci-pipeline.md` says the `DCO` check comes from the DCO app, on PRs and on merge-queue commits. ## Why the placeholder existed, and why it can go The DCO requires a `Signed-off-by:` trailer on every commit. The [DCO GitHub App](https://github.com/apps/dco) enforces it by posting a check named `DCO`. Until recently the app only ran on PRs, so a merge-queue commit never got a `DCO` result and the queue stalled. `dco.yml` filled that gap: it ran on `merge_group`, echoed a message, and passed without reading any commits. The app now handles merge-queue events: the org installation accepted its new "Merge queues" permission. The `main` ruleset requires `DCO` from the app only, so the placeholder's result no longer counts toward the merge. It only costs a runner for every queued PR. ## Tests None; this is a workflow deletion. This PR's own trip through the merge queue shows the app's `DCO` result satisfying the requirement without the placeholder. 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Clarified that the DCO app posts a separate check for pull requests and merge-queue commits. * **Chores** * Removed a redundant DCO workflow check; DCO sign-off checks continue to be posted by the DCO app. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> | 1 小时前 | |
chore: block commits missing DCO sign-off Add a husky commit-msg hook that rejects any commit whose message lacks a Signed-off-by trailer matching the commit author (name + email). This mirrors locally the DCO requirement documented in CONTRIBUTING.md so the remote status check never has to fail the PR. Merge / fixup! / squash! / amend! commits are skipped. Bypass remains available via git commit --no-verify. Signed-off-by: Serhii Tatarintsev <tatarintsev@prisma.io> | 3 个月前 | |
feat(codec-registration-completion): unify codec registration (TML-2357) (#417) <!-- CURSOR_AGENT_PR_BODY_BEGIN --> > **Status: ready for review.** All milestones complete; all 14 acceptance criteria PASS or LANDED at HEAD; validation gates green workspace-wide. Post-implementation surface cleanup (F9 + F10) and post-feedback hygiene round (F11–F39) landed on top. Completes the registration-side migration that the parent codec-registry-unification project (merged via [ADR 208](docs/architecture%20docs/adrs/ADR%20208%20-%20Higher-order%20codecs%20for%20parameterized%20types.md)) deliberately deferred. (TML-2357) ## Spec & plan - [`projects/codec-registration-completion/spec.md`](projects/codec-registration-completion/spec.md) — eight ACs (AC-0..AC-7), three pinning cases. - [`projects/codec-registration-completion/plan.md`](projects/codec-registration-completion/plan.md) — five milestones with validation gates and risks. - [`projects/codec-registration-completion/specs/class-based-codec-design.spec.md`](projects/codec-registration-completion/specs/class-based-codec-design.spec.md) — six implementation-level ACs (AC-CB-1..6) covering the abstract-class hierarchy. ## Milestones | # | Goal | Spec ACs | Status | |---|---|---|---| | **M0** | Class-based codec migration + per-codec helpers + Strength 3 deletion sweep | AC-0, AC-1, AC-CB-1..6 | **SATISFIED** at `a210fa1c5` | | **M1** | Narrow runtime `Codec` instance + descriptor-keyed metadata reads | AC-3 | **LANDED** at `1be7564c4`; reverified through M4 | | **M2** | Native descriptor migration + bridge / `aliasCodec` / `arktypeJsonEmitCodec` deletion | AC-2, AC-4 | **ABSORBED into M0** (Phase B + Phase C) | | **M3** | `ParamRef.refs` plumbing + encode-side `forColumn` + `forCodecId` retirement | AC-5 | **SATISFIED** at `3f0ec224a` | | **M4** | Delete `JsonSchemaValidatorRegistry`; retire `'json-validator'` trait | AC-6 | **SATISFIED** at `e055c9455` | | **F9 + F10** | Public-API surface cleanup: registry-only public surface; drop transition vocabulary | hygiene | **SATISFIED** at `c4d81ad1c` | | **F11–F39** | Post-feedback hygiene round: 27 findings closed; F38 rejected; SQL `CodecRegistry` consolidated into `CodecDescriptorRegistry` | hygiene + correctness | **SATISFIED** at `0e3aafc0b` | | **AC-7** | Validation gates green | AC-7 | **PASS** at every milestone close + every hygiene-round close | ## What landed - **Class-based codec hierarchy.** `interface CodecDescriptor<P>` + `abstract class CodecDescriptorImpl<P>`, paired with `interface Codec<Id, Traits, Wire, Input>` + `abstract class CodecImpl<...>`. Per-codec column helpers (e.g. `vectorColumn(N)`) directly invoke `descriptor.factory(params)` to preserve method-level generics; `satisfies ColumnHelperFor<D>` ties helpers to their descriptor without polymorphism. `AnyCodecDescriptor` (alias for `CodecDescriptor<any>`) is the canonical heterogeneous-storage type. - **Strength 3 forcing-function deletion.** Every legacy carrier deleted: `mkCodec`, `defineCodec`, `defineCodecGroup`, `defineCodecBundle`, `CodecDefBuilder*`, `synthesizeNonParameterizedDescriptor`, instance-keyed `ExtractCodecTypes`, `byScalar` maps, `dataTypes` exports, `sqlCodecDefinitions`, `codecDescriptorDefinitions`, `pgVectorRepresentativeCodec` placeholder, `parameterizedCodecs:` slot, `CodecParamsDescriptor`, `arktypeJsonEmitCodec`, `aliasCodec`, `aliasDescriptor` function form, the `'json-validator'` trait, `JsonSchemaValidatorRegistry` infrastructure, `arktypeParamsSchema` helper, the SQL-family `CodecRegistry` interface (consolidated into `CodecDescriptorRegistry`). Closing-grep zero call-sites. - **`ParamRef` + `ProjectionItem` carry `refs?: { table; column }`**; `validateParamRefRefs` builder-pipeline pass enforces refs for parameterized codec ids; encode/decode dispatch consults `metadata.refs` first via `contractCodecs.forColumn(table, column)`. - **JSON validation lives in the resolved codec's `decode` body** (arktype-json's inline pattern from TML-2229). Decode-error envelope equivalence verified via `codec-async.test.ts:408-456`. - **`ColumnTypeDescriptor` relocated** from `@prisma-next/contract-authoring` (layer 2) to `@prisma-next/framework-components` (layer 1) so codec base types live with the framework primitives. - **F8 portability fix** (`fae3bd688`): `CodecTypes` exposed at the public `exports/codec-types.ts` entry point with a `Resolve<T>` materializer to break tsdown's chunk-private path reference and restore consumer-side typecheck. - **F9 + F10 surface cleanup** (`3d57f9ecd..c4d81ad1c`): each codec-shipping package now exposes only column helpers + a `<package>CodecRegistry` instance + `type` re-exports of descriptor types. Internal `codecDescriptorMap` / `codecDescriptorClassList` no longer surface through public exports. Transition vocabulary (`Class` suffixes, `class-form` / `class-based` in comments, `codecs-class.ts` filenames) scrubbed. ## Post-feedback hygiene round (F11–F39) 19 commits between `c4d81ad1c..0e3aafc0b` close 27 findings surfaced from orchestrator-principal review and 30 GitHub PR review threads. Highlights: - **F11** (`f725db1f8`) — rename `ast/sql-codecs-class.ts` → `ast/sql-codecs.ts`, split helpers into `ast/sql-codec-helpers.ts`. - **F12** (`7d56a39b4`) — move parameterization predicate onto `CodecDescriptorImpl.isParameterized` getter; retire the standalone `IsParameterizedCodecId` callback type. - **F13 + F14 + F20** (`cfa078a23`) — align arktype params schemas with `TParams` optionality (`'length?': '...'`); delete `arktypeParamsSchema` helper; consumer sites direct-assign with `: StandardSchemaV1<TParams>`. The `arktype` runtime dep stays in `@prisma-next/contract` because `validate-contract.ts` consumes it directly for structural validation — that's by design, not a follow-up. - **F15** (`1051f24e8`) — replace `unique symbol` trait phantom with a string-key phantom property (`__codecTraits`) to avoid Node bundling failure modes. - **F16 + F17** (`083fff350`, `a278bd034`) — rewrite codec-authoring-guide alias section + fix self-referential JSDoc helper-source reference. - **F18** (`7ee52fae0`) — assert leaf scalar type in `no-emit-typed-flow.test-d.ts` to make AC-CB-6's literal claim explicit. - **F19 + F31 + F32 + F33** (`81c55248f`, `bc4e8d716`) — harden `extractCodecLookup`: lift inline imports, tighten `id` to non-optional `string`, refine the silent catch so non-parameterized codecs throw immediately while parameterized factories that tolerate empty params still materialise representatives. - **F21** (`f1be14d55`) — `createStubAdapter` returns a stable codec registry instance (no per-call rebuild). - **F22 + F26 + F29** (`20f99bffd`) — dispatch correctness: `refsFromLeft` walks via `collectColumnRefs` to preserve refs for wrapping expressions; encode-side `forColumn` fall-through is structurally safe (F19 + `ambiguousCodecIds` rejection + `byCodecId` column-correct materialisation); pgvector `length` threaded into `PgVectorCodec` constructor with `assertVector` validating the dimension at every ingress. - **F23 + F24 + F25** (`48ed1d135`) — type predicate `isArktypeSchemaLike` replaces blind cast in `rehydrateSchema`; `@ts-expect-error` replaces `as any` + biome-ignore in tests; `toExtend` replaces deprecated `toMatchTypeOf` matcher. - **F27** (`21b4cbca7`, `0e3aafc0b`) — retire SQL-family `CodecRegistry.register()` mutation surface in favour of `buildCodecRegistry(descriptors)` builder; phase-2 deletes the `CodecRegistry` interface entirely. Single registry surface in the SQL family is now `CodecDescriptorRegistry`. - **F28** (`9881a7efe`) — `buildCodecDescriptorRegistry` throws on duplicate `codecId`. - **F30** (`7a3faf20f`) — `codecDescriptorMap` relocated to `core/codec-type-map.ts`; `Resolve<T>` materialisation kept at the `exports/` boundary per F8. - **F34 + F35 + F36** (`4178072fa`) — postgres render hygiene: scale validation in `pgNumericRenderOutputType`; ISO 8601 regex for timestamps; string validation for enum values. - **F37** (`182d10c88`) — `SqliteDatetimeCodec` rejects `Invalid Date` in decode/decodeJson. - **F38** — **rejected.** Default identity codecs on `CodecImpl` would constrain its type signature and obscure where real conversion work happens. Convention stays: explicit identity overrides at codec-author site. - **F39** (`80ba4fd60`) — `enumParamsSchema` and `EnumParams` tightened to `readonly string[]`. Closure-mechanism note for F22: the implementer chose a structural argument over fail-fast on `forColumn` miss — F19's refinement makes `extractCodecLookup` skip parameterized descriptors that don't tolerate empty params; `buildContractCodecRegistry`'s `ambiguousCodecIds` set throws `RUNTIME.TYPE_PARAMS_INVALID` on multi-instance ids; for the non-ambiguous parameterized case `byCodecId` stores the column-correct per-instance codec. Reviewer cross-checked all three legs and accepted. ## Notable side effect: 16 pre-existing e2e failures resolved by M3 Before M3, the e2e suite ran 75/91 with 16 failures of the form `Codec '...' resolves to multiple parameterized instances; column-aware dispatch is required.` — top-level field shortcuts (`select('vectorCol')`) emitted `IdentifierRef` AST that didn't carry `(table, column)` context, so decode-side `resolveProjectionCodec` fell back to `forCodecId` and threw. M3's `ProjectionItem.refs` extension + decode-side parity in `decoding.ts` closed the path. **e2e is now 91/91.** ## Validation gates at HEAD `0e3aafc0b` | Gate | Result | |---|---| | `pnpm typecheck` | PASS — 123/123 | | `pnpm lint:deps` | PASS — 727 modules / 1444 deps / 0 violations | | `pnpm fixtures:check` | PASS — zero drift (demo emit byte-identical against `origin/main`) | | `pnpm build` | PASS — 62/62 | | `pnpm test:e2e` | **PASS — 91/91** (16 pre-existing failures resolved by M3) | | `pnpm test:packages` | PASS in scope (residual: pre-existing 7 sql-orm-client pgvector wire-format + TML-2402 parallel-flake) | ## Review artifacts `projects/codec-registration-completion/reviews/` carries three review artifacts produced by the reviewer subagent during orchestration. After user feedback that the initial structure didn't match the canonical skill output, all three were rewritten to conform to `/drive-pr-local-review` (flat F-numbered findings + AC verification table) and `/drive-pr-walkthrough` (intent-first semantic narrative). Final reviewer verdict at HEAD `0e3aafc0b`: **SATISFIED** with 12 PASS / 2 WEAK on the AC scoreboard. The two WEAKs are AC-7 (acknowledged baseline test failures in sql-orm-client pgvector wire format + TML-2402 parallel flake) and AC-CB-5 (a single internal `descriptor as unknown as AnyDescriptor` cast inside `buildCodecDescriptorRegistry` — purely a registry-internal heterogeneous-storage erasure, not a public surface concern). ## Linear follow-ups filed during close-out - **[TML-2402](https://linear.app/prisma-company/issue/TML-2402)** — `pnpm test:packages` parallel-execution flake (`adapter-postgres` / `cli` / `sql-orm-client`; passes cleanly in isolation). P3. - **[TML-2403](https://linear.app/prisma-company/issue/TML-2403)** — Turbo cache-keying gap on transitive AST/type-system changes (worked around with `pnpm build --force`). P4. - **[TML-2405](https://linear.app/prisma-company/issue/TML-2405)** — Codec dispatch follow-up: reference codec instances on the lowered Plan instead of carrying `(table, column)` lookup keys on the AST. The current shape's validator pass is a smell; instance-on-Plan would retire `forColumn`/`forCodecId` from the runtime dispatch surface entirely. Architectural successor to this work. P3. ## Out of scope - **Mongo codec registration migration** — folded into [TML-2324](https://linear.app/prisma-company/issue/TML-2324) (Mongo runtime `forColumn` plumbing). - **Renaming `Codec`** — type name stays; only the field set narrows. - **Reshaping the async codec runtime** ([ADR 204](docs/architecture%20docs/adrs/ADR%20204%20-%20Single-Path%20Async%20Codec%20Runtime.md)) or `CodecCallContext` ([ADR 207](docs/architecture%20docs/adrs/ADR%20207%20-%20Codec%20call%20context%20per-query%20AbortSignal%20and%20column%20metadata.md)). - **`pgEnumCodec` placeholder factory audit** (already clean at HEAD; documented in ADR 208 § Future work). - **Retiring `CodecLookup.get(id)` and `ProjectionItem.refs` / `ParamRef.refs` lookup-key carriers from the AST** — TML-2405. ## Note on project artifacts Per the user's mid-flight directive at close-out, `projects/codec-registration-completion/` is **preserved in-tree** (the standard transient-directory deletion was reverted at `5b0113a5a`). The directory's review artifacts under `reviews/` are gitignored and don't appear in the diff; they live in the working tree only as historical context. <!-- CURSOR_AGENT_PR_BODY_END --> <div><a href="https://cursor.com/agents/bc-a00fe249-d674-4cb5-8939-5b9d17b36650"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-web-light.png"><img alt="Open in Web" width="114" height="28" src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a> <a href="https://cursor.com/background-agent?bcId=bc-a00fe249-d674-4cb5-8939-5b9d17b36650"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img alt="Open in Cursor" width="131" height="28" src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a> </div> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Unified descriptor-driven codec system and class-based codec authoring; per-codec column helpers. * Codecs now receive per-call context (AbortSignal + column provenance). * **Documentation** * Added codec authoring reference and multiple ADR updates clarifying descriptor and async model. * **Improvements** * Stronger parameter validation and improved output-type rendering for parameterized codecs. * Query builder/runtime now propagate column refs into expressions and parameter encoding. * **Tests** * Expanded type and runtime tests covering descriptor-driven flows and helpers. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> | 4 个月前 | |
chore: add workspace settings for Zed editor (#22) Translate the settings in `.vscode/settings.json` to `.zed/settings.json`: - Set up Biome as the formatter for the supported file types. - Configure vtsls to use the workspace version of `tsserver` automatically (it does already seem to be the behaviour for me by default anyway, maybe due to other global settings, so I'm not sure it's strictly necessary, but this option isn't set by default according to the vtsls docs, so it doesn't hurt to enable it explicitly). | 9 个月前 | |
chore(release): bump to 8.0.0-rc.12 (#30395) ## Release: 8.0.0-rc.11 → 8.0.0-rc.12 This is the release PR described in [docs/oss/versioning.md](https://github.com/prisma/orm/blob/main/docs/oss/versioning.md). It bumps every workspace package to 8.0.0-rc.12 and moves the Prisma dependencies to their latest versions. **Merging this PR ships the release.** The push to `main` carries the new root `version`. The `Publish to npm` workflow then publishes 8.0.0-rc.12 under `latest` and creates a pre-release GitHub Release from the notes file. ## Review these first - [docs/releases/v8.0.0-rc.12.md](https://github.com/prisma/orm/blob/release/8.0.0-rc.12/docs/releases/v8.0.0-rc.12.md): the release notes, which become the GitHub Release body. The same entry is at the top of `CHANGELOG.md`. - The upgrade guides for [apps](https://github.com/prisma/orm/blob/release/8.0.0-rc.12/skills/prisma-8/upgrading/app/upgrades/8.0.0-rc.11-to-8.0.0-rc.12/instructions.md) and [extensions](https://github.com/prisma/orm/blob/release/8.0.0-rc.12/skills/prisma-8/upgrading/extension/upgrades/8.0.0-rc.11-to-8.0.0-rc.12/instructions.md). They merge the 24 pending fragments. The original fragments are moved unchanged to `upgrade-instructions/releases/8.0.0-rc.11-to-8.0.0-rc.12/sources/`. - Four guide entries have no fragment behind them. The `migration new` default and its removed error codes (#30389) had no guide entry. Neither did the PSL parser API changes (#30312, #30344, #30335, #30379). I wrote those entries while preparing the release. - Where fragments contradicted later code, the guide follows the code. Examples: the Supabase storage hash, `voidParamsSchema`, and quoted defaults printed by `infer`. ## Dependency updates | Package | From | To | Where | | --- | --- | --- | --- | | `@prisma/cli-engine` | 0.4.0 | 0.6.1 | examples, test fixtures, apps (the toolchain packages were already on 0.6.1 from #30372) | | `@prisma/dev` | 0.25.1 | 0.25.2 | the workspace catalog | | `@prisma/compute-sdk` | ^0.39.0 | ^0.43.0 | `apps/telemetry-backend` | | `@prisma/management-api-sdk` | ^1.56.0 | ^1.76.0 | `apps/telemetry-backend` | compute-sdk 0.43 renames "service" to "app" and "version" to "deployment". The telemetry deploy script now uses the new names. Both SDK versions call `/v1/apps/{appId}`, so the ID stored in the existing `TELEMETRY_DEPLOY_SERVICE_ID` secret is still correct. The app's typecheck now includes `scripts/`, so it catches the next SDK rename. The repo does not depend on `@prisma/composer`. ## Fixes needed to publish - **The publish workflow has failed on `main` since #30372.** `check:conformance` called the `orm` config validator as `validate(value)`. Engine 0.6 always calls `validate(value, provenance)`, and the validator reads `provenance.files`, so it threw on every input. The check now passes the same provenance the engine would. The prisma-cli copy of this check already does this. - `set-version` rewrote `workspace:@internal/cli@<version>` to `workspace:<version>`, dropping the alias. The prisma7-adoption example uses that alias. This is the first bump since the alias was added. - `lint:legacy-name` and the `add-model-map` test pointed at the pending fragment paths. They now point at the archived sources. ## Verification Passed locally: - `pnpm build` - `pnpm typecheck` - `pnpm lint` - `pnpm test:scripts` (563 tests) - `pnpm check:conformance` - `pnpm check:publish-deps` - `pnpm check:upgrade-coverage`, in both publish and PR mode - `pnpm check:release-notes`, in both publish and PR mode - `pnpm lint:legacy-name` - `pnpm lint:skills` - `pnpm test:packages`: all 18,196 tests passed Not covered locally, left to CI: - Three `test:packages` suites install packed tarballs from the registry. This machine's pnpm refuses `@vercel/detect-agent@1.2.5` because it has no provenance. CI passed the same suites on #30390. - `prisma-8-cloudflare-worker` needs a local Hyperdrive database. - The telemetry backend tests need Node 24.16 with `Temporal`. This machine has 24.13. - `fixtures:check` needs Postgres. 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added PostgreSQL full-text search, multi-file schemas, prepared ORM reads and aggregates, and conflict-skipping options for bulk creation. * Added support for using a Prisma 7 schema as the contract source, JavaScript `Date` timestamps on PostgreSQL, editor support for attribute arguments, and per-finding diagnostics. * **Breaking Changes** * Prisma 8 schema files now require `// use prisma-8` on the first line; unmapped models use their names verbatim for table names. * Replace `dbgenerated(...)` with SQL tagged literals. Defaults must be valid for their column types, creation timestamps use the application clock, and native PostgreSQL enums no longer support text operations. * Config naming and path resolution, migration starting points, and extension contracts have changed. * **Bug Fixes** * Improved migration checks and branching warnings, contract generation and inference, default verification, and type checking. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> | 18 小时前 | |
refactor(psl): track source provenance by syntax root (#30335) ## Linked issue Linear linkage omitted at the author's request. ## Summary Track PSL source provenance by syntax root rather than independently threading filenames through consumers. This is internal groundwork for future multifile support; existing single-file behavior remains the scope. ## Changes - Require `parse(source, filename, options?)`; put filenames and coordinate conversion on `SourceFile`. - Introduce `PslSources`, mapping red syntax roots to source files. Descendant lookup walks parents and throws `InternalError` for unregistered roots, without a singleton fallback. - Migrate SQL, Mongo, and language-server consumers to node-owned provenance while retaining cached live-buffer semantics. - Add regression coverage, narrow vocabulary-lint precision fixes, and cast-policy repairs in touched packages; document the model in ADR 253 and the parser README. ## Why A diagnostic's filename and location must come from the source that owns its syntax node, not a potentially different provider path or cached context. Red-root identity preserves that association without changing file-agnostic green trees. ## Scope Single-file internal provenance only: no glob discovery, schema merging, or multifile behavior. Prisma 7 changes are mechanical compatibility adaptations, not a provenance redesign. ## Testing performed - Previously recorded targeted passes: parser 744 tests, SQL 475, Mongo 196, and language server 587; workspace typecheck and `lint:deps` also passed at recorded checks. - Full workspace gates are **not green**. Latest full lint, fixture, and package-test runs failed with migration-tools cast findings, Prisma binary lookup failures in fixtures, and telemetry timeout / tarball skill-path errors. - Unfinished uncommitted remediation was discarded at the author's request. Validation was not rerun on the resulting final tree; these results are not a claim that all final-HEAD gates pass. ## Skill update n/a — internal only. ## Checklist - [x] All commits are DCO signed off. - [x] Tests are updated. - [x] Skill update status is stated above. - [ ] CONTRIBUTING review is not asserted by this PR-opening pass. - [ ] Linear-prefixed title intentionally omitted at the author's request. ## Notes for the reviewer The PR retains the committed implementation, lint/cast repairs, and architecture documentation. Full-workspace failures remain disclosed rather than waived as baseline. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * PSL parsing now accepts named source files and supports symbol analysis across multiple documents. * Diagnostics and editor features retain accurate source ownership across files. * Package exports now provide TypeScript declarations alongside runtime imports. * **Bug Fixes** * Improved diagnostic locations and source identifiers for relations, defaults, indexes, and enums. * Language server diagnostics now include parse errors and preserve last-known-good results during reloads. * Improved validation and error handling for malformed serialized operations and parser edge cases. * **Documentation** * Added architecture guidance for PSL source ownership and diagnostic mapping. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Steven McClankerton <tatarintsev@prisma.io> Co-authored-by: Steven McClankerton <tatarintsev@prisma.io> Co-authored-by: Claude Fable 5 <noreply@anthropic.com> | 6 天前 | |
ci: the DCO app checks merge-queue commits, so remove the placeholder DCO workflow (#30419) ## At a glance The merge-queue commits for #30392, #30397 and #30410 each carry two `DCO` results: ```text DCO dco success <- the DCO app; the ruleset requires this one DCO github-actions success <- .github/workflows/dco.yml; ignored ``` After this PR only the app's result remains. ## What this PR changes 1. Deletes `.github/workflows/dco.yml`. 2. `docs/oss/ci-pipeline.md` says the `DCO` check comes from the DCO app, on PRs and on merge-queue commits. ## Why the placeholder existed, and why it can go The DCO requires a `Signed-off-by:` trailer on every commit. The [DCO GitHub App](https://github.com/apps/dco) enforces it by posting a check named `DCO`. Until recently the app only ran on PRs, so a merge-queue commit never got a `DCO` result and the queue stalled. `dco.yml` filled that gap: it ran on `merge_group`, echoed a message, and passed without reading any commits. The app now handles merge-queue events: the org installation accepted its new "Merge queues" permission. The `main` ruleset requires `DCO` from the app only, so the placeholder's result no longer counts toward the merge. It only costs a runner for every queued PR. ## Tests None; this is a workflow deletion. This PR's own trip through the merge queue shows the app's `DCO` result satisfying the requirement without the placeholder. 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Clarified that the DCO app posts a separate check for pull requests and merge-queue commits. * **Chores** * Removed a redundant DCO workflow check; DCO sign-off checks continue to be posted by the DCO app. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> | 1 小时前 | |
docs: close out the orm-init-prisma7-detection project (#30392) Close-out of the orm-init-prisma7-detection project after its one PR, #30291 (a Prisma 7 project gets Prisma 8 set up beside it by running `orm init` once), merged. The project's docs brief becomes a reference page, the design decisions the CLI README did not state yet are added to it, the final retro's lessons land in `drive/`, and the transient project directory is deleted. **Linear:** no Linear project tracked this work. Deferred work filed at close-out: [TML-3291](https://linear.app/prisma-company/issue/TML-3291) (the upgrade guides' tsconfig advice, assigned to the docs owner, @wmadden) and [TML-3292](https://linear.app/prisma-company/issue/TML-3292) (rough edges from manual QA of `orm init`). ## Definition of done, verified on `main` at `b95a1b92a3` - **Slices.** Slice 1 (Postgres) merged as #30291. Slice 2 (Mongo) is cancelled: Prisma 7 has no Mongo support, and init already uses whatever Prisma 7 contract source a target package exports, so nothing is deferred. - **Fixture run.** A checked-in Prisma 7 project run through `orm init --from-prisma7-schema prisma/schema.prisma --confirm <dir>` emits the contract, leaves `prisma/` byte-identical, and `prisma db sign` then `prisma db verify` succeed with zero findings against a database built from its Prisma 7 migration: `packages/1-framework/3-tooling/cli/test/orm/init-prisma7.e2e.test.ts`. - **Refused schema.** A schema the source refuses (a `view` block) stops init with the source's diagnostics and leaves the project unchanged apart from the checked packages: the second case in the same file. - **Interactive path, refusals, re-run consent.** Covered by the `init-prisma7-prompts`, `init-prisma7-inputs`, `init-prisma7-consent`, and `init-prisma7-check` tests in the same directory. - **Documentation.** The CLI README documents the Prisma 7 path and the `git init` boundary. The docs brief is handed to the `prisma/web` docs owner as TML-3291, with its facts in `docs/reference/typescript-module-settings.md`. - **Repo-wide gates on this branch.** `pnpm build`, `pnpm lint:deps`, `pnpm fixtures:check`, `pnpm lint:docs`, and `pnpm lint:framework-vocabulary` pass; every commit carries a `Signed-off-by` trailer. - **Linear close-out.** Not applicable: the project had no Linear project, at the operator's request. - **Manual QA roll-up.** Two runs against a Prisma 7.10.0 project. The blocker and the should-fix findings in init were fixed in #30291. The two findings in `@prisma/cli-engine` (`--confirm` ignored interactively, the process staying alive after answered prompts) are handled separately. The remaining minor findings are TML-3292. `drive/qa/README.md` gained a pre-run step. - **ADR audit.** No ADR. The one candidate was the schema check loading the target package into the running CLI, which could misread a schema if the two came from different releases. That cannot happen for a user: init installs the latest target package beside the latest CLI, and releases pin them to the same version (operator ruling, 2026-09-24). - **Review threads.** None open on #30291. ## Where each project decision lives now | Decision (design notes) | Durable home | | --- | --- | | D1 no separate `prisma upgrade` command | CLI README, init section, design constraints | | D2 init never signs or connects beyond `--probe-db` | CLI README, init section ("behaves like `git init`") | | D3 side-by-side setup under one consent; `@prisma/client` moves with the Prisma 7 CLI | CLI README, init section (consent bullets and design constraints) | | D4 connection line is `process.env['DATABASE_URL']!`; the Prisma 7 `datasource.url` is not copied | CLI README, design constraints | | D5 layout is `src/prisma/`; nothing is written under `prisma/` | CLI README, init section and design constraints | | D6 Mongo waits for its own source | Superseded by D10; slice 2 cancelled above | | D7 `package.json#type` and tsconfig handling unchanged | CLI README, design constraints; `docs/reference/typescript-module-settings.md` | | D8, D10 the schema check runs the installed target package's `prisma7Schema` before any consent or edit; the target comes from the provider; a mismatched `--target` fails early; a package without `prisma7Schema` means a fresh init after a yes and an error with the flag | CLI README, init section; `docs/reference/error-reference.md` (`CLI.INIT_PRISMA7_*`); enforced by the tests above | | D9 no cutover step | CLI README, design constraints | | Rejected: generated `contract.ts` beside `contract.json` | `docs/Architecture Overview.md` (the product emits a data artefact plus types) | | Rejected: detecting a Prisma 7 config by its import text | CLI README ("a Prisma 7 config (`prisma.config.*` without the `$prismaConfig` marker)") | ## What moves where | Project file | Classification | Destination | | --- | --- | --- | | `docs-brief-module-settings.md` | long-lived, rewritten at migration to drop the brief's project framing and dated anchors | `docs/reference/typescript-module-settings.md`, indexed from `docs/README.md`. The request to change the `prisma/web` guides and the example project is TML-3291. | | `design-notes.md` | transient (decision log) | Decisions mapped above; the ones not yet in the CLI README were added to it. | | `manual-qa.md`, `manual-qa-reports/*` | transient | Unresolved findings are TML-3292. | | `spec.md`, `plan.md`, the slice spec, plan, and PR-body draft | transient | deleted | No file outside the project directory referenced it, so nothing was re-pointed. ## Final retro 1. **What went well.** Manual QA on a real Prisma 7 project and an independent review of the diff found five bugs the tests missed, among them a remove command that would have deleted a package the user had declared, and a re-run that replaced `prisma.config.ts` without asking. The end-to-end test runs the real `db sign` and `db verify`. 2. **What surprised us.** - The ruling "Our init command cannot be target specific" was recorded as "init must be target-agnostic"; the finishing brief was built on that reading, and the operator corrected it in the first question round. - A scripted `consent` returned `false`, which the engine never does, so a test covered a path users cannot reach. - A manual QA run against published `dev` builds refused a valid schema because the branch was a week behind `main`. - The feature merged while the published `@prisma/orm-postgres` still predated the Prisma 7 contract source, so users get it only with the next release; the plan never named that release. - Two problems that made the PR unacceptable to users (it was coupled to one database, and it changed the project before checking the schema) surfaced only in manual review after five dispatches; the spec never said what state the project is left in after each failure. - The finishing work ran without Drive dispatches, and the first pass of this close-out skipped the operator confirmation steps. 3. **Where the lessons landed.** - `drive/calibration/failure-modes.md`: F32 (record a ruling as a quote and confirm its interpretation) and F33 (a test fake returns only what the real surface returns). - `drive/qa/README.md`: merge `main` and rebuild before manual QA against published builds made from `main`. - `drive/spec/README.md`: a failure-state section for specs of commands that edit files they did not write. - `drive/project/README.md`: plans name the release that ships each dependency to users. - `drive/retro/README.md`: this retro in the recurring-pattern catalogue. 4. **Deferred work.** Slice 2 cancelled (above). TML-3291 and TML-3292 filed. 5. **ADR-worthy decision.** None (ADR audit above). 6. **Team summary.** `prisma orm init` now sets Prisma 8 up beside Prisma 7 in one run, reading the existing `schema.prisma`, and stops before changing anything when Prisma 8 cannot read it (#30291). ## Testing performed - `pnpm build`, `pnpm lint:deps`, `pnpm fixtures:check`, `pnpm lint:docs`, `pnpm lint:framework-vocabulary` on this branch: all pass. No code changes. ## Skill update n/a. Docs and process files only. ## Checklist - [x] All commits are signed off (`git commit -s`) per the DCO. - [x] I read CONTRIBUTING.md and the change is scoped to one logical concern. - [x] Tests are updated: n/a, doc-only. - [ ] The PR title is in `TML-NNNN: <sentence-case title>` form: n/a, no ticket tracks the close-out. - [x] The **Skill update** section above is filled in. 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Added a Prisma 8 TypeScript module settings guide with recommendations by project type, JSON import requirements, and details on settings written by `prisma orm init`. * Expanded `prisma orm init` documentation with Prisma 7 configuration rename behavior, migration constraints, and guidance for handling related imports. * Clarified how initialization handles `package.json` and `tsconfig.json` settings. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> | 2 小时前 | |
chore(release): bump to 8.0.0-rc.12 (#30395) ## Release: 8.0.0-rc.11 → 8.0.0-rc.12 This is the release PR described in [docs/oss/versioning.md](https://github.com/prisma/orm/blob/main/docs/oss/versioning.md). It bumps every workspace package to 8.0.0-rc.12 and moves the Prisma dependencies to their latest versions. **Merging this PR ships the release.** The push to `main` carries the new root `version`. The `Publish to npm` workflow then publishes 8.0.0-rc.12 under `latest` and creates a pre-release GitHub Release from the notes file. ## Review these first - [docs/releases/v8.0.0-rc.12.md](https://github.com/prisma/orm/blob/release/8.0.0-rc.12/docs/releases/v8.0.0-rc.12.md): the release notes, which become the GitHub Release body. The same entry is at the top of `CHANGELOG.md`. - The upgrade guides for [apps](https://github.com/prisma/orm/blob/release/8.0.0-rc.12/skills/prisma-8/upgrading/app/upgrades/8.0.0-rc.11-to-8.0.0-rc.12/instructions.md) and [extensions](https://github.com/prisma/orm/blob/release/8.0.0-rc.12/skills/prisma-8/upgrading/extension/upgrades/8.0.0-rc.11-to-8.0.0-rc.12/instructions.md). They merge the 24 pending fragments. The original fragments are moved unchanged to `upgrade-instructions/releases/8.0.0-rc.11-to-8.0.0-rc.12/sources/`. - Four guide entries have no fragment behind them. The `migration new` default and its removed error codes (#30389) had no guide entry. Neither did the PSL parser API changes (#30312, #30344, #30335, #30379). I wrote those entries while preparing the release. - Where fragments contradicted later code, the guide follows the code. Examples: the Supabase storage hash, `voidParamsSchema`, and quoted defaults printed by `infer`. ## Dependency updates | Package | From | To | Where | | --- | --- | --- | --- | | `@prisma/cli-engine` | 0.4.0 | 0.6.1 | examples, test fixtures, apps (the toolchain packages were already on 0.6.1 from #30372) | | `@prisma/dev` | 0.25.1 | 0.25.2 | the workspace catalog | | `@prisma/compute-sdk` | ^0.39.0 | ^0.43.0 | `apps/telemetry-backend` | | `@prisma/management-api-sdk` | ^1.56.0 | ^1.76.0 | `apps/telemetry-backend` | compute-sdk 0.43 renames "service" to "app" and "version" to "deployment". The telemetry deploy script now uses the new names. Both SDK versions call `/v1/apps/{appId}`, so the ID stored in the existing `TELEMETRY_DEPLOY_SERVICE_ID` secret is still correct. The app's typecheck now includes `scripts/`, so it catches the next SDK rename. The repo does not depend on `@prisma/composer`. ## Fixes needed to publish - **The publish workflow has failed on `main` since #30372.** `check:conformance` called the `orm` config validator as `validate(value)`. Engine 0.6 always calls `validate(value, provenance)`, and the validator reads `provenance.files`, so it threw on every input. The check now passes the same provenance the engine would. The prisma-cli copy of this check already does this. - `set-version` rewrote `workspace:@internal/cli@<version>` to `workspace:<version>`, dropping the alias. The prisma7-adoption example uses that alias. This is the first bump since the alias was added. - `lint:legacy-name` and the `add-model-map` test pointed at the pending fragment paths. They now point at the archived sources. ## Verification Passed locally: - `pnpm build` - `pnpm typecheck` - `pnpm lint` - `pnpm test:scripts` (563 tests) - `pnpm check:conformance` - `pnpm check:publish-deps` - `pnpm check:upgrade-coverage`, in both publish and PR mode - `pnpm check:release-notes`, in both publish and PR mode - `pnpm lint:legacy-name` - `pnpm lint:skills` - `pnpm test:packages`: all 18,196 tests passed Not covered locally, left to CI: - Three `test:packages` suites install packed tarballs from the registry. This machine's pnpm refuses `@vercel/detect-agent@1.2.5` because it has no provenance. CI passed the same suites on #30390. - `prisma-8-cloudflare-worker` needs a local Hyperdrive database. - The telemetry backend tests need Node 24.16 with `Temporal`. This machine has 24.13. - `fixtures:check` needs Postgres. 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added PostgreSQL full-text search, multi-file schemas, prepared ORM reads and aggregates, and conflict-skipping options for bulk creation. * Added support for using a Prisma 7 schema as the contract source, JavaScript `Date` timestamps on PostgreSQL, editor support for attribute arguments, and per-finding diagnostics. * **Breaking Changes** * Prisma 8 schema files now require `// use prisma-8` on the first line; unmapped models use their names verbatim for table names. * Replace `dbgenerated(...)` with SQL tagged literals. Defaults must be valid for their column types, creation timestamps use the application clock, and native PostgreSQL enums no longer support text operations. * Config naming and path resolution, migration starting points, and extension contracts have changed. * **Bug Fixes** * Improved migration checks and branching warnings, contract generation and inference, default verification, and type checking. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> | 18 小时前 | |
refactor: rename every user-facing prisma-next identifier to Prisma 8 (#30262) ## Linked issue n/a — no Linear ticket. Completes the rename that #30248 started for prose; builds on #30261. ## At a glance Every `prisma-next` identifier a user can see is renamed. Before and after, for a scaffolded project: ```text // use prisma-next → // use prisma-8 (schema header) prisma-next.md → prisma-8.md (primer at the project root) PRISMA_NEXT_DISABLE_TELEMETRY → PRISMA_DISABLE_TELEMETRY (and every other PRISMA_NEXT_* variable) ~/.config/prisma-next/ → ~/.config/prisma-8/ (per-user telemetry config) prisma-next contract emit → prisma contract emit (CLI invocations in docs, fixtures, recordings) ``` ## Summary After #30248 the product was called Prisma 8 in prose, but the working name was still written into user projects and printed by the CLI: the schema header, the primer file, the environment variables, the per-user config directory, the language-server diagnostic source, the Standard Schema vendor string, the contract brand symbol, the advisory-lock domain, and about 650 fixture and doc files that spelled out `prisma-next …` commands. This PR renames all of it in one pass and tightens the legacy-name lint so the only occurrences left are the ones with a reason. ## Decision One commit. The mapping: | Surface | Before | After | |---|---|---| | Schema header | `// use prisma-next` | `// use prisma-8` | | Primer file `init` writes | `prisma-next.md` | `prisma-8.md` | | CLI environment variables | `PRISMA_NEXT_*` | `PRISMA_*` | | Per-user config directory | `prisma-next/` | `prisma-8/` | | Language-server diagnostic source | `prisma-next` | `prisma` | | Standard Schema vendor, VS Code publisher | `prisma-next` | `prisma` | | Contract brand symbol | `__prisma_next_brand__` | `__prisma_8_brand__` | | Postgres advisory-lock domain | `prisma_next.contract.marker` | `prisma_8.contract.marker` | | Example database names | `prisma_next_*` | `prisma_8_*` | | README banner image | `images/prisma-next.png` | `images/prisma-8.png` | | Telemetry docs URL | `prisma-next.dev/docs/…` | `www.prisma.io/docs/…` | | New-issue links | `github.com/prisma/prisma-next/issues/new` | `github.com/prisma/orm/issues/new` | | CLI invocations in prose, fixtures, and recordings | `prisma-next db verify` | `prisma db verify` | `prisma-8` is the slug the repo already uses for the skill, the examples, and the upgrade directories, so it is the slug for everything that needs one. Environment variables drop the infix entirely because `PRISMA_*` is what users expect and nothing else in the repo claims those names. What keeps the old name, each with a lint allowance that says why: - **Dated records**: changelog, release notes, ADRs, shipped upgrade instructions, gotcha logs, the framework-gaps review, and the `projects/` and `drive/` write-ups. - **Pinned links** into the old repository by number, Linear slugs, and links to ADRs whose filenames carry the name. - **`@cipherstash/prisma-next`**, a third party's published package name. - **Retirement proofs**: the list of old skill directories `init` deletes, and the tests asserting that no `prisma-next` bin or skill directory is installed any more. ## Behavior changes & evidence - **Schema header.** The inferred-schema printer and the `init` templates write `// use prisma-8`. The language server accepts both headers, so existing schemas keep their diagnostics and completion, and its Format action rewrites the old header to the new one. [packages/1-framework/3-tooling/language-server/src/schema-directive.ts](packages/1-framework/3-tooling/language-server/src/schema-directive.ts), [packages/1-framework/2-authoring/psl-printer/src/ast-to-print-document.ts](packages/1-framework/2-authoring/psl-printer/src/ast-to-print-document.ts). Evidence: the `renameLegacyDirective` tests, the server test that formats a legacy-headed schema, and the psl-printer tests. - **Environment variables.** Telemetry gating, the endpoint override, and the debug switch read the new names. `PRISMA_NEXT_DISABLE_TELEMETRY` is still honoured as an opt-out so nobody is silently opted back in; the endpoint and debug spellings are not. [packages/1-framework/3-tooling/cli-telemetry/src/gating.ts](packages/1-framework/3-tooling/cli-telemetry/src/gating.ts). Evidence: cli-telemetry gating tests. - **Per-user config directory.** [packages/1-framework/3-tooling/cli-telemetry/src/user-config.ts](packages/1-framework/3-tooling/cli-telemetry/src/user-config.ts). Existing users see the telemetry consent prompt once more; nothing else is lost. - **Primer file.** [packages/1-framework/3-tooling/cli/src/orm/init-scaffold.ts](packages/1-framework/3-tooling/cli/src/orm/init-scaffold.ts). Evidence: init-scaffold tests and template snapshots. - **Advisory-lock domain.** A CLI on this version and one on the previous version take different locks for the same marker. Both versions running migrations against one database at the same moment is already unsupported. - **Upgrade instructions.** Entries for the header, the environment variables, and the primer file are recorded in the rc.9 → rc.10 app and extension instructions with detection patterns, so the published upgrade skill applies the rename. ## Testing performed - `pnpm test` in cli (1437), cli-telemetry (112), language-server (312), psl-printer (63), framework-components (672), target-postgres (1607), vite-plugin-contract-emit (31), emitter (231), and `pnpm test:scripts` (507): all pass after `pnpm build`. The language-server tests hard-coded the old header's length in semantic-token arrays and span offsets; those expectations are updated. - Committed migration steps and their content-addressed contract snapshots are left untouched, since rewriting them would break their hashes; the lint treats them as dated records. - `pnpm lint:legacy-name` passes with the tightened allowances; `node --test scripts/lint-legacy-name.test.mjs` passes (14 tests, including new negative cases for the header, primer, and skill names). - `pnpm check:upgrade-coverage --mode pr --prev origin/main` passes. ## Skill update `skills/prisma-8` references and the two rc.9 → rc.10 upgrade instruction files are updated in this PR. ## Checklist - [x] All commits are signed off (`git commit -s`) per the [DCO](../CONTRIBUTING.md#developer-certificate-of-origin-dco). - [x] I read [CONTRIBUTING.md](../CONTRIBUTING.md) and the change is scoped to one logical concern. - [x] Tests are updated. - [ ] The PR title is in `TML-NNNN: <sentence-case title>` form. No Linear ticket exists for this change. - [x] The **Skill update** section above is filled in. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io> Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> | 13 天前 | |
docs: close out the orm-init-prisma7-detection project (#30392) Close-out of the orm-init-prisma7-detection project after its one PR, #30291 (a Prisma 7 project gets Prisma 8 set up beside it by running `orm init` once), merged. The project's docs brief becomes a reference page, the design decisions the CLI README did not state yet are added to it, the final retro's lessons land in `drive/`, and the transient project directory is deleted. **Linear:** no Linear project tracked this work. Deferred work filed at close-out: [TML-3291](https://linear.app/prisma-company/issue/TML-3291) (the upgrade guides' tsconfig advice, assigned to the docs owner, @wmadden) and [TML-3292](https://linear.app/prisma-company/issue/TML-3292) (rough edges from manual QA of `orm init`). ## Definition of done, verified on `main` at `b95a1b92a3` - **Slices.** Slice 1 (Postgres) merged as #30291. Slice 2 (Mongo) is cancelled: Prisma 7 has no Mongo support, and init already uses whatever Prisma 7 contract source a target package exports, so nothing is deferred. - **Fixture run.** A checked-in Prisma 7 project run through `orm init --from-prisma7-schema prisma/schema.prisma --confirm <dir>` emits the contract, leaves `prisma/` byte-identical, and `prisma db sign` then `prisma db verify` succeed with zero findings against a database built from its Prisma 7 migration: `packages/1-framework/3-tooling/cli/test/orm/init-prisma7.e2e.test.ts`. - **Refused schema.** A schema the source refuses (a `view` block) stops init with the source's diagnostics and leaves the project unchanged apart from the checked packages: the second case in the same file. - **Interactive path, refusals, re-run consent.** Covered by the `init-prisma7-prompts`, `init-prisma7-inputs`, `init-prisma7-consent`, and `init-prisma7-check` tests in the same directory. - **Documentation.** The CLI README documents the Prisma 7 path and the `git init` boundary. The docs brief is handed to the `prisma/web` docs owner as TML-3291, with its facts in `docs/reference/typescript-module-settings.md`. - **Repo-wide gates on this branch.** `pnpm build`, `pnpm lint:deps`, `pnpm fixtures:check`, `pnpm lint:docs`, and `pnpm lint:framework-vocabulary` pass; every commit carries a `Signed-off-by` trailer. - **Linear close-out.** Not applicable: the project had no Linear project, at the operator's request. - **Manual QA roll-up.** Two runs against a Prisma 7.10.0 project. The blocker and the should-fix findings in init were fixed in #30291. The two findings in `@prisma/cli-engine` (`--confirm` ignored interactively, the process staying alive after answered prompts) are handled separately. The remaining minor findings are TML-3292. `drive/qa/README.md` gained a pre-run step. - **ADR audit.** No ADR. The one candidate was the schema check loading the target package into the running CLI, which could misread a schema if the two came from different releases. That cannot happen for a user: init installs the latest target package beside the latest CLI, and releases pin them to the same version (operator ruling, 2026-09-24). - **Review threads.** None open on #30291. ## Where each project decision lives now | Decision (design notes) | Durable home | | --- | --- | | D1 no separate `prisma upgrade` command | CLI README, init section, design constraints | | D2 init never signs or connects beyond `--probe-db` | CLI README, init section ("behaves like `git init`") | | D3 side-by-side setup under one consent; `@prisma/client` moves with the Prisma 7 CLI | CLI README, init section (consent bullets and design constraints) | | D4 connection line is `process.env['DATABASE_URL']!`; the Prisma 7 `datasource.url` is not copied | CLI README, design constraints | | D5 layout is `src/prisma/`; nothing is written under `prisma/` | CLI README, init section and design constraints | | D6 Mongo waits for its own source | Superseded by D10; slice 2 cancelled above | | D7 `package.json#type` and tsconfig handling unchanged | CLI README, design constraints; `docs/reference/typescript-module-settings.md` | | D8, D10 the schema check runs the installed target package's `prisma7Schema` before any consent or edit; the target comes from the provider; a mismatched `--target` fails early; a package without `prisma7Schema` means a fresh init after a yes and an error with the flag | CLI README, init section; `docs/reference/error-reference.md` (`CLI.INIT_PRISMA7_*`); enforced by the tests above | | D9 no cutover step | CLI README, design constraints | | Rejected: generated `contract.ts` beside `contract.json` | `docs/Architecture Overview.md` (the product emits a data artefact plus types) | | Rejected: detecting a Prisma 7 config by its import text | CLI README ("a Prisma 7 config (`prisma.config.*` without the `$prismaConfig` marker)") | ## What moves where | Project file | Classification | Destination | | --- | --- | --- | | `docs-brief-module-settings.md` | long-lived, rewritten at migration to drop the brief's project framing and dated anchors | `docs/reference/typescript-module-settings.md`, indexed from `docs/README.md`. The request to change the `prisma/web` guides and the example project is TML-3291. | | `design-notes.md` | transient (decision log) | Decisions mapped above; the ones not yet in the CLI README were added to it. | | `manual-qa.md`, `manual-qa-reports/*` | transient | Unresolved findings are TML-3292. | | `spec.md`, `plan.md`, the slice spec, plan, and PR-body draft | transient | deleted | No file outside the project directory referenced it, so nothing was re-pointed. ## Final retro 1. **What went well.** Manual QA on a real Prisma 7 project and an independent review of the diff found five bugs the tests missed, among them a remove command that would have deleted a package the user had declared, and a re-run that replaced `prisma.config.ts` without asking. The end-to-end test runs the real `db sign` and `db verify`. 2. **What surprised us.** - The ruling "Our init command cannot be target specific" was recorded as "init must be target-agnostic"; the finishing brief was built on that reading, and the operator corrected it in the first question round. - A scripted `consent` returned `false`, which the engine never does, so a test covered a path users cannot reach. - A manual QA run against published `dev` builds refused a valid schema because the branch was a week behind `main`. - The feature merged while the published `@prisma/orm-postgres` still predated the Prisma 7 contract source, so users get it only with the next release; the plan never named that release. - Two problems that made the PR unacceptable to users (it was coupled to one database, and it changed the project before checking the schema) surfaced only in manual review after five dispatches; the spec never said what state the project is left in after each failure. - The finishing work ran without Drive dispatches, and the first pass of this close-out skipped the operator confirmation steps. 3. **Where the lessons landed.** - `drive/calibration/failure-modes.md`: F32 (record a ruling as a quote and confirm its interpretation) and F33 (a test fake returns only what the real surface returns). - `drive/qa/README.md`: merge `main` and rebuild before manual QA against published builds made from `main`. - `drive/spec/README.md`: a failure-state section for specs of commands that edit files they did not write. - `drive/project/README.md`: plans name the release that ships each dependency to users. - `drive/retro/README.md`: this retro in the recurring-pattern catalogue. 4. **Deferred work.** Slice 2 cancelled (above). TML-3291 and TML-3292 filed. 5. **ADR-worthy decision.** None (ADR audit above). 6. **Team summary.** `prisma orm init` now sets Prisma 8 up beside Prisma 7 in one run, reading the existing `schema.prisma`, and stops before changing anything when Prisma 8 cannot read it (#30291). ## Testing performed - `pnpm build`, `pnpm lint:deps`, `pnpm fixtures:check`, `pnpm lint:docs`, `pnpm lint:framework-vocabulary` on this branch: all pass. No code changes. ## Skill update n/a. Docs and process files only. ## Checklist - [x] All commits are signed off (`git commit -s`) per the DCO. - [x] I read CONTRIBUTING.md and the change is scoped to one logical concern. - [x] Tests are updated: n/a, doc-only. - [ ] The PR title is in `TML-NNNN: <sentence-case title>` form: n/a, no ticket tracks the close-out. - [x] The **Skill update** section above is filled in. 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Added a Prisma 8 TypeScript module settings guide with recommendations by project type, JSON import requirements, and details on settings written by `prisma orm init`. * Expanded `prisma orm init` documentation with Prisma 7 configuration rename behavior, migration constraints, and guidance for handling related imports. * Clarified how initialization handles `package.json` and `tsconfig.json` settings. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> | 2 小时前 | |
docs: close out the orm-init-prisma7-detection project (#30392) Close-out of the orm-init-prisma7-detection project after its one PR, #30291 (a Prisma 7 project gets Prisma 8 set up beside it by running `orm init` once), merged. The project's docs brief becomes a reference page, the design decisions the CLI README did not state yet are added to it, the final retro's lessons land in `drive/`, and the transient project directory is deleted. **Linear:** no Linear project tracked this work. Deferred work filed at close-out: [TML-3291](https://linear.app/prisma-company/issue/TML-3291) (the upgrade guides' tsconfig advice, assigned to the docs owner, @wmadden) and [TML-3292](https://linear.app/prisma-company/issue/TML-3292) (rough edges from manual QA of `orm init`). ## Definition of done, verified on `main` at `b95a1b92a3` - **Slices.** Slice 1 (Postgres) merged as #30291. Slice 2 (Mongo) is cancelled: Prisma 7 has no Mongo support, and init already uses whatever Prisma 7 contract source a target package exports, so nothing is deferred. - **Fixture run.** A checked-in Prisma 7 project run through `orm init --from-prisma7-schema prisma/schema.prisma --confirm <dir>` emits the contract, leaves `prisma/` byte-identical, and `prisma db sign` then `prisma db verify` succeed with zero findings against a database built from its Prisma 7 migration: `packages/1-framework/3-tooling/cli/test/orm/init-prisma7.e2e.test.ts`. - **Refused schema.** A schema the source refuses (a `view` block) stops init with the source's diagnostics and leaves the project unchanged apart from the checked packages: the second case in the same file. - **Interactive path, refusals, re-run consent.** Covered by the `init-prisma7-prompts`, `init-prisma7-inputs`, `init-prisma7-consent`, and `init-prisma7-check` tests in the same directory. - **Documentation.** The CLI README documents the Prisma 7 path and the `git init` boundary. The docs brief is handed to the `prisma/web` docs owner as TML-3291, with its facts in `docs/reference/typescript-module-settings.md`. - **Repo-wide gates on this branch.** `pnpm build`, `pnpm lint:deps`, `pnpm fixtures:check`, `pnpm lint:docs`, and `pnpm lint:framework-vocabulary` pass; every commit carries a `Signed-off-by` trailer. - **Linear close-out.** Not applicable: the project had no Linear project, at the operator's request. - **Manual QA roll-up.** Two runs against a Prisma 7.10.0 project. The blocker and the should-fix findings in init were fixed in #30291. The two findings in `@prisma/cli-engine` (`--confirm` ignored interactively, the process staying alive after answered prompts) are handled separately. The remaining minor findings are TML-3292. `drive/qa/README.md` gained a pre-run step. - **ADR audit.** No ADR. The one candidate was the schema check loading the target package into the running CLI, which could misread a schema if the two came from different releases. That cannot happen for a user: init installs the latest target package beside the latest CLI, and releases pin them to the same version (operator ruling, 2026-09-24). - **Review threads.** None open on #30291. ## Where each project decision lives now | Decision (design notes) | Durable home | | --- | --- | | D1 no separate `prisma upgrade` command | CLI README, init section, design constraints | | D2 init never signs or connects beyond `--probe-db` | CLI README, init section ("behaves like `git init`") | | D3 side-by-side setup under one consent; `@prisma/client` moves with the Prisma 7 CLI | CLI README, init section (consent bullets and design constraints) | | D4 connection line is `process.env['DATABASE_URL']!`; the Prisma 7 `datasource.url` is not copied | CLI README, design constraints | | D5 layout is `src/prisma/`; nothing is written under `prisma/` | CLI README, init section and design constraints | | D6 Mongo waits for its own source | Superseded by D10; slice 2 cancelled above | | D7 `package.json#type` and tsconfig handling unchanged | CLI README, design constraints; `docs/reference/typescript-module-settings.md` | | D8, D10 the schema check runs the installed target package's `prisma7Schema` before any consent or edit; the target comes from the provider; a mismatched `--target` fails early; a package without `prisma7Schema` means a fresh init after a yes and an error with the flag | CLI README, init section; `docs/reference/error-reference.md` (`CLI.INIT_PRISMA7_*`); enforced by the tests above | | D9 no cutover step | CLI README, design constraints | | Rejected: generated `contract.ts` beside `contract.json` | `docs/Architecture Overview.md` (the product emits a data artefact plus types) | | Rejected: detecting a Prisma 7 config by its import text | CLI README ("a Prisma 7 config (`prisma.config.*` without the `$prismaConfig` marker)") | ## What moves where | Project file | Classification | Destination | | --- | --- | --- | | `docs-brief-module-settings.md` | long-lived, rewritten at migration to drop the brief's project framing and dated anchors | `docs/reference/typescript-module-settings.md`, indexed from `docs/README.md`. The request to change the `prisma/web` guides and the example project is TML-3291. | | `design-notes.md` | transient (decision log) | Decisions mapped above; the ones not yet in the CLI README were added to it. | | `manual-qa.md`, `manual-qa-reports/*` | transient | Unresolved findings are TML-3292. | | `spec.md`, `plan.md`, the slice spec, plan, and PR-body draft | transient | deleted | No file outside the project directory referenced it, so nothing was re-pointed. ## Final retro 1. **What went well.** Manual QA on a real Prisma 7 project and an independent review of the diff found five bugs the tests missed, among them a remove command that would have deleted a package the user had declared, and a re-run that replaced `prisma.config.ts` without asking. The end-to-end test runs the real `db sign` and `db verify`. 2. **What surprised us.** - The ruling "Our init command cannot be target specific" was recorded as "init must be target-agnostic"; the finishing brief was built on that reading, and the operator corrected it in the first question round. - A scripted `consent` returned `false`, which the engine never does, so a test covered a path users cannot reach. - A manual QA run against published `dev` builds refused a valid schema because the branch was a week behind `main`. - The feature merged while the published `@prisma/orm-postgres` still predated the Prisma 7 contract source, so users get it only with the next release; the plan never named that release. - Two problems that made the PR unacceptable to users (it was coupled to one database, and it changed the project before checking the schema) surfaced only in manual review after five dispatches; the spec never said what state the project is left in after each failure. - The finishing work ran without Drive dispatches, and the first pass of this close-out skipped the operator confirmation steps. 3. **Where the lessons landed.** - `drive/calibration/failure-modes.md`: F32 (record a ruling as a quote and confirm its interpretation) and F33 (a test fake returns only what the real surface returns). - `drive/qa/README.md`: merge `main` and rebuild before manual QA against published builds made from `main`. - `drive/spec/README.md`: a failure-state section for specs of commands that edit files they did not write. - `drive/project/README.md`: plans name the release that ships each dependency to users. - `drive/retro/README.md`: this retro in the recurring-pattern catalogue. 4. **Deferred work.** Slice 2 cancelled (above). TML-3291 and TML-3292 filed. 5. **ADR-worthy decision.** None (ADR audit above). 6. **Team summary.** `prisma orm init` now sets Prisma 8 up beside Prisma 7 in one run, reading the existing `schema.prisma`, and stops before changing anything when Prisma 8 cannot read it (#30291). ## Testing performed - `pnpm build`, `pnpm lint:deps`, `pnpm fixtures:check`, `pnpm lint:docs`, `pnpm lint:framework-vocabulary` on this branch: all pass. No code changes. ## Skill update n/a. Docs and process files only. ## Checklist - [x] All commits are signed off (`git commit -s`) per the DCO. - [x] I read CONTRIBUTING.md and the change is scoped to one logical concern. - [x] Tests are updated: n/a, doc-only. - [ ] The PR title is in `TML-NNNN: <sentence-case title>` form: n/a, no ticket tracks the close-out. - [x] The **Skill update** section above is filled in. 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Added a Prisma 8 TypeScript module settings guide with recommendations by project type, JSON import requirements, and details on settings written by `prisma orm init`. * Expanded `prisma orm init` documentation with Prisma 7 configuration rename behavior, migration constraints, and guidance for handling related imports. * Clarified how initialization handles `package.json` and `tsconfig.json` settings. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> | 2 小时前 | |
Remove dbgenerated: raw SQL defaults are sql tagged literals, infer prints them, Supabase contract regenerated (#30380) ## At a glance ```prisma model User { id Int @id token String @default(dbgenerated("gen_random_uuid()")) } ``` ```text PSL_UNKNOWN_DEFAULT_FUNCTION schema.prisma:5 Default function "dbgenerated" was removed. Write the SQL as a tagged literal: @default(sql`<expression>`). Supported functions: autoincrement(), cuid(2), nanoid(), nanoid(<2-255>), now(), ulid(), uuid(), uuid(4), uuid(7). ``` Before this branch that schema emitted a function default with the string as its expression. Now the same default is written `` @default(sql`gen_random_uuid()`) ``, and `contract infer` prints it that way too. The shipped Supabase contract shows all three replacements side by side: ```prisma id Id @id(map: "identities_pkey") @default(sql`gen_random_uuid()`) attributeMapping Jsonb @default(json`{}`) @map("attribute_mapping") expiresAt Timestamptz @default(sql`(now() + '00:03:00'::interval)`) @map("expires_at") ``` ## Linked issue n/a. No Linear ticket exists for this project; this is the third and last PR removing `dbgenerated`. Builds on #30325 (the `sql` tagged literal, ADR 129) and #30350 (data types and casts, ADR 254). Design: [ADR 129](docs/architecture%20docs/adrs/ADR%20129%20-%20Template-Tagged%20Literals%20for%20Extensions.md), [ADR 254](docs/architecture%20docs/adrs/ADR%20254%20-%20Data%20types%20and%20casts.md); the removal is recorded as a dated note in [ADR 167](docs/architecture%20docs/adrs/ADR%20167%20-%20Typed%20default%20literal%20pipeline%20and%20extensibility.md). ## Skill update n/a. No agent skill under `packages/0-shared/skills/` describes `@default` values. The user-facing migration is [upgrade-instructions/pending/remove-dbgenerated/](upgrade-instructions/pending/remove-dbgenerated/) for both audiences; the schema surface is documented in [packages/2-sql/2-authoring/contract-psl/README.md](packages/2-sql/2-authoring/contract-psl/README.md). ## Decision `@default(dbgenerated("..."))` is gone from Prisma 8. It was accepted by ADR 167 as a stopgap while typed defaults were unfinished; #30325 and #30350 built what it stood in for, so nothing needs it any more. 1. **Prisma 8 PSL refuses it** with a message that names the replacement. The code is the existing `PSL_UNKNOWN_DEFAULT_FUNCTION`; only the message is special-cased for that one name. No shim keeps it parsing. 2. **`contract infer` never prints it.** A raw expression the database reports prints as `` @default(sql`...`) ``, or `@default(sql"...")` when the expression holds a backtick. Infer never emits a comment in place of a default and never stops on one. 3. **The Prisma 7 contract source keeps reading Prisma 7's `dbgenerated`**, because that is Prisma 7's language: `dbgenerated("x")` maps straight to a function default without going through the target registry, and the empty `dbgenerated()` means no column default on every field. The diagnostic that refused the empty form on required fields is deleted. 4. **The contract format does not change.** A contract emitted before this PR still loads; a test proves it with the Supabase `contract.json` as committed on `main` before this branch. ## How it fits together 1. **The Prisma 7 source stops depending on the registry** ([`defaults.ts`](packages/2-sql/2-authoring/contract-prisma7/src/defaults.ts)), so the registry entry can go without breaking Prisma 7 schemas. 2. **The registry entries are deleted** on both adapters, with SQLite's `NOW_SYNONYMS` rewrite ([`control-mutation-defaults.ts`](packages/3-targets/6-adapters/sqlite/src/core/control-mutation-defaults.ts)). The verify-side rule that reads `CURRENT_TIMESTAMP` as `now()` stays; it exists so a named `now()` default verifies against the database's text. 3. **The interpreter names the replacement** ([`default-function-registry.ts`](packages/2-sql/2-authoring/contract-psl/src/default-function-registry.ts), [`sql-attribute-specs.ts`](packages/2-sql/2-authoring/contract-psl/src/sql-attribute-specs.ts)), and every in-repo schema, fixture and test that wrote `dbgenerated` is rewritten to the form its column allows. 4. **Infer prints the new forms** ([`default-mapping.ts`](packages/2-sql/9-family/src/core/psl-contract-infer/default-mapping.ts)); the Postgres-specific `dbgenerated` formatter and the family's comment fallback are deleted. 5. **The Supabase contract is regenerated** with that printer: exactly the 15 remaining `dbgenerated` lines change. Ten `gen_random_uuid()` and one interval expression become `sql` literals and keep their function-default shape in `contract.json`; four `'{}'::jsonb` / `'[]'::jsonb` become `json` literals, so those four defaults become `{ kind: 'literal' }` and the storage hash moves. The reference-fixture verify test proves every new literal verifies equal to the live default. 6. **Users get an upgrade instruction** for app and extension authors, and the docs, error reference, scorecards and ADRs no longer describe `dbgenerated` as an accepted form. ## Reviewer notes - **The largest diff is the Supabase regeneration** (`contract.prisma`, `contract.json`, `contract.d.ts`) plus the copy of the old `contract.json` kept as a fixture for the format test. In `contract.prisma`, 15 lines out and 15 in; in `contract.json`, four defaults and the storage hash. - **The old-contract fixture is not byte-identical to `main`'s file**: the repository formatter collapsed short arrays onto one line. Parsed, the two are identical, and the test reads it with `JSON.parse`. - **The format test loads through `PostgresContractSerializer`**, not a bare `validateSqlContractFully`, because the bare call rejects the contract's `role` and `native_enum` entries as unregistered kinds. The serializer is what `contract emit` and `db verify` use and calls the validator inside. - **The enum-cast print form stays a string literal** (`@default("STANDARD")`), as `main` already printed it after #30346. The slice spec once said the member name; the upgrade instruction follows what infer prints. - **The `default-dbgenerated` parity pair is deleted, not renamed**: `default-sql-literal` already carries `` sql`gen_random_uuid()` `` in both PSL and TypeScript. - **The Prisma 7 source refuses a blank `dbgenerated("")`** as an argument it does not read. Prisma 7's own parser refuses a blank argument, so no valid Prisma 7 schema carries it; this is not a body check. - **Backtick-fence escaping in infer** doubles every backslash and escapes backticks, the exact inverse of what the tokenizer resolves, so a default like `E'\n'` round-trips. Checked against `resolvePslBacktickEscapes`. - **Pre-existing, not fixed here:** the packaging tarball tests fail locally on an npm registry trust error for `@vercel/detect-agent@1.2.5` during their scratch install; CI is the check for those. ## Behavior changes & evidence - **`@default(dbgenerated("x"))` is an error naming `` sql`x` ``.** [`default-function-registry.ts`](packages/2-sql/2-authoring/contract-psl/src/default-function-registry.ts). Evidence: [`interpreter.defaults.functions.test.ts`](packages/2-sql/2-authoring/contract-psl/test/interpreter.defaults.functions.test.ts), fixture [`removed-dbgenerated`](test/integration/test/authoring/diagnostics/removed-dbgenerated/). - **Infer prints raw defaults as `sql` literals and never a comment.** [`default-mapping.ts`](packages/2-sql/9-family/src/core/psl-contract-infer/default-mapping.ts), [`infer-model-blocks.ts`](packages/3-targets/3-targets/postgres/src/core/psl-infer/infer-model-blocks.ts). Evidence: [`default-mapping.test.ts`](packages/2-sql/9-family/test/psl-contract-infer/default-mapping.test.ts), [`print-psl.defaults-and-types.test.ts`](packages/3-targets/3-targets/postgres/test/psl-infer/print-psl/print-psl.defaults-and-types.test.ts), the two `infer-roundtrip-fidelity` journeys. - **Prisma 7 `dbgenerated()` with no argument means no default, on every field.** [`defaults.ts`](packages/2-sql/2-authoring/contract-prisma7/src/defaults.ts). Evidence: [`defaults.test.ts`](packages/2-sql/2-authoring/contract-prisma7/test/defaults.test.ts) and the `dbgenerated-without-expression` fixture with the migration Prisma 7.10.0 generates for it. - **SQLite no longer rewrites `CURRENT_TIMESTAMP` to `now()` at authoring time**; the body is used verbatim (project decision D4). [`control-mutation-defaults.ts`](packages/3-targets/6-adapters/sqlite/src/core/control-mutation-defaults.ts). Evidence: the surviving `sqliteResolveDefault` tests in [`default-normalizer.test.ts`](packages/3-targets/3-targets/sqlite/test/default-normalizer.test.ts) cover what verify still needs. - **A contract from before this PR loads unchanged.** Evidence: [`supabase-before-dbgenerated-removal.test.ts`](test/integration/test/contract-format/supabase-before-dbgenerated-removal.test.ts). ## Compatibility Breaking for Prisma 8 schemas that wrote `@default(dbgenerated("..."))`; every rewrite is mechanical and listed in the upgrade instruction. Only the JSON and enum rewrites change the emitted contract (function default to literal), and `db verify` passes on both because the value is the same. `.defaultSql()` on the TypeScript builder stays deprecated until 8.0.0 GA. Prisma 7 schemas are unaffected: the Prisma 7 source reads Prisma 7's `dbgenerated` as before, and now also accepts the empty form on required fields. ## Testing performed - `pnpm build`, `pnpm typecheck`: clean - `pnpm test:packages`: green except the packaging tarball tests (npm registry trust error in the scratch install; environment) - `pnpm test:integration`: green except the same two tarball tests - `pnpm test:e2e`: green - `pnpm coverage:packages`: produced, same tarball exception - `pnpm fixtures:check`: only the Supabase contract, the diagnostics fixtures, the deleted parity pair and the mapped-enums port fixture change - `pnpm lint`, `pnpm lint:deps`, `pnpm lint:docs`, `pnpm lint:throws`, `pnpm lint:framework-vocabulary`, `pnpm check:error-reference`: clean - `pnpm check:upgrade-coverage --mode pr`: clean - `git grep -n "NOW_SYNONYMS\|lowerDbgenerated\|dbgeneratedSig\|formatDbGeneratedAttribute\|fallbackFunctionAttribute" -- packages`: empty ## Follow-ups - Editor tooling for tagged literals (hover, SQL highlighting inside the fences, a semantic token for the tag) is handed to Serhii in [a written brief](projects/remove-dbgenerated/editor-tooling-brief.md); tag completion is already implemented and tested. The brief moves to `docs/` at project close-out. - The SQL default body check is not quote-aware (`'a;b'` is refused); pre-existing, recorded in the project's deferred list. - `contract-prisma7` fixtures' golden JSON is still edited by hand because the updater writes a different format. ## Alternatives considered - **Keep `dbgenerated` as an alias of `` sql`...` ``.** Rejected: the repository's no-shim rule, and the 2026-07-20 decision that it retires in favour of ADR 129 literals. - **Register `gen_random_uuid()` as a named function** for the Supabase contract's ten uses. Rejected after Serhii's review: it reads like Prisma's own `uuid()`, which generates client-side, while `gen_random_uuid()` makes the database generate; raw SQL should look raw. - **Print enum casts as the member name** (`@default(STANDARD)`). Not taken: infer already prints the string literal since #30346 and the two forms emit the same contract. ## Checklist - [x] All commits are signed off (`git commit -s`) per the DCO. - [x] I read CONTRIBUTING.md and the change is scoped to one logical concern. - [x] Tests are updated. - [ ] The PR title is in `TML-NNNN: <sentence-case title>` form. No Linear ticket exists for this project, as for #30325 and #30350; the title carries no prefix. - [x] The **Skill update** section above is filled in. ## Notes for the reviewer The project artefacts under `projects/remove-dbgenerated/` (plan, slice plans, the editor brief) are left on disk for review and are removed at project close-out after this PR merges, with the editor brief moving to `docs/`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Breaking Changes** * Removed `dbgenerated(...)` support for raw SQL defaults. Use `@default(sql\`<expression>\`)` in schemas; inferred defaults now use SQL tagged literals or typed literals. * PostgreSQL minimum supported version is now 15. * **Documentation** * Added upgrade guidance and updated default-value references and examples. * **Bug Fixes** * Improved validation and diagnostics for invalid default arguments. * In Prisma 7, empty `dbgenerated()` now produces no column default; malformed arguments report diagnostics. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io> Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> | 2 天前 | |
chore(release): bump to 8.0.0-rc.12 (#30395) ## Release: 8.0.0-rc.11 → 8.0.0-rc.12 This is the release PR described in [docs/oss/versioning.md](https://github.com/prisma/orm/blob/main/docs/oss/versioning.md). It bumps every workspace package to 8.0.0-rc.12 and moves the Prisma dependencies to their latest versions. **Merging this PR ships the release.** The push to `main` carries the new root `version`. The `Publish to npm` workflow then publishes 8.0.0-rc.12 under `latest` and creates a pre-release GitHub Release from the notes file. ## Review these first - [docs/releases/v8.0.0-rc.12.md](https://github.com/prisma/orm/blob/release/8.0.0-rc.12/docs/releases/v8.0.0-rc.12.md): the release notes, which become the GitHub Release body. The same entry is at the top of `CHANGELOG.md`. - The upgrade guides for [apps](https://github.com/prisma/orm/blob/release/8.0.0-rc.12/skills/prisma-8/upgrading/app/upgrades/8.0.0-rc.11-to-8.0.0-rc.12/instructions.md) and [extensions](https://github.com/prisma/orm/blob/release/8.0.0-rc.12/skills/prisma-8/upgrading/extension/upgrades/8.0.0-rc.11-to-8.0.0-rc.12/instructions.md). They merge the 24 pending fragments. The original fragments are moved unchanged to `upgrade-instructions/releases/8.0.0-rc.11-to-8.0.0-rc.12/sources/`. - Four guide entries have no fragment behind them. The `migration new` default and its removed error codes (#30389) had no guide entry. Neither did the PSL parser API changes (#30312, #30344, #30335, #30379). I wrote those entries while preparing the release. - Where fragments contradicted later code, the guide follows the code. Examples: the Supabase storage hash, `voidParamsSchema`, and quoted defaults printed by `infer`. ## Dependency updates | Package | From | To | Where | | --- | --- | --- | --- | | `@prisma/cli-engine` | 0.4.0 | 0.6.1 | examples, test fixtures, apps (the toolchain packages were already on 0.6.1 from #30372) | | `@prisma/dev` | 0.25.1 | 0.25.2 | the workspace catalog | | `@prisma/compute-sdk` | ^0.39.0 | ^0.43.0 | `apps/telemetry-backend` | | `@prisma/management-api-sdk` | ^1.56.0 | ^1.76.0 | `apps/telemetry-backend` | compute-sdk 0.43 renames "service" to "app" and "version" to "deployment". The telemetry deploy script now uses the new names. Both SDK versions call `/v1/apps/{appId}`, so the ID stored in the existing `TELEMETRY_DEPLOY_SERVICE_ID` secret is still correct. The app's typecheck now includes `scripts/`, so it catches the next SDK rename. The repo does not depend on `@prisma/composer`. ## Fixes needed to publish - **The publish workflow has failed on `main` since #30372.** `check:conformance` called the `orm` config validator as `validate(value)`. Engine 0.6 always calls `validate(value, provenance)`, and the validator reads `provenance.files`, so it threw on every input. The check now passes the same provenance the engine would. The prisma-cli copy of this check already does this. - `set-version` rewrote `workspace:@internal/cli@<version>` to `workspace:<version>`, dropping the alias. The prisma7-adoption example uses that alias. This is the first bump since the alias was added. - `lint:legacy-name` and the `add-model-map` test pointed at the pending fragment paths. They now point at the archived sources. ## Verification Passed locally: - `pnpm build` - `pnpm typecheck` - `pnpm lint` - `pnpm test:scripts` (563 tests) - `pnpm check:conformance` - `pnpm check:publish-deps` - `pnpm check:upgrade-coverage`, in both publish and PR mode - `pnpm check:release-notes`, in both publish and PR mode - `pnpm lint:legacy-name` - `pnpm lint:skills` - `pnpm test:packages`: all 18,196 tests passed Not covered locally, left to CI: - Three `test:packages` suites install packed tarballs from the registry. This machine's pnpm refuses `@vercel/detect-agent@1.2.5` because it has no provenance. CI passed the same suites on #30390. - `prisma-8-cloudflare-worker` needs a local Hyperdrive database. - The telemetry backend tests need Node 24.16 with `Temporal`. This machine has 24.13. - `fixtures:check` needs Postgres. 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added PostgreSQL full-text search, multi-file schemas, prepared ORM reads and aggregates, and conflict-skipping options for bulk creation. * Added support for using a Prisma 7 schema as the contract source, JavaScript `Date` timestamps on PostgreSQL, editor support for attribute arguments, and per-finding diagnostics. * **Breaking Changes** * Prisma 8 schema files now require `// use prisma-8` on the first line; unmapped models use their names verbatim for table names. * Replace `dbgenerated(...)` with SQL tagged literals. Defaults must be valid for their column types, creation timestamps use the application clock, and native PostgreSQL enums no longer support text operations. * Config naming and path resolution, migration starting points, and extension contracts have changed. * **Bug Fixes** * Improved migration checks and branching warnings, contract generation and inference, default verification, and type checking. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> | 18 小时前 | |
docs(oss): contributor-PR triage targets prisma/orm, reads the DCO check, and finds external PRs from branches on this repository (#30397) ## At a glance Before this PR, the first command in the contributor-PR triage skill listed PRs from the wrong repository, and its sign-off step looked for a bot this repository does not use: ```bash gh pr list --repo prisma/prisma --state open ... jq '[.comments[] | select(.author.login=="CLAassistant")] | last' ... ``` After it, the skill lists `prisma/orm`, reads the `DCO` check on each PR, and also finds external PRs that come from a branch on this repository rather than a fork. On today's queue that adds PRs from two former staff members who now have `read` permission. ## What this PR changes 1. Every command in the skill targets `prisma/orm`. 2. The CLA step is gone. This repository uses the DCO only. 3. Sign-off is checked by reading the `DCO` check. A trailer comparison is kept to name the commit that needs fixing. 4. The doc defines who counts as external, and the skill checks the permission of every author whose PR comes from a branch on this repository. 5. CodeRabbit is described as reviewing `main` and `v7` and skipping `7.9.x`. 6. The skill warns that the repository's shell hook rejects Bash commands containing the word `npm` or `npx`. The criteria live in `docs/oss/pr-triage.md`; the procedure lives in `skills-contrib/triage-contributor-pr/SKILL.md`. ## Repository and CLA The skill was written for `prisma/prisma`. This repository is `prisma/orm`, and it uses the Developer Certificate of Origin (DCO) instead of a Contributor License Agreement (see `docs/oss/governance.md`, "Contributor provenance"). CLA-assistant comments still appear on older `v7` PRs; they are left over from `prisma/prisma` and do not apply. ## DCO The DCO requires each commit to carry a `Signed-off-by:` trailer matching its author. The [DCO GitHub App](https://github.com/apps/dco) checks that on every PR and posts a check named `DCO`. Because it is an app rather than an Actions workflow, it runs on a fork PR before a maintainer approves CI, and it skips merge commits. The app was only just installed on `prisma/orm`. Before that it covered `prisma-next`, a separate repository that is now archived, and none of the 66 merged `prisma/orm` PRs sampled since June had a `DCO` check. The only `DCO` result came from `.github/workflows/dco.yml`, which runs in the merge queue and only echoes a message. The skill now reads the app's check. When it fails or is missing, a `jq` comparison of each commit's trailer with its author names the commit to fix. ## Who counts as external The skill used `isCrossRepository` (the PR comes from a fork) as the definition of external. That misses PRs from branches on this repository whose author no longer has write access, such as former staff. The doc now defines external by permission: an author without `admin` or `write` is external. The skill checks `gh api repos/prisma/orm/collaborators/<login>/permission` for each same-repository author. One exception: an agent account that belongs to a team member is team, even with `read`. Such accounts say so in their profile bio, for example "Belongs to @<maintainer>". The author filter also used `jq`'s `inside`, which matches substrings, so naming `kim` would also have selected `develop-kim`. It now uses an exact match. ## CodeRabbit The doc said CodeRabbit reviews only PRs based on the default branch. #29828 added a CodeRabbit config to `v7`, so `v7` PRs are reviewed. `7.9.x` has no config, and CodeRabbit still posts "Review skipped" there (for example #30053). ## Tests Docs only. The new author-classification and PR-listing commands, and the trailer comparison, were run against the live PR queue. `pnpm lint:skills` passes. ## Alternatives considered - **Comparing trailers by hand as the sign-off check.** An earlier draft of this change did that, because no DCO check was visible on PRs. With the app installed, its check is the authoritative result and runs before CI approval, so the comparison is kept only to point at the failing commit. 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Updated pull request triage guidance to clarify external-contributor status, including when team members’ agent accounts count as team members and what confirmation is required. * Clarified that DCO checks are handled by the DCO app, that older CLA comments may be leftovers, and that DCO—not CLA—is used in contributor-triage checks. * Clarified that CodeRabbit reviews `main` and `v7` pull requests and posts a “Review skipped” comment on `7.9.x` pull requests. * Updated contributor-triage guidance for `prisma/orm` and documented shell-command restrictions. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> | 6 小时前 | |
chore(release): bump to 8.0.0-rc.12 (#30395) ## Release: 8.0.0-rc.11 → 8.0.0-rc.12 This is the release PR described in [docs/oss/versioning.md](https://github.com/prisma/orm/blob/main/docs/oss/versioning.md). It bumps every workspace package to 8.0.0-rc.12 and moves the Prisma dependencies to their latest versions. **Merging this PR ships the release.** The push to `main` carries the new root `version`. The `Publish to npm` workflow then publishes 8.0.0-rc.12 under `latest` and creates a pre-release GitHub Release from the notes file. ## Review these first - [docs/releases/v8.0.0-rc.12.md](https://github.com/prisma/orm/blob/release/8.0.0-rc.12/docs/releases/v8.0.0-rc.12.md): the release notes, which become the GitHub Release body. The same entry is at the top of `CHANGELOG.md`. - The upgrade guides for [apps](https://github.com/prisma/orm/blob/release/8.0.0-rc.12/skills/prisma-8/upgrading/app/upgrades/8.0.0-rc.11-to-8.0.0-rc.12/instructions.md) and [extensions](https://github.com/prisma/orm/blob/release/8.0.0-rc.12/skills/prisma-8/upgrading/extension/upgrades/8.0.0-rc.11-to-8.0.0-rc.12/instructions.md). They merge the 24 pending fragments. The original fragments are moved unchanged to `upgrade-instructions/releases/8.0.0-rc.11-to-8.0.0-rc.12/sources/`. - Four guide entries have no fragment behind them. The `migration new` default and its removed error codes (#30389) had no guide entry. Neither did the PSL parser API changes (#30312, #30344, #30335, #30379). I wrote those entries while preparing the release. - Where fragments contradicted later code, the guide follows the code. Examples: the Supabase storage hash, `voidParamsSchema`, and quoted defaults printed by `infer`. ## Dependency updates | Package | From | To | Where | | --- | --- | --- | --- | | `@prisma/cli-engine` | 0.4.0 | 0.6.1 | examples, test fixtures, apps (the toolchain packages were already on 0.6.1 from #30372) | | `@prisma/dev` | 0.25.1 | 0.25.2 | the workspace catalog | | `@prisma/compute-sdk` | ^0.39.0 | ^0.43.0 | `apps/telemetry-backend` | | `@prisma/management-api-sdk` | ^1.56.0 | ^1.76.0 | `apps/telemetry-backend` | compute-sdk 0.43 renames "service" to "app" and "version" to "deployment". The telemetry deploy script now uses the new names. Both SDK versions call `/v1/apps/{appId}`, so the ID stored in the existing `TELEMETRY_DEPLOY_SERVICE_ID` secret is still correct. The app's typecheck now includes `scripts/`, so it catches the next SDK rename. The repo does not depend on `@prisma/composer`. ## Fixes needed to publish - **The publish workflow has failed on `main` since #30372.** `check:conformance` called the `orm` config validator as `validate(value)`. Engine 0.6 always calls `validate(value, provenance)`, and the validator reads `provenance.files`, so it threw on every input. The check now passes the same provenance the engine would. The prisma-cli copy of this check already does this. - `set-version` rewrote `workspace:@internal/cli@<version>` to `workspace:<version>`, dropping the alias. The prisma7-adoption example uses that alias. This is the first bump since the alias was added. - `lint:legacy-name` and the `add-model-map` test pointed at the pending fragment paths. They now point at the archived sources. ## Verification Passed locally: - `pnpm build` - `pnpm typecheck` - `pnpm lint` - `pnpm test:scripts` (563 tests) - `pnpm check:conformance` - `pnpm check:publish-deps` - `pnpm check:upgrade-coverage`, in both publish and PR mode - `pnpm check:release-notes`, in both publish and PR mode - `pnpm lint:legacy-name` - `pnpm lint:skills` - `pnpm test:packages`: all 18,196 tests passed Not covered locally, left to CI: - Three `test:packages` suites install packed tarballs from the registry. This machine's pnpm refuses `@vercel/detect-agent@1.2.5` because it has no provenance. CI passed the same suites on #30390. - `prisma-8-cloudflare-worker` needs a local Hyperdrive database. - The telemetry backend tests need Node 24.16 with `Temporal`. This machine has 24.13. - `fixtures:check` needs Postgres. 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added PostgreSQL full-text search, multi-file schemas, prepared ORM reads and aggregates, and conflict-skipping options for bulk creation. * Added support for using a Prisma 7 schema as the contract source, JavaScript `Date` timestamps on PostgreSQL, editor support for attribute arguments, and per-finding diagnostics. * **Breaking Changes** * Prisma 8 schema files now require `// use prisma-8` on the first line; unmapped models use their names verbatim for table names. * Replace `dbgenerated(...)` with SQL tagged literals. Defaults must be valid for their column types, creation timestamps use the application clock, and native PostgreSQL enums no longer support text operations. * Config naming and path resolution, migration starting points, and extension contracts have changed. * **Bug Fixes** * Improved migration checks and branching warnings, contract generation and inference, default verification, and type checking. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> | 18 小时前 | |
fix(sql-orm-client): use every key column in includes, nested writes and multi-table variants (#30107) ## Linked issue Fixes #30104. ## Summary `.include()` across a composite foreign key correlated the child subquery on the first key column only, so a parent matched every child sharing that column — and for an `N:1` relation the result was then unwrapped to the first of them, giving every parent the same related row. Nothing throws and the row shape stays valid, so it surfaces as quietly wrong data rather than an error. The relation-filter path (`.some()` / `.every()` / `.none()`) already correlates on the full key through `buildJoinWhere`; this brings `.include()` in line with it. ## Testing performed - `pnpm typecheck` in `packages/3-extensions/sql-orm-client` — clean. - `pnpm test` in the same package — 773 passed across 70 files, no type errors (771 before, plus the two new cases). - `npx vitest run test/sql-orm-client/` in `test/integration` — 290 passed / 1 failed, identical to the same run on a clean `main`; that one failure is a pre-existing SQLite `sumBigInt` type test unrelated to includes. - `npx vitest run test/sql-orm-client/include.test.ts test/sql-orm-client/mn-include.test.ts` — 22 passed. - Counterfactual: with only the loop bounds reverted to the old first-column-only behaviour, both new tests fail and the other 70 still pass, so they do pin this regression. New tests: - `collection-contract.test.ts` — `resolveIncludeRelation()` returns both column pairs for a composite key. - `query-plan-select.test.ts` — the emitted child-subquery predicate is an `AND` of both equalities. ## Skill update n/a — internal only. No CLI, public TypeScript API, `prisma.config.ts`, error-code or glossary surface changes. ## Checklist - [x] All commits are signed off (`git commit -s`) per the DCO. - [x] I read CONTRIBUTING.md and the change is scoped to one logical concern. - [x] Tests are updated. - [x] The PR title is in conventional-commit form, per CONTRIBUTING.md and the `contrib-pr` skill (no Linear ticket, as an external contributor). ## Notes for the reviewer - `resolveIncludeRelation` keeps its existing "incomplete join metadata" error; it is now raised when no column pair resolves at all, rather than when index `0` is missing. - The `through` (m-n) branch is deliberately untouched — it already mapped every local field. - Both include join sites carried identical code, so they now share one `buildIncludeJoinExpr` helper instead of duplicating the loop. Happy to inline it back if you would rather keep the two sites independent. - I could not run `pnpm test:integration` end to end here: its `pretest` build fails on `@prisma/orm-framework` with an "aggregate entrypoints lost exports to star-export ambiguity" error, and it fails the same way on a clean `main` on this machine, so it looks unrelated to this change. I ran the integration tests directly through vitest instead, as listed above. Worth a second run in CI. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added support for relations using composite keys with multiple column pairs. - Include queries now match every related column for row and scalar results. - Relation metadata now exposes ordered local and target column lists. - **Bug Fixes** - Incomplete or invalid relation mappings are rejected instead of producing incorrect include results. - **Tests** - Added coverage for composite-key relations and multi-column include matching. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: thribhuvan003 <thribhuvan003@gmail.com> Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io> Co-authored-by: willbot <w.a.madden+machine@gmail.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> | 6 小时前 | |
fix(mongo): accept multi-host connection strings, and mask their credentials in CLI output (#30354) ## At a glance A replica-set connection string lists several hosts. Before this PR, `mongo()` rejected it before the driver ever saw it: ```ts mongo({ contract, url: 'mongodb://user:pw@h1:27017,h2:27017/app?replicaSet=rs' }) // before: throws RUNTIME.BINDING_INVALID "Mongo URL must be a valid URL" // after: accepted; the driver gets the URL unchanged and the database is "app" ``` The CLI masks the connection string before printing it (`db verify`, `db sign`, `db schema`, `db prepare`, `contract infer`, `migrate`). For the same URLs, it printed the password in clear: ```ts maskConnectionUrl('mongodb://admin:s3cret@h1:27017,h2:27017/app?replicaSet=rs') // before: 'mongodb://admin:s3cret@h1:27017,h2:27017/app?replicaSet=rs' // after: 'mongodb://****:****@h1:27017,h2:27017/app?replicaSet=rs' ``` ## Linked issue Fixes #30353 ## Summary The Mongo runtime validates a connection URL with `new URL`, which cannot parse a seed list. Given `mongodb://host1:27017,host2:27017/db` it reads `27017,host2:27017` as the port and throws, so every replica-set URI with more than one host was rejected as `Mongo URL must be a valid URL` before the driver ever saw it. Validation now drops the extra hosts before parsing. Only the scheme and the database path are read off the parsed URL, and the driver still receives the original string. ## Testing performed - `pnpm --dir packages/3-extensions/mongo test` — 128 passed. The seed-list test reproduces the report through `mongo({ contract, url })` and fails on `main` with the reported error. - `pnpm typecheck` and `pnpm lint` — clean. - `pnpm test:packages` — 17300 passed. Three tarball suites fail, but they fail the same way on an unmodified `main`: their scratch `pnpm install` cannot resolve dependencies here. - Mongo integration suites (`test/mongo`, `test/mongo-runtime`) — 145 passed across 17 files. ## Skill update n/a — no CLI flag, public API, config field, or error code changes. A connection string the MongoDB driver already accepts simply stops being rejected. ## Checklist - [x] All commits are signed off (`git commit -s`) per the DCO. - [x] I read CONTRIBUTING.md and the change is scoped to one logical concern. - [x] Tests are updated. - [ ] The PR title is in `TML-NNNN: <sentence-case title>` form — no Linear ticket, this comes from the issue tracker. - [x] The **Skill update** section above is filled in. ## Notes for the reviewer The scan for the host list starts after the last `@` in the authority, because a password is allowed to contain an unencoded comma. Tests cover that case along with a bracketed IPv6 seed list and a seed list with no database path, which still raises the existing "must include a database name" error. `mongodb+srv://` is unaffected: an SRV URI carries one host and no port, so there is no host list to collapse. Worth noting separately: `packages/3-extensions/postgres/src/runtime/binding.ts` validates the same way and libpq also accepts multi-host strings, so it likely has the same gap. I left it alone to keep this scoped to the reported issue. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * MongoDB connection strings are validated more accurately, including multi-host and replica-set connections, IPv6 hosts, and credentials containing special characters. * Database names are read from the first URL path segment and percent-decoded. Invalid schemes, malformed URLs, and missing database names return clear binding errors. * Sensitive credentials in connection URLs and error messages are redacted more consistently, including URLs with multi-host lists, encoded characters, or password query parameters. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: lazerg <lazerg2@gmail.com> Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io> Co-authored-by: willbot <w.a.madden+machine@gmail.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> | 6 小时前 | |
feat(scripts): add :agent variants for running tests (and other slow commands) (#832) ## At a glance ```bash $ pnpm test:packages:agent log: wip/test-packages.20260615-190441.32317.log $ grep -nE " FAIL |Test Files" wip/test-packages.20260615-190441.32317.log … ``` The `:agent` variant runs the canonical command, redirects its full output to a timestamped file under `wip/`, prints that path as its first line of output, and exits with the same status as the underlying command. The agent uses the exact path the script just announced. ## The decision Every slow verification command — `test:packages`, `test:integration`, `test:e2e`, `build`, `typecheck`, `lint`, `lint:deps`, `fixtures:check` — gets an `:agent` variant. Agents use the `:agent` form; canonical commands are unchanged for humans and CI. Each variant writes `wip/<name>.<YYYYMMDD-HHMMSS>.<pid>.log` and a sibling `.exit`, then prints the log path. Every run gets a unique filename so history is preserved automatically. `wip/.gitkeep` is committed; everything else under `wip/` is gitignored. A new always-apply rulecard, `.agents/rules/running-tests.mdc`, documents the workflow: 1. Run a test suite (use the `:agent` variant). 2. Run one package's tests (`pnpm --filter <pkg> test`). 3. Rerun a specific failing test (by file, or by test name with vitest `-t`). 4. Find specific failures in the captured output (grep the log path the `:agent` printed). ## Why this matters Sampled from one Drive session, ~90 min in a single subagent: - 4× `pnpm test:packages` (~150s each) chasing the same failure list - 4× `pnpm test:integration` for the same reason - 11× `pnpm fixtures:check` re-runs grepping different slices of the same output - 3× `pnpm turbo typecheck --force` in the same minute ~25 min of pure re-run waste in one subagent. The cause: piping `pnpm test:packages` to `tail`/`grep`/`head` discards the rest of the output and hides the exit code (those tools return 0). The next question about the failure forces a full re-run. A rulecard alone would tell agents "redirect to a file, then grep it" — standing guidance they have to remember and apply. The `:agent` scripts bake the pattern into the command. Affordance, not memory. ## What's in this PR - **8 new package.json scripts**, one per slow command. Each follows the same shell template: ``` ts=$(date +%Y%m%d-%H%M%S).$$; log=wip/<name>.$ts.log; echo "log: $log"; \ pnpm <name> > "$log" 2>&1; status=$?; \ echo $status > wip/<name>.$ts.exit; exit $status ``` - **`.agents/rules/running-tests.mdc`** (always-apply), symlinked into `.cursor/rules/` and `.claude/rules/` by the existing `pnpm rules:sync`. - **`wip/.gitkeep`** committed; `.gitignore` now reads `/wip/*` + `!/wip/.gitkeep`. - Rules-footprint thresholds bumped to fit the new always-apply rule. ## Alternatives considered - **A helper script (`scripts/agent-run.sh`).** Each `:agent` is one self-contained shell statement; no shared library to maintain. - **A skill** (`skills-contrib/running-tests/`). Skills are procedural workflows you *invoke*; "always run tests this way" is standing guidance, which is what `.agents/rules/*.mdc` is for. - **Stable symlinks** `wip/<name>.log` → latest run. Tried, removed. The script prints the exact log path, so the read path is unambiguous — no need for a "latest" abstraction. - **`mkdir -p wip` prefix in every script.** Replaced by committing `wip/.gitkeep` — the directory always exists, the scripts stay short. - **Overwriting a single log per command.** First iteration. Broke the "run full → fix → run full again, compare" workflow. Replaced by timestamped + PID-suffixed filenames; history is preserved automatically. - **A structured (`--reporter=json`) reporter on the first run.** Plausible but unnecessary — everything an agent does is programmatic; the agent reads the same human-readable log a human would, and `grep`/`tail` work fine against it. ## Verification - `pnpm lint:deps:agent` end-to-end: prints `log: wip/lint-deps.<ts>.<pid>.log`, writes the log + `.exit`, exits with the right status. - `pnpm lint:rules:footprint` — passes after threshold bumps. - `pnpm lint:rules:symlinks` — symlink trees consistent. Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com> --------- Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io> Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com> | 3 个月前 | |
chore: enable CodeRabbit auto-review on PRs targeting non-default branches (#30024) ## Linked issue n/a — small change (repo tooling config). ## At a glance ```yaml reviews: path_filters: - "!projects/**" auto_review: base_branches: - ".*" ``` Before this change, `.coderabbit.yml` left `base_branches` at its default (empty), so CodeRabbit only reviewed PRs based on `main`. ## Decision Enable CodeRabbit auto-review for PRs targeting any base branch, not just the default one. Stacked PRs base each PR on the branch below it, so under the default config every PR in a stack except the bottom one gets no CodeRabbit review. Setting `reviews.auto_review.base_branches` to `".*"` (a regex matching all branches, per the [CodeRabbit schema](https://coderabbit.ai/integrations/schema.v2.json)) makes each stacked PR get an incremental review against its own base. ## Notes for the reviewer - CodeRabbit reads `.coderabbit.yml` from the head branch of each PR, so the setting takes effect for a given PR only once this change is present in that PR's branch (i.e. after this merges and stacks rebase onto `main`, or if a stack includes it). - Minor cost: when a lower PR in a stack merges and the PR above retargets `main`, CodeRabbit may post a fresh incremental review on the retargeted PR. ## Testing performed - Validated the key path and value against CodeRabbit's published config schema (`reviews.auto_review.base_branches`, array of regex strings, default `[]`). - No code paths touched; CI is unaffected. ## Skill update n/a — internal only (review-bot configuration, no user-facing surface). ## Checklist - [x] All commits are signed off (`git commit -s`) per the DCO. - [x] I read CONTRIBUTING.md and the change is scoped to one logical concern. - [x] Tests are updated (n/a — config-only change with no testable behavioural delta in this repo). - [ ] The PR title is in `TML-NNNN: <sentence-case title>` form — no Linear ticket exists for this repo-tooling tweak. - [x] The **Skill update** section above is filled in. https://claude.ai/code/session_01WxsDtFe21Td8TQWznuywoW <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Enabled automatic code reviews for changes targeting any base branch. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Signed-off-by: Oleksii Orlenko <robot@aqrln.net> | 1 个月前 | |
refactor: rename migration contract artifacts to end-contract / start-contract Within a migration directory, rename the on-disk contract files and the planner-emitted scaffold import so authoring-surface vocabulary matches the semantics: `end-contract.{json,d.ts}` is the schema that must be true at the end of the migration, and `start-contract.{json,d.ts}` is the schema true at the start. Framework-level `from`/`to` tracking vocabulary (manifest fields, `Migration.describe()`, internal hashes) is unchanged — it names edges in the DAG, a distinct concern. Per ADR 199, `computeMigrationId` strips contract payloads before hashing, so this rename does not invalidate attestation on existing demo migrations. - DataTransformCall now emits `dataTransform(endContract, ...)` and declares a default import from `./end-contract.json`. - `migration plan` / `migration new` copy artifacts as `end-contract.{json,d.ts}` (and, when a prior migration exists, `start-contract.{json,d.ts}`). - Rename existing example migration artifacts and update the two hand-authored `migration.ts` files that import the contract. - Mark the new patterns `linguist-generated` in `.gitattributes`. - Update unit + e2e tests and the spec / pr-plan / review artifacts. Live source-package `src/prisma/contract.{json,d.ts}` is unchanged — it is the unqualified live contract, not a point-in-time snapshot. | 5 个月前 | |
refactor: rename every user-facing prisma-next identifier to Prisma 8 (#30262) ## Linked issue n/a — no Linear ticket. Completes the rename that #30248 started for prose; builds on #30261. ## At a glance Every `prisma-next` identifier a user can see is renamed. Before and after, for a scaffolded project: ```text // use prisma-next → // use prisma-8 (schema header) prisma-next.md → prisma-8.md (primer at the project root) PRISMA_NEXT_DISABLE_TELEMETRY → PRISMA_DISABLE_TELEMETRY (and every other PRISMA_NEXT_* variable) ~/.config/prisma-next/ → ~/.config/prisma-8/ (per-user telemetry config) prisma-next contract emit → prisma contract emit (CLI invocations in docs, fixtures, recordings) ``` ## Summary After #30248 the product was called Prisma 8 in prose, but the working name was still written into user projects and printed by the CLI: the schema header, the primer file, the environment variables, the per-user config directory, the language-server diagnostic source, the Standard Schema vendor string, the contract brand symbol, the advisory-lock domain, and about 650 fixture and doc files that spelled out `prisma-next …` commands. This PR renames all of it in one pass and tightens the legacy-name lint so the only occurrences left are the ones with a reason. ## Decision One commit. The mapping: | Surface | Before | After | |---|---|---| | Schema header | `// use prisma-next` | `// use prisma-8` | | Primer file `init` writes | `prisma-next.md` | `prisma-8.md` | | CLI environment variables | `PRISMA_NEXT_*` | `PRISMA_*` | | Per-user config directory | `prisma-next/` | `prisma-8/` | | Language-server diagnostic source | `prisma-next` | `prisma` | | Standard Schema vendor, VS Code publisher | `prisma-next` | `prisma` | | Contract brand symbol | `__prisma_next_brand__` | `__prisma_8_brand__` | | Postgres advisory-lock domain | `prisma_next.contract.marker` | `prisma_8.contract.marker` | | Example database names | `prisma_next_*` | `prisma_8_*` | | README banner image | `images/prisma-next.png` | `images/prisma-8.png` | | Telemetry docs URL | `prisma-next.dev/docs/…` | `www.prisma.io/docs/…` | | New-issue links | `github.com/prisma/prisma-next/issues/new` | `github.com/prisma/orm/issues/new` | | CLI invocations in prose, fixtures, and recordings | `prisma-next db verify` | `prisma db verify` | `prisma-8` is the slug the repo already uses for the skill, the examples, and the upgrade directories, so it is the slug for everything that needs one. Environment variables drop the infix entirely because `PRISMA_*` is what users expect and nothing else in the repo claims those names. What keeps the old name, each with a lint allowance that says why: - **Dated records**: changelog, release notes, ADRs, shipped upgrade instructions, gotcha logs, the framework-gaps review, and the `projects/` and `drive/` write-ups. - **Pinned links** into the old repository by number, Linear slugs, and links to ADRs whose filenames carry the name. - **`@cipherstash/prisma-next`**, a third party's published package name. - **Retirement proofs**: the list of old skill directories `init` deletes, and the tests asserting that no `prisma-next` bin or skill directory is installed any more. ## Behavior changes & evidence - **Schema header.** The inferred-schema printer and the `init` templates write `// use prisma-8`. The language server accepts both headers, so existing schemas keep their diagnostics and completion, and its Format action rewrites the old header to the new one. [packages/1-framework/3-tooling/language-server/src/schema-directive.ts](packages/1-framework/3-tooling/language-server/src/schema-directive.ts), [packages/1-framework/2-authoring/psl-printer/src/ast-to-print-document.ts](packages/1-framework/2-authoring/psl-printer/src/ast-to-print-document.ts). Evidence: the `renameLegacyDirective` tests, the server test that formats a legacy-headed schema, and the psl-printer tests. - **Environment variables.** Telemetry gating, the endpoint override, and the debug switch read the new names. `PRISMA_NEXT_DISABLE_TELEMETRY` is still honoured as an opt-out so nobody is silently opted back in; the endpoint and debug spellings are not. [packages/1-framework/3-tooling/cli-telemetry/src/gating.ts](packages/1-framework/3-tooling/cli-telemetry/src/gating.ts). Evidence: cli-telemetry gating tests. - **Per-user config directory.** [packages/1-framework/3-tooling/cli-telemetry/src/user-config.ts](packages/1-framework/3-tooling/cli-telemetry/src/user-config.ts). Existing users see the telemetry consent prompt once more; nothing else is lost. - **Primer file.** [packages/1-framework/3-tooling/cli/src/orm/init-scaffold.ts](packages/1-framework/3-tooling/cli/src/orm/init-scaffold.ts). Evidence: init-scaffold tests and template snapshots. - **Advisory-lock domain.** A CLI on this version and one on the previous version take different locks for the same marker. Both versions running migrations against one database at the same moment is already unsupported. - **Upgrade instructions.** Entries for the header, the environment variables, and the primer file are recorded in the rc.9 → rc.10 app and extension instructions with detection patterns, so the published upgrade skill applies the rename. ## Testing performed - `pnpm test` in cli (1437), cli-telemetry (112), language-server (312), psl-printer (63), framework-components (672), target-postgres (1607), vite-plugin-contract-emit (31), emitter (231), and `pnpm test:scripts` (507): all pass after `pnpm build`. The language-server tests hard-coded the old header's length in semantic-token arrays and span offsets; those expectations are updated. - Committed migration steps and their content-addressed contract snapshots are left untouched, since rewriting them would break their hashes; the lint treats them as dated records. - `pnpm lint:legacy-name` passes with the tightened allowances; `node --test scripts/lint-legacy-name.test.mjs` passes (14 tests, including new negative cases for the header, primer, and skill names). - `pnpm check:upgrade-coverage --mode pr --prev origin/main` passes. ## Skill update `skills/prisma-8` references and the two rc.9 → rc.10 upgrade instruction files are updated in this PR. ## Checklist - [x] All commits are signed off (`git commit -s`) per the [DCO](../CONTRIBUTING.md#developer-certificate-of-origin-dco). - [x] I read [CONTRIBUTING.md](../CONTRIBUTING.md) and the change is scoped to one logical concern. - [x] Tests are updated. - [ ] The PR title is in `TML-NNNN: <sentence-case title>` form. No Linear ticket exists for this change. - [x] The **Skill update** section above is filled in. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io> Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> | 13 天前 | |
TML-2502: Add SupabaseRuntime and the supabase() façade (#792) Linear: [TML-2502](https://linear.app/prisma-company/issue/TML-2502) (ships TML-2878/2879/2880/2881). Design record: `projects/runtime-target-layer/specs/adr-runtime-target-layer.md`. ## What this is for The Supabase integration needs a database client where the person making the request decides which rows they can see. Supabase does this with Postgres Row-Level Security (RLS): you connect, tell Postgres which role you are (`anon`, `authenticated`, `service_role`) and who the user is (their JWT claims), and Postgres filters every query against the policies defined on each table. This PR builds that client — `SupabaseRuntime` and the `supabase()` factory — plus the runtime restructuring needed to support it. ```ts import { createDb } from "./prisma/db"; // the app surface, built on supabase() const db = await createDb(process.env.DATABASE_URL); const session = db.asUser(jwt); // this request is "user X" await session.orm.public.Profile.find({ ... }); // returns only the rows X may see await db.asServiceRole().orm.public.Profile.create({ ... }); // full access (bypasses RLS) db.asAnon(); // the public, unauthenticated role ``` ## How a role-bound session works `asUser(jwt)` verifies the JWT — rejecting expired or forged tokens before touching the database — and returns a `Db` bound to that role. When you run a query on it, the runtime: 1. checks out a connection from the pool; 2. sets the Postgres role and JWT claims on that connection (`SELECT set_config(role, authenticated, false)` and the same for `request.jwt.claims` — parameterized, so nothing from the JWT is ever interpolated into SQL); 3. runs your work — a single statement, an ORM operation with its nested reads/writes, or a transaction — on that same connection, so the role is in effect for all of it; 4. resets the connection (`RESET ALL`) before returning it to the pool, and destroys it if the reset fails, so one requests role can never leak to the next. The role is set on the connection itself, underneath the query layer, so application middleware cannot run a query that skips it. That is the guarantee RLS depends on. ## Runtime changes needed to support it `SupabaseRuntime` is a Postgres runtime with this session behaviour added, so it has to extend the Postgres runtime, which extends the SQL runtime. The SQL runtime wasnt built to be extended — it was a single internal class built by a `createRuntime` factory. This PR restructures it: - `SqlRuntime` becomes **`SqlRuntimeBase`**, an abstract base that targets extend. - Each target ships a concrete runtime — **`PostgresRuntimeImpl`**, **`SqliteRuntimeImpl`** — and **`SupabaseRuntimeImpl`** extends the Postgres one. App code depends on the interfaces (`PostgresRuntime`, `SqliteRuntime`, `SupabaseRuntime`), never the classes. - **`createRuntime` is removed**; you build a runtime through its target factory (`postgres()`, `sqlite()`, `supabase()`). These are breaking changes. The 0.13→0.14 upgrade instructions (in both the user and extension-author upgrade trees) tell consumers how to migrate. ## Tests `examples/supabase` exercises the whole thing end to end against a real RLS policy: through the example apps own `createDb()`, `asUser(jwt)` sees and updates only that users rows, `asAnon()` sees none, and `asServiceRole()` sees and creates everything — while a logging middleware confirms it never observes the role-setting SQL. Tests run real runtime objects over a fake driver (and real in-memory SQLite) rather than mocking our own classes. ## Alternatives considered Full record in the ADR. The short version: an earlier cut of this PR set the role as a step inside each `execute()` call rather than on the session. That left the ORM free to run its own statements on a different, unbound connection — an RLS hole. Binding the role to the connection the whole operation runs on is what closes it. ## Verification All gates green: `@prisma-next/sql-runtime` 278 tests · `extension-supabase` 46+ · `postgres` 88 · `sqlite` 46 · `test:packages` 10256 · integration 1070 · e2e 109 · `examples` (skeleton + RLS acceptance; `prisma-next-cloudflare-worker` needs a local Hyperdrive env that CI provides) · `lint:deps`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Release Notes * **Refactor** * Restructured SQL runtime architecture: `SqlRuntime` is now an abstract base class with concrete implementations (`PostgresRuntimeImpl`, `SqliteRuntimeImpl`). Removed `createRuntime` factory in favor of direct class instantiation. * **New Features** * Added Supabase runtime extension with role-based access control and JWT verification, enabling Row-Level Security (RLS) enforcement via `asUser()`, `asAnon()`, and `asServiceRole()`. * **Documentation** * Updated architecture documentation and upgrade guides to reflect runtime naming and construction changes. * **Tests** * Expanded test coverage for role binding, raw connection access patterns, and runtime lifecycle management. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Will Madden <madden@prisma.io> Co-authored-by: Will Madden <madden@prisma.io> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com> | 3 个月前 | |
chore: bump Node.js to 24.16.0 Update the .tool-versions pin (the single source mise reads in CI) from 24.13.0 to the latest v24 release, and refresh the environment line in the testing onboarding doc to match. Signed-off-by: Alexey Orlenko's AI Agent <robot@aqrln.net> | 3 个月前 | |
docs: rewrite README for Prisma 8, fix orm init dist-tag, sweep "Prisma Next" prose (#30248) ## Linked issue n/a — no Linear ticket. Follow-up to the README banner swap in #30225. ## At a glance The README's getting-started commands, before and after, checked against [prisma.io/docs/getting-started](https://www.prisma.io/docs/getting-started): ```bash # before npm create prisma@next npx @prisma/cli@next orm init # after npm create prisma npx prisma orm init npx prisma skills sync ``` The `prisma` package has no `next` dist-tag any more (`latest` is `8.0.0-rc.13`, `prev` is `7.10.0`), so the old commands no longer resolve. ## Summary The README still introduced the product as "Prisma Next" in Early Access, pointed at the removed `next` dist-tag, listed extensions by their `@internal/*` workspace names, and linked to `prisma/prisma`. The rest of the repo had about a thousand prose mentions of the working name. This PR fixes all of it and one real bug the sweep turned up. ## Decision Five commits, each reviewable on its own (the fifth only records the sweep against the in-flight upgrade-instruction files for the coverage check): 1. **Rewrite the README against the live docs.** Every instruction in it now matches the getting-started, quickstart, `orm init`, `skills`, and extensions pages in prisma/web. 2. **Fix `orm init` to install `prisma@latest`.** The CLI added `prisma@next` as a dev dependency. That tag no longer exists on npm, so `orm init` fails at the install step for anyone running it today. The engine fallback moves from `@prisma/cli-engine@next` (0.2.3, stale) to `@latest` (0.3.0). 3. **Replace "Prisma Next" with "Prisma 8" in prose repo-wide.** Docs, doc comments, READMEs, package descriptions, skill references, and user-facing strings. 4. **Carry the pnpm trust-policy exemptions into the tarball smoke tests.** The scratch installs those tests run trip a trust-downgrade check on `undici-types@6.21.0` (no provenance, while 6.13.0 and 6.18.2 had it). The repo already exempts it for the workspace install; the test kit now restates `trustPolicy` and `trustPolicyExclude` in the scratch project the way it restates the release-age settings. Reproduced on main with a fresh metadata cache, so this is a pre-existing failure that any run without cached metadata hits. ## Reviewer notes - **Rebased on #30229.** That PR's release-candidate banner and its `scorecard.md` link replace the roadmap reference in the README, and `ROADMAP.md` stays deleted. The prose sweep re-applied cleanly on top of its CONTRIBUTING, SECURITY, and governance edits. - **Dated records keep the old name**, matching the allowances `scripts/lint-legacy-name.mjs` already defines for the `prisma-next` identifier: `CHANGELOG.md`, `docs/releases/`, the ADRs, `projects/`, and `drive/`. Rewriting those would misreport what was true at the time, and a mechanical pass produced sentences like "Prisma Next becomes Prisma 8" turning into "Prisma 8 becomes Prisma 8". - **Identifiers are untouched.** `prisma-next` package names, paths, env vars (`PRISMA_NEXT_*`), `PrismaNext*` types, the `images/prisma-next.png` file, and the `prisma-next.md` primer (the docs still call it that) are all unchanged. Renaming any of those is a behaviour change with an upgrade path, not a docs fix. - **The sweep is mechanical.** The third commit is a `sed` of `Prisma Next` and `Prisma-next` to `Prisma 8` over 345 files. Three sentences that became self-referential (`ROADMAP.md`, `ROADMAP.html`, `scorecard.md`) were rewritten by hand. - **`README.md` supported-databases section** now says PostgreSQL and MongoDB are first-class and SQLite is planned next, which is what [/docs/orm](https://www.prisma.io/docs/orm) says. The previous text referenced work "before the 8.0.0-rc.1 release". - **Discord channel name dropped.** The README linked to a `prisma-next` channel I could not verify; it now links to Discord generically. ## Behavior changes & evidence - **`orm init` installs `prisma@latest`** instead of `prisma@next`, and falls back to `@prisma/cli-engine@latest` when the manifest does not pin the engine. [packages/1-framework/3-tooling/cli/src/orm/init.ts](packages/1-framework/3-tooling/cli/src/orm/init.ts), [packages/1-framework/3-tooling/cli/src/orm/init-packages.ts](packages/1-framework/3-tooling/cli/src/orm/init-packages.ts). Evidence: [packages/1-framework/3-tooling/cli/test/orm/init-install.test.ts](packages/1-framework/3-tooling/cli/test/orm/init-install.test.ts), [test/integration/test/cli.init-skill-distribution.integration.test.ts](test/integration/test/cli.init-skill-distribution.integration.test.ts). - **Scaffolded quick-reference notes and the skill quickstart** tell users to run `prisma@latest orm init`. [packages/1-framework/3-tooling/cli/src/commands/init/templates/quick-reference-postgres.md](packages/1-framework/3-tooling/cli/src/commands/init/templates/quick-reference-postgres.md), [skills/prisma-8/references/quickstart.md](skills/prisma-8/references/quickstart.md). Evidence: [packages/1-framework/3-tooling/cli/test/commands/init/__snapshots__/templates.test.ts.snap](packages/1-framework/3-tooling/cli/test/commands/init/__snapshots__/templates.test.ts.snap). - **No other runtime change.** Every other edit is prose in docs, comments, `package.json` descriptions, and `//` comments in test fixture schemas, which the emitter drops. ## Testing performed - `pnpm test` in `packages/1-framework/3-tooling/cli`: 115 files, 1437 tests passed - `pnpm lint:legacy-name`, `pnpm lint:docs`, `pnpm lint:skills`, `pnpm lint:rules:footprint`, `pnpm lint:manifests`: all pass (the `errors` README warning is pre-existing) - `pnpm fixtures:check` could not run in this worktree because the examples' `prisma` binary is not installed. The only schema edits are `//` comments, which do not reach the emitted contract. ## Skill update `skills/prisma-8/references/quickstart.md` is updated in the second commit: its `orm init` commands moved from `@prisma/cli@next` to `prisma@latest`, the same change the README makes. ## Alternatives considered - **Rename the identifiers too** (`prisma-next.md`, `PRISMA_NEXT_*`, `PrismaNext*` types, the image file). Each is a user-visible surface with an upgrade path, and the docs still name `prisma-next.md`. Left for a deliberate rename with upgrade instructions. - **Sweep the ADRs, changelog, and project write-ups as well.** The repo's own legacy-name lint exempts them as dated records, and the mechanical pass mangled sentences that describe the rename itself. Following the existing policy keeps the diff honest. - **Keep `@latest` on the commands, as the docs pages write them.** The v8 line is `latest` now, so the tag adds nothing; the README uses the bare `npm create prisma` and `npx prisma …` forms. ## Checklist - [x] All commits are signed off (`git commit -s`) per the [DCO](../CONTRIBUTING.md#developer-certificate-of-origin-dco). - [x] I read [CONTRIBUTING.md](../CONTRIBUTING.md) and the change is scoped to one logical concern. - [x] Tests are updated (the CLI install-command tests and snapshots). - [ ] The PR title is in `TML-NNNN: <sentence-case title>` form. No Linear ticket exists for this change. - [x] The **Skill update** section above is filled in. ## Notes for the reviewer The first two commits are small and worth reading line by line. The third is large but uniform; spot-check a few files rather than reading all 345. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io> Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> | 13 天前 | |
refactor: rename every user-facing prisma-next identifier to Prisma 8 (#30262) ## Linked issue n/a — no Linear ticket. Completes the rename that #30248 started for prose; builds on #30261. ## At a glance Every `prisma-next` identifier a user can see is renamed. Before and after, for a scaffolded project: ```text // use prisma-next → // use prisma-8 (schema header) prisma-next.md → prisma-8.md (primer at the project root) PRISMA_NEXT_DISABLE_TELEMETRY → PRISMA_DISABLE_TELEMETRY (and every other PRISMA_NEXT_* variable) ~/.config/prisma-next/ → ~/.config/prisma-8/ (per-user telemetry config) prisma-next contract emit → prisma contract emit (CLI invocations in docs, fixtures, recordings) ``` ## Summary After #30248 the product was called Prisma 8 in prose, but the working name was still written into user projects and printed by the CLI: the schema header, the primer file, the environment variables, the per-user config directory, the language-server diagnostic source, the Standard Schema vendor string, the contract brand symbol, the advisory-lock domain, and about 650 fixture and doc files that spelled out `prisma-next …` commands. This PR renames all of it in one pass and tightens the legacy-name lint so the only occurrences left are the ones with a reason. ## Decision One commit. The mapping: | Surface | Before | After | |---|---|---| | Schema header | `// use prisma-next` | `// use prisma-8` | | Primer file `init` writes | `prisma-next.md` | `prisma-8.md` | | CLI environment variables | `PRISMA_NEXT_*` | `PRISMA_*` | | Per-user config directory | `prisma-next/` | `prisma-8/` | | Language-server diagnostic source | `prisma-next` | `prisma` | | Standard Schema vendor, VS Code publisher | `prisma-next` | `prisma` | | Contract brand symbol | `__prisma_next_brand__` | `__prisma_8_brand__` | | Postgres advisory-lock domain | `prisma_next.contract.marker` | `prisma_8.contract.marker` | | Example database names | `prisma_next_*` | `prisma_8_*` | | README banner image | `images/prisma-next.png` | `images/prisma-8.png` | | Telemetry docs URL | `prisma-next.dev/docs/…` | `www.prisma.io/docs/…` | | New-issue links | `github.com/prisma/prisma-next/issues/new` | `github.com/prisma/orm/issues/new` | | CLI invocations in prose, fixtures, and recordings | `prisma-next db verify` | `prisma db verify` | `prisma-8` is the slug the repo already uses for the skill, the examples, and the upgrade directories, so it is the slug for everything that needs one. Environment variables drop the infix entirely because `PRISMA_*` is what users expect and nothing else in the repo claims those names. What keeps the old name, each with a lint allowance that says why: - **Dated records**: changelog, release notes, ADRs, shipped upgrade instructions, gotcha logs, the framework-gaps review, and the `projects/` and `drive/` write-ups. - **Pinned links** into the old repository by number, Linear slugs, and links to ADRs whose filenames carry the name. - **`@cipherstash/prisma-next`**, a third party's published package name. - **Retirement proofs**: the list of old skill directories `init` deletes, and the tests asserting that no `prisma-next` bin or skill directory is installed any more. ## Behavior changes & evidence - **Schema header.** The inferred-schema printer and the `init` templates write `// use prisma-8`. The language server accepts both headers, so existing schemas keep their diagnostics and completion, and its Format action rewrites the old header to the new one. [packages/1-framework/3-tooling/language-server/src/schema-directive.ts](packages/1-framework/3-tooling/language-server/src/schema-directive.ts), [packages/1-framework/2-authoring/psl-printer/src/ast-to-print-document.ts](packages/1-framework/2-authoring/psl-printer/src/ast-to-print-document.ts). Evidence: the `renameLegacyDirective` tests, the server test that formats a legacy-headed schema, and the psl-printer tests. - **Environment variables.** Telemetry gating, the endpoint override, and the debug switch read the new names. `PRISMA_NEXT_DISABLE_TELEMETRY` is still honoured as an opt-out so nobody is silently opted back in; the endpoint and debug spellings are not. [packages/1-framework/3-tooling/cli-telemetry/src/gating.ts](packages/1-framework/3-tooling/cli-telemetry/src/gating.ts). Evidence: cli-telemetry gating tests. - **Per-user config directory.** [packages/1-framework/3-tooling/cli-telemetry/src/user-config.ts](packages/1-framework/3-tooling/cli-telemetry/src/user-config.ts). Existing users see the telemetry consent prompt once more; nothing else is lost. - **Primer file.** [packages/1-framework/3-tooling/cli/src/orm/init-scaffold.ts](packages/1-framework/3-tooling/cli/src/orm/init-scaffold.ts). Evidence: init-scaffold tests and template snapshots. - **Advisory-lock domain.** A CLI on this version and one on the previous version take different locks for the same marker. Both versions running migrations against one database at the same moment is already unsupported. - **Upgrade instructions.** Entries for the header, the environment variables, and the primer file are recorded in the rc.9 → rc.10 app and extension instructions with detection patterns, so the published upgrade skill applies the rename. ## Testing performed - `pnpm test` in cli (1437), cli-telemetry (112), language-server (312), psl-printer (63), framework-components (672), target-postgres (1607), vite-plugin-contract-emit (31), emitter (231), and `pnpm test:scripts` (507): all pass after `pnpm build`. The language-server tests hard-coded the old header's length in semantic-token arrays and span offsets; those expectations are updated. - Committed migration steps and their content-addressed contract snapshots are left untouched, since rewriting them would break their hashes; the lint treats them as dated records. - `pnpm lint:legacy-name` passes with the tightened allowances; `node --test scripts/lint-legacy-name.test.mjs` passes (14 tests, including new negative cases for the header, primer, and skill names). - `pnpm check:upgrade-coverage --mode pr --prev origin/main` passes. ## Skill update `skills/prisma-8` references and the two rc.9 → rc.10 upgrade instruction files are updated in this PR. ## Checklist - [x] All commits are signed off (`git commit -s`) per the [DCO](../CONTRIBUTING.md#developer-certificate-of-origin-dco). - [x] I read [CONTRIBUTING.md](../CONTRIBUTING.md) and the change is scoped to one logical concern. - [x] Tests are updated. - [ ] The PR title is in `TML-NNNN: <sentence-case title>` form. No Linear ticket exists for this change. - [x] The **Skill update** section above is filled in. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io> Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> | 13 天前 | |
chore(release): bump to 8.0.0-rc.12 (#30395) ## Release: 8.0.0-rc.11 → 8.0.0-rc.12 This is the release PR described in [docs/oss/versioning.md](https://github.com/prisma/orm/blob/main/docs/oss/versioning.md). It bumps every workspace package to 8.0.0-rc.12 and moves the Prisma dependencies to their latest versions. **Merging this PR ships the release.** The push to `main` carries the new root `version`. The `Publish to npm` workflow then publishes 8.0.0-rc.12 under `latest` and creates a pre-release GitHub Release from the notes file. ## Review these first - [docs/releases/v8.0.0-rc.12.md](https://github.com/prisma/orm/blob/release/8.0.0-rc.12/docs/releases/v8.0.0-rc.12.md): the release notes, which become the GitHub Release body. The same entry is at the top of `CHANGELOG.md`. - The upgrade guides for [apps](https://github.com/prisma/orm/blob/release/8.0.0-rc.12/skills/prisma-8/upgrading/app/upgrades/8.0.0-rc.11-to-8.0.0-rc.12/instructions.md) and [extensions](https://github.com/prisma/orm/blob/release/8.0.0-rc.12/skills/prisma-8/upgrading/extension/upgrades/8.0.0-rc.11-to-8.0.0-rc.12/instructions.md). They merge the 24 pending fragments. The original fragments are moved unchanged to `upgrade-instructions/releases/8.0.0-rc.11-to-8.0.0-rc.12/sources/`. - Four guide entries have no fragment behind them. The `migration new` default and its removed error codes (#30389) had no guide entry. Neither did the PSL parser API changes (#30312, #30344, #30335, #30379). I wrote those entries while preparing the release. - Where fragments contradicted later code, the guide follows the code. Examples: the Supabase storage hash, `voidParamsSchema`, and quoted defaults printed by `infer`. ## Dependency updates | Package | From | To | Where | | --- | --- | --- | --- | | `@prisma/cli-engine` | 0.4.0 | 0.6.1 | examples, test fixtures, apps (the toolchain packages were already on 0.6.1 from #30372) | | `@prisma/dev` | 0.25.1 | 0.25.2 | the workspace catalog | | `@prisma/compute-sdk` | ^0.39.0 | ^0.43.0 | `apps/telemetry-backend` | | `@prisma/management-api-sdk` | ^1.56.0 | ^1.76.0 | `apps/telemetry-backend` | compute-sdk 0.43 renames "service" to "app" and "version" to "deployment". The telemetry deploy script now uses the new names. Both SDK versions call `/v1/apps/{appId}`, so the ID stored in the existing `TELEMETRY_DEPLOY_SERVICE_ID` secret is still correct. The app's typecheck now includes `scripts/`, so it catches the next SDK rename. The repo does not depend on `@prisma/composer`. ## Fixes needed to publish - **The publish workflow has failed on `main` since #30372.** `check:conformance` called the `orm` config validator as `validate(value)`. Engine 0.6 always calls `validate(value, provenance)`, and the validator reads `provenance.files`, so it threw on every input. The check now passes the same provenance the engine would. The prisma-cli copy of this check already does this. - `set-version` rewrote `workspace:@internal/cli@<version>` to `workspace:<version>`, dropping the alias. The prisma7-adoption example uses that alias. This is the first bump since the alias was added. - `lint:legacy-name` and the `add-model-map` test pointed at the pending fragment paths. They now point at the archived sources. ## Verification Passed locally: - `pnpm build` - `pnpm typecheck` - `pnpm lint` - `pnpm test:scripts` (563 tests) - `pnpm check:conformance` - `pnpm check:publish-deps` - `pnpm check:upgrade-coverage`, in both publish and PR mode - `pnpm check:release-notes`, in both publish and PR mode - `pnpm lint:legacy-name` - `pnpm lint:skills` - `pnpm test:packages`: all 18,196 tests passed Not covered locally, left to CI: - Three `test:packages` suites install packed tarballs from the registry. This machine's pnpm refuses `@vercel/detect-agent@1.2.5` because it has no provenance. CI passed the same suites on #30390. - `prisma-8-cloudflare-worker` needs a local Hyperdrive database. - The telemetry backend tests need Node 24.16 with `Temporal`. This machine has 24.13. - `fixtures:check` needs Postgres. 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added PostgreSQL full-text search, multi-file schemas, prepared ORM reads and aggregates, and conflict-skipping options for bulk creation. * Added support for using a Prisma 7 schema as the contract source, JavaScript `Date` timestamps on PostgreSQL, editor support for attribute arguments, and per-finding diagnostics. * **Breaking Changes** * Prisma 8 schema files now require `// use prisma-8` on the first line; unmapped models use their names verbatim for table names. * Replace `dbgenerated(...)` with SQL tagged literals. Defaults must be valid for their column types, creation timestamps use the application clock, and native PostgreSQL enums no longer support text operations. * Config naming and path resolution, migration starting points, and extension contracts have changed. * **Bug Fixes** * Improved migration checks and branching warnings, contract generation and inference, default verification, and type checking. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> | 18 小时前 | |
chore: Link AGENT.md to CLAUDE.md | 6 个月前 | |
feat(oss-setup): add SECURITY.md, CODEOWNERS, and CoC reporting channel Establishes the safety/disclosure surface area required to accept external contributions: - SECURITY.md documents GitHub Private Vulnerability Reporting as the primary channel (security@prisma.io as fallback), commits to a 5-business-day acknowledgement SLA, declares scope (every published @prisma-next/* package), and is explicit that pre-1.0 only the latest minor receives security fixes. - .github/CODEOWNERS routes every PR to @prisma/ORM-TS-Maintain. A flat single-rule layout is intentional: until the maintainer group is large enough to warrant subsystem routing, per-directory rules drift faster than they help. Branch protection (admin-side, not in this commit) is the gate that turns this from advisory to required. - CODE_OF_CONDUCT.md previously routed reports only to Discord. The Reporting an Issue section now names conduct@prisma.io as the primary channel with Discord as a fallback for cases where email is uncomfortable (e.g. report concerns a maintainer). The rest of the Contributor Covenant text is unchanged. The corresponding GitHub admin actions (enable PVR, require CODEOWNER review on main, provision conduct@prisma.io if not already in place) are tracked separately in plan.md M2 and need to land before this PR merges. Refs TML-2439. | 4 个月前 | |
docs: Prisma 7 bug reports belong in this repository (#30297) A Prisma 7 user who opens a bug report in this repository today is told this before the form: > You are on the **latest minor version** of Prisma 8. While we are pre-1.0, only the latest minor receives fixes — older minors are not supported. If you are on an older minor, please upgrade and re-verify before filing. With this PR they are told this instead: > You are on the latest release of the line you use. For Prisma 8, that is the latest release candidate: while we are pre-1.0, only the latest release receives fixes. For Prisma 7, that is the latest `7.x`: Prisma 7 is maintained on the [`v7` branch](https://github.com/prisma/orm/tree/v7) of this repository and receives bug fixes for eighteen months after `8.0.0` final, so Prisma 7 reports belong here too. ## The decision Prisma 7 bug reports are filed in this repository, on the same templates as Prisma 8 reports, and every contributor-facing document here says so and links only to this repository. ## Why the docs need it Prisma 7 moved to the `v7` branch of this repository when Prisma 8 became the `main` line. The README says so. The documents a reporter actually reads were written for a Prisma 8 only repository and were never updated: - The bug template's precondition, quoted above, reads as "Prisma 7 is not supported here". A user with a real Prisma 7 problem reads it and leaves. That is how #30295, a dependency advisory on `prisma@7.10.0`, nearly went unfiled. - `CONTRIBUTING.md`'s clone command fetches `prisma/prisma` and then enters a directory that clone does not create. Anyone who follows it ends up in the wrong repository, then in no directory at all. - `SECURITY.md` and the template config send vulnerability reports to `prisma/prisma`'s advisory form and say advisories are published there. `SECURITY.md`'s supported-versions section describes only the release-candidate line, so a Prisma 7 user cannot tell whether their version gets security fixes at all. - Both templates apply labels that do not exist here: `bug`, `needs-triage` and `enhancement`. GitHub drops labels it cannot find, so every issue filed through the web form lands unlabelled. ## What changes - **Bug template.** The precondition covers both lines, as quoted above. The package field says Prisma 7 versions are welcome. Labels become `kind/bug` and `bug/1-unconfirmed`, which exist. - **Feature template.** Label becomes `kind/feature`. Its links to the issue list and the README point at this repository. - **`SECURITY.md`.** The advisory links point at this repository. Supported versions gains a Prisma 7 paragraph: bug and security fixes for eighteen months after `8.0.0` final, on the latest `7.x` only. - **`CONTRIBUTING.md`.** The clone URL points at this repository and the setup snippet enters the `orm` directory the clone creates. The `v7` branch link and the eighteen-month window landed on `main` in #30296 and are not repeated here. - **Template config.** The security and contributing links point at this repository. Documentation only; no code or workflow changes. ## Alternatives considered - **A separate Prisma 7 bug template.** Rejected: the fields are identical, and two templates means two places to keep in step. One precondition that names both lines is enough. - **Sending Prisma 7 reports to `prisma/prisma`.** Rejected: the code is not there. The `v7` branch is in this repository and the fix would land here. - **Creating the `bug`, `needs-triage` and `enhancement` labels instead of changing the templates.** Rejected: this repository already has a label scheme (`kind/*`, `bug/*`, `status/*`), and adding a parallel one would split triage across two vocabularies. 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Updated contribution and setup instructions to use the current repository location. * Clarified Prisma 7 maintenance coverage, supported versions, and release-branch guidance. * Updated security reporting links to the Prisma ORM vulnerability portal. * Refreshed issue templates with current labels, repository links, and Prisma 7/8 version guidance. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io> Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> | 9 天前 | |
chore: add LICENSE | 6 个月前 | |
docs: Prisma 7 is supported for eighteen months after 8.0.0 final (#30296) The README and CONTRIBUTING said Prisma 7 gets "bug fixes for twelve months after `8.0.0` final". The docs site's [Release status](https://www.prisma.io/docs/orm/release-status) page says Prisma ORM 7 receives bug fixes and security updates for 18 months from general availability. Both now say eighteen months, and name security updates as well as bug fixes. Before: > Prisma 7 stays on the `v7` branch with bug fixes for twelve months after `8.0.0` final. After: > Prisma 7 stays on the `v7` branch with bug fixes and security updates for eighteen months after `8.0.0` final. Not changed: the planning documents under `projects/prisma-8-rc1/` still say 12 months. They record the plan as it was written, so they are left as history. 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Documentation** - Updated support guidance to state that Prisma 7 will receive bug fixes and security updates for 18 months after the Prisma 8.0.0 final release. - Clarified that Prisma 7 is an exception to the latest-release-only security-fix policy, with updates provided on the v7 branch. - Updated the contribution guidelines, README, and security documentation to reflect the revised support window. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io> Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> | 9 天前 | |
docs: Prisma 7 bug reports belong in this repository (#30297) A Prisma 7 user who opens a bug report in this repository today is told this before the form: > You are on the **latest minor version** of Prisma 8. While we are pre-1.0, only the latest minor receives fixes — older minors are not supported. If you are on an older minor, please upgrade and re-verify before filing. With this PR they are told this instead: > You are on the latest release of the line you use. For Prisma 8, that is the latest release candidate: while we are pre-1.0, only the latest release receives fixes. For Prisma 7, that is the latest `7.x`: Prisma 7 is maintained on the [`v7` branch](https://github.com/prisma/orm/tree/v7) of this repository and receives bug fixes for eighteen months after `8.0.0` final, so Prisma 7 reports belong here too. ## The decision Prisma 7 bug reports are filed in this repository, on the same templates as Prisma 8 reports, and every contributor-facing document here says so and links only to this repository. ## Why the docs need it Prisma 7 moved to the `v7` branch of this repository when Prisma 8 became the `main` line. The README says so. The documents a reporter actually reads were written for a Prisma 8 only repository and were never updated: - The bug template's precondition, quoted above, reads as "Prisma 7 is not supported here". A user with a real Prisma 7 problem reads it and leaves. That is how #30295, a dependency advisory on `prisma@7.10.0`, nearly went unfiled. - `CONTRIBUTING.md`'s clone command fetches `prisma/prisma` and then enters a directory that clone does not create. Anyone who follows it ends up in the wrong repository, then in no directory at all. - `SECURITY.md` and the template config send vulnerability reports to `prisma/prisma`'s advisory form and say advisories are published there. `SECURITY.md`'s supported-versions section describes only the release-candidate line, so a Prisma 7 user cannot tell whether their version gets security fixes at all. - Both templates apply labels that do not exist here: `bug`, `needs-triage` and `enhancement`. GitHub drops labels it cannot find, so every issue filed through the web form lands unlabelled. ## What changes - **Bug template.** The precondition covers both lines, as quoted above. The package field says Prisma 7 versions are welcome. Labels become `kind/bug` and `bug/1-unconfirmed`, which exist. - **Feature template.** Label becomes `kind/feature`. Its links to the issue list and the README point at this repository. - **`SECURITY.md`.** The advisory links point at this repository. Supported versions gains a Prisma 7 paragraph: bug and security fixes for eighteen months after `8.0.0` final, on the latest `7.x` only. - **`CONTRIBUTING.md`.** The clone URL points at this repository and the setup snippet enters the `orm` directory the clone creates. The `v7` branch link and the eighteen-month window landed on `main` in #30296 and are not repeated here. - **Template config.** The security and contributing links point at this repository. Documentation only; no code or workflow changes. ## Alternatives considered - **A separate Prisma 7 bug template.** Rejected: the fields are identical, and two templates means two places to keep in step. One precondition that names both lines is enough. - **Sending Prisma 7 reports to `prisma/prisma`.** Rejected: the code is not there. The `v7` branch is in this repository and the fix would land here. - **Creating the `bug`, `needs-triage` and `enhancement` labels instead of changing the templates.** Rejected: this repository already has a label scheme (`kind/*`, `bug/*`, `status/*`), and adding a parallel one would split triage across two vocabularies. 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Updated contribution and setup instructions to use the current repository location. * Clarified Prisma 7 maintenance coverage, supported versions, and release-branch guidance. * Updated security reporting links to the Prisma ORM vulnerability portal. * Refreshed issue templates with current labels, repository links, and Prisma 7/8 version guidance. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io> Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> | 9 天前 | |
refactor: rename every user-facing prisma-next identifier to Prisma 8 (#30262) ## Linked issue n/a — no Linear ticket. Completes the rename that #30248 started for prose; builds on #30261. ## At a glance Every `prisma-next` identifier a user can see is renamed. Before and after, for a scaffolded project: ```text // use prisma-next → // use prisma-8 (schema header) prisma-next.md → prisma-8.md (primer at the project root) PRISMA_NEXT_DISABLE_TELEMETRY → PRISMA_DISABLE_TELEMETRY (and every other PRISMA_NEXT_* variable) ~/.config/prisma-next/ → ~/.config/prisma-8/ (per-user telemetry config) prisma-next contract emit → prisma contract emit (CLI invocations in docs, fixtures, recordings) ``` ## Summary After #30248 the product was called Prisma 8 in prose, but the working name was still written into user projects and printed by the CLI: the schema header, the primer file, the environment variables, the per-user config directory, the language-server diagnostic source, the Standard Schema vendor string, the contract brand symbol, the advisory-lock domain, and about 650 fixture and doc files that spelled out `prisma-next …` commands. This PR renames all of it in one pass and tightens the legacy-name lint so the only occurrences left are the ones with a reason. ## Decision One commit. The mapping: | Surface | Before | After | |---|---|---| | Schema header | `// use prisma-next` | `// use prisma-8` | | Primer file `init` writes | `prisma-next.md` | `prisma-8.md` | | CLI environment variables | `PRISMA_NEXT_*` | `PRISMA_*` | | Per-user config directory | `prisma-next/` | `prisma-8/` | | Language-server diagnostic source | `prisma-next` | `prisma` | | Standard Schema vendor, VS Code publisher | `prisma-next` | `prisma` | | Contract brand symbol | `__prisma_next_brand__` | `__prisma_8_brand__` | | Postgres advisory-lock domain | `prisma_next.contract.marker` | `prisma_8.contract.marker` | | Example database names | `prisma_next_*` | `prisma_8_*` | | README banner image | `images/prisma-next.png` | `images/prisma-8.png` | | Telemetry docs URL | `prisma-next.dev/docs/…` | `www.prisma.io/docs/…` | | New-issue links | `github.com/prisma/prisma-next/issues/new` | `github.com/prisma/orm/issues/new` | | CLI invocations in prose, fixtures, and recordings | `prisma-next db verify` | `prisma db verify` | `prisma-8` is the slug the repo already uses for the skill, the examples, and the upgrade directories, so it is the slug for everything that needs one. Environment variables drop the infix entirely because `PRISMA_*` is what users expect and nothing else in the repo claims those names. What keeps the old name, each with a lint allowance that says why: - **Dated records**: changelog, release notes, ADRs, shipped upgrade instructions, gotcha logs, the framework-gaps review, and the `projects/` and `drive/` write-ups. - **Pinned links** into the old repository by number, Linear slugs, and links to ADRs whose filenames carry the name. - **`@cipherstash/prisma-next`**, a third party's published package name. - **Retirement proofs**: the list of old skill directories `init` deletes, and the tests asserting that no `prisma-next` bin or skill directory is installed any more. ## Behavior changes & evidence - **Schema header.** The inferred-schema printer and the `init` templates write `// use prisma-8`. The language server accepts both headers, so existing schemas keep their diagnostics and completion, and its Format action rewrites the old header to the new one. [packages/1-framework/3-tooling/language-server/src/schema-directive.ts](packages/1-framework/3-tooling/language-server/src/schema-directive.ts), [packages/1-framework/2-authoring/psl-printer/src/ast-to-print-document.ts](packages/1-framework/2-authoring/psl-printer/src/ast-to-print-document.ts). Evidence: the `renameLegacyDirective` tests, the server test that formats a legacy-headed schema, and the psl-printer tests. - **Environment variables.** Telemetry gating, the endpoint override, and the debug switch read the new names. `PRISMA_NEXT_DISABLE_TELEMETRY` is still honoured as an opt-out so nobody is silently opted back in; the endpoint and debug spellings are not. [packages/1-framework/3-tooling/cli-telemetry/src/gating.ts](packages/1-framework/3-tooling/cli-telemetry/src/gating.ts). Evidence: cli-telemetry gating tests. - **Per-user config directory.** [packages/1-framework/3-tooling/cli-telemetry/src/user-config.ts](packages/1-framework/3-tooling/cli-telemetry/src/user-config.ts). Existing users see the telemetry consent prompt once more; nothing else is lost. - **Primer file.** [packages/1-framework/3-tooling/cli/src/orm/init-scaffold.ts](packages/1-framework/3-tooling/cli/src/orm/init-scaffold.ts). Evidence: init-scaffold tests and template snapshots. - **Advisory-lock domain.** A CLI on this version and one on the previous version take different locks for the same marker. Both versions running migrations against one database at the same moment is already unsupported. - **Upgrade instructions.** Entries for the header, the environment variables, and the primer file are recorded in the rc.9 → rc.10 app and extension instructions with detection patterns, so the published upgrade skill applies the rename. ## Testing performed - `pnpm test` in cli (1437), cli-telemetry (112), language-server (312), psl-printer (63), framework-components (672), target-postgres (1607), vite-plugin-contract-emit (31), emitter (231), and `pnpm test:scripts` (507): all pass after `pnpm build`. The language-server tests hard-coded the old header's length in semantic-token arrays and span offsets; those expectations are updated. - Committed migration steps and their content-addressed contract snapshots are left untouched, since rewriting them would break their hashes; the lint treats them as dated records. - `pnpm lint:legacy-name` passes with the tightened allowances; `node --test scripts/lint-legacy-name.test.mjs` passes (14 tests, including new negative cases for the header, primer, and skill names). - `pnpm check:upgrade-coverage --mode pr --prev origin/main` passes. ## Skill update `skills/prisma-8` references and the two rc.9 → rc.10 upgrade instruction files are updated in this PR. ## Checklist - [x] All commits are signed off (`git commit -s`) per the [DCO](../CONTRIBUTING.md#developer-certificate-of-origin-dco). - [x] I read [CONTRIBUTING.md](../CONTRIBUTING.md) and the change is scoped to one logical concern. - [x] Tests are updated. - [ ] The PR title is in `TML-NNNN: <sentence-case title>` form. No Linear ticket exists for this change. - [x] The **Skill update** section above is filled in. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io> Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> | 13 天前 | |
chore(deps-dev)(deps-dev): bump the dev-deps group across 1 directory with 10 updates (#30037) Bumps the dev-deps group with 10 updates in the / directory: | Package | From | To | | --- | --- | --- | | [@biomejs/biome](https://github.com/biomejs/biome/tree/HEAD/packages/@biomejs/biome) | `2.5.7` | `2.5.8` | | [dependency-cruiser](https://github.com/sverweij/dependency-cruiser) | `18.1.0` | `18.1.1` | | [pkg-pr-new](https://github.com/stackblitz-labs/pkg.pr.new/tree/HEAD/packages/cli) | `0.0.86` | `0.0.87` | | [skills](https://github.com/vercel-labs/skills) | `1.5.21` | `1.5.22` | | [turbo](https://github.com/vercel/turborepo) | `2.10.8` | `2.10.9` | | [wrangler](https://github.com/cloudflare/workers-sdk/tree/HEAD/packages/wrangler) | `4.118.0` | `4.119.0` | | [@cloudflare/vitest-pool-workers](https://github.com/cloudflare/workers-sdk/tree/HEAD/packages/vitest-pool-workers) | `0.20.1` | `0.20.3` | | [@cloudflare/workers-types](https://github.com/cloudflare/workerd) | `5.20260714.1` | `5.20260804.1` | | [@prisma/compute-sdk](https://github.com/prisma/project-compute) | `0.38.0` | `0.39.0` | | [@prisma/management-api-sdk](https://github.com/prisma/pdp-control-plane/tree/HEAD/packages/management-api-sdk) | `1.53.0` | `1.56.0` | Updates `@biomejs/biome` from 2.5.7 to 2.5.8 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/biomejs/biome/releases">@biomejs/biome's releases</a>.</em></p> <blockquote> <h2>Biome CLI v2.5.8</h2> <h2>2.5.8</h2> <h3>Patch Changes</h3> <ul> <li> <p><a href="https://redirect.github.com/biomejs/biome/pull/10710">#10710</a> <a href="https://github.com/biomejs/biome/commit/0a0fbc15d67c410c80dfae398903f845544fcd65"><code>0a0fbc1</code></a> Thanks <a href="https://github.com/dyc3"><code>@dyc3</code></a>! - Added a new nursery rule <a href="https://biomejs.dev/linter/rules/use-react-compiler/"><code>useReactCompiler</code></a>, which reports diagnostics from React Compiler lint mode.</p> </li> <li> <p><a href="https://redirect.github.com/biomejs/biome/pull/11251">#11251</a> <a href="https://github.com/biomejs/biome/commit/ea9dd8a93e65f849840415e8e26cd668aa1af913"><code>ea9dd8a</code></a> Thanks <a href="https://github.com/dyc3"><code>@dyc3</code></a>! - Improved performance of <a href="https://biomejs.dev/linter/rules/no-import-cycles/"><code>noImportCycles</code></a>.</p> </li> <li> <p><a href="https://redirect.github.com/biomejs/biome/pull/11247">#11247</a> <a href="https://github.com/biomejs/biome/commit/52b44d6795741d051bf703bd69c6cb447af8fd1d"><code>52b44d6</code></a> Thanks <a href="https://github.com/dyc3"><code>@dyc3</code></a>! - Added the nursery rule <a href="https://biomejs.dev/linter/rules/no-svelte-legacy-const/"><code>noSvelteLegacyConst</code></a>, which disallows legacy Svelte <code>{@const}</code> tags and recommends declaration tags with <code>$derived()</code>.</p> <p>Invalid:</p> <pre lang="svelte"><code>{#each boxes as box} {@const area = box.width * box.height} <p>{area}</p> {/each} </code></pre> <p>Valid:</p> <pre lang="svelte"><code>{#each boxes as box} {const area = $derived(box.width * box.height)} <p>{area}</p> {/each} </code></pre> </li> <li> <p><a href="https://redirect.github.com/biomejs/biome/pull/11252">#11252</a> <a href="https://github.com/biomejs/biome/commit/d5f570414fdcdddf62372e35c05f6dababad9287"><code>d5f5704</code></a> Thanks <a href="https://github.com/Turtle-Hwan"><code>@Turtle-Hwan</code></a>! - Fixed <a href="https://redirect.github.com/biomejs/biome/issues/11250">#11250</a>: <a href="https://biomejs.dev/linter/rules/use-await/"><code>useAwait</code></a> no longer reports async functions that contain an <code>await using</code> declaration.</p> </li> <li> <p><a href="https://redirect.github.com/biomejs/biome/pull/11143">#11143</a> <a href="https://github.com/biomejs/biome/commit/6be7be1b147d7b4352ff5625a78bd54a48958950"><code>6be7be1</code></a> Thanks <a href="https://github.com/vznh"><code>@vznh</code></a>! - Fixed <a href="https://redirect.github.com/biomejs/biome/issues/11017">#11017</a>: <a href="https://biomejs.dev/linter/rules/no-useless-undefined/"><code>noUselessUndefined</code></a> no longer reports <code>return undefined</code> when the enclosing function has a return type annotation other than <code>undefined</code> or <code>void</code>.</p> </li> <li> <p><a href="https://redirect.github.com/biomejs/biome/pull/11234">#11234</a> <a href="https://github.com/biomejs/biome/commit/caefe393c66340914c481f7ccfc82979cf76b61b"><code>caefe39</code></a> Thanks <a href="https://github.com/subotac"><code>@subotac</code></a>! - Fixed <a href="https://redirect.github.com/biomejs/biome/issues/11228">#11228</a>: CSS block comments between a declaration colon and value now preserve their source indentation.</p> <pre lang="diff"><code> :root { --font-stack: -/* comment */ + /* comment */ system-ui; } </code></pre> </li> <li> <p><a href="https://redirect.github.com/biomejs/biome/pull/11285">#11285</a> <a href="https://github.com/biomejs/biome/commit/bca1f73d939423056337bfd0a42cbdcb66bb1e3f"><code>bca1f73</code></a> Thanks <a href="https://github.com/denbezrukov"><code>@denbezrukov</code></a>! - Fixed <a href="https://redirect.github.com/biomejs/biome/issues/11280">#11280</a>: CSS formatting keeps comments inside functional pseudo-classes and pseudo-elements instead of moving them before the function name.</p> <pre lang="diff"><code>-:/* comment */ where(div) {} +:where(/* comment */ div) {} </code></pre> </li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/biomejs/biome/blob/main/packages/@biomejs/biome/CHANGELOG.md">@biomejs/biome's changelog</a>.</em></p> <blockquote> <h2>2.5.8</h2> <h3>Patch Changes</h3> <ul> <li> <p><a href="https://redirect.github.com/biomejs/biome/pull/10710">#10710</a> <a href="https://github.com/biomejs/biome/commit/0a0fbc15d67c410c80dfae398903f845544fcd65"><code>0a0fbc1</code></a> Thanks <a href="https://github.com/dyc3"><code>@dyc3</code></a>! - Added a new nursery rule <a href="https://biomejs.dev/linter/rules/use-react-compiler/"><code>useReactCompiler</code></a>, which reports diagnostics from React Compiler lint mode.</p> </li> <li> <p><a href="https://redirect.github.com/biomejs/biome/pull/11251">#11251</a> <a href="https://github.com/biomejs/biome/commit/ea9dd8a93e65f849840415e8e26cd668aa1af913"><code>ea9dd8a</code></a> Thanks <a href="https://github.com/dyc3"><code>@dyc3</code></a>! - Improved performance of <a href="https://biomejs.dev/linter/rules/no-import-cycles/"><code>noImportCycles</code></a>.</p> </li> <li> <p><a href="https://redirect.github.com/biomejs/biome/pull/11247">#11247</a> <a href="https://github.com/biomejs/biome/commit/52b44d6795741d051bf703bd69c6cb447af8fd1d"><code>52b44d6</code></a> Thanks <a href="https://github.com/dyc3"><code>@dyc3</code></a>! - Added the nursery rule <a href="https://biomejs.dev/linter/rules/no-svelte-legacy-const/"><code>noSvelteLegacyConst</code></a>, which disallows legacy Svelte <code>{@const}</code> tags and recommends declaration tags with <code>$derived()</code>.</p> <p>Invalid:</p> <pre lang="svelte"><code>{#each boxes as box} {@const area = box.width * box.height} <p>{area}</p> {/each} </code></pre> <p>Valid:</p> <pre lang="svelte"><code>{#each boxes as box} {const area = $derived(box.width * box.height)} <p>{area}</p> {/each} </code></pre> </li> <li> <p><a href="https://redirect.github.com/biomejs/biome/pull/11252">#11252</a> <a href="https://github.com/biomejs/biome/commit/d5f570414fdcdddf62372e35c05f6dababad9287"><code>d5f5704</code></a> Thanks <a href="https://github.com/Turtle-Hwan"><code>@Turtle-Hwan</code></a>! - Fixed <a href="https://redirect.github.com/biomejs/biome/issues/11250">#11250</a>: <a href="https://biomejs.dev/linter/rules/use-await/"><code>useAwait</code></a> no longer reports async functions that contain an <code>await using</code> declaration.</p> </li> <li> <p><a href="https://redirect.github.com/biomejs/biome/pull/11143">#11143</a> <a href="https://github.com/biomejs/biome/commit/6be7be1b147d7b4352ff5625a78bd54a48958950"><code>6be7be1</code></a> Thanks <a href="https://github.com/vznh"><code>@vznh</code></a>! - Fixed <a href="https://redirect.github.com/biomejs/biome/issues/11017">#11017</a>: <a href="https://biomejs.dev/linter/rules/no-useless-undefined/"><code>noUselessUndefined</code></a> no longer reports <code>return undefined</code> when the enclosing function has a return type annotation other than <code>undefined</code> or <code>void</code>.</p> </li> <li> <p><a href="https://redirect.github.com/biomejs/biome/pull/11234">#11234</a> <a href="https://github.com/biomejs/biome/commit/caefe393c66340914c481f7ccfc82979cf76b61b"><code>caefe39</code></a> Thanks <a href="https://github.com/subotac"><code>@subotac</code></a>! - Fixed <a href="https://redirect.github.com/biomejs/biome/issues/11228">#11228</a>: CSS block comments between a declaration colon and value now preserve their source indentation.</p> <pre lang="diff"><code> :root { --font-stack: -/* comment */ + /* comment */ system-ui; } </code></pre> </li> <li> <p><a href="https://redirect.github.com/biomejs/biome/pull/11285">#11285</a> <a href="https://github.com/biomejs/biome/commit/bca1f73d939423056337bfd0a42cbdcb66bb1e3f"><code>bca1f73</code></a> Thanks <a href="https://github.com/denbezrukov"><code>@denbezrukov</code></a>! - Fixed <a href="https://redirect.github.com/biomejs/biome/issues/11280">#11280</a>: CSS formatting keeps comments inside functional pseudo-classes and pseudo-elements instead of moving them before the function name.</p> <pre lang="diff"><code>-:/* comment */ where(div) {} +:where(/* comment */ div) {} </code></pre> </li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/biomejs/biome/commit/6b8f09c04394f2a9f72b89f9381724681169641a"><code>6b8f09c</code></a> ci: release (<a href="https://github.com/biomejs/biome/tree/HEAD/packages/@biomejs/biome/issues/11236">#11236</a>)</li> <li><a href="https://github.com/biomejs/biome/commit/23c0369c43b59284ca68c65883d6ede4228b6fb8"><code>23c0369</code></a> feat(lint): nursery noInvalidPropertyInitValue (<a href="https://github.com/biomejs/biome/tree/HEAD/packages/@biomejs/biome/issues/11187">#11187</a>)</li> <li><a href="https://github.com/biomejs/biome/commit/52b44d6795741d051bf703bd69c6cb447af8fd1d"><code>52b44d6</code></a> feat(lint/html): add <code>noSvelteLegacyConst</code> (<a href="https://github.com/biomejs/biome/tree/HEAD/packages/@biomejs/biome/issues/11247">#11247</a>)</li> <li><a href="https://github.com/biomejs/biome/commit/0a0fbc15d67c410c80dfae398903f845544fcd65"><code>0a0fbc1</code></a> feat(lint/js): add <code>useReactCompiler</code> (<a href="https://github.com/biomejs/biome/tree/HEAD/packages/@biomejs/biome/issues/10710">#10710</a>)</li> <li>See full diff in <a href="https://github.com/biomejs/biome/commits/@biomejs/biome@2.5.8/packages/@biomejs/biome">compare view</a></li> </ul> </details> <br /> Updates `dependency-cruiser` from 18.1.0 to 18.1.1 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/sverweij/dependency-cruiser/releases">dependency-cruiser's releases</a>.</em></p> <blockquote> <h2>v18.1.1</h2> <h2>👷 maintenance</h2> <ul> <li>1ee565bb/ 942cf969 build(npm): updates external dependencies</li> <li>f0061d15 fix: removes all unused catch parameters</li> <li>cbe062ae/ c0250f8d chore(tools): uses node permission model</li> <li>01c47439 fix(build): re-adds esbuild to the devDependencies</li> <li>e57d9fc2 chore: replaces eslint with oxlint (<a href="https://redirect.github.com/sverweij/dependency-cruiser/issues/1074">#1074</a>)</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/sverweij/dependency-cruiser/commit/da355e4cc82383f7b9744e0beb2f64d3c20f2e25"><code>da355e4</code></a> 18.1.1</li> <li><a href="https://github.com/sverweij/dependency-cruiser/commit/c0250f8dd06f622fba990fcd9b1d5da8c4bfaa1b"><code>c0250f8</code></a> chore(tools): makes the tools work again on node 22</li> <li><a href="https://github.com/sverweij/dependency-cruiser/commit/942cf969aa6174f1a4bfa91542dc6da37e5cdbcd"><code>942cf96</code></a> build(npm): updates external dependencies</li> <li><a href="https://github.com/sverweij/dependency-cruiser/commit/cbe062ae2b1994a7ce38bec9939562a33b193b84"><code>cbe062a</code></a> chore(tools): uses node permission model</li> <li><a href="https://github.com/sverweij/dependency-cruiser/commit/01c474397603d0a3db8288793c6bf362c18c7784"><code>01c4743</code></a> fix(build): re-adds esbuild to the devDependencies</li> <li><a href="https://github.com/sverweij/dependency-cruiser/commit/e57d9fc2f06a860eee3d7bf3667da05d52145a3e"><code>e57d9fc</code></a> chore: replaces eslint with oxlint (<a href="https://redirect.github.com/sverweij/dependency-cruiser/issues/1074">#1074</a>)</li> <li><a href="https://github.com/sverweij/dependency-cruiser/commit/f0061d1545e2c16a8ee0212f36306e2f41bad056"><code>f0061d1</code></a> fix: removes all unused catch parameters</li> <li><a href="https://github.com/sverweij/dependency-cruiser/commit/1ee565bb8ee935385b4288891849740125829f99"><code>1ee565b</code></a> build(npm): updates external dependencies</li> <li>See full diff in <a href="https://github.com/sverweij/dependency-cruiser/compare/v18.1.0...v18.1.1">compare view</a></li> </ul> </details> <br /> Updates `pkg-pr-new` from 0.0.86 to 0.0.87 <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/stackblitz-labs/pkg.pr.new/commit/d293ab292f1e71640630a6e4e4683235b92cdef7"><code>d293ab2</code></a> release: v0.0.87</li> <li>See full diff in <a href="https://github.com/stackblitz-labs/pkg.pr.new/commits/v0.0.87/packages/cli">compare view</a></li> </ul> </details> <br /> Updates `skills` from 1.5.21 to 1.5.22 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/vercel-labs/skills/releases">skills's releases</a>.</em></p> <blockquote> <h2>v1.5.22</h2> <h2>Changelog</h2> <ul> <li>fix: discover skills nested under two categories (<a href="https://redirect.github.com/vercel-labs/skills/issues/1866">#1866</a>)</li> <li>fix(update): normalize GitHub shorthand for project deletion checks (<a href="https://redirect.github.com/vercel-labs/skills/issues/1865">#1865</a>)</li> <li>fix: preserve locked GitHub host during updates (<a href="https://redirect.github.com/vercel-labs/skills/issues/1837">#1837</a>)</li> <li>Surface skills added upstream to well-known sources during update (<a href="https://redirect.github.com/vercel-labs/skills/issues/1824">#1824</a>)</li> <li>Make skills update work for well-known installs (incl. skills.sh packs) (<a href="https://redirect.github.com/vercel-labs/skills/issues/1821">#1821</a>)</li> <li>Preselect all skills when installing a skills.sh pack (<a href="https://redirect.github.com/vercel-labs/skills/issues/1820">#1820</a>)</li> <li>Add MiniMax Code agent support (<a href="https://redirect.github.com/vercel-labs/skills/issues/1814">#1814</a>)</li> <li>fix(remove): keep the lock entry while another agent still uses the skill (<a href="https://redirect.github.com/vercel-labs/skills/issues/1786">#1786</a>)</li> <li>fix(find): show all registry results in non-interactive search (<a href="https://redirect.github.com/vercel-labs/skills/issues/1748">#1748</a>)</li> <li>fix: store local path sources in lockfile using portable source (<a href="https://redirect.github.com/vercel-labs/skills/issues/1743">#1743</a>)</li> </ul> <h2>Contributors</h2> <p><a href="https://github.com/AndreaCovelli"><code>@AndreaCovelli</code></a>,<a href="https://github.com/IsmaelMartinez"><code>@IsmaelMartinez</code></a> <a href="https://github.com/SenseiMarv"><code>@SenseiMarv</code></a>,<a href="https://github.com/Ygilany"><code>@Ygilany</code></a> <a href="https://github.com/byapparov"><code>@byapparov</code></a>,<a href="https://github.com/hetaoBackend"><code>@hetaoBackend</code></a> <a href="https://github.com/mlekhi"><code>@mlekhi</code></a>,<a href="https://github.com/quuu"><code>@quuu</code></a></p> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/vercel-labs/skills/commit/a4d243c3d4f86cdf9385dd1b6a0733f6937e70b5"><code>a4d243c</code></a> v1.5.22</li> <li><a href="https://github.com/vercel-labs/skills/commit/ab4fc49265c443279a5deae20297e631470da68c"><code>ab4fc49</code></a> fix(find): show all returned search results (<a href="https://redirect.github.com/vercel-labs/skills/issues/1748">#1748</a>)</li> <li><a href="https://github.com/vercel-labs/skills/commit/644686b10ba6a6b563a1518e1a124a52e84460af"><code>644686b</code></a> Merge pull request <a href="https://redirect.github.com/vercel-labs/skills/issues/1743">#1743</a> from SenseiMarv/fix/store-local-path-sources-using-p...</li> <li><a href="https://github.com/vercel-labs/skills/commit/7533583f24a9a9be6fd5f783912f55c15a08b31e"><code>7533583</code></a> Merge branch 'main' into fix/store-local-path-sources-using-portable-source</li> <li><a href="https://github.com/vercel-labs/skills/commit/50d3b75443c24d2e224f5961cdd75e793c99d912"><code>50d3b75</code></a> fix project update GitHub shorthand clone (<a href="https://redirect.github.com/vercel-labs/skills/issues/1865">#1865</a>)</li> <li><a href="https://github.com/vercel-labs/skills/commit/653739a1ed1316cc2492ea81fbfcee14a45e4802"><code>653739a</code></a> fix: preserve locked GitHub host during updates (<a href="https://redirect.github.com/vercel-labs/skills/issues/1837">#1837</a>)</li> <li><a href="https://github.com/vercel-labs/skills/commit/65658a84d05961bbd0e2ea1afedb976946131315"><code>65658a8</code></a> Merge pull request <a href="https://redirect.github.com/vercel-labs/skills/issues/1786">#1786</a> from IsmaelMartinez/fix/remove-agent-subset-keeps-lock</li> <li><a href="https://github.com/vercel-labs/skills/commit/375f497e5c0e2d9ef743de372ce53545b1d77620"><code>375f497</code></a> Merge pull request <a href="https://redirect.github.com/vercel-labs/skills/issues/1866">#1866</a> from vercel-labs/fix/deeper-nested-skill-discovery</li> <li><a href="https://github.com/vercel-labs/skills/commit/dc045b90613a7c4d9c0feebbb96a27abedadf86b"><code>dc045b9</code></a> docs: update nested discovery depth</li> <li><a href="https://github.com/vercel-labs/skills/commit/6eeafb76573a798e330687c10fd83592bd619f8e"><code>6eeafb7</code></a> fix: discover skills nested under two categories</li> <li>Additional commits viewable in <a href="https://github.com/vercel-labs/skills/compare/v1.5.21...v1.5.22">compare view</a></li> </ul> </details> <br /> Updates `turbo` from 2.10.8 to 2.10.9 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/vercel/turborepo/releases">turbo's releases</a>.</em></p> <blockquote> <h2>Turborepo v2.10.9</h2> <!-- raw HTML omitted --> <h2>What's Changed</h2> <h3>Changelog</h3> <ul> <li>chore: Release Turborepo 2.10.8 by <a href="https://github.com/github-actions"><code>@github-actions</code></a>[bot] in <a href="https://redirect.github.com/vercel/turborepo/pull/13626">vercel/turborepo#13626</a></li> <li>perf: Walk literal-prefix tree globs without wax compilation by <a href="https://github.com/charpeni"><code>@charpeni</code></a> in <a href="https://redirect.github.com/vercel/turborepo/pull/13522">vercel/turborepo#13522</a></li> <li>fix: Accept semver ranges in devEngines.packageManager.version by <a href="https://github.com/bangseongbeom"><code>@bangseongbeom</code></a> in <a href="https://redirect.github.com/vercel/turborepo/pull/13623">vercel/turborepo#13623</a></li> <li>docs: Explain affected package invalidation reasons by <a href="https://github.com/ghoullier"><code>@ghoullier</code></a> in <a href="https://redirect.github.com/vercel/turborepo/pull/13594">vercel/turborepo#13594</a></li> <li>perf(lockfiles): Borrow field-name scalars in the pnpm fast parser by <a href="https://github.com/anthonyshew"><code>@anthonyshew</code></a> in <a href="https://redirect.github.com/vercel/turborepo/pull/13648">vercel/turborepo#13648</a></li> <li>perf(repository): Avoid discarded alias allocation in Relationship by <a href="https://github.com/anthonyshew"><code>@anthonyshew</code></a> in <a href="https://redirect.github.com/vercel/turborepo/pull/13650">vercel/turborepo#13650</a></li> <li>perf(lockfiles): Drop redundant human_name clone for pnpm v7/v9 by <a href="https://github.com/anthonyshew"><code>@anthonyshew</code></a> in <a href="https://redirect.github.com/vercel/turborepo/pull/13649">vercel/turborepo#13649</a></li> <li>perf: Index workspace nodes by name in project_relationships by <a href="https://github.com/anthonyshew"><code>@anthonyshew</code></a> in <a href="https://redirect.github.com/vercel/turborepo/pull/13647">vercel/turborepo#13647</a></li> <li>perf: Share resolution identity lists across identical workspace closures by <a href="https://github.com/anthonyshew"><code>@anthonyshew</code></a> in <a href="https://redirect.github.com/vercel/turborepo/pull/13641">vercel/turborepo#13641</a></li> <li>docs: Fix duplicated word in runtime dependencies guide summary by <a href="https://github.com/anthonyshew"><code>@anthonyshew</code></a> in <a href="https://redirect.github.com/vercel/turborepo/pull/13630">vercel/turborepo#13630</a></li> <li>refactor: Remove turborepo-lsp dependency on turborepo-lib by <a href="https://github.com/anthonyshew"><code>@anthonyshew</code></a> in <a href="https://redirect.github.com/vercel/turborepo/pull/13631">vercel/turborepo#13631</a></li> <li>perf: Index Bun nested lockfile entries by name for fallback resolution by <a href="https://github.com/anthonyshew"><code>@anthonyshew</code></a> in <a href="https://redirect.github.com/vercel/turborepo/pull/13633">vercel/turborepo#13633</a></li> <li>perf: Memoize framework inference per package during task hashing by <a href="https://github.com/anthonyshew"><code>@anthonyshew</code></a> in <a href="https://redirect.github.com/vercel/turborepo/pull/13634">vercel/turborepo#13634</a></li> <li>perf: Avoid materializing transient declarations in external_dependencies by <a href="https://github.com/anthonyshew"><code>@anthonyshew</code></a> in <a href="https://redirect.github.com/vercel/turborepo/pull/13646">vercel/turborepo#13646</a></li> <li>perf: Enable shared closure DP for npm and yarn1 lockfiles by <a href="https://github.com/anthonyshew"><code>@anthonyshew</code></a> in <a href="https://redirect.github.com/vercel/turborepo/pull/13635">vercel/turborepo#13635</a></li> <li>perf: Parse pnpm explicit-key entries in the lockfile fast path by <a href="https://github.com/anthonyshew"><code>@anthonyshew</code></a> in <a href="https://redirect.github.com/vercel/turborepo/pull/13640">vercel/turborepo#13640</a></li> <li>perf: Parallelize resolution fingerprint hashing by <a href="https://github.com/anthonyshew"><code>@anthonyshew</code></a> in <a href="https://redirect.github.com/vercel/turborepo/pull/13642">vercel/turborepo#13642</a></li> <li>perf: Build resolution identity lists in parallel by <a href="https://github.com/anthonyshew"><code>@anthonyshew</code></a> in <a href="https://redirect.github.com/vercel/turborepo/pull/13643">vercel/turborepo#13643</a></li> <li>perf: Intern resolution identities as Arc<str> across closures by <a href="https://github.com/anthonyshew"><code>@anthonyshew</code></a> in <a href="https://redirect.github.com/vercel/turborepo/pull/13645">vercel/turborepo#13645</a></li> <li>fix: Compose affected tasks with package filters by <a href="https://github.com/anthonyshew"><code>@anthonyshew</code></a> in <a href="https://redirect.github.com/vercel/turborepo/pull/13656">vercel/turborepo#13656</a></li> <li>docs: Explain worktree cache path isolation by <a href="https://github.com/anthonyshew"><code>@anthonyshew</code></a> in <a href="https://redirect.github.com/vercel/turborepo/pull/13657">vercel/turborepo#13657</a></li> <li>fix: Upgrade brace-expansion to 5.0.9 by <a href="https://github.com/anthonyshew"><code>@anthonyshew</code></a> in <a href="https://redirect.github.com/vercel/turborepo/pull/13658">vercel/turborepo#13658</a></li> <li>docs: Correct verified inaccuracies in the Turborepo Agent Skill by <a href="https://github.com/charpeni"><code>@charpeni</code></a> in <a href="https://redirect.github.com/vercel/turborepo/pull/13644">vercel/turborepo#13644</a></li> <li>chore: Update Next.js to 16.3.0 by <a href="https://github.com/anthonyshew"><code>@anthonyshew</code></a> in <a href="https://redirect.github.com/vercel/turborepo/pull/13659">vercel/turborepo#13659</a></li> <li>fix: Don't use <code>eprintln!</code> in the panic hook by <a href="https://github.com/molofsky"><code>@molofsky</code></a> in <a href="https://redirect.github.com/vercel/turborepo/pull/13637">vercel/turborepo#13637</a></li> <li>fix: Invalidate only when Git ignore sources change by <a href="https://github.com/smasato"><code>@smasato</code></a> in <a href="https://redirect.github.com/vercel/turborepo/pull/13632">vercel/turborepo#13632</a></li> <li>docs: Update Geistdocs to 1.19.4 by <a href="https://github.com/christopherkindl"><code>@christopherkindl</code></a> in <a href="https://redirect.github.com/vercel/turborepo/pull/13680">vercel/turborepo#13680</a></li> <li>docs: Exclude Turborepo from its own OSS products menu by <a href="https://github.com/christopherkindl"><code>@christopherkindl</code></a> in <a href="https://redirect.github.com/vercel/turborepo/pull/13681">vercel/turborepo#13681</a></li> <li>docs: Use the geistdocs Turborepo logo in the navbar by <a href="https://github.com/christopherkindl"><code>@christopherkindl</code></a> in <a href="https://redirect.github.com/vercel/turborepo/pull/13682">vercel/turborepo#13682</a></li> <li>docs: Update redirected vercel.com/nextjs.org links to current targets by <a href="https://github.com/molebox"><code>@molebox</code></a> in <a href="https://redirect.github.com/vercel/turborepo/pull/13685">vercel/turborepo#13685</a></li> <li>refactor: Generalize native command arguments by <a href="https://github.com/anthonyshew"><code>@anthonyshew</code></a> in <a href="https://redirect.github.com/vercel/turborepo/pull/13664">vercel/turborepo#13664</a></li> <li>refactor: Move native contracts to tasks by <a href="https://github.com/anthonyshew"><code>@anthonyshew</code></a> in <a href="https://redirect.github.com/vercel/turborepo/pull/13665">vercel/turborepo#13665</a></li> <li>docs: Fix loadTransformers reference in turbo-codemod README by <a href="https://github.com/latent-9"><code>@latent-9</code></a> in <a href="https://redirect.github.com/vercel/turborepo/pull/13683">vercel/turborepo#13683</a></li> <li>refactor: Model native task execution explicitly by <a href="https://github.com/anthonyshew"><code>@anthonyshew</code></a> in <a href="https://redirect.github.com/vercel/turborepo/pull/13666">vercel/turborepo#13666</a></li> <li>feat: Compose aggregate native task dependencies by <a href="https://github.com/anthonyshew"><code>@anthonyshew</code></a> in <a href="https://redirect.github.com/vercel/turborepo/pull/13667">vercel/turborepo#13667</a></li> <li>fix: Respect aggregate task overrides by <a href="https://github.com/anthonyshew"><code>@anthonyshew</code></a> in <a href="https://redirect.github.com/vercel/turborepo/pull/13668">vercel/turborepo#13668</a></li> <li>test: Stabilize watch task inputs regression test by <a href="https://github.com/anthonyshew"><code>@anthonyshew</code></a> in <a href="https://redirect.github.com/vercel/turborepo/pull/13686">vercel/turborepo#13686</a></li> <li>feat: Parse Python quality tool declarations by <a href="https://github.com/anthonyshew"><code>@anthonyshew</code></a> in <a href="https://redirect.github.com/vercel/turborepo/pull/13669">vercel/turborepo#13669</a></li> <li>feat: Resolve Python quality plans by <a href="https://github.com/anthonyshew"><code>@anthonyshew</code></a> in <a href="https://redirect.github.com/vercel/turborepo/pull/13670">vercel/turborepo#13670</a></li> <li>refactor: Extract uv native task specs by <a href="https://github.com/anthonyshew"><code>@anthonyshew</code></a> in <a href="https://redirect.github.com/vercel/turborepo/pull/13671">vercel/turborepo#13671</a></li> <li>feat: Synthesize Python quality tasks by <a href="https://github.com/anthonyshew"><code>@anthonyshew</code></a> in <a href="https://redirect.github.com/vercel/turborepo/pull/13672">vercel/turborepo#13672</a></li> <li>test: Cover Python quality task commands by <a href="https://github.com/anthonyshew"><code>@anthonyshew</code></a> in <a href="https://redirect.github.com/vercel/turborepo/pull/13673">vercel/turborepo#13673</a></li> <li>feat: Hash Python quality task inputs by <a href="https://github.com/anthonyshew"><code>@anthonyshew</code></a> in <a href="https://redirect.github.com/vercel/turborepo/pull/13674">vercel/turborepo#13674</a></li> <li>test: Cover Python quality task graph by <a href="https://github.com/anthonyshew"><code>@anthonyshew</code></a> in <a href="https://redirect.github.com/vercel/turborepo/pull/13675">vercel/turborepo#13675</a></li> <li>chore: Release Turborepo 2.10.9-canary.1 by <a href="https://github.com/github-actions"><code>@github-actions</code></a>[bot] in <a href="https://redirect.github.com/vercel/turborepo/pull/13687">vercel/turborepo#13687</a></li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/vercel/turborepo/commit/33237d4be13d7b74768c2cf3353b19cfa8d1af7c"><code>33237d4</code></a> publish 2.10.9 to registry</li> <li><a href="https://github.com/vercel/turborepo/commit/3b0e57f1289b2a6b3d6dd402bce928469d3b25fa"><code>3b0e57f</code></a> fix: Prevent Windows process cleanup PID reuse (<a href="https://redirect.github.com/vercel/turborepo/issues/13695">#13695</a>)</li> <li><a href="https://github.com/vercel/turborepo/commit/efe4e1bdf665f2950cf89d7968907de36c2f0737"><code>efe4e1b</code></a> fix: Prune Bun wildcard workspace dev dependencies (<a href="https://redirect.github.com/vercel/turborepo/issues/13694">#13694</a>)</li> <li><a href="https://github.com/vercel/turborepo/commit/a98e5cde97796088c6107684a64a40a967cd1ef0"><code>a98e5cd</code></a> docs: Document dependency-driven Python tasks (<a href="https://redirect.github.com/vercel/turborepo/issues/13676">#13676</a>)</li> <li><a href="https://github.com/vercel/turborepo/commit/c09a92f526b6dca9ea0243922f680803779759cd"><code>c09a92f</code></a> chore: Release Turborepo 2.10.9-canary.1 (<a href="https://redirect.github.com/vercel/turborepo/issues/13687">#13687</a>)</li> <li><a href="https://github.com/vercel/turborepo/commit/09bd548dddbff2a29086bdef7cb07b02d5e5458a"><code>09bd548</code></a> test: Cover Python quality task graph (<a href="https://redirect.github.com/vercel/turborepo/issues/13675">#13675</a>)</li> <li><a href="https://github.com/vercel/turborepo/commit/3584a5fb8edac9efc826fdea57e92088505fc76a"><code>3584a5f</code></a> feat: Hash Python quality task inputs (<a href="https://redirect.github.com/vercel/turborepo/issues/13674">#13674</a>)</li> <li><a href="https://github.com/vercel/turborepo/commit/0d43ff3cbf5ac8873c646a84b2fd7ae53097e08d"><code>0d43ff3</code></a> test: Cover Python quality task commands (<a href="https://redirect.github.com/vercel/turborepo/issues/13673">#13673</a>)</li> <li><a href="https://github.com/vercel/turborepo/commit/94708adc6bc19b41805741cc5a15ac5467a481cf"><code>94708ad</code></a> feat: Synthesize Python quality tasks (<a href="https://redirect.github.com/vercel/turborepo/issues/13672">#13672</a>)</li> <li><a href="https://github.com/vercel/turborepo/commit/e14f04ec6c2dc2791b0a3beb32df7515b31b3d4b"><code>e14f04e</code></a> refactor: Extract uv native task specs (<a href="https://redirect.github.com/vercel/turborepo/issues/13671">#13671</a>)</li> <li>Additional commits viewable in <a href="https://github.com/vercel/turborepo/compare/v2.10.8...v2.10.9">compare view</a></li> </ul> </details> <br /> Updates `wrangler` from 4.118.0 to 4.119.0 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/cloudflare/workers-sdk/releases">wrangler's releases</a>.</em></p> <blockquote> <h2>wrangler@4.119.0</h2> <h3>Minor Changes</h3> <ul> <li> <p><a href="https://redirect.github.com/cloudflare/workers-sdk/pull/14952">#14952</a> <a href="https://github.com/cloudflare/workers-sdk/commit/20470fa8b09761c50b5c2c1d6a5f2652b61bd271"><code>20470fa</code></a> Thanks <a href="https://github.com/nelsonjsduarte"><code>@nelsonjsduarte</code></a>! - Add <code>--parse-type</code> flag to <code>wrangler ai-search create</code></p> <p><code>wrangler ai-search create</code> now accepts <code>--parse-type</code> to control how a website data source discovers URLs. <code>sitemap</code> (the default) reads XML sitemaps; <code>discover</code> follows links recursively.</p> <p>Previously the parse type could only be chosen through the interactive wizard, which was skipped whenever <code>--source</code> was supplied — so it was impossible to create a <code>discover</code> instance from a script.</p> <pre lang="sh"><code>wrangler ai-search create my-instance \ --type web-crawler \ --source https://example.com \ --parse-type discover </code></pre> <p>The interactive wizard now offers <code>Discover</code> alongside <code>Sitemap</code>. <code>--parse-type</code> is only valid with <code>--type web-crawler</code>; passing it with <code>--type builtin</code> or <code>--type r2</code> is rejected, since the API stores the value for those source types but never reads it. When the flag is omitted in non-interactive mode the field is left unset and the API default (<code>sitemap</code>) applies.</p> </li> <li> <p><a href="https://redirect.github.com/cloudflare/workers-sdk/pull/14941">#14941</a> <a href="https://github.com/cloudflare/workers-sdk/commit/266172b98c27770e6d48d3fd42790e2125115e5e"><code>266172b</code></a> Thanks <a href="https://github.com/nickpatt"><code>@nickpatt</code></a>! - Improve the Local Explorer's Observability views</p> <p><code>console.log</code> messages now render the way the console would (JSON-encoded strings are unwrapped and multi-argument logs are joined), traces and events can be looked up by trace or span id from the search bar, and an event's "View trace" button jumps to the exact invocation that emitted it — even when a trace_id spans several invocations (e.g. a subrequest or self fetch).</p> </li> <li> <p><a href="https://redirect.github.com/cloudflare/workers-sdk/pull/14064">#14064</a> <a href="https://github.com/cloudflare/workers-sdk/commit/a9e5abb8c0c2e7895b0bb09c6c8e8ffd3dbc3bc0"><code>a9e5abb</code></a> Thanks <a href="https://github.com/petebacondarwin"><code>@petebacondarwin</code></a>! - Add support for OAuth 2.0 Device Authorization Grant to <code>wrangler login</code></p> <p>Run <code>wrangler login --device</code> to authenticate without a local callback server. Useful in containers, remote SSH sessions, Codespaces, and any other environment where <code>localhost:8976</code> is unreachable from your browser.</p> <p>The new flow:</p> <ul> <li>prints the verification URL and user code to the terminal,</li> <li>attempts to open the verification URL in your default browser automatically (suppressed via <code>--browser=false</code>),</li> <li>and polls the token endpoint until you approve the request (with a 5-minute hard cap).</li> </ul> <p>The verification URL is supplied by the authorization server, so it is rejected unless it is an <code>https</code> URL on the same auth domain the device code was requested from — it is never printed or opened otherwise.</p> <p><code>--callback-host</code> and <code>--callback-port</code> cannot be combined with <code>--device</code>, since this flow does not start a local callback server.</p> </li> </ul> <h3>Patch Changes</h3> <ul> <li> <p><a href="https://redirect.github.com/cloudflare/workers-sdk/pull/14984">#14984</a> <a href="https://github.com/cloudflare/workers-sdk/commit/9c7453837e3293787c0cb1778520f630aea7e5ca"><code>9c74538</code></a> Thanks <a href="https://github.com/apps/dependabot"><code>@dependabot</code></a>! - Update dependencies of "miniflare", "wrangler"</p> <p>The following dependency versions have been updated:</p> <table> <thead> <tr> <th>Dependency</th> <th>From</th> <th>To</th> </tr> </thead> <tbody> <tr> <td><code>@cloudflare/workers-types</code></td> <td>^5.20260730.1</td> <td>^5.20260731.1</td> </tr> <tr> <td>workerd</td> <td>1.20260730.1</td> <td>1.20260731.1</td> </tr> </tbody> </table> </li> <li> <p><a href="https://redirect.github.com/cloudflare/workers-sdk/pull/15012">#15012</a> <a href="https://github.com/cloudflare/workers-sdk/commit/0d33cb8dfb1d6289cb180f16e0e60cd7073a1b1b"><code>0d33cb8</code></a> Thanks <a href="https://github.com/apps/dependabot"><code>@dependabot</code></a>! - Update dependencies of "miniflare", "wrangler"</p> <p>The following dependency versions have been updated:</p> </li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/cloudflare/workers-sdk/commit/2938c01a9da2424a3f2d3c73bd870c7b75b39753"><code>2938c01</code></a> Version Packages (<a href="https://github.com/cloudflare/workers-sdk/tree/HEAD/packages/wrangler/issues/15021">#15021</a>)</li> <li><a href="https://github.com/cloudflare/workers-sdk/commit/b6a862966aaaa4d2bc7845a349636a6af65313fe"><code>b6a8629</code></a> Revert "Version Packages (<a href="https://github.com/cloudflare/workers-sdk/tree/HEAD/packages/wrangler/issues/14977">#14977</a>)" (<a href="https://github.com/cloudflare/workers-sdk/tree/HEAD/packages/wrangler/issues/15033">#15033</a>)</li> <li><a href="https://github.com/cloudflare/workers-sdk/commit/42c4227798c21cfde8dbfb087be1bb9078dab185"><code>42c4227</code></a> Version Packages (<a href="https://github.com/cloudflare/workers-sdk/tree/HEAD/packages/wrangler/issues/14977">#14977</a>)</li> <li><a href="https://github.com/cloudflare/workers-sdk/commit/511635c70821d33c64bb377e2c4a6be27683801f"><code>511635c</code></a> [wrangler] Skip the CAA half of the unenv-preset testDns E2E (<a href="https://github.com/cloudflare/workers-sdk/tree/HEAD/packages/wrangler/issues/15016">#15016</a>)</li> <li><a href="https://github.com/cloudflare/workers-sdk/commit/ebd1dfd3778dd3fdb9a63a5596852287eb4029b1"><code>ebd1dfd</code></a> [vite-plugin] Surface Local Explorer API to headless agents, matching wrangle...</li> <li><a href="https://github.com/cloudflare/workers-sdk/commit/a9e5abb8c0c2e7895b0bb09c6c8e8ffd3dbc3bc0"><code>a9e5abb</code></a> [wrangler] Add OAuth 2.0 Device Authorization Grant support (<a href="https://github.com/cloudflare/workers-sdk/tree/HEAD/packages/wrangler/issues/14064">#14064</a>)</li> <li><a href="https://github.com/cloudflare/workers-sdk/commit/20470fa8b09761c50b5c2c1d6a5f2652b61bd271"><code>20470fa</code></a> [wrangler] Add --parse-type to ai-search create (<a href="https://github.com/cloudflare/workers-sdk/tree/HEAD/packages/wrangler/issues/14952">#14952</a>)</li> <li><a href="https://github.com/cloudflare/workers-sdk/commit/5fd61271cdb7c661eace968ae4cbae40d2fbdc37"><code>5fd6127</code></a> [miniflare] De-flake rate limit tests at bucket boundaries (<a href="https://github.com/cloudflare/workers-sdk/tree/HEAD/packages/wrangler/issues/14961">#14961</a>)</li> <li>See full diff in <a href="https://github.com/cloudflare/workers-sdk/commits/wrangler@4.119.0/packages/wrangler">compare view</a></li> </ul> </details> <br /> Updates `@cloudflare/vitest-pool-workers` from 0.20.1 to 0.20.3 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/cloudflare/workers-sdk/releases">@cloudflare/vitest-pool-workers's releases</a>.</em></p> <blockquote> <h2><code>@cloudflare/vitest-pool-workers</code><a href="https://github.com/0"><code>@0</code></a>.20.3</h2> <h3>Patch Changes</h3> <ul> <li> <p><a href="https://redirect.github.com/cloudflare/workers-sdk/pull/15013">#15013</a> <a href="https://github.com/cloudflare/workers-sdk/commit/8cf78c83cb4c64be8b458d7bd618b47e7c6e7d25"><code>8cf78c8</code></a> Thanks <a href="https://github.com/dario-piotrowicz"><code>@dario-piotrowicz</code></a>! - Update undici from 7.28.0 to 7.29.0</p> </li> <li> <p>Updated dependencies [<a href="https://github.com/cloudflare/workers-sdk/commit/35c87e97199fb4548d4d9aaac024c3e07be5734e"><code>35c87e9</code></a>, <a href="https://github.com/cloudflare/workers-sdk/commit/b4f0c9760bcab1e04cf1a9c8859feed8b4fc6487"><code>b4f0c97</code></a>, <a href="https://github.com/cloudflare/workers-sdk/commit/8cf78c83cb4c64be8b458d7bd618b47e7c6e7d25"><code>8cf78c8</code></a>, <a href="https://github.com/cloudflare/workers-sdk/commit/a60ff4dea0bbae8775726d9cf885655b56460a30"><code>a60ff4d</code></a>, <a href="https://github.com/cloudflare/workers-sdk/commit/99eb50ce1d3420a50ae0e95958bf49d65874706e"><code>99eb50c</code></a>, <a href="https://github.com/cloudflare/workers-sdk/commit/35c87e97199fb4548d4d9aaac024c3e07be5734e"><code>35c87e9</code></a>]:</p> <ul> <li>wrangler@4.120.0</li> <li><a href="mailto:miniflare@5.20260801.1-alpha">miniflare@5.20260801.1-alpha</a></li> </ul> </li> </ul> <h2><code>@cloudflare/vitest-pool-workers</code><a href="https://github.com/0"><code>@0</code></a>.20.2</h2> <h3>Patch Changes</h3> <ul> <li>Updated dependencies [<a href="https://github.com/cloudflare/workers-sdk/commit/20470fa8b09761c50b5c2c1d6a5f2652b61bd271"><code>20470fa</code></a>, <a href="https://github.com/cloudflare/workers-sdk/commit/9c7453837e3293787c0cb1778520f630aea7e5ca"><code>9c74538</code></a>, <a href="https://github.com/cloudflare/workers-sdk/commit/266172b98c27770e6d48d3fd42790e2125115e5e"><code>266172b</code></a>, <a href="https://github.com/cloudflare/workers-sdk/commit/a88d1691d57bf44616ad15556a51b7f8ca17375c"><code>a88d169</code></a>, <a href="https://github.com/cloudflare/workers-sdk/commit/a88d1691d57bf44616ad15556a51b7f8ca17375c"><code>a88d169</code></a>, <a href="https://github.com/cloudflare/workers-sdk/commit/daf65f28cecf35e251dc6e476d5bbd82972d68de"><code>daf65f2</code></a>, <a href="https://github.com/cloudflare/workers-sdk/commit/a9e5abb8c0c2e7895b0bb09c6c8e8ffd3dbc3bc0"><code>a9e5abb</code></a>]: <ul> <li>wrangler@4.119.0</li> <li><a href="mailto:miniflare@5.20260801.0-alpha">miniflare@5.20260801.0-alpha</a></li> </ul> </li> </ul> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/cloudflare/workers-sdk/blob/main/packages/vitest-pool-workers/CHANGELOG.md">@cloudflare/vitest-pool-workers's changelog</a>.</em></p> <blockquote> <h2>0.20.3</h2> <h3>Patch Changes</h3> <ul> <li> <p><a href="https://redirect.github.com/cloudflare/workers-sdk/pull/15013">#15013</a> <a href="https://github.com/cloudflare/workers-sdk/commit/8cf78c83cb4c64be8b458d7bd618b47e7c6e7d25"><code>8cf78c8</code></a> Thanks <a href="https://github.com/dario-piotrowicz"><code>@dario-piotrowicz</code></a>! - Update undici from 7.28.0 to 7.29.0</p> </li> <li> <p>Updated dependencies [<a href="https://github.com/cloudflare/workers-sdk/commit/35c87e97199fb4548d4d9aaac024c3e07be5734e"><code>35c87e9</code></a>, <a href="https://github.com/cloudflare/workers-sdk/commit/b4f0c9760bcab1e04cf1a9c8859feed8b4fc6487"><code>b4f0c97</code></a>, <a href="https://github.com/cloudflare/workers-sdk/commit/8cf78c83cb4c64be8b458d7bd618b47e7c6e7d25"><code>8cf78c8</code></a>, <a href="https://github.com/cloudflare/workers-sdk/commit/a60ff4dea0bbae8775726d9cf885655b56460a30"><code>a60ff4d</code></a>, <a href="https://github.com/cloudflare/workers-sdk/commit/99eb50ce1d3420a50ae0e95958bf49d65874706e"><code>99eb50c</code></a>, <a href="https://github.com/cloudflare/workers-sdk/commit/35c87e97199fb4548d4d9aaac024c3e07be5734e"><code>35c87e9</code></a>]:</p> <ul> <li>wrangler@4.120.0</li> <li><a href="mailto:miniflare@5.20260801.1-alpha">miniflare@5.20260801.1-alpha</a></li> </ul> </li> </ul> <h2>0.20.2</h2> <h3>Patch Changes</h3> <ul> <li>Updated dependencies [<a href="https://github.com/cloudflare/workers-sdk/commit/20470fa8b09761c50b5c2c1d6a5f2652b61bd271"><code>20470fa</code></a>, <a href="https://github.com/cloudflare/workers-sdk/commit/9c7453837e3293787c0cb1778520f630aea7e5ca"><code>9c74538</code></a>, <a href="https://github.com/cloudflare/workers-sdk/commit/266172b98c27770e6d48d3fd42790e2125115e5e"><code>266172b</code></a>, <a href="https://github.com/cloudflare/workers-sdk/commit/a88d1691d57bf44616ad15556a51b7f8ca17375c"><code>a88d169</code></a>, <a href="https://github.com/cloudflare/workers-sdk/commit/a88d1691d57bf44616ad15556a51b7f8ca17375c"><code>a88d169</code></a>, <a href="https://github.com/cloudflare/workers-sdk/commit/daf65f28cecf35e251dc6e476d5bbd82972d68de"><code>daf65f2</code></a>, <a href="https://github.com/cloudflare/workers-sdk/commit/a9e5abb8c0c2e7895b0bb09c6c8e8ffd3dbc3bc0"><code>a9e5abb</code></a>]: <ul> <li>wrangler@4.119.0</li> <li><a href="mailto:miniflare@5.20260801.0-alpha">miniflare@5.20260801.0-alpha</a></li> </ul> </li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/cloudflare/workers-sdk/commit/b0aea76e0a7862b4ecfbe44232fb0a56ba3a2525"><code>b0aea76</code></a> Version Packages (<a href="https://github.com/cloudflare/workers-sdk/tree/HEAD/packages/vitest-pool-workers/issues/15036">#15036</a>)</li> <li><a href="https://github.com/cloudflare/workers-sdk/commit/2938c01a9da2424a3f2d3c73bd870c7b75b39753"><code>2938c01</code></a> Version Packages (<a href="https://github.com/cloudflare/workers-sdk/tree/HEAD/packages/vitest-pool-workers/issues/15021">#15021</a>)</li> <li><a href="https://github.com/cloudflare/workers-sdk/commit/b6a862966aaaa4d2bc7845a349636a6af65313fe"><code>b6a8629</code></a> Revert "Version Packages (<a href="https://github.com/cloudflare/workers-sdk/tree/HEAD/packages/vitest-pool-workers/issues/14977">#14977</a>)" (<a href="https://github.com/cloudflare/workers-sdk/tree/HEAD/packages/vitest-pool-workers/issues/15033">#15033</a>)</li> <li><a href="https://github.com/cloudflare/workers-sdk/commit/42c4227798c21cfde8dbfb087be1bb9078dab185"><code>42c4227</code></a> Version Packages (<a href="https://github.com/cloudflare/workers-sdk/tree/HEAD/packages/vitest-pool-workers/issues/14977">#14977</a>)</li> <li>See full diff in <a href="https://github.com/cloudflare/workers-sdk/commits/@cloudflare/vitest-pool-workers@0.20.3/packages/vitest-pool-workers">compare view</a></li> </ul> </details> <br /> Updates `@cloudflare/workers-types` from 5.20260714.1 to 5.20260804.1 <details> <summary>Commits</summary> <ul> <li>See full diff in <a href="https://github.com/cloudflare/workerd/commits">compare view</a></li> </ul> </details> <br /> Updates `@prisma/compute-sdk` from 0.38.0 to 0.39.0 <details> <summary>Commits</summary> <ul> <li>See full diff in <a href="https://github.com/prisma/project-compute/commits">compare view</a></li> </ul> </details> <br /> Updates `@prisma/management-api-sdk` from 1.53.0 to 1.56.0 <details> <summary>Commits</summary> <ul> <li>See full diff in <a href="https://github.com/prisma/pdp-control-plane/commits/HEAD/packages/management-api-sdk">compare view</a></li> </ul> </details> <br /> Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore <dependency name> major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore <dependency name> minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore <dependency name>` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore <dependency name>` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore <dependency name> <ignore condition>` will remove the ignore condition of the specified dependency and ignore conditions </details> Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io> Co-authored-by: willbot <w.a.madden+machine@gmail.com> | 1 个月前 | |
TML-2624: renew the contract package coverage waiver (#30155) Renews the expired coverage waiver for `packages/1-framework/0-foundation/contract`. The 90-day waiver added 2026-05-29 lapsed on 2026-08-27, which flipped the Test job's coverage gate red on every open PR (first observed on #30154, a PR that doesn't touch the package). The underlying situation is unchanged — 93.75% branches vs the 94% floor, the same 15 uncovered branches as when the waiver was written — so this renews rather than fixes, following the file's existing renewal precedent (sqlite 2026-07-27, sql-orm-client 2026-08-21, 2-sql entries 2026-08-17). **Linear:** TML-2624 (the debt's tracking ticket; the recovery path — dedicated `canonicalization.ts` branch tests — stays named in the entry). **Scope:** Only `coverage.config.json`, one entry, two fields (`addedDate` → 2026-08-28; renewal sentence appended to `notes`). No code, no thresholds, no other entries. **Verification:** Diff shows the two-field change. Ran CI's gate locally on main±fix: the only delta is the disappearance of `ERROR: Coverage for branches (93.75%) does not meet … threshold (94%)`; `pnpm coverage:report` exits 0 with the entry back under non-blocking warnings, expires 2026-11-26. 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Renewed the coverage waiver for the foundation contract package. * Updated waiver records to reflect the recent expiration and unchanged coverage metrics. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Signed-off-by: Steven McClankerton <tatarintsev@prisma.io> Co-authored-by: Steven McClankerton <tatarintsev@prisma.io> Co-authored-by: Claude Fable 5 <noreply@anthropic.com> | 27 天前 | |
ci: combine package tests and coverage (#30082) ## Linked issue n/a — this infrastructure migration has no Linear ticket. ## At a glance ```json "coverage:packages": "turbo run build --filter='!./examples/**' --filter='!./test/**' && vitest run --coverage", "coverage:report": "node scripts/coverage-report.mjs" ``` One root Vitest invocation now runs package tests and collects coverage, replacing the duplicated package-test and coverage CI jobs. ## Decision This PR ships three related changes: 1. Package tests and package coverage run together in one root Vitest multi-project invocation on Vitest `5.0.0-rc.2`. 2. Each package owns its complete coverage policy in an adjacent `coverage.config.json`, while root composition and post-processing preserve package thresholds and time-limited warning-only exceptions. 3. The obsolete, type-test-only SQL lane query-builder package and its public facade export are removed instead of retaining a permanently unmeasurable 95% runtime-coverage policy. ## Reviewer notes - The broad config diff is mostly moving existing coverage include/exclude/threshold blocks from `vitest.config.ts` into adjacent JSON policies and removing now-redundant package coverage scripts. - Vitest 5 removes `describe.sequential`; affected suites now use `{ concurrent: false }`. Compile-only `.test-d.ts` suites also declare compile-time test cases so Vitest 5 recognizes them. - `examples/prisma-8-cloudflare-worker` intentionally remains on Vitest 4 because `@cloudflare/vitest-pool-workers@0.20.3` requires Vitest 4 peers. - Eight existing package coverage deficits remain visible as active, non-blocking warning-only entries. Expired warnings and ordinary threshold failures still block CI. ## How it fits together 1. `scripts/coverage-config.js` discovers and validates package policies deterministically, rebases package globs to the repository root, and composes process-wide V8 collection settings. 2. The root `vitest.config.ts` references every package project and applies the composed coverage settings to a single test process. 3. `scripts/coverage-report.mjs` reads the root `coverage/coverage-final.json`, attributes files to their owning package, calculates all four metrics, and enforces each package's policy and warning expiry. 4. `.github/workflows/ci.yml` runs `pnpm coverage:packages` in the test job, reports package coverage even when collection finds a test failure, and removes the standalone coverage job. Test failures remain blocking. 5. Vitest 5 compatibility updates keep type tests, sequential suites, and CLI module mocks deterministic under the new runner behavior. ## Behavior changes & evidence - **Package tests execute once in CI while still producing coverage.** The combined command and workflow live in [`package.json`](package.json) and [`.github/workflows/ci.yml`](.github/workflows/ci.yml); [`scripts/coverage-config.test.mjs`](scripts/coverage-config.test.mjs) guards the single-run workflow shape. - **Coverage ownership remains package-local and threshold enforcement remains package-aware.** Composition is implemented in [`scripts/coverage-config.js`](scripts/coverage-config.js), reporting in [`scripts/coverage-report.mjs`](scripts/coverage-report.mjs), and exercised by [`scripts/coverage-report.test.mjs`](scripts/coverage-report.test.mjs). - **Vitest 5 runs the workspace without the previous V8 merge bottleneck.** The workspace pins are in [`package.json`](package.json) and [`pnpm-lock.yaml`](pnpm-lock.yaml); representative compatibility fixes are covered by [`packages/1-framework/3-tooling/cli/test/migration-cli.test.ts`](packages/1-framework/3-tooling/cli/test/migration-cli.test.ts) and the migrated type-test suites. - **The obsolete SQL lane query-builder is no longer published.** Its package is removed, along with the facade dependency/export in [`packages/9-public/@prisma/orm-family-sql/package.json`](packages/9-public/@prisma/orm-family-sql/package.json) and publish-surface mapping in [`packages/0-shared/publish-surface/src/shells.ts`](packages/0-shared/publish-surface/src/shells.ts). ## Compatibility / migration / risk This is a pre-1.0 breaking cleanup: `@internal/sql-lane-query-builder` and `@prisma/orm-family-sql/lane-query-builder` are removed. Repository references and generated facade wiring were removed together, and the public SQL family shell rebuilds without them. Coverage semantics remain package-specific; only orchestration and report aggregation change. ## Testing performed - `CI=true TEST_TIMEOUT_MULTIPLIER=2 pnpm coverage:packages` — 1,155 files passed; 15,311 tests passed, 3 expected failures, no type errors - `pnpm coverage:report` — 69 package policies, 0 blocking failures, 8 active warnings, 0 expired warnings - `pnpm test:scripts` — 476 tests passed - `pnpm lint:deps` - `pnpm lint:manifests` - `pnpm build --filter=@prisma/orm-family-sql...` - Publish-surface tests and typecheck — 56 tests passed - Focused package tests/typechecks for CLI, Mongo runtime, SQL ORM client, SQLite codec testkit, integration tests, examples, and shell tarballs - `pnpm install --frozen-lockfile --ignore-scripts` - Targeted Biome checks and `git diff --check` ## Skill update n/a — the removed prototype query-builder export was not referenced by any user-facing skill; its package, public README, architecture docs, and publish surface were updated directly. ## Alternatives considered - **Keep Vitest 4 and optimize around it:** the single V8 run remained CPU-bound for more than 37 minutes because the relevant V8 merge optimization is only available in Vitest 5; the Vitest 4 backport was not merged. - **Switch to Istanbul coverage:** benchmarking was slower and introduced CLI language-server instrumentation timeouts, so V8 remains the provider. - **Run packages sequentially:** this preserves policy isolation but repeats runner startup and cannot eliminate duplicate test execution in CI; root collection plus package-aware post-processing keeps policy ownership without that cost. ## Checklist - [x] All commits are signed off (`git commit -s`) per the DCO. - [x] I read `CONTRIBUTING.md` and the change is scoped to one logical concern. - [x] Tests are updated. - [ ] The PR title is in `TML-NNNN: <sentence-case title>` form — no Linear ticket exists, so this uses the conventional commit title required by `CONTRIBUTING.md`. - [x] The **Skill update** section is filled in. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Breaking Changes** - Removed the SQL lane query-builder package and its public package export. - Updated SQL documentation and package entrypoint references. - **Testing & Quality** - Centralized package coverage reporting with package-specific thresholds, exclusions, and warning policies. - Improved coverage validation, threshold reporting, and CI integration. - Updated serialized integration-test execution for compatibility with the current test runner. - **Documentation** - Expanded testing guidance for package coverage workflows and CI behavior. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Steven McClankerton <tatarintsev@prisma.io> Co-authored-by: Steven McClankerton <tatarintsev@prisma.io> | 1 个月前 | |
docs: rewrite README for Prisma 8, fix orm init dist-tag, sweep "Prisma Next" prose (#30248) ## Linked issue n/a — no Linear ticket. Follow-up to the README banner swap in #30225. ## At a glance The README's getting-started commands, before and after, checked against [prisma.io/docs/getting-started](https://www.prisma.io/docs/getting-started): ```bash # before npm create prisma@next npx @prisma/cli@next orm init # after npm create prisma npx prisma orm init npx prisma skills sync ``` The `prisma` package has no `next` dist-tag any more (`latest` is `8.0.0-rc.13`, `prev` is `7.10.0`), so the old commands no longer resolve. ## Summary The README still introduced the product as "Prisma Next" in Early Access, pointed at the removed `next` dist-tag, listed extensions by their `@internal/*` workspace names, and linked to `prisma/prisma`. The rest of the repo had about a thousand prose mentions of the working name. This PR fixes all of it and one real bug the sweep turned up. ## Decision Five commits, each reviewable on its own (the fifth only records the sweep against the in-flight upgrade-instruction files for the coverage check): 1. **Rewrite the README against the live docs.** Every instruction in it now matches the getting-started, quickstart, `orm init`, `skills`, and extensions pages in prisma/web. 2. **Fix `orm init` to install `prisma@latest`.** The CLI added `prisma@next` as a dev dependency. That tag no longer exists on npm, so `orm init` fails at the install step for anyone running it today. The engine fallback moves from `@prisma/cli-engine@next` (0.2.3, stale) to `@latest` (0.3.0). 3. **Replace "Prisma Next" with "Prisma 8" in prose repo-wide.** Docs, doc comments, READMEs, package descriptions, skill references, and user-facing strings. 4. **Carry the pnpm trust-policy exemptions into the tarball smoke tests.** The scratch installs those tests run trip a trust-downgrade check on `undici-types@6.21.0` (no provenance, while 6.13.0 and 6.18.2 had it). The repo already exempts it for the workspace install; the test kit now restates `trustPolicy` and `trustPolicyExclude` in the scratch project the way it restates the release-age settings. Reproduced on main with a fresh metadata cache, so this is a pre-existing failure that any run without cached metadata hits. ## Reviewer notes - **Rebased on #30229.** That PR's release-candidate banner and its `scorecard.md` link replace the roadmap reference in the README, and `ROADMAP.md` stays deleted. The prose sweep re-applied cleanly on top of its CONTRIBUTING, SECURITY, and governance edits. - **Dated records keep the old name**, matching the allowances `scripts/lint-legacy-name.mjs` already defines for the `prisma-next` identifier: `CHANGELOG.md`, `docs/releases/`, the ADRs, `projects/`, and `drive/`. Rewriting those would misreport what was true at the time, and a mechanical pass produced sentences like "Prisma Next becomes Prisma 8" turning into "Prisma 8 becomes Prisma 8". - **Identifiers are untouched.** `prisma-next` package names, paths, env vars (`PRISMA_NEXT_*`), `PrismaNext*` types, the `images/prisma-next.png` file, and the `prisma-next.md` primer (the docs still call it that) are all unchanged. Renaming any of those is a behaviour change with an upgrade path, not a docs fix. - **The sweep is mechanical.** The third commit is a `sed` of `Prisma Next` and `Prisma-next` to `Prisma 8` over 345 files. Three sentences that became self-referential (`ROADMAP.md`, `ROADMAP.html`, `scorecard.md`) were rewritten by hand. - **`README.md` supported-databases section** now says PostgreSQL and MongoDB are first-class and SQLite is planned next, which is what [/docs/orm](https://www.prisma.io/docs/orm) says. The previous text referenced work "before the 8.0.0-rc.1 release". - **Discord channel name dropped.** The README linked to a `prisma-next` channel I could not verify; it now links to Discord generically. ## Behavior changes & evidence - **`orm init` installs `prisma@latest`** instead of `prisma@next`, and falls back to `@prisma/cli-engine@latest` when the manifest does not pin the engine. [packages/1-framework/3-tooling/cli/src/orm/init.ts](packages/1-framework/3-tooling/cli/src/orm/init.ts), [packages/1-framework/3-tooling/cli/src/orm/init-packages.ts](packages/1-framework/3-tooling/cli/src/orm/init-packages.ts). Evidence: [packages/1-framework/3-tooling/cli/test/orm/init-install.test.ts](packages/1-framework/3-tooling/cli/test/orm/init-install.test.ts), [test/integration/test/cli.init-skill-distribution.integration.test.ts](test/integration/test/cli.init-skill-distribution.integration.test.ts). - **Scaffolded quick-reference notes and the skill quickstart** tell users to run `prisma@latest orm init`. [packages/1-framework/3-tooling/cli/src/commands/init/templates/quick-reference-postgres.md](packages/1-framework/3-tooling/cli/src/commands/init/templates/quick-reference-postgres.md), [skills/prisma-8/references/quickstart.md](skills/prisma-8/references/quickstart.md). Evidence: [packages/1-framework/3-tooling/cli/test/commands/init/__snapshots__/templates.test.ts.snap](packages/1-framework/3-tooling/cli/test/commands/init/__snapshots__/templates.test.ts.snap). - **No other runtime change.** Every other edit is prose in docs, comments, `package.json` descriptions, and `//` comments in test fixture schemas, which the emitter drops. ## Testing performed - `pnpm test` in `packages/1-framework/3-tooling/cli`: 115 files, 1437 tests passed - `pnpm lint:legacy-name`, `pnpm lint:docs`, `pnpm lint:skills`, `pnpm lint:rules:footprint`, `pnpm lint:manifests`: all pass (the `errors` README warning is pre-existing) - `pnpm fixtures:check` could not run in this worktree because the examples' `prisma` binary is not installed. The only schema edits are `//` comments, which do not reach the emitted contract. ## Skill update `skills/prisma-8/references/quickstart.md` is updated in the second commit: its `orm init` commands moved from `@prisma/cli@next` to `prisma@latest`, the same change the README makes. ## Alternatives considered - **Rename the identifiers too** (`prisma-next.md`, `PRISMA_NEXT_*`, `PrismaNext*` types, the image file). Each is a user-visible surface with an upgrade path, and the docs still name `prisma-next.md`. Left for a deliberate rename with upgrade instructions. - **Sweep the ADRs, changelog, and project write-ups as well.** The repo's own legacy-name lint exempts them as dated records, and the mechanical pass mangled sentences that describe the rename itself. Following the existing policy keeps the diff honest. - **Keep `@latest` on the commands, as the docs pages write them.** The v8 line is `latest` now, so the tag adds nothing; the README uses the bare `npm create prisma` and `npx prisma …` forms. ## Checklist - [x] All commits are signed off (`git commit -s`) per the [DCO](../CONTRIBUTING.md#developer-certificate-of-origin-dco). - [x] I read [CONTRIBUTING.md](../CONTRIBUTING.md) and the change is scoped to one logical concern. - [x] Tests are updated (the CLI install-command tests and snapshots). - [ ] The PR title is in `TML-NNNN: <sentence-case title>` form. No Linear ticket exists for this change. - [x] The **Skill update** section above is filled in. ## Notes for the reviewer The first two commits are small and worth reading line by line. The third is large but uniform; spot-check a few files rather than reading all 345. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io> Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> | 13 天前 | |
TML-3196: lower the PostgreSQL floor from 17 to 15 (ADR 244) (#29971) ## Linked issue Refs [TML-3196](https://linear.app/prisma-company/issue/TML-3196/pin-minimum-postgres-version-for-prisma-8). Resolves the overdue minimum-Postgres-version decision from `ROADMAP.md` (target date July 22). ## At a glance ```diff "prismaNext": { - "minServerVersion": "17" + "minServerVersion": "15" } ``` Every downstream surface follows from this field and its CLI mirror: `prisma-next init` scaffolds now generate `# Requires PostgreSQL >= 15.` in `.env.example` and "**PostgreSQL 15 or newer.**" in the quick reference, and the `--probe-db` warning threshold moves with it. ## Decision This PR pins the minimum supported PostgreSQL version for Prisma 8 at **15** (previously 17), and ships the decision as: 1. The floor change itself — `prismaNext.minServerVersion` on the Postgres target package plus the CLI's `MIN_SERVER_VERSION` mirror (drift-tested), with the CLI scaffold snapshot updated. 2. **[ADR 244 — PostgreSQL floor lowered to 15](docs/architecture%20docs/adrs/ADR%20244%20-%20PostgreSQL%20floor%20lowered%20to%2015.md)** — the full rationale: the feature audit, the CI reality, the support calendar and market context, and a record of what Postgres 16 and 17 would offer so a future raise starts from evidence. 3. An amendment to [ADR 222](docs/architecture%20docs/adrs/ADR%20222%20-%20Version%20support%20policy.md) correcting its enforcement record: the floor is proven by the `postgres:15` service containers in `.github/workflows/ci.yml`, not by `docker-compose.yaml` as ADR 222 originally claimed. 4. Alignment of local dev with the floor: `docker-compose.yaml` and the `gotchas.md` reproduction recipe move from `postgres:17-alpine` to `postgres:15-alpine`. ## Reviewer notes - **No CI change is needed.** All five Postgres service containers already run `postgres:15`; this PR makes the declared floor match what CI has been exercising all along. - **The feature audit says 12, the floor says 15 — deliberately.** The lowest version our emitted SQL, introspection, and migration DDL can run on is 12 (bounded by `ALTER TYPE ... ADD VALUE` inside the migration transaction). We declare 15 because it is the oldest version we actually test, and 14 dies in November 2026. - **ADR 222's "Why these specific floors" section still describes the 17-era reasoning.** That prose is left as a historical record; the amendment note, floor table, and bump procedure are what changed. - The full CLI suite is flaky under sandbox parallelism (a clean checkout fails a varying handful of tests run-to-run, each passing in isolation). The floor-guarding tests were run focused and deterministically — see below. - `examples/react-router-demo/.env.example` already told users "Any Postgres 15+"; it now agrees with the declared floor rather than contradicting it. ## How it fits together 1. **Source of truth:** `packages/3-targets/3-targets/postgres/package.json` declares `minServerVersion: "15"`. 2. **Mirror:** `MIN_SERVER_VERSION.postgres` in `packages/1-framework/3-tooling/cli/src/commands/init/templates/env.ts` follows; the drift test in `tsconfig-env.test.ts` asserts the two match, and the scaffold templates, quick reference, and `--probe-db` threshold all read the mirror. 3. **Record:** ADR 244 documents the decision; ADR 222's floor table, status line, and bump procedure are amended; `docs/Supported Versions.md` states 15 and links both ADRs. 4. **Infrastructure:** local dev (`docker-compose.yaml`, `gotchas.md`) runs the floor version, matching CI. 5. **Project bookkeeping:** `ROADMAP.md`, `projects/prisma-8-rc1/plan.md`, and `design-notes.md` record the decision as made on August 11, unblocking the scoreboard verdicts it was holding. ## Behavior changes & evidence - Fresh `prisma-next init` output states the 15 floor: `.env.example` says `# Requires PostgreSQL >= 15.` and `prisma-next.md` says "PostgreSQL 15 or newer." — [`env.ts`](packages/1-framework/3-tooling/cli/src/commands/init/templates/env.ts); evidence: [`templates.test.ts.snap`](packages/1-framework/3-tooling/cli/test/commands/init/__snapshots__/templates.test.ts.snap). - `init --probe-db` warns below 15 instead of below 17 (threshold flows from the mirror; no code change) — evidence: [`probe-db.test.ts`](packages/1-framework/3-tooling/cli/test/commands/init/probe-db.test.ts). - Servers on Postgres 15 and 16 are now inside the supported range — [`docs/Supported Versions.md`](docs/Supported%20Versions.md), [ADR 244](docs/architecture%20docs/adrs/ADR%20244%20-%20PostgreSQL%20floor%20lowered%20to%2015.md). ## Testing performed - `pnpm build` (86 tasks, all green) after the constant change. - `pnpm --filter @internal/cli test tsconfig-env templates probe-db` — 113/113 passed (drift test, scaffold snapshots, probe threshold). - Full `@internal/cli` suite run twice: the only failures were sandbox-parallelism flakes that also occur on a clean checkout and pass in isolation (ruled pre-existing). ## Skill update n/a — the user-facing scaffold text is generated from the `MIN_SERVER_VERSION` constant updated in this PR; no skill under `packages/0-shared/skills/` states a Postgres floor (verified by grep). ## Follow-ups - [TML-2320](https://linear.app/prisma-company/issue/TML-2320/runtime-version-check-warning-on-first-dbconnect-fr85-follow-up) — runtime version-check warning on first connect; today the only guard is the opt-in `init --probe-db` warning. - If we ever want to emit 16/17-only SQL (`ANY_VALUE`, `JSON_TABLE`, `MERGE ... RETURNING`), ADR 244 prescribes per-server capability gating in the Postgres adapter rather than raising the floor. ## Alternatives considered - **Keep the 17 floor** — rejected: CI never tested 17 (every job runs `postgres:15`), so the declaration claimed less compatibility than we actually prove, and it excluded the Prisma 7 migrating audience on 15/16 that the incremental-migration promise targets. - **Lower to 14 or to the feature floor of 12** — rejected: we test neither, declaring them would violate ADR 222's governing principle ("never claim broader compatibility than our test infrastructure exercises"); 14 reaches end of life in November 2026; going below 12 would require moving the native-enum `ADD VALUE` operation out of the migration transaction. - **Raise to 16 instead** — rejected: a full audit found nothing in 16 our code paths need (`ANY_VALUE` and the standard SQL/JSON constructors are conveniences; the 16 planner speedups benefit users on newer servers without any floor change). The architecturally interesting features (`JSON_TABLE`, `MERGE ... RETURNING`) are in 17, and capability gating is the cheaper path to them. - **Add a per-version CI matrix now** — deferred: the floor version is the version CI runs, which restores the policy's honesty without new infrastructure; matrix rows can come with the first capability-gated feature. ## Checklist - [x] All commits are signed off (`git commit -s`) per the [DCO](CONTRIBUTING.md#developer-certificate-of-origin-dco). The DCO status check will block merge if any commit is missing a `Signed-off-by:` trailer. - [x] I read [CONTRIBUTING.md](CONTRIBUTING.md) and the change is scoped to one logical concern. - [x] Tests are updated (scaffold snapshot refreshed; the drift test needed no change — it reads both sources dynamically). - [x] The PR title is in `TML-NNNN: <sentence-case title>` form (Linear ticket prefix + concise title naming the concrete deliverable). See `.claude/skills/create-pr/SKILL.md` for the full convention. - [x] The **Skill update** section above is filled in (or stated `n/a — internal only`). https://claude.ai/code/session_01WxsDtFe21Td8TQWznuywoW <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * PostgreSQL 15 is now the minimum supported server version. * Project setup and PostgreSQL tooling now target PostgreSQL 15 by default. * **Documentation** * Added guidance documenting the PostgreSQL 15 support policy and upgrade rationale. * Updated roadmap, supported-version references, architecture records, and troubleshooting instructions. * **Chores** * Updated local and CI PostgreSQL environments to use PostgreSQL 15. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Oleksii Orlenko <robot@aqrln.net> | 1 个月前 | |
feat(sql): Prisma 7 users point Prisma 8 at their existing schema.prisma instead of running contract infer and hand-fixing it (#30287) ## At a glance A Prisma 7 project has a `prisma/schema.prisma`. To run Prisma 8 beside it today, the user runs `prisma contract infer` against the database, deletes the `PrismaMigrations` model it picks up, adds `@@map` to every model, loses relation field names, ORM-side defaults and `@updatedAt`, and does it all again after every Prisma 7 migration. With this PR, `prisma.config.ts` points at the file they already have: ```ts // prisma.config.ts import { definePrismaConfig } from 'prisma/config'; import { defineConfig as ormConfig, prisma7Schema } from '@prisma/orm-postgres/config'; export default definePrismaConfig({ orm: ormConfig({ contract: prisma7Schema('prisma/schema.prisma'), db: { connection: process.env['DATABASE_URL']! }, }), }); ``` The normal commands then work unchanged: ```bash prisma contract emit # reads schema.prisma, writes contract.json + contract.d.ts prisma db sign # verifies against the database Prisma 7 built: zero findings ``` After every Prisma 7 migration the user runs `contract emit` and `db sign` again. Nothing is hand-edited. ## The decision Prisma 8 accepts the Prisma 7 schema language as a first-class contract source, interpreted straight into the contract. Prisma 7 keeps owning the database and its migrations; Prisma 8 adopts it read-only. [ADR 252](<docs/architecture docs/adrs/ADR 252 - An earlier Prisma version's schema is a contract source.md>) records the decision and the rules below. 1. **Fidelity means `db verify` reports nothing** against the database Prisma 7 built. `db verify` compares column types and nullability, defaults, primary key columns, foreign key actions, unique columns, index and check names, and native enums with member order. The interpreter reproduces exactly that, and leaves key, foreign key, and unique constraint names to Prisma 8. 2. **Every construct is either described exactly or a hard error.** No warnings, nothing dropped silently. An error names the construct, its line, and an edit that is valid in Prisma 7, with what that edit does to Prisma 7's next migration and to the Prisma 7 client. 3. **Prisma 8's own checks are not relaxed to admit a construct.** Where Prisma 8 PSL cannot spell something — an optional generated field, `@updatedAt` with a storage default — the source reports a hard error. Those refusals are a list of features to build, recorded in the project spec; nothing here loosens the parser or the interpreter to hide them. ## What changed for every Prisma 8 user Most of this PR is a new surface, but running real Prisma 7 DDL through `db verify` exposed defects on shared paths. Each fix is here with a regression test. - **The parser change is off by default.** Attributes on enum members and field lines inside a `view` block are read only under `grammar: 'prisma7'`, which only this source passes. A Prisma 8 PSL schema still rejects exactly what it rejected before, and the formatter now throws on a node kind it cannot print instead of writing a truncated block. - **`db verify` reads more default spellings.** A negative or cast numeral (`'-1'::integer`), an enum literal cast to a type in another schema, a zoneless `timestamp` literal, and `ARRAY[...]` list defaults are now read as the values they are. Columns that were reported as drift now verify clean; nothing that verified before starts failing. A schema-qualified mixed-case type name such as `audit."AuditAction"` also compares correctly now. Of 41 existing Prisma 8 contracts planned, applied and verified, 24 went from a false mismatch to clean and none went the other way. - **Introspection reads in a pinned session.** Defaults, check constraints, index predicates and policy text are read with `TimeZone = UTC`, `DateStyle = ISO, MDY`, `IntervalStyle = postgres`, and the caller's settings are restored. A contract inferred earlier from a server outside UTC that holds a `timestamptz` constant in such text shows that text once as a difference; the new text is stable. - **Migration planning renders a list literal default with its cast** (`ARRAY['1', '-2']::int8[]`), the same rendering the adapter uses for column DDL. - **`contract infer` prints each default in the form `contract emit` accepts:** quoted decimal text for `Decimal` and `Numeric`, plain digits for a large `BigInt`, quoted `NaN` and `Infinity`, and `dbgenerated(...)` for a list default holding a `NULL` element, which was previously dropped in silence. - **PSL number defaults keep every digit.** A `@default` number is read from its source text, so `Decimal @default(1.50)` stays `"1.50"` and a `BigInt` past 2^53 emits instead of failing. Contracts with such defaults get a new storage hash and need re-signing; the app upgrade instructions have the steps. - **A failing contract source reports findings, not just JSON.** `CONTRACT.SOURCE_LOAD_FAILED` now carries a `diagnostics` array — one entry per finding, with its code, its summary and, where known, its file and line — and the terminal prints them. A dotted source code travels as itself; an undotted legacy `PSL_*` code is wrapped as `CONTRACT.SOURCE_DIAGNOSTIC` with the original in `meta.code`. `meta.diagnostics` and `meta.issues` are unchanged. - **An ORM-side "now" default on a zoneless `timestamp` column no longer fails at write time.** The generator produced an instant where the codec encodes a plain date-time; Prisma 8's own `temporal.timestamp(onUpdate: now)` had the same defect. Every temporal preset now takes its generator from one codec-to-"now" lookup. ## How it works **Interpreting.** `@internal/sql-contract-prisma7` holds the dialect's rules: blocks, attributes, relation pairing, junction tables, defaults, and the diagnostics. It knows nothing about a particular database. Everything a target must answer arrives through `Prisma7TargetBinding` — the provider names it accepts, the type map, the native enum entity kind, index types, the identifier byte limit, junction relation field names, the `@updatedAt` generator per codec, and how literal defaults are read. The Postgres target exports one instance, `prisma7PostgresBinding`, and the Postgres facade wires the two together as `prisma7Schema(path)`. `defineConfig` accepts `contract: string | ContractConfig`; artifacts land beside the schema file or directory, and `output` on `defineConfig` overrides. The rules were not written from memory. `prisma@7.10.0 migrate diff` generated the SQL for every fixture that produces a contract, and that SQL is committed beside it. The ones that matter most: - Table and column names are the Prisma 7 names verbatim; `String` is `text`, `DateTime` is `timestamp(3)`, `Json` is `jsonb`, `Decimal` is `numeric(65,30)`, with `@db.*` overriding per Prisma 7's own table. - List columns are nullable, because Prisma 7 creates them without `NOT NULL`. - Native enums keep mapped values in declared order, in their `@@schema`. - `onDelete` and `onUpdate` are always written, with Prisma 7's defaults (`Restrict` or `SetNull`, and `Cascade`). - An implicit many-to-many relation becomes the junction Prisma 7 creates: table `_AToB`, primary key `(A, B)`, index `_AToB_B_index`, cascading foreign keys. Its two relation fields are named the way `contract infer` names the same table's foreign keys, so the model reads the same before and after cutover. - `@unique` becomes a unique **index** named `{table}_{cols}_key`, cut to 63 bytes as Prisma 7 cuts it, because that is what Prisma 7 creates and `db verify` tells indexes and constraints apart. - `@updatedAt`, `uuid()`, `cuid()`, `ulid()` and `nanoid()` become ORM-side generators; `cuid()` maps to cuid2, since Prisma 8 ships no cuid v1 and the column type and the opacity of the ids are the same. **Hard errors.** 22 codes, all dotted `PSL.PRISMA7_*`, each with a fixture and an entry in `docs/reference/error-reference.md`: views, `Unsupported(...)`, `@db.*` types with no Prisma 8 codec, `relationMode = "prisma"`, an enum used from another `@@schema`, index `sort`/`length`/`ops` arguments, a JSON `null` default, referential actions a required field cannot take, table and junction name collisions, an `@ignore`d field a key or relation uses, and the optional or `@default`-combined generated fields above. ## The example app `examples/prisma7-adoption` runs the public upgrade guide's story for real, in one vitest run against a `@prisma/dev` database: Prisma 7 installed as `@prisma/prisma7@7.10.0` with its own binary and config, `prisma7 migrate deploy`, Prisma 8 emitting from the same `schema.prisma`, `db sign`, `db verify` with zero findings, rows written through one client and read through the other (including tags through `_PostToTag`), then a second Prisma 7 migration, emit and sign again. Its README records two things a user following the guide meets that are not this PR's to fix: Prisma 7's peer dependency on `prisma` makes pnpm resolve the `prisma` binary to Prisma 7 unless a Prisma 8 `prisma` dev dependency is explicit, and pnpm's `no-downgrade` trust policy refuses `prisma@7.10.0` because it carries no provenance. ## How it is tested - 77 package fixtures, one per rule and per error code, run through the real Postgres pack with the expected contract or diagnostics committed; the 32 that expect a contract each carry the `migration.sql` Prisma 7.10.0 wrote, and a table-driven integration test applies each and verifies against it. - The `supported` proof schema covers every scalar, the `@db.*` overrides, number, list and temporal defaults, native enums, implicit many-to-many, `@updatedAt` and multiSchema. Prisma 7's SQL for it is applied unchanged and verified in **strict** mode, so a dropped column, index or foreign key fails the test; the expected extras are exactly what Prisma 7 creates for `@ignore` and `@@ignore`. One `timestamptz` default is checked with the session time zone outside UTC. - CLI journeys for `contract emit`, `db sign` and `db verify` from a user-shaped config, plus a journey for the hard-error exit (code 2, one diagnostic, nothing written). - The example's own test, in the examples CI job, with Prisma 7's schema engine fetched in a step before the tests. ## Known gaps Recorded, not hidden, in `projects/prisma7-contract-source/spec.md` § Deferred gaps. In short: cross-`@@schema` enum references need a feature (ADR 226 covers `@relation` only); `Bytes` and `DateTime` literal defaults are carried as the SQL literal of the default Postgres stores, which verifies exactly but prints as `dbgenerated("...")` at cutover; the Mongo PSL interpreter still ignores unknown top-level blocks, which the Mongo slice fixes. The same section lists the pre-existing defects this work found and did not fix — `contract infer` printing PascalCase tables without `@@map` and nullable lists as required, several `db init` failures, and a handful of list-default spellings that still fail verify — each with where it lives and the note that it exists on `main`. ## Alternatives considered - **A one-shot converter to a Prisma 8 file** (the original design). Rejected: the converted file drifts on every Prisma 7 migration, and every Prisma 8 spelling gap would become a lossy conversion rule. The converter survives as the cutover step on top of this source. - **Prisma 7's own parser** (`@prisma/get-dmmf`, the WebAssembly build). Rejected: its output deletes `@ignore` fields and `@@ignore` models and lists views as models, and it is a 3 MB synchronous load on the emit path. This repository depends on no Prisma 7 package. - **Porting Prisma 7's parser to TypeScript.** Unnecessary; the Prisma 8 parser needed two small grammar additions. - **`contract infer` plus hand edits.** The status quo this replaces. ## Notes for reviewers - The user-visible changes above are covered by entries in `skills/prisma-8/upgrading/app/upgrades/8.0.0-rc.11-to-8.0.0-rc.12/`. The extension notes gain one entry: `parseRawDefault` left the `family/psl-infer` subpath for `parsePostgresDefault` on `@prisma/orm-postgres/target/default-normalizer`, same signature. - The branch merges `origin/main` at rc.11. 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added Prisma 7 schema support for generating Prisma 8 PostgreSQL contracts. - Added `prisma7Schema` configuration, contract signing and verification workflows, and a Prisma 7 adoption example. - Added support for Prisma 7 models, relations, indexes, enums, defaults, native types, and multi-schema projects. - Added improved temporal, numeric, array, and enum default handling. - **Improvements** - Contract source failures now include detailed, location-aware diagnostics. - PostgreSQL introspection is more consistent across session settings. - **Documentation** - Expanded adoption guidance, error references, upgrade notes, and troubleshooting documentation. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io> Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> | 9 天前 | |
TML-2685: forbid bare as-casts via cast-utils + Biome plugin + CI ratchet (#598) | 3 个月前 | |
chore(release): bump to 8.0.0-rc.12 (#30395) ## Release: 8.0.0-rc.11 → 8.0.0-rc.12 This is the release PR described in [docs/oss/versioning.md](https://github.com/prisma/orm/blob/main/docs/oss/versioning.md). It bumps every workspace package to 8.0.0-rc.12 and moves the Prisma dependencies to their latest versions. **Merging this PR ships the release.** The push to `main` carries the new root `version`. The `Publish to npm` workflow then publishes 8.0.0-rc.12 under `latest` and creates a pre-release GitHub Release from the notes file. ## Review these first - [docs/releases/v8.0.0-rc.12.md](https://github.com/prisma/orm/blob/release/8.0.0-rc.12/docs/releases/v8.0.0-rc.12.md): the release notes, which become the GitHub Release body. The same entry is at the top of `CHANGELOG.md`. - The upgrade guides for [apps](https://github.com/prisma/orm/blob/release/8.0.0-rc.12/skills/prisma-8/upgrading/app/upgrades/8.0.0-rc.11-to-8.0.0-rc.12/instructions.md) and [extensions](https://github.com/prisma/orm/blob/release/8.0.0-rc.12/skills/prisma-8/upgrading/extension/upgrades/8.0.0-rc.11-to-8.0.0-rc.12/instructions.md). They merge the 24 pending fragments. The original fragments are moved unchanged to `upgrade-instructions/releases/8.0.0-rc.11-to-8.0.0-rc.12/sources/`. - Four guide entries have no fragment behind them. The `migration new` default and its removed error codes (#30389) had no guide entry. Neither did the PSL parser API changes (#30312, #30344, #30335, #30379). I wrote those entries while preparing the release. - Where fragments contradicted later code, the guide follows the code. Examples: the Supabase storage hash, `voidParamsSchema`, and quoted defaults printed by `infer`. ## Dependency updates | Package | From | To | Where | | --- | --- | --- | --- | | `@prisma/cli-engine` | 0.4.0 | 0.6.1 | examples, test fixtures, apps (the toolchain packages were already on 0.6.1 from #30372) | | `@prisma/dev` | 0.25.1 | 0.25.2 | the workspace catalog | | `@prisma/compute-sdk` | ^0.39.0 | ^0.43.0 | `apps/telemetry-backend` | | `@prisma/management-api-sdk` | ^1.56.0 | ^1.76.0 | `apps/telemetry-backend` | compute-sdk 0.43 renames "service" to "app" and "version" to "deployment". The telemetry deploy script now uses the new names. Both SDK versions call `/v1/apps/{appId}`, so the ID stored in the existing `TELEMETRY_DEPLOY_SERVICE_ID` secret is still correct. The app's typecheck now includes `scripts/`, so it catches the next SDK rename. The repo does not depend on `@prisma/composer`. ## Fixes needed to publish - **The publish workflow has failed on `main` since #30372.** `check:conformance` called the `orm` config validator as `validate(value)`. Engine 0.6 always calls `validate(value, provenance)`, and the validator reads `provenance.files`, so it threw on every input. The check now passes the same provenance the engine would. The prisma-cli copy of this check already does this. - `set-version` rewrote `workspace:@internal/cli@<version>` to `workspace:<version>`, dropping the alias. The prisma7-adoption example uses that alias. This is the first bump since the alias was added. - `lint:legacy-name` and the `add-model-map` test pointed at the pending fragment paths. They now point at the archived sources. ## Verification Passed locally: - `pnpm build` - `pnpm typecheck` - `pnpm lint` - `pnpm test:scripts` (563 tests) - `pnpm check:conformance` - `pnpm check:publish-deps` - `pnpm check:upgrade-coverage`, in both publish and PR mode - `pnpm check:release-notes`, in both publish and PR mode - `pnpm lint:legacy-name` - `pnpm lint:skills` - `pnpm test:packages`: all 18,196 tests passed Not covered locally, left to CI: - Three `test:packages` suites install packed tarballs from the registry. This machine's pnpm refuses `@vercel/detect-agent@1.2.5` because it has no provenance. CI passed the same suites on #30390. - `prisma-8-cloudflare-worker` needs a local Hyperdrive database. - The telemetry backend tests need Node 24.16 with `Temporal`. This machine has 24.13. - `fixtures:check` needs Postgres. 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added PostgreSQL full-text search, multi-file schemas, prepared ORM reads and aggregates, and conflict-skipping options for bulk creation. * Added support for using a Prisma 7 schema as the contract source, JavaScript `Date` timestamps on PostgreSQL, editor support for attribute arguments, and per-finding diagnostics. * **Breaking Changes** * Prisma 8 schema files now require `// use prisma-8` on the first line; unmapped models use their names verbatim for table names. * Replace `dbgenerated(...)` with SQL tagged literals. Defaults must be valid for their column types, creation timestamps use the application clock, and native PostgreSQL enums no longer support text operations. * Config naming and path resolution, migration starting points, and extension contracts have changed. * **Bug Fixes** * Improved migration checks and branching warnings, contract generation and inference, default verification, and type checking. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> | 18 小时前 | |
fix(mongo): accept multi-host connection strings, and mask their credentials in CLI output (#30354) ## At a glance A replica-set connection string lists several hosts. Before this PR, `mongo()` rejected it before the driver ever saw it: ```ts mongo({ contract, url: 'mongodb://user:pw@h1:27017,h2:27017/app?replicaSet=rs' }) // before: throws RUNTIME.BINDING_INVALID "Mongo URL must be a valid URL" // after: accepted; the driver gets the URL unchanged and the database is "app" ``` The CLI masks the connection string before printing it (`db verify`, `db sign`, `db schema`, `db prepare`, `contract infer`, `migrate`). For the same URLs, it printed the password in clear: ```ts maskConnectionUrl('mongodb://admin:s3cret@h1:27017,h2:27017/app?replicaSet=rs') // before: 'mongodb://admin:s3cret@h1:27017,h2:27017/app?replicaSet=rs' // after: 'mongodb://****:****@h1:27017,h2:27017/app?replicaSet=rs' ``` ## Linked issue Fixes #30353 ## Summary The Mongo runtime validates a connection URL with `new URL`, which cannot parse a seed list. Given `mongodb://host1:27017,host2:27017/db` it reads `27017,host2:27017` as the port and throws, so every replica-set URI with more than one host was rejected as `Mongo URL must be a valid URL` before the driver ever saw it. Validation now drops the extra hosts before parsing. Only the scheme and the database path are read off the parsed URL, and the driver still receives the original string. ## Testing performed - `pnpm --dir packages/3-extensions/mongo test` — 128 passed. The seed-list test reproduces the report through `mongo({ contract, url })` and fails on `main` with the reported error. - `pnpm typecheck` and `pnpm lint` — clean. - `pnpm test:packages` — 17300 passed. Three tarball suites fail, but they fail the same way on an unmodified `main`: their scratch `pnpm install` cannot resolve dependencies here. - Mongo integration suites (`test/mongo`, `test/mongo-runtime`) — 145 passed across 17 files. ## Skill update n/a — no CLI flag, public API, config field, or error code changes. A connection string the MongoDB driver already accepts simply stops being rejected. ## Checklist - [x] All commits are signed off (`git commit -s`) per the DCO. - [x] I read CONTRIBUTING.md and the change is scoped to one logical concern. - [x] Tests are updated. - [ ] The PR title is in `TML-NNNN: <sentence-case title>` form — no Linear ticket, this comes from the issue tracker. - [x] The **Skill update** section above is filled in. ## Notes for the reviewer The scan for the host list starts after the last `@` in the authority, because a password is allowed to contain an unencoded comma. Tests cover that case along with a bracketed IPv6 seed list and a seed list with no database path, which still raises the existing "must include a database name" error. `mongodb+srv://` is unaffected: an SRV URI carries one host and no port, so there is no host list to collapse. Worth noting separately: `packages/3-extensions/postgres/src/runtime/binding.ts` validates the same way and libpq also accepts multi-host strings, so it likely has the same gap. I left it alone to keep this scoped to the reported issue. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * MongoDB connection strings are validated more accurately, including multi-host and replica-set connections, IPv6 hosts, and credentials containing special characters. * Database names are read from the first URL path segment and percent-decoded. Invalid schemes, malformed URLs, and missing database names return clear binding errors. * Sensitive credentials in connection URLs and error messages are redacted more consistently, including URLs with multi-host lists, encoded characters, or password query parameters. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: lazerg <lazerg2@gmail.com> Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io> Co-authored-by: willbot <w.a.madden+machine@gmail.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> | 6 小时前 | |
fix(mongo): accept multi-host connection strings, and mask their credentials in CLI output (#30354) ## At a glance A replica-set connection string lists several hosts. Before this PR, `mongo()` rejected it before the driver ever saw it: ```ts mongo({ contract, url: 'mongodb://user:pw@h1:27017,h2:27017/app?replicaSet=rs' }) // before: throws RUNTIME.BINDING_INVALID "Mongo URL must be a valid URL" // after: accepted; the driver gets the URL unchanged and the database is "app" ``` The CLI masks the connection string before printing it (`db verify`, `db sign`, `db schema`, `db prepare`, `contract infer`, `migrate`). For the same URLs, it printed the password in clear: ```ts maskConnectionUrl('mongodb://admin:s3cret@h1:27017,h2:27017/app?replicaSet=rs') // before: 'mongodb://admin:s3cret@h1:27017,h2:27017/app?replicaSet=rs' // after: 'mongodb://****:****@h1:27017,h2:27017/app?replicaSet=rs' ``` ## Linked issue Fixes #30353 ## Summary The Mongo runtime validates a connection URL with `new URL`, which cannot parse a seed list. Given `mongodb://host1:27017,host2:27017/db` it reads `27017,host2:27017` as the port and throws, so every replica-set URI with more than one host was rejected as `Mongo URL must be a valid URL` before the driver ever saw it. Validation now drops the extra hosts before parsing. Only the scheme and the database path are read off the parsed URL, and the driver still receives the original string. ## Testing performed - `pnpm --dir packages/3-extensions/mongo test` — 128 passed. The seed-list test reproduces the report through `mongo({ contract, url })` and fails on `main` with the reported error. - `pnpm typecheck` and `pnpm lint` — clean. - `pnpm test:packages` — 17300 passed. Three tarball suites fail, but they fail the same way on an unmodified `main`: their scratch `pnpm install` cannot resolve dependencies here. - Mongo integration suites (`test/mongo`, `test/mongo-runtime`) — 145 passed across 17 files. ## Skill update n/a — no CLI flag, public API, config field, or error code changes. A connection string the MongoDB driver already accepts simply stops being rejected. ## Checklist - [x] All commits are signed off (`git commit -s`) per the DCO. - [x] I read CONTRIBUTING.md and the change is scoped to one logical concern. - [x] Tests are updated. - [ ] The PR title is in `TML-NNNN: <sentence-case title>` form — no Linear ticket, this comes from the issue tracker. - [x] The **Skill update** section above is filled in. ## Notes for the reviewer The scan for the host list starts after the last `@` in the authority, because a password is allowed to contain an unencoded comma. Tests cover that case along with a bracketed IPv6 seed list and a seed list with no database path, which still raises the existing "must include a database name" error. `mongodb+srv://` is unaffected: an SRV URI carries one host and no port, so there is no host list to collapse. Worth noting separately: `packages/3-extensions/postgres/src/runtime/binding.ts` validates the same way and libpq also accepts multi-host strings, so it likely has the same gap. I left it alone to keep this scoped to the reported issue. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * MongoDB connection strings are validated more accurately, including multi-host and replica-set connections, IPv6 hosts, and credentials containing special characters. * Database names are read from the first URL path segment and percent-decoded. Invalid schemes, malformed URLs, and missing database names return clear binding errors. * Sensitive credentials in connection URLs and error messages are redacted more consistently, including URLs with multi-host lists, encoded characters, or password query parameters. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: lazerg <lazerg2@gmail.com> Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io> Co-authored-by: willbot <w.a.madden+machine@gmail.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> | 6 小时前 | |
Add declarative config for rules footprint thresholds Move hardcoded THRESHOLDS from the script to a JSON config file at .cursor/rules-footprint.config.json. This follows the project pattern of preferring declarative configuration over embedded constants. Include a JSON schema for validation and editor autocomplete support. | 8 个月前 | |
docs: rewrite README for Prisma 8, fix orm init dist-tag, sweep "Prisma Next" prose (#30248) ## Linked issue n/a — no Linear ticket. Follow-up to the README banner swap in #30225. ## At a glance The README's getting-started commands, before and after, checked against [prisma.io/docs/getting-started](https://www.prisma.io/docs/getting-started): ```bash # before npm create prisma@next npx @prisma/cli@next orm init # after npm create prisma npx prisma orm init npx prisma skills sync ``` The `prisma` package has no `next` dist-tag any more (`latest` is `8.0.0-rc.13`, `prev` is `7.10.0`), so the old commands no longer resolve. ## Summary The README still introduced the product as "Prisma Next" in Early Access, pointed at the removed `next` dist-tag, listed extensions by their `@internal/*` workspace names, and linked to `prisma/prisma`. The rest of the repo had about a thousand prose mentions of the working name. This PR fixes all of it and one real bug the sweep turned up. ## Decision Five commits, each reviewable on its own (the fifth only records the sweep against the in-flight upgrade-instruction files for the coverage check): 1. **Rewrite the README against the live docs.** Every instruction in it now matches the getting-started, quickstart, `orm init`, `skills`, and extensions pages in prisma/web. 2. **Fix `orm init` to install `prisma@latest`.** The CLI added `prisma@next` as a dev dependency. That tag no longer exists on npm, so `orm init` fails at the install step for anyone running it today. The engine fallback moves from `@prisma/cli-engine@next` (0.2.3, stale) to `@latest` (0.3.0). 3. **Replace "Prisma Next" with "Prisma 8" in prose repo-wide.** Docs, doc comments, READMEs, package descriptions, skill references, and user-facing strings. 4. **Carry the pnpm trust-policy exemptions into the tarball smoke tests.** The scratch installs those tests run trip a trust-downgrade check on `undici-types@6.21.0` (no provenance, while 6.13.0 and 6.18.2 had it). The repo already exempts it for the workspace install; the test kit now restates `trustPolicy` and `trustPolicyExclude` in the scratch project the way it restates the release-age settings. Reproduced on main with a fresh metadata cache, so this is a pre-existing failure that any run without cached metadata hits. ## Reviewer notes - **Rebased on #30229.** That PR's release-candidate banner and its `scorecard.md` link replace the roadmap reference in the README, and `ROADMAP.md` stays deleted. The prose sweep re-applied cleanly on top of its CONTRIBUTING, SECURITY, and governance edits. - **Dated records keep the old name**, matching the allowances `scripts/lint-legacy-name.mjs` already defines for the `prisma-next` identifier: `CHANGELOG.md`, `docs/releases/`, the ADRs, `projects/`, and `drive/`. Rewriting those would misreport what was true at the time, and a mechanical pass produced sentences like "Prisma Next becomes Prisma 8" turning into "Prisma 8 becomes Prisma 8". - **Identifiers are untouched.** `prisma-next` package names, paths, env vars (`PRISMA_NEXT_*`), `PrismaNext*` types, the `images/prisma-next.png` file, and the `prisma-next.md` primer (the docs still call it that) are all unchanged. Renaming any of those is a behaviour change with an upgrade path, not a docs fix. - **The sweep is mechanical.** The third commit is a `sed` of `Prisma Next` and `Prisma-next` to `Prisma 8` over 345 files. Three sentences that became self-referential (`ROADMAP.md`, `ROADMAP.html`, `scorecard.md`) were rewritten by hand. - **`README.md` supported-databases section** now says PostgreSQL and MongoDB are first-class and SQLite is planned next, which is what [/docs/orm](https://www.prisma.io/docs/orm) says. The previous text referenced work "before the 8.0.0-rc.1 release". - **Discord channel name dropped.** The README linked to a `prisma-next` channel I could not verify; it now links to Discord generically. ## Behavior changes & evidence - **`orm init` installs `prisma@latest`** instead of `prisma@next`, and falls back to `@prisma/cli-engine@latest` when the manifest does not pin the engine. [packages/1-framework/3-tooling/cli/src/orm/init.ts](packages/1-framework/3-tooling/cli/src/orm/init.ts), [packages/1-framework/3-tooling/cli/src/orm/init-packages.ts](packages/1-framework/3-tooling/cli/src/orm/init-packages.ts). Evidence: [packages/1-framework/3-tooling/cli/test/orm/init-install.test.ts](packages/1-framework/3-tooling/cli/test/orm/init-install.test.ts), [test/integration/test/cli.init-skill-distribution.integration.test.ts](test/integration/test/cli.init-skill-distribution.integration.test.ts). - **Scaffolded quick-reference notes and the skill quickstart** tell users to run `prisma@latest orm init`. [packages/1-framework/3-tooling/cli/src/commands/init/templates/quick-reference-postgres.md](packages/1-framework/3-tooling/cli/src/commands/init/templates/quick-reference-postgres.md), [skills/prisma-8/references/quickstart.md](skills/prisma-8/references/quickstart.md). Evidence: [packages/1-framework/3-tooling/cli/test/commands/init/__snapshots__/templates.test.ts.snap](packages/1-framework/3-tooling/cli/test/commands/init/__snapshots__/templates.test.ts.snap). - **No other runtime change.** Every other edit is prose in docs, comments, `package.json` descriptions, and `//` comments in test fixture schemas, which the emitter drops. ## Testing performed - `pnpm test` in `packages/1-framework/3-tooling/cli`: 115 files, 1437 tests passed - `pnpm lint:legacy-name`, `pnpm lint:docs`, `pnpm lint:skills`, `pnpm lint:rules:footprint`, `pnpm lint:manifests`: all pass (the `errors` README warning is pre-existing) - `pnpm fixtures:check` could not run in this worktree because the examples' `prisma` binary is not installed. The only schema edits are `//` comments, which do not reach the emitted contract. ## Skill update `skills/prisma-8/references/quickstart.md` is updated in the second commit: its `orm init` commands moved from `@prisma/cli@next` to `prisma@latest`, the same change the README makes. ## Alternatives considered - **Rename the identifiers too** (`prisma-next.md`, `PRISMA_NEXT_*`, `PrismaNext*` types, the image file). Each is a user-visible surface with an upgrade path, and the docs still name `prisma-next.md`. Left for a deliberate rename with upgrade instructions. - **Sweep the ADRs, changelog, and project write-ups as well.** The repo's own legacy-name lint exempts them as dated records, and the mechanical pass mangled sentences that describe the rename itself. Following the existing policy keeps the diff honest. - **Keep `@latest` on the commands, as the docs pages write them.** The v8 line is `latest` now, so the tag adds nothing; the README uses the bare `npm create prisma` and `npx prisma …` forms. ## Checklist - [x] All commits are signed off (`git commit -s`) per the [DCO](../CONTRIBUTING.md#developer-certificate-of-origin-dco). - [x] I read [CONTRIBUTING.md](../CONTRIBUTING.md) and the change is scoped to one logical concern. - [x] Tests are updated (the CLI install-command tests and snapshots). - [ ] The PR title is in `TML-NNNN: <sentence-case title>` form. No Linear ticket exists for this change. - [x] The **Skill update** section above is filled in. ## Notes for the reviewer The first two commits are small and worth reading line by line. The third is large but uniform; spot-check a few files rather than reading all 345. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io> Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> | 13 天前 | |
ci: combine package tests and coverage (#30082) ## Linked issue n/a — this infrastructure migration has no Linear ticket. ## At a glance ```json "coverage:packages": "turbo run build --filter='!./examples/**' --filter='!./test/**' && vitest run --coverage", "coverage:report": "node scripts/coverage-report.mjs" ``` One root Vitest invocation now runs package tests and collects coverage, replacing the duplicated package-test and coverage CI jobs. ## Decision This PR ships three related changes: 1. Package tests and package coverage run together in one root Vitest multi-project invocation on Vitest `5.0.0-rc.2`. 2. Each package owns its complete coverage policy in an adjacent `coverage.config.json`, while root composition and post-processing preserve package thresholds and time-limited warning-only exceptions. 3. The obsolete, type-test-only SQL lane query-builder package and its public facade export are removed instead of retaining a permanently unmeasurable 95% runtime-coverage policy. ## Reviewer notes - The broad config diff is mostly moving existing coverage include/exclude/threshold blocks from `vitest.config.ts` into adjacent JSON policies and removing now-redundant package coverage scripts. - Vitest 5 removes `describe.sequential`; affected suites now use `{ concurrent: false }`. Compile-only `.test-d.ts` suites also declare compile-time test cases so Vitest 5 recognizes them. - `examples/prisma-8-cloudflare-worker` intentionally remains on Vitest 4 because `@cloudflare/vitest-pool-workers@0.20.3` requires Vitest 4 peers. - Eight existing package coverage deficits remain visible as active, non-blocking warning-only entries. Expired warnings and ordinary threshold failures still block CI. ## How it fits together 1. `scripts/coverage-config.js` discovers and validates package policies deterministically, rebases package globs to the repository root, and composes process-wide V8 collection settings. 2. The root `vitest.config.ts` references every package project and applies the composed coverage settings to a single test process. 3. `scripts/coverage-report.mjs` reads the root `coverage/coverage-final.json`, attributes files to their owning package, calculates all four metrics, and enforces each package's policy and warning expiry. 4. `.github/workflows/ci.yml` runs `pnpm coverage:packages` in the test job, reports package coverage even when collection finds a test failure, and removes the standalone coverage job. Test failures remain blocking. 5. Vitest 5 compatibility updates keep type tests, sequential suites, and CLI module mocks deterministic under the new runner behavior. ## Behavior changes & evidence - **Package tests execute once in CI while still producing coverage.** The combined command and workflow live in [`package.json`](package.json) and [`.github/workflows/ci.yml`](.github/workflows/ci.yml); [`scripts/coverage-config.test.mjs`](scripts/coverage-config.test.mjs) guards the single-run workflow shape. - **Coverage ownership remains package-local and threshold enforcement remains package-aware.** Composition is implemented in [`scripts/coverage-config.js`](scripts/coverage-config.js), reporting in [`scripts/coverage-report.mjs`](scripts/coverage-report.mjs), and exercised by [`scripts/coverage-report.test.mjs`](scripts/coverage-report.test.mjs). - **Vitest 5 runs the workspace without the previous V8 merge bottleneck.** The workspace pins are in [`package.json`](package.json) and [`pnpm-lock.yaml`](pnpm-lock.yaml); representative compatibility fixes are covered by [`packages/1-framework/3-tooling/cli/test/migration-cli.test.ts`](packages/1-framework/3-tooling/cli/test/migration-cli.test.ts) and the migrated type-test suites. - **The obsolete SQL lane query-builder is no longer published.** Its package is removed, along with the facade dependency/export in [`packages/9-public/@prisma/orm-family-sql/package.json`](packages/9-public/@prisma/orm-family-sql/package.json) and publish-surface mapping in [`packages/0-shared/publish-surface/src/shells.ts`](packages/0-shared/publish-surface/src/shells.ts). ## Compatibility / migration / risk This is a pre-1.0 breaking cleanup: `@internal/sql-lane-query-builder` and `@prisma/orm-family-sql/lane-query-builder` are removed. Repository references and generated facade wiring were removed together, and the public SQL family shell rebuilds without them. Coverage semantics remain package-specific; only orchestration and report aggregation change. ## Testing performed - `CI=true TEST_TIMEOUT_MULTIPLIER=2 pnpm coverage:packages` — 1,155 files passed; 15,311 tests passed, 3 expected failures, no type errors - `pnpm coverage:report` — 69 package policies, 0 blocking failures, 8 active warnings, 0 expired warnings - `pnpm test:scripts` — 476 tests passed - `pnpm lint:deps` - `pnpm lint:manifests` - `pnpm build --filter=@prisma/orm-family-sql...` - Publish-surface tests and typecheck — 56 tests passed - Focused package tests/typechecks for CLI, Mongo runtime, SQL ORM client, SQLite codec testkit, integration tests, examples, and shell tarballs - `pnpm install --frozen-lockfile --ignore-scripts` - Targeted Biome checks and `git diff --check` ## Skill update n/a — the removed prototype query-builder export was not referenced by any user-facing skill; its package, public README, architecture docs, and publish surface were updated directly. ## Alternatives considered - **Keep Vitest 4 and optimize around it:** the single V8 run remained CPU-bound for more than 37 minutes because the relevant V8 merge optimization is only available in Vitest 5; the Vitest 4 backport was not merged. - **Switch to Istanbul coverage:** benchmarking was slower and introduced CLI language-server instrumentation timeouts, so V8 remains the provider. - **Run packages sequentially:** this preserves policy isolation but repeats runner startup and cannot eliminate duplicate test execution in CI; root collection plus package-aware post-processing keeps policy ownership without that cost. ## Checklist - [x] All commits are signed off (`git commit -s`) per the DCO. - [x] I read `CONTRIBUTING.md` and the change is scoped to one logical concern. - [x] Tests are updated. - [ ] The PR title is in `TML-NNNN: <sentence-case title>` form — no Linear ticket exists, so this uses the conventional commit title required by `CONTRIBUTING.md`. - [x] The **Skill update** section is filled in. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Breaking Changes** - Removed the SQL lane query-builder package and its public package export. - Updated SQL documentation and package entrypoint references. - **Testing & Quality** - Centralized package coverage reporting with package-specific thresholds, exclusions, and warning policies. - Improved coverage validation, threshold reporting, and CI integration. - Updated serialized integration-test execution for compatibility with the current test runner. - **Documentation** - Expanded testing guidance for package coverage workflows and CI behavior. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Steven McClankerton <tatarintsev@prisma.io> Co-authored-by: Steven McClankerton <tatarintsev@prisma.io> | 1 个月前 | |
Serialize tarball packaging suites in the integration test package (#30345) ## Linked issue n/a — standalone packaging-test race fix; Linear link omitted as requested. Kept separate from the generic-block-value-specs feature. ## Summary Two Vitest suites — the Postgres facade tarball suite and the pgvector extension tarball suite — `pnpm pack` the same real `@prisma/orm-postgres` directory concurrently. Its `prepack` rewrites the `skills/` tree in place, so concurrent packs corrupt each other (confirmed `ENOENT` race in `sync-package-skills.ts`). This PR fixes the race by scheduling instead of locking: both suites move into the integration test package under a dedicated Vitest project that runs its files sequentially. The first commit on this branch implemented a cross-process lock (Lamport bakery around `pnpm pack`); review judged it too complex for the problem, and the second commit reverts it. The third commit is the replacement: - `test/integration/test/packaging/` now holds `facade-tarball.test.ts` and `extension-tarball.test.ts` (moved as-is; only the `repoRoot` depth changed). - `test/integration/vitest.config.ts` splits into two projects: `integration` (everything else, parallelism unchanged) and `packaging` (`test/packaging/**`, `fileParallelism: false`). Vitest runs every `fileParallelism: false` project in one shared sequential execution group, so only the packing suites serialize. - `@prisma/orm-postgres` and `@prisma/orm-extension-pgvector` lose their now-empty test rigs (`test` script, `vitest.config.ts`, test-only devDependencies) and their dead `turbo.json` task overrides. - `scripts/lint-single-import-root.mjs` gets a narrow exemption for `test/integration/test/packaging/`: the moved suites' `@prisma/orm-*` specifiers are strings executed inside isolated scratch installs in child processes, never imports in the integration-tests module graph, so the dual-copy hazard the lint guards against cannot occur. Covered by new cases in its test. ## Verification - Both moved suites pass under the `packaging` project: 17/17. JSON-reporter timestamps prove sequential scheduling: `facade-tarball` ran 15:23:32.647–15:23:39.247, `extension-tarball` started 15:23:45.227 — no overlap. - `scripts/lint-single-import-root.test.mjs`: 8/8, including the new exemption cases (one proves the package is still reported when the exemption list is emptied). - `pnpm lint:deps`, `pnpm lint:manifests`, `pnpm lint:vitest-timeouts`, `pnpm lint:legacy-name`, integration-tests `typecheck` + `lint`, and both donor packages' `lint` all pass. ## Known limitations - The protection is scheduler-scoped: two independently launched Vitest processes could still pack concurrently. Accepted as the simpler trade-off over cross-process locking. - `orm-framework`'s tarball suites and `orm-target-postgres`'s cross-shell suite stay in `test:packages` and pack overlapping platform-shell directories in separate Vitest projects; those directories have no in-place-rewriting `prepack`, and that pre-existing exposure is unchanged by this PR. - Validation surfaced an orthogonal breakage: fresh scratch installs currently fail with `ERR_PNPM_TRUST_DOWNGRADE` for `@vercel/detect-agent@1.2.5` (resolved via `^1.2.4` from `@prisma/orm-toolchain`; 1.2.5 carries no provenance where earlier versions did). This breaks the tarball suites on `main` in their old location too. The green runs above used a temporary local trust exclusion that is deliberately **not** committed — whether to pin `1.2.4` or vouch for `1.2.5` in `trustPolicyExclude` is a separate supply-chain decision. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Tests** * Separated integration and packaging tests into distinct projects. * Packaging tests now run sequentially with extended timeout settings. * Updated packaging test paths and repository layout references. * Updated coverage validation for the revised package structure. * **Chores** * Removed standalone test scripts, coverage settings, and test configurations from the PostgreSQL ORM packages. * Updated import validation and legacy-name checks for relocated packaging tests. * Added tooling required by integration tests. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Steven McClankerton <tatarintsev@prisma.io> Co-authored-by: Steven McClankerton <tatarintsev@prisma.io> | 6 天前 | |
refactor: rename every user-facing prisma-next identifier to Prisma 8 (#30262) ## Linked issue n/a — no Linear ticket. Completes the rename that #30248 started for prose; builds on #30261. ## At a glance Every `prisma-next` identifier a user can see is renamed. Before and after, for a scaffolded project: ```text // use prisma-next → // use prisma-8 (schema header) prisma-next.md → prisma-8.md (primer at the project root) PRISMA_NEXT_DISABLE_TELEMETRY → PRISMA_DISABLE_TELEMETRY (and every other PRISMA_NEXT_* variable) ~/.config/prisma-next/ → ~/.config/prisma-8/ (per-user telemetry config) prisma-next contract emit → prisma contract emit (CLI invocations in docs, fixtures, recordings) ``` ## Summary After #30248 the product was called Prisma 8 in prose, but the working name was still written into user projects and printed by the CLI: the schema header, the primer file, the environment variables, the per-user config directory, the language-server diagnostic source, the Standard Schema vendor string, the contract brand symbol, the advisory-lock domain, and about 650 fixture and doc files that spelled out `prisma-next …` commands. This PR renames all of it in one pass and tightens the legacy-name lint so the only occurrences left are the ones with a reason. ## Decision One commit. The mapping: | Surface | Before | After | |---|---|---| | Schema header | `// use prisma-next` | `// use prisma-8` | | Primer file `init` writes | `prisma-next.md` | `prisma-8.md` | | CLI environment variables | `PRISMA_NEXT_*` | `PRISMA_*` | | Per-user config directory | `prisma-next/` | `prisma-8/` | | Language-server diagnostic source | `prisma-next` | `prisma` | | Standard Schema vendor, VS Code publisher | `prisma-next` | `prisma` | | Contract brand symbol | `__prisma_next_brand__` | `__prisma_8_brand__` | | Postgres advisory-lock domain | `prisma_next.contract.marker` | `prisma_8.contract.marker` | | Example database names | `prisma_next_*` | `prisma_8_*` | | README banner image | `images/prisma-next.png` | `images/prisma-8.png` | | Telemetry docs URL | `prisma-next.dev/docs/…` | `www.prisma.io/docs/…` | | New-issue links | `github.com/prisma/prisma-next/issues/new` | `github.com/prisma/orm/issues/new` | | CLI invocations in prose, fixtures, and recordings | `prisma-next db verify` | `prisma db verify` | `prisma-8` is the slug the repo already uses for the skill, the examples, and the upgrade directories, so it is the slug for everything that needs one. Environment variables drop the infix entirely because `PRISMA_*` is what users expect and nothing else in the repo claims those names. What keeps the old name, each with a lint allowance that says why: - **Dated records**: changelog, release notes, ADRs, shipped upgrade instructions, gotcha logs, the framework-gaps review, and the `projects/` and `drive/` write-ups. - **Pinned links** into the old repository by number, Linear slugs, and links to ADRs whose filenames carry the name. - **`@cipherstash/prisma-next`**, a third party's published package name. - **Retirement proofs**: the list of old skill directories `init` deletes, and the tests asserting that no `prisma-next` bin or skill directory is installed any more. ## Behavior changes & evidence - **Schema header.** The inferred-schema printer and the `init` templates write `// use prisma-8`. The language server accepts both headers, so existing schemas keep their diagnostics and completion, and its Format action rewrites the old header to the new one. [packages/1-framework/3-tooling/language-server/src/schema-directive.ts](packages/1-framework/3-tooling/language-server/src/schema-directive.ts), [packages/1-framework/2-authoring/psl-printer/src/ast-to-print-document.ts](packages/1-framework/2-authoring/psl-printer/src/ast-to-print-document.ts). Evidence: the `renameLegacyDirective` tests, the server test that formats a legacy-headed schema, and the psl-printer tests. - **Environment variables.** Telemetry gating, the endpoint override, and the debug switch read the new names. `PRISMA_NEXT_DISABLE_TELEMETRY` is still honoured as an opt-out so nobody is silently opted back in; the endpoint and debug spellings are not. [packages/1-framework/3-tooling/cli-telemetry/src/gating.ts](packages/1-framework/3-tooling/cli-telemetry/src/gating.ts). Evidence: cli-telemetry gating tests. - **Per-user config directory.** [packages/1-framework/3-tooling/cli-telemetry/src/user-config.ts](packages/1-framework/3-tooling/cli-telemetry/src/user-config.ts). Existing users see the telemetry consent prompt once more; nothing else is lost. - **Primer file.** [packages/1-framework/3-tooling/cli/src/orm/init-scaffold.ts](packages/1-framework/3-tooling/cli/src/orm/init-scaffold.ts). Evidence: init-scaffold tests and template snapshots. - **Advisory-lock domain.** A CLI on this version and one on the previous version take different locks for the same marker. Both versions running migrations against one database at the same moment is already unsupported. - **Upgrade instructions.** Entries for the header, the environment variables, and the primer file are recorded in the rc.9 → rc.10 app and extension instructions with detection patterns, so the published upgrade skill applies the rename. ## Testing performed - `pnpm test` in cli (1437), cli-telemetry (112), language-server (312), psl-printer (63), framework-components (672), target-postgres (1607), vite-plugin-contract-emit (31), emitter (231), and `pnpm test:scripts` (507): all pass after `pnpm build`. The language-server tests hard-coded the old header's length in semantic-token arrays and span offsets; those expectations are updated. - Committed migration steps and their content-addressed contract snapshots are left untouched, since rewriting them would break their hashes; the lint treats them as dated records. - `pnpm lint:legacy-name` passes with the tightened allowances; `node --test scripts/lint-legacy-name.test.mjs` passes (14 tests, including new negative cases for the header, primer, and skill names). - `pnpm check:upgrade-coverage --mode pr --prev origin/main` passes. ## Skill update `skills/prisma-8` references and the two rc.9 → rc.10 upgrade instruction files are updated in this PR. ## Checklist - [x] All commits are signed off (`git commit -s`) per the [DCO](../CONTRIBUTING.md#developer-certificate-of-origin-dco). - [x] I read [CONTRIBUTING.md](../CONTRIBUTING.md) and the change is scoped to one logical concern. - [x] Tests are updated. - [ ] The PR title is in `TML-NNNN: <sentence-case title>` form. No Linear ticket exists for this change. - [x] The **Skill update** section above is filled in. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io> Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> | 13 天前 |
正在使用 Prisma 7? 它仍获得完全支持。其源码位于本仓库的
v7分支,文档位于 prisma.io/docs/orm/v7。
Prisma 8 目前为发布候选版本。
8.0.0正式版预计将在未来四到八周内发布。在此之前,发布候选版本可能包含破坏性变更;每次发布都会附带升级方案,prisma-8技能可自动为你应用。该候选版本是一套我们愿意背书的完整实现:我们会将其中的缺陷视为紧急问题;你所承担的风险,是某些功能尚未实现,而非频繁变动。功能记分板 列出了所有差距。新项目应从这里开始。现有 Prisma 7 应用可渐进式迁移;在8.0.0正式版发布后的十八个月内,Prisma 7 仍会保留在v7分支,并提供缺陷修复和安全更新。欢迎给仓库点 Star,在 X 上关注 @prisma,或继续阅读 Prisma 博客。
Prisma 8 是 Prisma ORM 的 TypeScript 重写版本,默认具备可扩展性、可组合性,并对 AI Agent 友好。阅读公告,或从文档开始。
前提条件
- Node.js 24 或更高版本
- 一个包管理器(
npm、pnpm或yarn)
快速开始
1. 搭建新项目
交互式脚手架会选择一个应用模板(Next.js、Hono、Nuxt、Astro、NestJS、SvelteKit、TanStack Start 或 Elysia),并将 Prisma 8 接入你选择的数据库(PostgreSQL 或 MongoDB):
npm create prisma
完成后可得到一个可运行的应用、一个初始契约,并且 Agent 技能已安装。有关所有模板和标志,请参阅 create-prisma 参考,或参考 PostgreSQL 与 MongoDB 快速入门。
2. 或者,将 Prisma 8 添加到现有项目
请在仓库根目录中运行以下命令:
npx prisma orm init
orm init 会写入 prisma.config.ts,在 src/prisma/ 下生成 starter contract 和 db.ts,安装运行时,并输出 contract。它不会改动你的框架或构建配置。然后安装 agent skills:
npx prisma skills sync
参见 orm init 和 skills CLI 参考,或者查看将 Prisma 8 添加到现有 PostgreSQL 或 MongoDB 应用的指南。
3. 用你的 AI agent 处理所有 Prisma 8 相关工作
两个安装器都会在项目根目录保留一份顶层 prisma-8.md 入门指南,供任何 agent 优先阅读,并为每个工作流在 agent 运行时读取的目录中安装一个 SKILL.md:
.claude/skills/<skill-name>/SKILL.md— Claude Code.cursor/skills/<skill-name>/SKILL.md— Cursor.agents/skills/<skill-name>/SKILL.md— Copilot Agent 及其他运行时的通用位置.devin/skills/<skill-name>/SKILL.md— Devin
Skills 随项目安装的 Prisma 包一同分发,因此始终描述当前正在使用的版本。当你的提示词匹配时,编辑器 AI 助手会自动加载正确的 skill。
只需描述你想要的结果。例如:
"添加一个
posts模型,并与users建立关联,然后编写一个查询,加载每个用户最近的三条帖子。"
agent 会加载 prisma-8 skill,打开其 contract 与 queries 参考,然后端到端完成变更。
完整目录以及每个 skill 涵盖的内容,请参见 skills/README.md。
发现了 bug、缺少功能,或者想向团队提问?
向你的 agent 提问。prisma-8 skill 的反馈流程会起草一份结构化的 GitHub issue,或者提供一个用于实时问答的 Prisma Discord 链接。你可以在任何内容提交前审阅并确认。
面向扩展作者
Prisma 8 的核心非常精简。包括 Postgres 支持本身在内,围绕它的一切,都构建在任何作者都可以使用的同一套公开 SPI 之上。如果你一直想将自己的工具、数据库或库与 Prisma 集成,这就是入口。
已发布的扩展:
@prisma/orm-extension-pgvector:向量列和相似性搜索。@prisma/orm-extension-postgis:几何列和地理查询。@prisma/orm-extension-paradedb:BM25 全文搜索索引(实验性)。@prisma/orm-extension-supabase:Supabase 认证和存储表、与角色绑定的客户端(实验性)。@prisma/orm-extension-arktype-json:使用 arktype schema 验证的 JSON 列。@cipherstash/prisma-next:可搜索加密和数据级访问控制。
关于如何安装并注册其中一个,请参见 使用扩展。想发布自己的扩展吗?扩展作者征集 将讲解 SPI、你的扩展可以接入的层,以及团队如何推荐新扩展。
支持的数据库
- PostgreSQL — 主要支持对象,提供一等支持
- MongoDB — 提供一等支持
- SQLite — 计划下一步支持,目前已有概念验证
MySQL 将在 SQLite 之后跟进。查看功能支持记分卡,了解各数据库当前支持的功能。
参与贡献
查看 CONTRIBUTING.md 了解环境搭建、命令、DCO 签署以及 PR 约定。对于实质性变更,请先提交 issue,这样我们可以先给出方向性反馈,再让你投入开发时间。
安全漏洞:请按照 SECURITY.md 中的私有漏洞报告流程操作。请勿将其提交为公开 issue。
社区
你用 Prisma 8 构建了什么?请在 X 上标注 @prisma。优秀的社区作品会在这里获得推荐和链接展示。
- Discord:在 Discord 与我们交流
- X:@prisma
- 博客:prisma.io/blog
许可证
Apache 2.0。查看 LICENSE。
项目介绍
下一代ORM,适用于Node.js和TypeScript | 支持PostgreSQL、MySQL、MariaDB、SQL Server、SQLite、MongoDB及CockroachDB【此简介由AI生成】