Measured while implementing #10111 (PR #10181), whose file surface is the CLI's entry points. Not repaired there — different defect class, and that card's fence is invocation loudness. Filed unassigned, severity for triage.
The measurement
Measured on main at 2d3860df9.
packages/cli/package.json builds with tsc:
"build": "if [ -n \"$OS_SKIP_DTS\" ]; then tsc -p tsconfig.build.json --noCheck --declaration false --declarationMap false; else tsc -p tsconfig.build.json; fi"
packages/cli/tsup.config.ts nonetheless exists and declares a different output shape — two entries, src/bin.ts (with a #!/usr/bin/env node banner) and src/index.ts, the first with clean: true:
export default defineConfig([
{ entry: ['src/bin.ts'], format: ['esm'], clean: true, shims: true, banner: { js: '#!/usr/bin/env node' } },
{ entry: ['src/index.ts'], format: ['esm'], dts: !process.env.OS_SKIP_DTS, shims: true },
]);
Nothing invokes it. Grepped over scripts/, .github/, turbo.json and the package's own package.json: no reference to it. tsup is still in the package's devDependencies.
Two things follow, and the second is why this is filed rather than left as tidy-up:
src/bin.ts is reachable from nothing else. It is a one-line export { execute } from '@oclif/core', and the only reference to it in the repo is the dead tsup entry above (the real bin is bin/run.js, which is what package.json bin names). tsc emits dist/bin.js from it on every build; nothing reads that file.
- Running the config would break the package, quietly-ish.
clean: true wipes dist/, and tsup's two entries emit dist/bin.js + dist/index.js only — no dist/commands/**. package.json declares oclif.commands.target: "./dist/commands", so the result is a CLI that resolves no commands, which is the "command not found" symptom scripts/cli-build-prerequisite.mjs exists to classify. A config file sitting next to a package is a standing invitation to run it (pnpm --filter @objectstack/cli exec tsup), and this one looks like the package's build.
Directions (not a decision)
- Delete
tsup.config.ts and src/bin.ts if neither is wanted, and drop tsup from the package's devDependencies if nothing else there uses it. Cheapest, and it removes the trap rather than documenting it.
- Or, if the tsup shape is a deliberate future direction, say so in the file and make it produce
dist/commands/** so running it is not destructive.
Either way the choice is a domain:cli call and needs someone to confirm the tsup path is genuinely unwanted before deleting it.
Dedupe
search_issues for "packages/cli tsup.config.ts unused build config, the CLI package builds with tsc not tsup, dead build configuration" returns 6 results, none about this: #7849 (missing vitest.config.ts letting a stale dist decide verdicts), #9307 (closed, build-console.sh pre-building outside turbo), and four closed packages/spec / packages/qa tsconfig-coverage cards. Grep over the repo for a reference to this config found only the file itself.
Generated by Claude Code
Measured while implementing #10111 (PR #10181), whose file surface is the CLI's entry points. Not repaired there — different defect class, and that card's fence is invocation loudness. Filed unassigned, severity for triage.
The measurement
Measured on
mainat2d3860df9.packages/cli/package.jsonbuilds with tsc:packages/cli/tsup.config.tsnonetheless exists and declares a different output shape — two entries,src/bin.ts(with a#!/usr/bin/env nodebanner) andsrc/index.ts, the first withclean: true:Nothing invokes it. Grepped over
scripts/,.github/,turbo.jsonand the package's ownpackage.json: no reference to it.tsupis still in the package'sdevDependencies.Two things follow, and the second is why this is filed rather than left as tidy-up:
src/bin.tsis reachable from nothing else. It is a one-lineexport { execute } from '@oclif/core', and the only reference to it in the repo is the dead tsup entry above (the real bin isbin/run.js, which is whatpackage.jsonbinnames).tscemitsdist/bin.jsfrom it on every build; nothing reads that file.clean: truewipesdist/, and tsup's two entries emitdist/bin.js+dist/index.jsonly — nodist/commands/**.package.jsondeclaresoclif.commands.target: "./dist/commands", so the result is a CLI that resolves no commands, which is the "command not found" symptomscripts/cli-build-prerequisite.mjsexists to classify. A config file sitting next to a package is a standing invitation to run it (pnpm --filter @objectstack/cli exec tsup), and this one looks like the package's build.Directions (not a decision)
tsup.config.tsandsrc/bin.tsif neither is wanted, and droptsupfrom the package's devDependencies if nothing else there uses it. Cheapest, and it removes the trap rather than documenting it.dist/commands/**so running it is not destructive.Either way the choice is a
domain:clicall and needs someone to confirm the tsup path is genuinely unwanted before deleting it.Dedupe
search_issuesfor "packages/cli tsup.config.ts unused build config, the CLI package builds with tsc not tsup, dead build configuration" returns 6 results, none about this: #7849 (missingvitest.config.tsletting a stale dist decide verdicts), #9307 (closed,build-console.shpre-building outside turbo), and four closedpackages/spec/packages/qatsconfig-coverage cards. Grep over the repo for a reference to this config found only the file itself.Generated by Claude Code