Skip to content

ci: guard against publishing a package without dist - #54

Merged
bhouston merged 1 commit into
mainfrom
ci/guard-dist-in-tarball
Sep 24, 2026
Merged

bhouston merged 1 commit into
mainfrom
ci/guard-dist-in-tarball

Conversation

@bhouston

Copy link
Copy Markdown
Owner

Summary

  • A sibling project (tanstack-router-ga4) shipped v1.6.1 to npm without its dist/ directory because the release job published from a checkout where dist was never built (v1.6.1 npm package is missing the dist directory tanstack-router-ga4#26, fixed in test(ci): guard against publishing a package without dist tanstack-router-ga4#27).
  • hdrify's release workflow already runs pnpm build before pnpm release, and the currently published tarballs for hdrify, hdrify-cli, and hdrify-react were confirmed to include dist/. But there was no regression guard, so a future change to the build step, a package's files field, or the release workflow could silently break packaging again.
  • This PR adds a CI step after pnpm build that runs pnpm pack --dry-run for each of the three npm-published packages and fails if dist/index.js is missing from the tarball listing.

Validation

  • pnpm build && pnpm tsc && pnpm lint && pnpm test --coverage && pnpm release:check && pnpm size all pass locally.
  • Manually confirmed the new check passes against the current build output for all three packages.
  • pnpm audit --audit-level=high reviewed; pre-existing advisories only, unrelated to this change.

Closes #53

Add a step after pnpm build that packs each of the three npm-published
packages (hdrify, cli, hdrify-react) with pnpm pack --dry-run and fails
if dist/index.js is missing from the tarball listing.

A sibling project shipped a release without dist because its release
job published from a checkout that never built dist
(bhouston/tanstack-router-ga4#26). hdrify's release workflow already
builds before publishing, but there was no regression guard.

Closes #53
@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@bhouston
bhouston merged commit 41ea0ef into main Sep 24, 2026
2 checks passed
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.

ci: guard against publishing a package without dist

2 participants