Skip to content

chore(deps): Composer moves to Prisma ORM 8.0.0-rc.28, and the upgrade notes follow the ORM's corrected instructions - #482

Merged
wmadden-electric merged 3 commits into
mainfrom
chore/orm-rc28
Dec 3, 2026
Merged

wmadden-electric merged 3 commits into
mainfrom
chore/orm-rc28

Conversation

@wmadden-electric

Copy link
Copy Markdown
Contributor

Composer moves to Prisma ORM 8.0.0-rc.28, and the deploying guide's upgrade notes follow the ORM's corrected upgrade instructions. The next Composer release, 0.41.2, ships this. It also documents the region an app's first deploy needs, which the guide never mentioned.

Why

ORM rc.28 changes nothing an application must do; its upgrade guide from rc.27 has no entries. It fixes the upgrade instructions that misled agents upgrading real projects from rc.25. Three of the fixes change what Composer's guide must say:

  • The rc.25-to-rc.26 hash script now refuses a contract that still uses the names from before rc.13 (table and column) for a generated column value. Before, it wrote new hashes over it and left a snapshot that later commands reject. Composer 0.40.0's orm-demo example had such a snapshot.
  • prisma contract emit now warns with MIGRATION.CONTRACT_SNAPSHOT_PROFILE_NOT_UPDATED when it cannot update a snapshot, where rc.27 said nothing.
  • MIGRATION.SIGNATURE_NOT_IN_GRAPH, on a database an earlier release migrated, now points to the ORM's signing step instead of advising prisma db update.

The ORM's upgrade instructions also changed how they start: they now download the newest release's guides, because the copy installed with an older release has old ones.

What changes

  • Pins: every @prisma/orm-* package and the root override for prisma's toolchain move from 8.0.0-rc.27 to 8.0.0-rc.28, with the lockfile. pnpm contracts:emit changed no contract or snapshot.
  • Deploying guide, upgrade section. The heading no longer names a release candidate ("Upgrading to Prisma ORM's new contract hashes"), so it stops changing at every ORM release; the links to it from the contracts decision record and the auth module's README follow.
    • Readers upgrade straight from rc.25 to rc.28, starting from rc.28's upgrade reference. The guide tells them to give their coding agent the starting version, because Composer's step 3 already installed rc.28 and the reference would otherwise read rc.28 from the lockfile as the starting point.
    • Whatever MIGRATION.SIGNATURE_NOT_IN_GRAPH advises, the reader signs by hand as step 7 says, because a Composer deploy never signs (the contracts decision record).
    • Step 4 covers the hash script refusing an old-named contract. Step 5 covers the emit warning and what happens to deploys if it is ignored: they stop at the migration step, or sign a new database that fails prisma db verify.
    • The paths from Composer 0.41.0 and 0.41.1 now also run prisma contract emit and act on that warning, because the hash script those releases shipped could leave an old-named snapshot.
    • @prisma/composer-cli is upgraded only if the app lists it, because prisma depends on it and brings its own.
  • Deploying guide, Credentials: an app's first deploy creates its Prisma Cloud project, so it needs a region: PRISMA_REGION, or prismaCloud({ region }) in prisma.config.ts, which wins. When one is set, every later deploy also creates services and databases in it, so it must not change: a database in another region is replaced by an empty one. prisma dev never needs it. The prisma CLI's end-to-end check stopped at the missing region; the error named the variable, but the guide did not.

How it was checked

  • pnpm lint:deps (every pin exactly rc.28, snapshot copies agree) and pnpm typecheck pass. The lockfile has no other ORM version and no development build.
  • The target's ORM unit tests (migrate, migration resource, Postgres resource, target ref) pass.
  • An independent review checked the guide against the ORM's rc.28 release notes, its upgrade reference and guides, the ORM's error code, and Composer's region code. Its findings are fixed here.
  • Not done here: a deploy on rc.28. Users cannot follow the guide until a prisma release depends on @prisma/orm-toolchain 8.0.0-rc.28 and this Composer version; that release, and the prisma CLI's end-to-end check, follow this one.

Agent: herodotus-23

🤖 Generated with Claude Code

…-cli only where the app lists it, and the first deploy needs a region

Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
…region must not change after the first deploy; each path checks the emit warning

Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
@wmadden-electric
wmadden-electric requested a review from a team as a code owner December 3, 2026 00:47
@prisma-gizmo

prisma-gizmo Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

✅ Gizmo reviewed ac34f26 — posted 0 inline comment(s) this pass.

Open findings: none

Change walkthrough

This PR moves Composer to Prisma ORM 8.0.0-rc.28 across every workspace package and rewrites the deploying guide's upgrade notes to follow the ORM's corrected rc.28 upgrade instructions, plus a new Credentials note about the region a first deploy needs.

Version pins. All @prisma/orm-* dependency pins (examples, auth shared module, target extension, composer-prisma-cloud's dependency/peer/dev blocks) and the root prisma>@prisma/orm-toolchain override move from rc.27 to rc.28, with the lockfile. Verified repo-wide: lint-orm-pins reports all 37 orm specs exactly rc.28, and no rc.27 or development build remains in any JSON/YAML file. The pnpm override structure (composer-cli as workspace:*) is untouched.

Deploying guide — Credentials. The new paragraph documents that a first deploy creates the app's Prisma Cloud Project and therefore needs a region via PRISMA_REGION or prismaCloud({ region }), with the option winning. This matches the code: region resolution prefers the config option over the environment variable in target/src/control/extension.ts:280-285, and the failure message ("no deploy region is configured", naming both escape hatches) matches lowering/src/container.ts:136-140. The paragraph also warns that the region must not change after the first deploy because services cannot move region and out-of-region databases get replaced empty.

Deploying guide — upgrade section. The section heading is now release-agnostic ("Upgrading to Prisma ORM's new contract hashes"), so the anchor stops churning per ORM release; the ADR-0022 and auth README links were updated to the new slug, and no stale reference to the old #upgrading-to-prisma-orm-800-rc27 anchor remains anywhere. The rewritten paths describe upgrades straight from rc.25/rc.26 to rc.28, starting from rc.28's upgrade reference (because the locally installed guides are stale), cover the hash script's new refusal of pre-rc.13 table/column naming, the new MIGRATION.CONTRACT_SNAPSHOT_PROFILE_NOT_UPDATED emit warning and its deploy consequences, and only-upgrade @prisma/composer-cli when the app lists it. A new "Upgrading from Composer 0.41.1" subsection gives the rc.27-to-rc.28 path (emit, act on the warning, nothing to sign). Cross-references to the main upgrade's steps 1, 4, 5 and 7 all resolve to the right steps.

Not in scope here: users can only follow the new guide once a prisma npm release depends on toolchain rc.28 and this Composer version — the PR description flags that release as following this one.

@coderabbitai

coderabbitai Bot commented Dec 3, 2026

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 8e4ffaa1-1c66-456c-9564-a5f2ee8c1ff2
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@pkg-pr-new

pkg-pr-new Bot commented Dec 3, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@prisma/composer@482
npm i https://pkg.pr.new/@prisma/composer-cli@482
npm i https://pkg.pr.new/@prisma/composer-prisma-cloud@482

commit: ac34f26

@prisma-gizmo prisma-gizmo Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New findings: none · trace

@prisma-gizmo prisma-gizmo Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No Gizmo finding is open and the head commit has been reviewed. Approving.

@wmadden-electric
wmadden-electric enabled auto-merge (squash) December 3, 2026 01:11
@wmadden-electric
wmadden-electric merged commit 89df28b into main Dec 3, 2026
33 of 35 checks passed
@wmadden-electric
wmadden-electric deleted the chore/orm-rc28 branch December 3, 2026 01:15
wmadden-electric added a commit to prisma/prisma-cli that referenced this pull request Dec 3, 2026
…tract emit` warns when it leaves the migration snapshot stale (#431)

## At a glance

Merging this pull request publishes `prisma` and `@prisma/cli`
8.0.0-rc.39 under the `next` dist-tag
([versioning](https://github.com/prisma/prisma-cli/blob/main/docs/oss/versioning.md)).
The release pins Prisma ORM 8.0.0-rc.28 and Composer 0.41.2 exactly.
`npm install prisma` keeps getting rc.36 from `latest` until a
maintainer promotes a newer release with `promote.yml`.

rc.39 changes no CLI code. It ships ORM fixes found by upgrading two
real applications to rc.38.

## What the new ORM and Composer releases fix

- **`prisma contract emit` warns when it cannot update the migration
snapshot.** The migration snapshot is the copy of the contract that
`prisma db migrate` records in each database it creates. When emit
cannot update it, a new database records out-of-date capabilities and
later fails `prisma db verify`. Emit used to skip it without a word.
That happened in our rc.38 upgrade check: the ORM's rc.25 to rc.26
upgrade script had left the snapshot's mutation-default references with
key names from before ORM rc.13. Emit now warns with
`MIGRATION.CONTRACT_SNAPSHOT_PROFILE_NOT_UPDATED`, naming the snapshot,
the reason and what to do. That upgrade script now refuses such a
snapshot and gives the command of the older script that renames the keys
([prisma/orm#31346](prisma/orm#31346)).
- **Upgrades follow the newest instructions.** The ORM's upgrade
instructions, written for coding agents, ship inside its packages. An
agent upgrading from an older release used to read that release's copy,
without later corrections. Now it downloads the newest release and
follows the guides in it (same PR).
- **`MIGRATION.SIGNATURE_NOT_IN_GRAPH` gives the right advice** for a
database that an earlier ORM release migrated. It used to suggest
`prisma db update`. It now points to the step of the rc.25 to rc.26
upgrade guide that says when to run `prisma db sign` (same PR).
- **Composer 0.41.2 moves Composer to ORM rc.28** and changes no
Composer code that ships. Its deploy guide now says an app's first
deploy needs `PRISMA_REGION`
([prisma/composer#482](prisma/composer#482)).

An application on rc.38 needs no code changes: the ORM's rc.27 to rc.28
upgrade guide has no entries. A project whose snapshot still has the old
key names now sees the new warning from `contract emit`, and the warning
says how to fix it.

## What changes in this pull request

- `packages/cli/package.json` and `packages/prisma/package.json` pin
every `@prisma/orm-*` package at 8.0.0-rc.28 and the three
`@prisma/composer*` packages at 0.41.2.
- `pnpm bump-version` set the root, `prisma`, `@prisma/cli`, the private
workspace packages and the version the CLI's skill names to 8.0.0-rc.39.
`@prisma/cli-engine` and `@prisma/compute` keep their own versions. The
lockfile follows.

## Why `@prisma/cli-engine` stays at 0.10.4

ORM rc.28 and Composer 0.41.2 both require `@prisma/cli-engine` 0.10.4
exactly. So this release must not change what the engine publishes. In
this pull request the engine's `package.json` changes only in its
development dependencies, which are not published.

## Checked before merge

- All `@prisma/orm-*` packages are on npm at 8.0.0-rc.28, and all
`@prisma/composer*` packages at 0.41.2. `@prisma/composer-prisma-cloud`
0.41.2 requires ORM 8.0.0-rc.28 exactly, so the pins agree.
- The lockfile holds one version of `@prisma/orm-toolchain`.
- Typecheck and lint pass. So do the tests that check which ORM and
Composer commands are mounted, and the tests of
`CLI.SECOND_PACKAGE_COPY`, the refusal to run when two copies of a
Prisma package are installed.

## After merge, before promotion

rc.39 is installed from npm by its exact version and checked end to end:

- a fresh Composer deploy, whose new database is migrated to the
migration that the environment's ref names, and must pass `prisma db
verify`;
- an upgrade of a project deployed with rc.38.

rc.39 is promoted to `latest` only if both pass. If either fails, it
stays on `next` and the fix goes in the next release.

## Replaces #430

The release automation opened #430. It moves the ORM to rc.28 but leaves
Composer at 0.41.1. Composer 0.41.1 requires ORM rc.27 exactly, so #430
would put two versions of `@prisma/orm-toolchain` in the lockfile.

Agent: cobain-55

🤖 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 Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants