Skip to content

fix(ci): build swap-widget before publishing packages - #12503

Merged
kaladinlight merged 2 commits into
developfrom
fix/publish-swap-widget-build
Jul 28, 2026
Merged

fix(ci): build swap-widget before publishing packages#12503
kaladinlight merged 2 commits into
developfrom
fix/publish-swap-widget-build

Conversation

@kaladinlight

@kaladinlight kaladinlight commented Jul 28, 2026

Copy link
Copy Markdown
Member

Description

Every npm-published version of @shapeshiftoss/swap-widget (0.2.0–0.5.0) is an empty package — 3 files (package.json/README/LICENSE), no dist. Root cause: the publish workflow builds via pnpm run build:packages, which is the tsc solution build (tsconfig.packages.json) — swap-widget builds with tsup and is not (and can't be) in that reference list, and clean:dist even removes any dist that might be lying around. pnpm -r publish then happily packs it dist-less.

Changes:

  • Add an explicit Build swap-widget step to publish-packages.yml after Build Packages (the solution build must run first so the widget's tsc check resolves workspace .d.ts output).
  • Patch bump swap-widget to 0.5.1 so a working package publishes on merge to main (npm won't accept a republish of 0.5.0; the empty versions are permanent).

Not touched: build:packages itself stays web-only — the widget isn't a web dependency, so web builds don't pay the widget build cost. All other public packages are covered by the solution build (verified against the full packages/* list; the remaining unreferenced packages — public-api, affiliate-dashboard, hdwallet-sandbox — are private: true and skipped by pnpm -r publish).

Issue (if applicable)

closes #

Risk

Low — CI workflow + version bump only. No runtime code changes. Worst case the new step fails and blocks the publish job, which currently publishes a broken artifact anyway.

What protocols, transaction types, wallets or contract interactions might be affected by this PR?

None.

Testing

Engineering

Verified locally: pnpm --filter @shapeshiftoss/swap-widget build then npm pack --dry-run in packages/swap-widget produces the correct 5-file tarball (dist/index.js 188 kB, dist/index.d.ts, dist/index.css, README, package.json) vs the 3-file empty tarball on npm today. After merge to main, confirm the publish run ships 0.5.1 with npm view @shapeshiftoss/swap-widget@0.5.1 dist.fileCount (expect 5, not 3).

Operations

  • 🏁 No user-facing impact — CI publish pipeline only

Screenshots (if applicable)

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes

    • Improved the package release process by ensuring the swap widget is explicitly built before publishing.
  • Chores

    • Updated the swap widget package version to 0.5.1.

swap-widget builds with tsup and is not part of the tsc solution build in
build:packages, so every published version (0.2.0-0.5.0) shipped without
dist - an empty package. Add an explicit build step to the publish
workflow and patch bump to 0.5.1 so a working package publishes on merge.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@kaladinlight
kaladinlight requested a review from a team as a code owner July 28, 2026 21:17
@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: b27b8713-d76e-451a-bed9-038c727dbade

📥 Commits

Reviewing files that changed from the base of the PR and between 0b8eb75 and 19e91f6.

📒 Files selected for processing (2)
  • .github/workflows/publish-packages.yml
  • packages/swap-widget/package.json

📝 Walkthrough

Walkthrough

The swap widget package version is incremented to 0.5.1, and the package publishing workflow now runs its dedicated build step before publishing.

Changes

Swap Widget Release

Layer / File(s) Summary
Release build and version update
.github/workflows/publish-packages.yml, packages/swap-widget/package.json
The package version changes from 0.5.0 to 0.5.1, and publishing explicitly builds @shapeshiftoss/swap-widget after the shared package build.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

Suggested reviewers: 0xapotheosis

Poem

A rabbit packs the widget tight,
Builds it clean before the flight.
Version five-one joins the trail,
Then tags and ships beyond the rail.
Hop, hop—release without fail!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main CI change: building swap-widget before package publishing.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/publish-swap-widget-build

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@kaladinlight
kaladinlight enabled auto-merge (squash) July 28, 2026 21:32
@kaladinlight
kaladinlight merged commit dffc530 into develop Jul 28, 2026
4 checks passed
@kaladinlight
kaladinlight deleted the fix/publish-swap-widget-build branch July 28, 2026 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant