Repository navigation
ci: fail on an unmet peer dependency with pnpm peers check - #92
Merged
Merged
Conversation
beeline-cli pinned a cli-base outside cli-core's peer range. pnpm let cli-core use the app's own cli-base, so every local test passed; npm install of the packed CLI gave cli-core its own copy, and two cli-base copies crashed it at start. pnpm peers check reads the lockfile and exits 1 on an unmet peer. It runs first in ci.yml's checks, which upgrade keeps current in every CLI. strictPeerDependencies was tried and not used: it fires only when pnpm resolves again, so CI's --frozen-lockfile install passes a committed mismatch, and pnpm-workspace.yaml is a seed that upgrade does not carry. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged
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.
Task
IDEA-218: a cli-core/cli-base peer-version mismatch passed all local tests and crashed only the packed, npm-installed CLI. Catch it early, in the template.
Why
beeline-cli pinned cli-base 0.63.0 while cli-core wanted
>=0.65.0 <0.66.0. pnpm let cli-core use the app's own cli-base, so the dev build and tests worked.npm installof the packed CLI gave cli-core its own cli-base, and the two copies crashed it at start (beeline-cli PR #12).What
.github/workflows/ci.yml:pnpm peers checkfirst inchecks..github/is intemplate.jsonfiles, so every CLI gets it on its nextupgrade.CHANGELOG.md: Unreleased entry.Not used:
strictPeerDependencies: true. Measured on pnpm 11.28.8: it fails a fresh resolve or a local pin bump, but with a lockfile already in place,pnpm install --frozen-lockfile(what CI runs) exits 0 on the same mismatch. It also lives inpnpm-workspace.yaml, a seed thatupgradedoes not carry.Scope: the check fails on any unmet peer in the tree, not only cli-base. The template has none today.
Testing
On a scratch copy of the template with cli-base pinned to 0.64.0 (cli-core 0.495.0 wants
>=0.65.0 <0.66.0):pnpm install --frozen-lockfile --ignore-scripts→ exit 0 (the gap)checks, run as node-ci runs it (bash -eo pipefail -c) → exit 1,✕ unmet peer @wirecat/cli-base Installed: 0.64.0No peer dependency issues found🤖 Generated with Claude Code