fix(ci): build swap-widget before publishing packages - #12503
Conversation
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>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe swap widget package version is incremented to 0.5.1, and the package publishing workflow now runs its dedicated build step before publishing. ChangesSwap Widget Release
Estimated code review effort: 1 (Trivial) | ~5 minutes Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
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), nodist. Root cause: the publish workflow builds viapnpm 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, andclean:disteven removes any dist that might be lying around.pnpm -r publishthen happily packs it dist-less.Changes:
Build swap-widgetstep topublish-packages.ymlafterBuild Packages(the solution build must run first so the widget'stsccheck resolves workspace.d.tsoutput).Not touched:
build:packagesitself 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 fullpackages/*list; the remaining unreferenced packages — public-api, affiliate-dashboard, hdwallet-sandbox — areprivate: trueand skipped bypnpm -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.
None.
Testing
Engineering
Verified locally:
pnpm --filter @shapeshiftoss/swap-widget buildthennpm pack --dry-runinpackages/swap-widgetproduces the correct 5-file tarball (dist/index.js188 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 withnpm view @shapeshiftoss/swap-widget@0.5.1 dist.fileCount(expect 5, not 3).Operations
Screenshots (if applicable)
🤖 Generated with Claude Code
Summary by CodeRabbit
Bug Fixes
Chores