From 66f29fcd132b9b5c001a9170d0b05a420d8d8a13 Mon Sep 17 00:00:00 2001 From: ScriptedAlchemy Date: Sun, 30 Aug 2026 03:03:14 +0000 Subject: [PATCH 1/2] fix(release): pass --peerDeps to preview:publish so matched preview pairs install cleanly with npm pkg-pr-new's --previewVersion rewrites package versions to 0.0.0-preview- 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. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 988012fa3..73fa4590f 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "changeset": "changeset", "version-packages": "changeset version", "release": "pnpm build && changeset publish", - "preview:publish": "pkg-pr-new publish --previewVersion --no-compact --no-template './packages/agent-bundle' './packages/rsc-runtime'", + "preview:publish": "pkg-pr-new publish --previewVersion --peerDeps --no-compact --no-template './packages/agent-bundle' './packages/rsc-runtime'", "pack:dry-run": "pnpm build && npm pack ./packages/agent-bundle --dry-run --json", "audit:release": "pnpm lint:package && attw --pack --profile esm-only packages/agent-bundle && node scripts/audit-packed-release.mjs", "check:release": "pnpm pack:dry-run && pnpm audit:release && pnpm test:packed", From 3db7cf38c2456fa35cde9523ba1b166a933aa0bd Mon Sep 17 00:00:00 2001 From: ScriptedAlchemy Date: Sun, 30 Aug 2026 03:11:18 +0000 Subject: [PATCH 2/2] docs(preview): drop the --legacy-peer-deps caveat now that matched preview 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. --- docs/preview-packages.md | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/docs/preview-packages.md b/docs/preview-packages.md index 37a3fff76..ec142f2a8 100644 --- a/docs/preview-packages.md +++ b/docs/preview-packages.md @@ -33,17 +33,22 @@ npm i https://pkg.pr.new/ScriptedAlchemy/agent-bundle/@agent-bundle/rsc-runtime@ pnpm and yarn accept the same URLs (`pnpm add `, `yarn add agent-bundle@`). -Previews carry the version string `0.0.0-preview-`, which does not satisfy -the `agent-bundle@^0.1.0` peer range declared by `@agent-bundle/rsc-runtime`. -When installing both previews into the same project with npm, add -`--legacy-peer-deps`; pnpm reports the mismatch as a warning and proceeds. +Previews carry the version string `0.0.0-preview-`, and the publish +rewrites the `agent-bundle` peer range inside the `@agent-bundle/rsc-runtime` +preview tarball to that exact preview version (`--peerDeps`). Installing both +packages from the same sha therefore works with stock npm — no +`--legacy-peer-deps` needed. Mixing two different shas fails with `ERESOLVE` +by design; use one sha (or one PR number) for both URLs. Previews published +before the peer rewrite landed (PR #46) still carry the original +`agent-bundle@^0.1.0` range, so pair-installing those older shas with npm +still requires `--legacy-peer-deps`. ## Where previews come from `.github/workflows/package-preview.yml` runs -`pnpm preview:publish` (`pkg-pr-new publish --previewVersion --no-compact ---no-template './packages/agent-bundle' './packages/rsc-runtime'`) after a -full build, on every pull request and on every push to `main`. Runs for +`pnpm preview:publish` (`pkg-pr-new publish --previewVersion --peerDeps +--no-compact --no-template './packages/agent-bundle' './packages/rsc-runtime'`) +after a full build, on every pull request and on every push to `main`. Runs for `main` pushes use a per-commit concurrency group, so overlapping pushes cannot cancel one another and every `main` commit has an installable snapshot. (PR runs cancel superseded builds for the same PR — only the