Skip to content

fix(packaging): align React peer ranges for clean npm installs #780

Description

@ScriptedAlchemy

Problem

A clean npm consumer that installs agent-bundle with @agent-bundle/runtime can fail with ERESOLVE now that React 19.3.0 is published.

agent-bundle declares an exact optional peer:

"react": "19.2.8"

while @agent-bundle/runtime declares:

"react": "^19.2.0",
"react-dom": "^19.2.0"

Without React preinstalled, npm selects React/React DOM 19.3.0 for the runtime and then rejects agent-bundle's exact React 19.2.8 peer. This is a pre-existing manifest inconsistency surfaced while triaging #777; it is not caused by the rslint bump.

#777 pins React 19.2.8 and React DOM 19.2.8 in generated routed templates and in the packed bin-consumer harness. That restores release coverage for the supported consumer state, but the harness pin also stops the clean-consumer proof from detecting peer-range drift.

Acceptance

  • Align or safely widen the agent-bundle and @agent-bundle/runtime React peer ranges so a clean npm install resolves without explicit React preinstallation.
  • Preserve React/React DOM version compatibility rather than bypassing peer checks with --legacy-peer-deps or --force.
  • Remove the explicit React pins from scripts/run-packed-tests.mjs so its clean-consumer install detects future peer drift again.
  • Add a regression test for the clean npm consumer install.
  • Update the matching English and Chinese installation guidance.
  • Include exactly one changeset for the affected publishable package(s).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions