Skip to content

Commit daaf522

Browse files
committed
Update RELEASE protocol to publish workspace deps before main package
@cluesmith/codev depends on @cluesmith/codev-core (and @cluesmith/codev-types for the VS Code extension). When the workspace deps aren't on npm, npm install fails with E404. v3.0.0-rc.10 hit this — codev-core had to be published out-of-band to fix the install. Use pnpm filters to publish workspace deps first (idempotent — pnpm skips already-published versions), then the main package with the appropriate tag. Updates apply to RC publishing, stable publishing, and backport publishing.
1 parent 638b08f commit daaf522

1 file changed

Lines changed: 22 additions & 4 deletions

File tree

codev/protocols/release/protocol.md

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,24 @@ gh release create vX.Y.Z --title "vX.Y.Z Codename" --notes-file docs/releases/vX
113113

114114
### 7. Publish to npm
115115

116+
`@cluesmith/codev` has runtime dependencies on workspace packages (`@cluesmith/codev-core`, `@cluesmith/codev-types`). Those must be on npm **before** the main package, or `npm install -g @cluesmith/codev` will fail with E404. The VS Code extension (`packages/vscode`) also imports from these packages at runtime.
117+
118+
Use pnpm filters to publish the workspace deps first, then the main package. `pnpm publish` is idempotent — it skips versions already on the registry, so re-running is safe.
119+
116120
```bash
117-
cd packages/codev && pnpm publish
121+
# 1. Publish workspace dependencies (skips already-published versions)
122+
pnpm publish --filter '@cluesmith/codev-core' --filter '@cluesmith/codev-types' --no-git-checks --access public
123+
124+
# 2. Publish the main package with the appropriate tag
125+
cd packages/codev && pnpm publish --no-git-checks # stable → tag latest
126+
# OR
127+
cd packages/codev && pnpm publish --tag next --no-git-checks # RC → tag next
118128
```
119129

130+
**When to bump workspace dep versions:** if you've changed `packages/core/src/**` or `packages/types/src/**` since the last release, bump that package's version (`pnpm --filter @cluesmith/codev-core version patch`) before publishing. Otherwise the publish step will skip it (existing version) and consumers will get the old code.
131+
132+
**Verification:** the `Post-Release E2E Verification` GitHub Actions workflow (triggered automatically on release) installs the published tarball on macOS and Ubuntu. If it fails with E404 on a `@cluesmith/*` package, that workspace dep is missing from npm — publish it and re-run the workflow with `gh workflow run "Post-Release E2E Verification" -f version=X.Y.Z`.
133+
120134
### 8. Post to Discussion Forum
121135

122136
Announce the release in GitHub Discussions (Announcements category):
@@ -198,8 +212,9 @@ git commit -m "v1.7.0-rc.1"
198212
git tag -a v1.7.0-rc.1 -m "v1.7.0-rc.1 - Release candidate"
199213
git push && git push origin v1.7.0-rc.1
200214
201-
# Publish to "next" channel (NOT "latest")
202-
cd packages/codev && pnpm publish --tag next
215+
# Publish workspace deps first, then main package (see step 7 above for full details)
216+
pnpm publish --filter '@cluesmith/codev-core' --filter '@cluesmith/codev-types' --no-git-checks --access public
217+
cd packages/codev && pnpm publish --tag next --no-git-checks
203218
```
204219

205220
### RC → Stable Promotion
@@ -251,7 +266,10 @@ git add packages/codev/package.json pnpm-lock.yaml
251266
git commit -m "v1.6.1 - Backport: <fix description>"
252267
git tag -a v1.6.1 -m "v1.6.1 - Backport fix"
253268
git push origin release/1.6.x && git push origin v1.6.1
254-
cd packages/codev && pnpm publish
269+
270+
# Publish workspace deps first, then main package (see step 7 above for full details)
271+
pnpm publish --filter '@cluesmith/codev-core' --filter '@cluesmith/codev-types' --no-git-checks --access public
272+
cd packages/codev && pnpm publish --no-git-checks
255273
```
256274

257275
### When to Use RCs

0 commit comments

Comments
 (0)