chore: simplify package exports, enable tsdown exports, and upgrade to TypeScript 7

- Delegate `exports` map generation to tsdown (`exports: true`) and simplify `package.json` to a bare `"." : "./dist/index.mjs"` entry plus `"./package.json"`; drop redundant `main`/`module` fields
- Add `sideEffects: false` to `package.json` so bundlers can tree-shake the package
- Enable `clean: true` and `failOnWarn: true` in `tsdown.config.ts` for a cleaner build and stricter warning enforcement
- Suppress the TypeScript 7.0 experimental-API warning emitted by tsdown
- Bump `typescript` dev dependency to `^7.0.2`
This commit is contained in:
2026-09-20 17:47:36 -04:00
parent 3ded70f364
commit 026a93c69f
3 changed files with 381 additions and 20 deletions
+4
View File
@@ -4,7 +4,11 @@ export default defineConfig({
platform: "node",
target: "node20",
entry: ["src/index.ts"],
clean: true,
dts: true,
exports: true,
nodeProtocol: "strip",
deps: { neverBundle: ["tldts"] },
failOnWarn: true,
suppressWarnings: ["TypeScript 7.0 does not yet have a stable API and is experimental"],
});