Skip to content

Upgrade alchemy to beta.81 and use effect ^4.0.0, dropping the @effect/vitest runtime dependency - #348

Merged
wmadden-electric merged 5 commits into
mainfrom
claude/effect-vitest-runtime-dep-19ccb8
Oct 8, 2026
Merged

wmadden-electric merged 5 commits into
mainfrom
claude/effect-vitest-runtime-dep-19ccb8

Conversation

@wmadden-electric

Copy link
Copy Markdown
Contributor

@prisma/composer no longer lists @effect/vitest, a test library, as a runtime dependency:

 "dependencies": {
-  "@effect/sql-d1": "4.0.0-rc.115",
-  "@effect/sql-sqlite-do": "4.0.0-rc.115",
-  "@effect/vitest": "4.0.0-rc.115",
-  "alchemy": "2.0.0-beta.78",
+  "alchemy": "2.0.0-beta.81",
-  "effect": "4.0.0-rc.115",
+  "effect": "^4.0.0",

Decision: upgrade alchemy to its latest release (2.0.0-beta.81) and declare effect with alchemy's own range, ^4.0.0. Drop every @effect/* pin that only existed to steer npm.

Why the pins existed

Until now, alchemy listed effect and several @effect/* packages as dependencies with open-ended ranges. @effect/vitest was one of them. We were on effect release candidates (4.0.0-rc.115). A caret range like ^4.0.0 doesn't match release candidates. So the only way to keep npm on a single effect was to pin effect and every companion package exactly. Composer never imported @effect/vitest, @effect/sql-d1 or @effect/sql-sqlite-do. They were listed only so a consumer's npm would pick our versions.

What changed upstream

effect 4.0.0 is out (latest is 4.0.2). From 2.0.0-beta.80, alchemy declares effect as a ^4.0.0 peer, depends on @effect/sql-* with ^4.0.0, and makes @effect/vitest an optional peer, so npm no longer installs it. With a stable effect, normal semver ranges work and the exact pins aren't needed.

What this PR does

  • Upgrades alchemy from 2.0.0-beta.78 to 2.0.0-beta.81 everywhere. It stays exact because it's a beta and its API moves.
  • Changes effect from 4.0.0-rc.115 to ^4.0.0 everywhere.
  • Drops @effect/vitest, @effect/sql-d1, @effect/sql-sqlite-do and @effect/platform-node-shared.
  • Keeps @effect/platform-node (lowering imports it) and @effect/platform-bun, both now ^4.0.0. alchemy loads the platform package for its runtime, and its CLI re-runs itself under Bun when started from Bun. Removing @effect/platform-bun made alchemy exit under bun test, so it's a real runtime dependency.
  • Bumps @distilled.cloud/prisma to 1.0.0-rc.13, the exact version alchemy beta.81 depends on, so npm installs one copy.
  • Code: effect 4.0 moved effect/unstable/http/* to effect/http/*. Six imports changed. No other API breakage.
  • scripts/check-npm-effect-resolution.mjs no longer requires effect to be an exact version. It still checks that a bare npm install resolves exactly one effect and that alchemy resolves that same copy, and that the adversarial tree still fails.
  • The deploy guide, the core-concepts skill and the upgrade-alchemy-effect skill now describe effect 4.x instead of an exact pin.

Verification

  • pnpm typecheck, pnpm lint, and pnpm test (66/66 tasks) pass.
  • pnpm check:npm-effect-resolution: all three healthy npm installs (including npm 10) resolve a single effect@4.0.2, and the adversarial tree fails to import alchemy as expected.
  • check:family-static-graph, check:cli-engine-pin, check:publish-deps, check:skill-packaging and test:scripts pass.
  • alchemy, alchemy/Output, /Provider, /Stack and /Prisma load, and a bare import('alchemy') registers no signal listeners.
  • Not yet verified: the E2E deploy jobs in CI. alchemy is the deploy engine, so those are the real test of this upgrade.

Alternatives considered

  • Delete only the @effect/vitest line and stay on alchemy beta.78. Rejected: beta.78 still depends on @effect/vitest with an open range. npm would pick @effect/vitest@4.0.2, which needs effect ^4.0.2, which conflicts with the rc.115 pin. That's the second-effect and npm-backtracking failure the pin was added to prevent (2026-09-11).
  • Make effect a peer dependency instead of a dependency. Not done: Composer imports effect directly, and a regular dependency with alchemy's range dedupes to one copy just as well, as the npm check shows.

Agent: penelope-12

🤖 Generated with Claude Code

wmadden-electric and others added 4 commits October 8, 2026 09:31
alchemy beta.81 accepts effect ^4.0.0 and makes @effect/vitest an optional
peer, so the exact pins that only steered npm away from floating ranges are
gone: @effect/vitest, @effect/sql-d1, @effect/sql-sqlite-do,
@effect/platform-bun and @effect/platform-node-shared. effect and
@effect/platform-node, which we import, now use alchemy's range.

effect 4.0 moved effect/unstable/http to effect/http.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
The npm resolution check now asserts one effect in the tree that alchemy
resolves, instead of an exact version. The deploy guide, the core-concepts
skill and the upgrade skill tell users and maintainers to use effect 4.x.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
alchemy loads @effect/platform-bun at runtime when it runs on Bun, which its
CLI does when started from Bun. It is a real runtime dependency, not only an
npm pin, so it stays, with alchemy's ^4.0.0 range.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
…runtime-dep-19ccb8

# Conflicts:
#	docs/guides/deploying.md
#	skills/prisma-composer-core-concepts/SKILL.md
@prisma-gizmo

prisma-gizmo Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

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

Open findings: none

Change walkthrough

The incremental delta updates skills/prisma-composer-core-concepts/SKILL.md:358, the core-concepts skill's description of the deploy engine. The prose "exactly-pinned npm dependency of @prisma/composer" now cites alchemy 2.0.0-beta.81 instead of 2.0.0-beta.78, keeping the documentation in sync with the dependency upgrade that is the heart of this PR.

The new version string matches the actual pin in packages/9-public/composer/package.json:37, where alchemy is declared at exactly 2.0.0-beta.81 — so the "exactly-pinned" phrasing stays accurate; alchemy remains a beta with a moving API and is deliberately not given a caret range. The adjacent sentence, "alchemy is why Composer depends on effect 4.x," also remains correct under the new ^4.0.0 range now declared in the same manifest. This line was the last documentation reference left describing the old engine version, so after this change the core-concepts skill, the deploy guide, and the upgrade-alchemy-effect skill all consistently describe alchemy beta.81 running on effect 4.x. The change is documentation-only with no runtime or packaging effect; the operational guidance around it (generated stack files, bisection via the alchemy CLI, destroy semantics, public-URL rules) is untouched and still matches the code paths it describes.

@coderabbitai

coderabbitai Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

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

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 260a644c-3060-4b23-a924-faa1b732fd23
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@pkg-pr-new

pkg-pr-new Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

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

commit: 20dd776

@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: 🟡 1 minor · trace

Findings outside the diff

  • 🟡 Minor · consistency skills/prisma-composer-core-concepts/SKILL.md — Core-concepts skill still cites alchemy 2.0.0-beta.78
    The PR updates every other alchemy version citation in the repo (glossary, deploy guide, both skills) to 2.0.0-beta.81, but the engine-overview paragraph in the core-concepts skill still reads "an ordinary, exactly-pinned npm dependency of @prisma/composer (2.0.0-beta.78 at this library version)". A reader cross-checking this line against the manifests sees a version that no longer matches. The "exactly-pinned" claim itself is still accurate; only the version in parentheses is stale. The stale sentence sits on line 358, outside this PR's diffed hunks in the file, so it is recorded here without a line anchor.
    Recommended fix: Update the parenthetical to (2.0.0-beta.81 at this library version).

@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 critical or major Gizmo finding is open and the head commit has been reviewed. Approving.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>

@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 critical or major Gizmo finding is open and the head commit has been reviewed. Approving.

@wmadden-electric
wmadden-electric merged commit 8532530 into main Oct 8, 2026
25 checks passed
@wmadden-electric
wmadden-electric deleted the claude/effect-vitest-runtime-dep-19ccb8 branch October 8, 2026 08:35
kristof-siket added a commit that referenced this pull request Oct 8, 2026
Re-runs pnpm bump-minor on top of main to resolve the version conflicts with #348.

Signed-off-by: Kristof Siket <siket@prisma.io>
wmadden pushed a commit that referenced this pull request Oct 8, 2026
…rc.15; release v0.29.1 (#349)

* fix(deps): go back to alchemy 2.0.0-beta.78 so npm stops nesting prisma@8.0.0-rc.15

alchemy 2.0.0-beta.80 and later declare optional peers on exactly prisma@8.0.0-rc.15 and @prisma/orm-postgres@8.0.0-rc.11. Any other prisma version fails the peer, so npm installs a full nested prisma@8.0.0-rc.15 (with @prisma/cli-engine 0.4.0) under @prisma/composer and @prisma/composer-cli. The prisma CLI's conformance check then fails on that nested engine.

This reverts the dependency part of #348 and restores the pins it removed: alchemy 2.0.0-beta.78, effect 4.0.0-rc.115 and the exact @effect/* pins. beta.79 also lacks the peers, but its alchemy/Prisma entry fails to load without @alchemy.run/frontend-frameworks, and Composer imports alchemy/Prisma. beta.78 and beta.79 only work on effect rc.115, which still needs the @effect/vitest pin to keep npm on one effect copy.

ORM 8.0.0-rc.17 and cli-engine 0.7.0 from #345 stay.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>

* chore(release): v0.29.1

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>

* docs(deps): one effect override placeholder, and name both pin sites in the dedupe check's timeout message

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
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