diff --git a/.changeset/cli-retire-abandoned-tsup-config.md b/.changeset/cli-retire-abandoned-tsup-config.md new file mode 100644 index 0000000000..10a4cbad73 --- /dev/null +++ b/.changeset/cli-retire-abandoned-tsup-config.md @@ -0,0 +1,21 @@ +--- +"@objectstack/cli": patch +--- + +Remove the abandoned tsup build path from `packages/cli` (#10185): the +`tsup.config.ts`, the orphaned `src/bin.ts` it was the only referrer of, and +the now-unused `tsup` devDependency. + +The package has built with `tsc -p tsconfig.build.json` since the oclif +migration, which also introduced `oclif.commands.target: "./dist/commands"` +and moved the `bin` field onto `bin/run.js`. The tsup config was left behind +by that commit and never invoked again — but it was not inert. It declared +`clean: true` with only `src/bin.ts` and `src/index.ts` as entries, so anyone +running the obvious `tsup` next to a `tsup.config.ts` would wipe `dist/` and +emit no `dist/commands/**` at all, leaving a CLI that resolves zero commands. +Deleting it removes the trap rather than documenting it. + +No published behaviour changes: the resolved oclif command surface is +identical before and after (60 commands, 68 topics). The only build-output +difference is that `dist/bin.js` — a re-export of `execute` from +`@oclif/core` that nothing imported — is no longer emitted. diff --git a/packages/cli/package.json b/packages/cli/package.json index f3416f2012..6549dd0738 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -119,7 +119,6 @@ "@oclif/plugin-plugins": "^5.4.87", "@types/better-sqlite3": "^7.6.13", "@types/node": "^26.2.0", - "tsup": "^8.5.1", "typescript": "^6.0.3", "vitest": "^4.1.10" }, diff --git a/packages/cli/src/bin.ts b/packages/cli/src/bin.ts deleted file mode 100644 index 7e7f9d6f63..0000000000 --- a/packages/cli/src/bin.ts +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license. - -/** - * ObjectStack CLI — oclif-based entry point. - * - * All commands are auto-discovered from `src/commands/` by oclif. - * Plugins extend the CLI via oclif's built-in plugin system - * (configured in package.json under "oclif.plugins"). - * - * Run `os --help` for available commands. - */ - -export { execute } from '@oclif/core'; diff --git a/packages/cli/tsup.config.ts b/packages/cli/tsup.config.ts deleted file mode 100644 index a26047d4ff..0000000000 --- a/packages/cli/tsup.config.ts +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license. - -import { defineConfig } from 'tsup'; - -export default defineConfig([ - // CLI binary entry — needs shebang - { - entry: ['src/bin.ts'], - format: ['esm'], - clean: true, - shims: true, - banner: { - js: '#!/usr/bin/env node', - }, - }, - // Library entry — no shebang, with types - { - entry: ['src/index.ts'], - format: ['esm'], - dts: !process.env.OS_SKIP_DTS, - shims: true, - }, -]); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e56c87dd68..704b88939e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -599,9 +599,6 @@ importers: '@types/node': specifier: ^26.2.0 version: 26.2.0 - tsup: - specifier: ^8.5.1 - version: 8.5.1(jiti@2.7.0)(postcss@8.5.26)(tsx@4.23.12)(typescript@6.0.3)(yaml@2.9.0) typescript: specifier: ^6.0.3 version: 6.0.3