Skip to content

fix: declare effect as a peer dependency in published packages#876

Open
aryasaatvik wants to merge 1 commit into
RhysSullivan:mainfrom
aryasaatvik:fix/effect-peer-dependency
Open

fix: declare effect as a peer dependency in published packages#876
aryasaatvik wants to merge 1 commit into
RhysSullivan:mainfrom
aryasaatvik:fix/effect-peer-dependency

Conversation

@aryasaatvik
Copy link
Copy Markdown
Contributor

@aryasaatvik aryasaatvik commented May 30, 2026

Problem

The published @executor-js/* packages declare effect as a hard dependency. Since effect needs a single module instance for Context/service identity and type equality, a consumer pinning a different 4.0.0-beta.x ends up with a duplicated effect — services stop resolving, and TypeScript flags the two copies as incompatible.

Fix

Move effect from dependenciespeerDependencies (with a devDependencies mirror) in the 12 published library packages, so the consumer supplies the single shared instance. Matches how react / @effect/atom-react are already declared as peers.

The executor CLI (leaf binary) and private workspace packages keep effect as a regular dependency.

Verification

  • bun install → single effect@4.0.0-beta.59
  • turbo run typecheck → 34/34 pass
  • bun pm pack on @executor-js/sdkeffect under peerDependencies, not dependencies

effect requires a single module instance for Context/service identity and type equality. Declaring it as a hard dependency causes duplicate effect copies when a consumer pins a different 4.0.0-beta.x, breaking service resolution and surfacing as TypeScript reporting the two effect copies as incompatible.

Move effect to peerDependencies (with a devDependencies mirror) in the 12 published library packages. The executor CLI and private workspace packages keep effect as a regular dependency.
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.

1 participant