Skip to content

fix(release): rewrite preview peer ranges via --peerDeps so npm installs matched pkg.pr.new pairs cleanly - #46

Merged
ScriptedAlchemy merged 2 commits into
mainfrom
fix/preview-peer-ranges
Aug 30, 2026
Merged

fix(release): rewrite preview peer ranges via --peerDeps so npm installs matched pkg.pr.new pairs cleanly#46
ScriptedAlchemy merged 2 commits into
mainfrom
fix/preview-peer-ranges

Conversation

@ScriptedAlchemy

Copy link
Copy Markdown
Owner

Summary

Installing both pkg.pr.new previews with npm hard-fails with ERESOLVE: previews are versioned 0.0.0-preview-<sha>, which does not satisfy the agent-bundle@^0.1.0 peer range that @agent-bundle/rsc-runtime ships even in its preview tarball. This lands direction 1 from the issue: add --peerDeps to preview:publish.

Per the pinned pkg-pr-new@0.0.88 source, --previewVersion alone only rewrites the version field — its help text claims cross-package peerDependencies are updated to match, but peer rewriting (hijackDeps(realDeps, pJson.peerDependencies)) only runs when --peerDeps is set, which is what builds the realDeps map. With both flags, the preview tarball's agent-bundle peer range becomes the exact 0.0.0-preview-<sha> of the same run, so a matched pair installs cleanly with stock npm, and a mixed-sha pair now fails loudly instead of being silently accepted. Preview tarballs only; the manifests destined for npm are untouched (writeDeps restores the source package.json after packing).

Verification

Smoke-tested against this PR's own preview publish: plain npm install (no --legacy-peer-deps) of both preview URLs into a clean temp project, then import both entrypoints. Results in the PR conversation.

Closes #45

…airs install cleanly with npm

pkg-pr-new's --previewVersion rewrites package versions to
0.0.0-preview-<sha> but leaves rsc-runtime's agent-bundle@^0.1.0 peer
range untouched (despite its help text), so npm hard-fails with
ERESOLVE on the documented two-package install. --peerDeps rewrites
workspace peer ranges to the exact preview version in the preview
tarballs only; npm manifests are unaffected.
@changeset-bot

changeset-bot Bot commented Aug 30, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 3db7cf3

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 30, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-08-30T03:05:33.971453Z 66f29fc PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@pkg-pr-new

pkg-pr-new Bot commented Aug 30, 2026

Copy link
Copy Markdown
npm i https://pkg.pr.new/ScriptedAlchemy/agent-bundle@46
npm i https://pkg.pr.new/ScriptedAlchemy/agent-bundle/@agent-bundle/rsc-runtime@46

commit: 3db7cf3

…eview pairs install cleanly

Documents the --peerDeps rewrite, the by-design ERESOLVE for mixed-sha
pairs, and the remaining workaround for previews older than this fix.
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.

npm install of both pkg.pr.new previews hard-fails with ERESOLVE: 0.0.0-preview-<sha> does not satisfy rsc-runtime peer range agent-bundle@^0.1.0

1 participant