Repository navigation
test: guard @wolfstar/http-framework peer ranges against the latest major - #125
Conversation
…ajor The v5 bump (#99) widened every plugin's peer range on main, but only plugin-i18next got a changeset, so npm still ships plugin-api 1.1.6 (^3.0.0), plugin-logger 0.2.0 (^3.4.0) and plugin-subcommands-advanced 2.0.4 (^3.1.0), leaving v5 projects with an unmet peer. - Add patch changesets for those three packages so the widened ranges get released. - Add tests/http-framework-peer-range.test.ts (runs in the CI unit job): every public package peering on @wolfstar/http-framework must devDepend on it, accept the version the workspace installs (kept on the latest release by Renovate), and accept the same majors as its siblings. - Add semver + @types/semver as root devDependencies for the range checks. - Document the check in AGENTS.md. Refs #121 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01RBWEHLtNzWNykJMPqeqqbB
◈ PR LensNote The title starts with
|
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Part of #121 (item 7): three plugins had their @wolfstar/http-framework peer range already widened to ^3.x || ^5.0.0 on main, but never shipped to npm because no changeset accompanied the widening. This adds the missing changesets plus a regression test so it can't happen silently again.
- Changesets: patch changesets for
plugin-api,plugin-logger, andplugin-subcommands-advanced, wording matching the existingplugin-i18next(#116) changeset. - Guard test (
tests/http-framework-peer-range.test.ts): failspnpm testwhen a package's http-framework peer range excludes the framework version the workspace devDepends on, when a package declaring the peer doesn't also devDepend on it, or when packages' peer ranges accept different majors from each other. AGENTS.md: documents the new check and the "widen every plugin's range + add a changeset per package" rule for future framework major bumps.- Root
package.json/pnpm-lock.yaml: addssemver/@types/semverdevDependencies used by the new test.
I verified this rather than taking the PR description at face value:
- Ran the new test against current
mainstate (pnpm install+vitest run tests/http-framework-peer-range.test.ts): 16/16 pass. Confirmed the 5 packages it picks up (plugin-api,plugin-gateway,plugin-i18next,plugin-logger,plugin-subcommands-advanced) are exactly the ones with a realpeerDependencies["@wolfstar/http-framework"]entry —plugin-cache/plugin-sharderare correctly excluded since neither declares that peer. - Reproduced the described failure by temporarily narrowing
plugin-logger's peer back to^3.4.0: the guard fails with the exact assertion message quoted in the PR body, confirming the test is a real regression guard and not theatre. Reverted the change afterward. - Checked the new changeset wording against
packages/plugin-i18next/CHANGELOG.md:13(the merged #116 changeset) — matches verbatim as claimed. - Confirmed
AGENTS.md's new bullet accurately describes the test's three failure conditions.
No behavioral, correctness, or convention issues found.
Claude Sonnet | 𝕏

🔗 Linked issue
Part of #121 (item 7: published peer ranges lag behind
main).🧭 Context
The
@wolfstar/http-frameworkv5 bump (#99) widened every plugin's peer range onmain, but onlyplugin-i18nextgot a changeset (#116). The issue is right, and the earlier bot comment saying these ranges were already published is wrong. I checked npm live withnpm view <pkg> peerDependencies version: three plugins still publish^3-only peer ranges.mainpeer@wolfstar/plugin-api^3.0.0^3.0.0 || ^5.0.0@wolfstar/plugin-logger^3.4.0^3.4.0 || ^5.0.0@wolfstar/plugin-subcommands-advanced^3.1.0^3.1.0 || ^5.0.0@wolfstar/plugin-i18next^3.1.0 || ^5.0.0@wolfstar/plugin-gateway^3.4.0 || ^5.0.0mainhad no pending.changeset/*.mdfor any of them, so the widened ranges were never going to be released.📚 Description
Publishing: patch changesets for
plugin-api,plugin-loggerandplugin-subcommands-advanced, so the next release publishes the ranges that are already onmain. They use the same wording as fix(plugin-i18next): restore T/FT/resolveKey/resolveUserKey shims and release the v5 peer range #116.Guard:
tests/http-framework-peer-range.test.tsruns offline as part ofpnpm test, so it runs in the CIunitjob. It covers every public package that declares a@wolfstar/http-frameworkpeer, and fails when any of these is false:semver.satisfies). Renovate keeps that devDependency on the latest release, so a new major shows up as a red check instead of an unmet peer for consumers.semver.intersectsper major). Lower bounds can still differ.Each failure message names the package, file, range and version, and says to add a changeset.
I checked that the guard fails. Temporarily narrowing
plugin-loggerback to^3.4.0gives:Key changes
.changeset/{plugin-api,plugin-logger,plugin-subcommands-advanced}-http-framework-v5.md: patch changesets.tests/http-framework-peer-range.test.ts: the new guard.package.json/pnpm-lock.yaml:semverand@types/semverdevDependencies, added withpnpm add -Dw.AGENTS.md: documents the check, and the rule to widen every range and add a changeset per package on a framework major bump.Type of Change
Pre-flight Checklist
main)AGENTS.md)pnpm changeset🤖 Generated with Claude Code
https://claude.ai/code/session_01RBWEHLtNzWNykJMPqeqqbB
Generated by Claude Code