fix: pin @effex/core exactly in @effex/platform to avoid split copies#44
Merged
Conversation
Platform's dep on @effex/core was 'workspace:^', which publishes as '^X.Y.Z' — a range. Every other internal package uses 'workspace:*', which publishes as the exact current version. When both are installed, pnpm can end up with two different @effex/core copies in node_modules — and two copies means Effect Context tags declared in one don't unify with the other, silently breaking cross-package interactions. Switched to 'workspace:*'. Published @effex/platform now pins @effex/core to a single exact version, matching how dom/router/form work. Every core bump will now force a platform patch bump too, which was already the effective behaviour for the other internal packages. Peer deps on @effex/dom and @effex/router stay on workspace:^ — those are peers the user installs, and semver ranges are appropriate there. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Deploying effex with
|
| Latest commit: |
bed39a9
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://35755845.effex.pages.dev |
| Branch Preview URL: | https://fix-platform-pin-core.effex.pages.dev |
Deploying effex-api with
|
| Latest commit: |
bed39a9
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://90a80ffc.effex-api.pages.dev |
| Branch Preview URL: | https://fix-platform-pin-core.effex-api.pages.dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Confirmed by inspecting a downstream user's lockfile — two `@effex/core` copies coexist in `node_modules`:
```
@effex/core: 1.1.1 (via @effex/dom, @effex/router)
@effex/core: 1.1.0 (via @effex/platform)
```
Same class of bug as the `effect` dedup issue we fixed earlier. Two Effect Context tags with the same name declared in two different `@effex/core` modules don't unify — Signal/Readable/ControlCtx flowing through platform-provided layers doesn't reach dom/router-consuming components. Silent breakage of cross-package interactions.
Root cause
`packages/platform/package.json` had:
```json
"@effex/core": "workspace:^"
```
That publishes as `^X.Y.Z` — a semver range. `@effex/dom`, `@effex/router`, and `@effex/form` all use `"workspace:*"`, which publishes as the exact current version. So the published dep graph looks like:
```
@effex/dom@1.3.0 → @effex/core@1.1.1 (exact)
@effex/router@1.2.5 → @effex/core@1.1.1 (exact)
@effex/platform@1.2.1 → @effex/core@^1.1.0 (range)
```
pnpm can't always hoist to a single version — it may resolve platform's range to a different core than the exact-pinned packages, keeping both in the tree.
Fix
Switched platform's `@effex/core` to `"workspace:*"`. It now publishes as the exact current core version, matching dom/router/form. pnpm gets exact-vs-exact constraints, which can only hoist to one core.
What this does NOT change
Platform's peer deps on `@effex/dom` and `@effex/router` stay on `workspace:^`. Those are peer deps — the user installs them themselves — and semver ranges are appropriate for user-controlled deps. Same for `vite-plugin`'s peer dep on `@effex/platform`.
Downstream consequence
Every future `@effex/core` bump now forces a `@effex/platform` patch bump too. That was already the effective behaviour for dom/router/form — this just brings platform into line.
Test plan
🤖 Generated with Claude Code