Repository navigation
fix(bindx-ui): ship the CLI bundle the bin points to - #161
Merged
Merged
Conversation
Member
Author
Review round 1Reviewer: Claude agent (Opus 5.5, general-purpose subagent, independent brief without the author's conclusions) Verified by the reviewer: Findings
|
Member
Author
The bindx-ui CLI was bundled only by the package's own build script, which the publish flow never runs, so the published tarball lacked dist/cli/cli.js. Move the bundle into a build:js script and make the root build run every workspace's build:js. Add check:pack: packs each published package with bun pm pack and fails when a main/module/types/bin/exports target is missing from the tarball. It runs as a CI job and in the publish workflow before any package is published. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
process.exit() skipped the finally block, leaving the packed tarballs in the temp dir after every failing run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
matej21
force-pushed
the
fix/bindx-ui-cli-bin
branch
from
November 4, 2026 16:41
78f9e30 to
4eb39cd
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The published
@contember/bindx-uideclares"bin": { "bindx-ui": "./dist/cli/cli.js" }, but the 0.1.60 tarball contains onlydist/types— nodist/cli. Runningnpx bindx-uifrom an install fails.The CLI bundle step lived only in the package's own
buildscript. The publish workflow runs the rootbuild, which runstsc --buildplus the compiler'sbuild:js, so the CLI was never bundled beforebun pm pack.Fix
bindx-ui: move the CLI bundle into abuild:jsscript (same convention asbindx-compiler).build:tsc --build && bun run --filter '*' build:js— every workspace's JS bundle step runs, so a new package with a bundle step is picked up without editing the root script.scripts/check-pack/run.ts(bun run check:pack): packs every non-private package withbun pm pack(the tool the publish script uses) and fails if anymain/module/types/bin/exports/importstarget of the packedpackage.jsonis missing from the tarball. Subpath patterns (./src/*) need at least one match.Package Contentsjob (build +check:pack). Publish workflow:check:packruns after build and before the firstnpm publish, so a broken tarball stops the release before any package is published.Verification
Local, on a clean worktree:
npm pack @contember/bindx-ui@0.1.60 --dry-run— onlydist/types/**, nodist/cli(the bug).bun run build— bundlesbindx-ui/dist/cli/cli.js(with shebang, executable) andbindx-compiler/dist/index.js.bun run check:pack— all 11 published packagesok.bindx-ui/dist/cli:check:packexits 1 withFAIL @contember/bindx-ui — missing: ./dist/cli/cli.js.bun pm pack, installed the tarballs with npm into an empty dir:node_modules/.bin/bindx-uilinks todist/cli/cli.js;npx bindx-ui --helpprints usage,npx bindx-ui statusreads the package root and printsNo ejected components.Status
🤖 Generated with Claude Code