From f1492c51ea36fa8cd21674eb6a95d14c9aef1126 Mon Sep 17 00:00:00 2001 From: Dawson Toth Date: Fri, 11 Sep 2026 10:51:36 -0400 Subject: [PATCH] build: drop --dts, which emitted declarations nothing can import This is what blocks the TypeScript 7 upgrade (#145). tsup 8.5.1 inlines its own `rollup-plugin-dts@6.1.1` compiled against `typescript@5.7.3`, and that copy throws on TS 7: TypeError: Cannot read properties of undefined (reading 'useCaseSensitiveFileNames') at node_modules/.pnpm/rollup-plugin-dts@6.1.1_rollup@4.53.2_typescript@5.7.3/... Nothing in our lockfile reaches that vendored copy, so no `overrides` can fix it, and tsup has not published since 2025-11-12 (8.5.1 is the only dist-tag). The crash is confined to the DTS step - the ESM bundle completes before it. And the declarations that step produces are unreachable anyway: package.json has no `types` field, no `typings`, and no `types` condition in `exports` (just `{".": "./dist/index.js"}`), so no TypeScript consumer can resolve them. Nothing in the org imports @harperfast/agent as a library either; it is consumed as a CLI through `bin`. So we have been paying for declaration emit that no consumer could use, and it is the only thing standing between us and TS 7. Verified: build succeeds on both typescript 6.0.3 and 7.0.2, dist still contains cli.js / index.js / schema.graphql, and `node ./dist/cli.js --help` runs. Lint, format, and 345 tests pass. Note this is the minimal unblock. If we would rather keep publishing types, the tsdown migration does that and gets us off unmaintained tooling - the two are alternatives, not a sequence. --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index ab7d734..5bc4776 100644 --- a/package.json +++ b/package.json @@ -9,9 +9,9 @@ }, "homepage": "https://github.com/harperfast", "scripts": { - "dev": "tsup index.ts cli.ts --format esm --clean --dts --watch --external puppeteer", + "dev": "tsup index.ts cli.ts --format esm --clean --watch --external puppeteer", "link": "npm run build && npm link", - "build": "tsup index.ts cli.ts --format esm --clean --dts --external puppeteer && cp node_modules/harper/schema.graphql dist/", + "build": "tsup index.ts cli.ts --format esm --clean --external puppeteer && cp node_modules/harper/schema.graphql dist/", "commitlint": "commitlint --edit", "start": "node ./dist/cli.js", "lint": "oxlint --format stylish .",