Skip to content

Commit bde0ab9

Browse files
Elon Muskclaude
andauthored
chore(cli): retire the abandoned tsup build path (#10185) (#10601)
`packages/cli` has built with `tsc -p tsconfig.build.json` since the oclif migration (bbea22f, 2026-02-18), which in one commit switched `build` from `tsup` to `tsc`, introduced `oclif.commands.target: "./dist/commands"`, and pointed the `bin` field at the new `bin/run.js`. The tsup config was left behind by that commit and has never been invoked since. It was not inert, though. It declared `clean: true` with only `src/bin.ts` and `src/index.ts` as entries, so running the obvious `tsup` next to a `tsup.config.ts` wipes `dist/` and emits no `dist/commands/**` — leaving a CLI that resolves zero commands, the "command not found" signature `scripts/cli-build-prerequisite.mjs` exists to classify. Removed: - `packages/cli/tsup.config.ts` — invoked by no script, no turbo task, no CI step and no doc; in no tsc program either (the package tsconfig is `include: ["src"]`, the root one excludes `packages`). - `packages/cli/src/bin.ts` — the carcass of the pre-oclif Commander entry point, gutted to a 13-line re-export by dd1e67b in the same migration. Its only referrer repo-wide was the tsup entry above. - the `tsup` devDependency — the config's import was its only use in the package. Verified by comparing the command surface oclif actually resolves (via `Config.load`) before and after: identical, 60 commands and 68 topics, same flags and aliases. The sole build-output difference is that `dist/bin.js` is no longer emitted. Claude-Session: https://claude.ai/code/session_019bmVFqoQPq63zhKrxdYG1r Co-authored-by: Claude <noreply@anthropic.com>
1 parent d5e7b9f commit bde0ab9

5 files changed

Lines changed: 21 additions & 40 deletions

File tree

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
"@objectstack/cli": patch
3+
---
4+
5+
Remove the abandoned tsup build path from `packages/cli` (#10185): the
6+
`tsup.config.ts`, the orphaned `src/bin.ts` it was the only referrer of, and
7+
the now-unused `tsup` devDependency.
8+
9+
The package has built with `tsc -p tsconfig.build.json` since the oclif
10+
migration, which also introduced `oclif.commands.target: "./dist/commands"`
11+
and moved the `bin` field onto `bin/run.js`. The tsup config was left behind
12+
by that commit and never invoked again — but it was not inert. It declared
13+
`clean: true` with only `src/bin.ts` and `src/index.ts` as entries, so anyone
14+
running the obvious `tsup` next to a `tsup.config.ts` would wipe `dist/` and
15+
emit no `dist/commands/**` at all, leaving a CLI that resolves zero commands.
16+
Deleting it removes the trap rather than documenting it.
17+
18+
No published behaviour changes: the resolved oclif command surface is
19+
identical before and after (60 commands, 68 topics). The only build-output
20+
difference is that `dist/bin.js` — a re-export of `execute` from
21+
`@oclif/core` that nothing imported — is no longer emitted.

packages/cli/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,6 @@
119119
"@oclif/plugin-plugins": "^5.4.87",
120120
"@types/better-sqlite3": "^7.6.13",
121121
"@types/node": "^26.2.0",
122-
"tsup": "^8.5.1",
123122
"typescript": "^6.0.3",
124123
"vitest": "^4.1.10"
125124
},

packages/cli/src/bin.ts

Lines changed: 0 additions & 13 deletions
This file was deleted.

packages/cli/tsup.config.ts

Lines changed: 0 additions & 23 deletions
This file was deleted.

pnpm-lock.yaml

Lines changed: 0 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)