Skip to content

test: guard @wolfstar/http-framework peer ranges against the latest major - #125

Merged
kodiakhq[bot] merged 2 commits into
mainfrom
claude/issue-121-peer-range-check
Sep 26, 2026
Merged

kodiakhq[bot] merged 2 commits into
mainfrom
claude/issue-121-peer-range-check

Conversation

@RedStar071

Copy link
Copy Markdown
Member

🔗 Linked issue

Part of #121 (item 7: published peer ranges lag behind main).

🧭 Context

The @wolfstar/http-framework v5 bump (#99) widened every plugin's peer range on main, but only plugin-i18next got a changeset (#116). The issue is right, and the earlier bot comment saying these ranges were already published is wrong. I checked npm live with npm view <pkg> peerDependencies version: three plugins still publish ^3-only peer ranges.

Package npm latest npm peer main peer
@wolfstar/plugin-api 1.1.6 ^3.0.0 ^3.0.0 || ^5.0.0
@wolfstar/plugin-logger 0.2.0 ^3.4.0 ^3.4.0 || ^5.0.0
@wolfstar/plugin-subcommands-advanced 2.0.4 ^3.1.0 ^3.1.0 || ^5.0.0
@wolfstar/plugin-i18next 2.1.0 ^3.1.0 || ^5.0.0 same ✅
@wolfstar/plugin-gateway 0.1.1 ^3.4.0 || ^5.0.0 same ✅

main had no pending .changeset/*.md for any of them, so the widened ranges were never going to be released.

📚 Description

  • Publishing: patch changesets for plugin-api, plugin-logger and plugin-subcommands-advanced, so the next release publishes the ranges that are already on main. 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.ts runs offline as part of pnpm test, so it runs in the CI unit job. It covers every public package that declares a @wolfstar/http-framework peer, and fails when any of these is false:

    1. The package also devDepends on the framework, and it is installed for that package.
    2. The peer range accepts the newest framework version installed in the workspace (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.
    3. All packages accept the same set of majors (semver.intersects per 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-logger back to ^3.4.0 gives:

AssertionError: @wolfstar/plugin-logger (packages/plugin-logger/package.json) has peerDependencies["@wolfstar/http-framework"] = "^3.4.0", which excludes 5.1.0, the version the workspace installs. Widen it (e.g. "^3.4.0 || ^5.0.0") and add a patch changeset so the new range gets published.

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.
  • Root package.json / pnpm-lock.yaml: semver and @types/semver devDependencies, added with pnpm 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

  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation change
  • Workflow / CI change

Pre-flight Checklist

  • I have read the Contributing Guidelines (if applicable)
  • My code follows the code style of this project
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes (42 files, 459 tests after merging main)
  • I have updated the documentation accordingly (AGENTS.md)
  • I added a changeset with pnpm changeset

🤖 Generated with Claude Code

https://claude.ai/code/session_01RBWEHLtNzWNykJMPqeqqbB


Generated by Claude Code

…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
@coldtea-pr-lens

Copy link
Copy Markdown

◈ PR Lens

Note

The title starts with test:, so PR Lens left this pull request undrawn. Comment @pr-lens draw to draw it

github.comment.notice: false in .github/pr-lens.yml turns this note off

@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​types/​semver@​7.8.01001007483100

View full report

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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, and plugin-subcommands-advanced, wording matching the existing plugin-i18next (#116) changeset.
  • Guard test (tests/http-framework-peer-range.test.ts): fails pnpm test when 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: adds semver/@types/semver devDependencies used by the new test.

I verified this rather than taking the PR description at face value:

  • Ran the new test against current main state (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 real peerDependencies["@wolfstar/http-framework"] entry — plugin-cache/plugin-sharder are 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.

Pullfrog  | View workflow run | Using Claude Sonnet | 𝕏

@kodiakhq
kodiakhq Bot merged commit 27f8d59 into main Sep 26, 2026
14 of 15 checks passed
@kodiakhq
kodiakhq Bot deleted the claude/issue-121-peer-range-check branch September 26, 2026 22:01
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.

2 participants