Skip to content

feat(build): publint publish gate, types on by default, clear entry errors#52

Draft
natemoo-re wants to merge 1 commit into
mainfrom
feat/build-publish-gate
Draft

feat(build): publint publish gate, types on by default, clear entry errors#52
natemoo-re wants to merge 1 commit into
mainfrom
feat/build-publish-gate

Conversation

@natemoo-re

Copy link
Copy Markdown
Member

Summary

Session logs showed bsh publint essentially never ran (zero violations across all logs) — it was a standalone command nobody remembered, while bsh build happily emitted publish-broken artifacts. And "dts only emits with the flag" was a recurring discovery tax: packages went out without types.

  • publint (strict) now runs after every successful bsh build against the emitted dist/ and fails the build on errors. Post-build is the right moment — publint's file-existence checks need dist/ to exist.
  • .d.mts generation is now default (--no-dts opts out). If package.json declares types that aren't emitted, the build fails.
  • Empty entry globs fail clearly (No entry files matched: … + cwd + hint) instead of tsdown's opaque Error: undefined Cannot find entry.
  • bsh publint renders real messages via publint's formatMessage instead of bare rule codes.

Validation

  • --no-dts on this repo correctly fails the gate: pkg.exports["./test-utils"].types is ./dist/test-utils/index.d.mts but the file does not exist
  • Empty-dir build produces the new actionable error
  • cooper/packages/identity builds clean with one advisory USE_FILES suggestion
  • This repo's own build script drops the now-redundant --dts flag

Includes changeset (minor).

…rrors

- bsh build runs publint (strict) against dist/ and fails on errors
- dts generation now defaults on; --no-dts opts out
- empty entry globs fail with an actionable message
- publint violations render full messages, not bare codes
@changeset-bot

changeset-bot Bot commented Jul 23, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 02e7a43

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@bomb.sh/tools Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pkg-pr-new

pkg-pr-new Bot commented Jul 23, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@bomb.sh/tools@52

commit: 02e7a43

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