Uh oh!
There was an error while loading. Please reload this page.
chore(cli): retire the abandoned tsup build path - #10601
Conversation
`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. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019bmVFqoQPq63zhKrxdYG1r
📓 Docs Drift CheckThis PR changes 1 package(s): 1 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
What this run could not see
Coarse fallback — 23 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin b0c408dca7c50e1cd7303c3e5f74688a46ee5da5 && git checkout b0c408dca7c50e1cd7303c3e5f74688a46ee5da5
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 299b85e9d091a392c82fccd06750f666c3986814 e983eb3f2549f7fb53c04a5a1f58a9a64ce810de && git checkout -B drift-repro 299b85e9d091a392c82fccd06750f666c3986814 && git merge --no-ff e983eb3f2549f7fb53c04a5a1f58a9a64ce810de
node scripts/docs-audit/affected-docs.mjs --json 299b85e9d091a392c82fccd06750f666c3986814
|
Uh oh!
There was an error while loading. Please reload this page.
Fixes#10185
Retires the abandoned tsup build path in
packages/cli: thetsup.config.ts, the orphanedsrc/bin.ts, and the now-unusedtsupdevDependency.The history check came first, and it cleared the deletion
Triage made the history check a gate on the deletion, not a formality. The clone in this container was shallow (275 commits, every file forged as "added" at the graft boundary), so it was unshallowed to 10,529 commits before any of this was answerable — the first pass returned one bogus commit per file and would have been worthless evidence.
bbea22f350(2026-02-18) is the pivot. One commit movedpackages/cliaway from tsup:The direction of travel is documented and it points away from tsup — and the reason is structural: oclif's
patternstrategy needs one emitted file per command underdist/commands/**, which tsup's entry-bundling does not produce. That is also exactly why running the leftover config is destructive. The config was simply left behind by that commit.The only later touch,
55ac75d730(2026-06-05), edited 12tsup.config.tsfiles in one mechanical sweep with the same one-linedts: truetodts: !process.env.OS_SKIP_DTSchange. A repo-wide sweep, not a CLI revival. No deliberate future direction exists, so the fallback (make the config non-destructive) does not apply.The other three checks, each proven separately
build/devare tsc,testvitest,typechecktsc,check:app-nav-i18nnode — zero tsup);turbo.json(no@objectstack/cli#buildoverride, only#test; theglobalDependencies: ["tsconfig.json", "tsup.config.ts"]entry is root-relative with no**, so it names the root config);.github/**(every tsup hit is prose about other packages); andcontent/**docs (zero hits). It is also in no tsc program at all — the package tsconfig isinclude: ["src"]and the root one excludespackages.src/bin.tsis genuinely orphaned — the check the brief flagged as the trap, so it was checked against what oclif resolves, not against imports.package.jsonbinnames./bin/run.jsfor bothobjectstackandos; oclif resolves commands from./dist/commandsand its hook from./dist/hooks/**;bin.tsis in none of them. Its only referrer repo-wide was the dead tsup entry.dd1e67bbdagutted it from a 103-line Commander program to a 13-line re-export in the same migration that createdbin/run.js— it is the carcass of the pre-oclif entry point. The barrel already says so insrc/index.ts: "The CLI entry point isbin/run.js, and now the barrel says so."tsupis unused elsewhere in the package — its only live mentions were the config's ownimportand the devDependency line (the rest are CHANGELOG history). The lockfile diff is 3 lines;tsupstays for the packages that really build with it.Verification: the command surface, before and after
"Tests still pass" would prove nothing here, so the check is the one triage asked for — the command list oclif actually resolves, compared across the removal. Both legs are clean builds (
rm -rf distfirst), enumerated through@oclif/core's ownConfig.load— the same pathbin/run.jstakes:dist/commandsdist/bin.jsdiffof the two full surface dumps (id + aliases + sorted flag names per command) exits 0 — identical. The sole build-output difference is the deaddist/bin.jsdisappearing, which is the artifact being retired. Live check through the published entry point after removal:node bin/run.js --version,--helpandinfo --helpall exit 0 with the full topic list intact.Gates, all at
e983eb3f25(the final commit), re-derived withnode scripts/pm/dispatch-gates.mjsrather than from a hand-written list — 13 families, each quoting its own verdict line:pnpm --filter @objectstack/cli typecheckreports 0error TS;pnpm --filter @objectstack/cli testreportsTest Files 138 passed (138)/Tests 1543 passed (1543).A
patchchangeset is included: nothing user-facing changes behaviourally, but the published tarball no longer carriesdist/bin.js, so it is declared rather than passed off as invisible.Generated by Claude Code