Skip to content

Commit 6834cd9

Browse files
Nick Ficanoclaude
andcommitted
fix(publish): pnpm pack to resolve workspace:* before npm publish
@agentruntimecontrolprotocol/sdk@1.0.1 shipped its internal workspace:* deps unresolved, so installs failed with EUNSUPPORTEDPROTOCOL. publish.yml now packs each package with `pnpm pack` (which rewrites workspace:* to the concrete versions) and publishes the resulting tarball, preserving npm OIDC provenance. Includes a changeset bumping the sdk meta-package to 1.0.2. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent ddbdc17 commit 6834cd9

2 files changed

Lines changed: 17 additions & 2 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@agentruntimecontrolprotocol/sdk": patch
3+
---
4+
5+
fix(publish): pack with `pnpm pack` before `npm publish` so internal `workspace:*` deps resolve to concrete versions in the published manifest. 1.0.1 shipped `workspace:*` unresolved and failed to install with `EUNSUPPORTEDPROTOCOL`.

.github/workflows/publish.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,15 @@ jobs:
123123
# publishConfig in each package.json carries access=public and
124124
# provenance=true; --provenance here is the CLI counterpart that
125125
# activates the OIDC token flow in GitHub Actions.
126-
(cd "$dir" && npm publish --provenance --registry=https://registry.npmjs.org)
126+
#
127+
# Pack with pnpm first: `npm publish` does NOT rewrite the
128+
# `workspace:*` protocol in internal deps, so publishing the dir
129+
# directly leaks `workspace:*` into the registry manifest and
130+
# makes the package uninstallable (EUNSUPPORTEDPROTOCOL). `pnpm
131+
# pack` resolves workspace:* to the concrete versions in the
132+
# produced tarball; we then publish that tarball.
133+
tarball="$(cd "$dir" && pnpm pack --pack-destination "${RUNNER_TEMP:-/tmp}" | tail -n1)"
134+
npm publish "$tarball" --provenance --registry=https://registry.npmjs.org
127135
published=$((published + 1))
128136
fi
129137
done < .publish-dirs.txt
@@ -161,7 +169,9 @@ jobs:
161169
skipped=$((skipped + 1))
162170
else
163171
echo "[publish] $name@$local_ver (GitHub Packages has '${gh_ver:-nothing}')"
164-
(cd "$dir" && npm publish --registry=https://npm.pkg.github.com)
172+
# pnpm pack to resolve workspace:* (see npm step above for why).
173+
tarball="$(cd "$dir" && pnpm pack --pack-destination "${RUNNER_TEMP:-/tmp}" | tail -n1)"
174+
npm publish "$tarball" --registry=https://npm.pkg.github.com
165175
published=$((published + 1))
166176
fi
167177
done < .publish-dirs.txt

0 commit comments

Comments
 (0)