fix(cli): pin shared Effect dependency for npm installs #11240
main fromrefs/pull/11240/head·merged by juliusmarminge View on GitHubFresh npm installs can hang in an ERESOLVE loop because the pinned Effect platform packages allow newer @effect/platform-node-shared prereleases. npm selects rc.114, whose effect peer is unavailable, and ignores T3's published overrides because T3 is a dependency rather than the install root. Remote Update eventually fails at the install timeout.
Declare @effect/platform-node-shared as a direct catalog dependency so the published package pins it alongside the other Effect packages. Keep the intentional transitive pin in Knip's dependency exclusions. This fixes the package consumed by existing updaters and fresh npm installs once a new release is published; it does not repair existing npm tarballs.
Refs #11208. This is a smaller package-level alternative to the installer changes in #11232.
Validation:
- Built the web client and server CLI from upstream main plus this change.
- Exercised the publish command's metadata preparation and restoration with its publish subprocess redirected to
vp pm pack(no registry publication). - Installed the resulting tarball outside the workspace with an empty npm cache: 141 packages installed in 10 seconds on macOS arm64, Node 24.12.0 / npm 11.17.0.
npm ls effect @effect/platform-node-shared --allshows one deduplicated rc.112 version of each; the installed CLI's__service-preflightreturnedreadywith launcher protocol 2.- All 15 CLI packaging tests pass; frozen-lockfile install, scoped Knip dependency check, formatting, and
git diff --checkpass.
Model: GPT-6. Harness: Codex.
Summary by CodeRabbit#
- Chores
- Added a runtime dependency to improve compatibility for standalone server package installations.
- Updated dependency analysis configuration to account for the new runtime dependency.
- 1
github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:XS
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Advanced
Run ID:
dc715ea3-21c0-4400-8150-0ddaac2e8a6c📥 Commits
Reviewing files that changed from the base of the PR and between 211618fd9fe39d3dde01171a6856ce9f633571c9 and 7791e62cbe00cf3aba1eea36fae0132e66831d17.
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (2)
apps/server/package.jsonknip.jsonc
Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review.
📝 Walkthrough
Walkthrough#
The server adds
@effect/platform-node-sharedas a catalog-pinned dependency. Knip ignores this dependency and documents its transitive runtime purpose for standalone npm installs.Changes#
Server runtime dependency
Layer / File(s) Summary Runtime dependency declaration
apps/server/package.json,knip.jsoncThe server declares @effect/platform-node-sharedthrough the workspace catalog. Knip ignores the dependency and documents its transitive runtime purpose.Priority: ⬇️ Low
Estimated code review effort: 1 (Trivial) | ~3 minutes
Change: Bug fix
Suggested reviewers:
juliusmarmingeMerge Risk: ⚪ Minimal · up to
7791eThe dependency pin is ready to merge and addresses fresh-install resolution without introducing an identified runtime risk.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation Title check ✅ Passed The title clearly and concisely describes the primary change: pinning the shared Effect dependency for npm installs. Description check ✅ Passed The description explains what changed, why it was needed, scope limitations, references, and validation results. It does not use the template headings or checklist format, but it provides the required… Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0… Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request. Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request. ✨ Finishing Touches
🧪 Generate unit tests (beta)
- Create PR with unit tests
Comment `@coderabbitai help` to get the list of available commands.juliusmarminge merged this5eecc24
juliusmarminge closed this
Thanks for this fix and getting it so quick 😁
Sign in to join this conversation.
Approvability#
Verdict: Not approved
Macroscope's review found this PR not approvable — This one-file change only affects Knip's dependency analysis and does not alter production execution, but it adds an ignoreDependencies entry that can suppress an unused-dependency diagnostic. The suppression warrants deliberate human review.
You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).