Skip to content

Commit 935593a

Browse files
apostoliclaude
andcommitted
fix(release): swap to bun publish; ship [email protected]
The 0.1.4 svelte tarball on npm has `@somewhatintelligent/cc-ws-client: "workspace:*"` literally because `changeset publish` shells out to `npm publish` per-package, which only rewrites Bun's workspace protocol when invoked via `npm publish --workspaces` from the repo root, not when cd'd into a single package. Tracking issues: - changesets/changesets#1468 - oven-sh/bun#16074 Pipeline now uses `bun publish` per package — bun rewrites `workspace:*` to the resolved version natively. Release script iterates `packages/*`, runs `bun publish --access public || true` (the `|| true` swallows already-published errors so 0.1.4 packages are no-ops), then `changeset tag` for git tags. Workflow writes `.npmrc` upfront so `bun publish` authenticates. Bumps `@somewhatintelligent/cc-ws-svelte` 0.1.4 → 0.1.5; deprecation of 0.1.4 follows once 0.1.5 lands. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
1 parent 26fef51 commit 935593a

6 files changed

Lines changed: 29 additions & 12 deletions

File tree

‎.github/workflows/release.yml‎

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,24 @@ jobs:
2626
with:
2727
bun-version: latest
2828

29+
# `bun publish` reads .npmrc for the auth token (changesets/action only
30+
# writes it for npm publish, which we no longer use — workspace:*
31+
# protocol leaks through changeset's per-package npm publish).
32+
- name: Setup npmrc
33+
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc
34+
2935
- name: Install dependencies
3036
run: bun install --frozen-lockfile
3137

3238
- name: Test
3339
run: bun test
3440

35-
- name: Build
36-
run: bun run build
37-
38-
# Two-mode action: if there are pending changesets in `.changeset/`,
39-
# opens (or updates) a "Version Packages" PR that consumes them and
40-
# bumps versions. If the head of trunk has no pending changesets
41-
# (i.e. that PR was just merged), runs `publish` to push the bumped
42-
# packages to npm.
41+
# Two-mode action: pending changesets in `.changeset/` → opens (or
42+
# updates) a "Version Packages" PR that consumes them and bumps
43+
# versions. No pending changesets (PR was just merged) → runs
44+
# `release`, which builds + iterates packages/* with `bun publish`
45+
# (which natively rewrites `workspace:*` to the resolved version,
46+
# unlike `changeset publish`).
4347
- name: Create release PR or publish
4448
id: changesets
4549
uses: changesets/action@v1

‎apps/web/CHANGELOG.md‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# @somewhatintelligent/cc-ws-web
22

3+
## 0.1.2
4+
5+
### Patch Changes
6+
7+
- Updated dependencies
8+
- @somewhatintelligent/cc-ws-svelte@0.1.5
9+
310
## 0.1.1
411

512
### Patch Changes

‎apps/web/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@somewhatintelligent/cc-ws-web",
3-
"version": "0.1.1",
3+
"version": "0.1.2",
44
"private": true,
55
"type": "module",
66
"scripts": {

‎package.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
"build": "bun --filter './packages/element' build",
1313
"test": "bun test",
1414
"changeset": "changeset",
15-
"version": "changeset version",
16-
"release": "bun run build && changeset publish"
15+
"version": "changeset version && bun install",
16+
"release": "bun run build && for dir in packages/*; do (cd \"$dir\" && bun publish --access public || true); done && changeset tag"
1717
},
1818
"devDependencies": {
1919
"@changesets/cli": "^2.31.0",

‎packages/svelte/CHANGELOG.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# @somewhatintelligent/cc-ws-svelte
22

3+
## 0.1.5
4+
5+
### Patch Changes
6+
7+
- Republish to fix `workspace:*` leak. The 0.1.4 tarball on npm has its `@somewhatintelligent/cc-ws-client` dependency literally as `"workspace:*"` because `changeset publish` (which shells out to `npm publish` per package) does not rewrite Bun's workspace protocol — see [changesets#1468](https://github.com/changesets/changesets/issues/1468) and [bun#16074](https://github.com/oven-sh/bun/issues/16074). The release pipeline now uses `bun publish` per package, which rewrites `workspace:*` to the resolved version. 0.1.4 is deprecated; use 0.1.5+.
8+
39
## 0.1.4
410

511
### Patch Changes

‎packages/svelte/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@somewhatintelligent/cc-ws-svelte",
3-
"version": "0.1.4",
3+
"version": "0.1.5",
44
"description": "Svelte 5 adapter for the cc-ws reactive client; typed context injection plus re-exports.",
55
"license": "MIT",
66
"type": "module",

0 commit comments

Comments
 (0)