fix(release): rewrite preview peer ranges via --peerDeps so npm installs matched pkg.pr.new pairs cleanly - #46
Conversation
…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.
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
commit: |
…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.
Summary
Installing both pkg.pr.new previews with npm hard-fails with
ERESOLVE: previews are versioned0.0.0-preview-<sha>, which does not satisfy theagent-bundle@^0.1.0peer range that@agent-bundle/rsc-runtimeships even in its preview tarball. This lands direction 1 from the issue: add--peerDepstopreview:publish.Per the pinned
pkg-pr-new@0.0.88source,--previewVersionalone only rewrites theversionfield — its help text claims cross-package peerDependencies are updated to match, but peer rewriting (hijackDeps(realDeps, pJson.peerDependencies)) only runs when--peerDepsis set, which is what builds therealDepsmap. With both flags, the preview tarball'sagent-bundlepeer range becomes the exact0.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 (writeDepsrestores the sourcepackage.jsonafter 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