🚨 Breaking Changes
- Drop Node.js < 22.18.0 support, make unrun optional, add tsx config loader - by @sxzz (a1042)
- dts: Auto-enable dts when tsconfig declaration is true - by @sxzz in #872 (085f0)
- publint: Use pkg from publint results, require publint v0.3.8+ - by @sxzz (413bb)
Migration Guide
Node.js version
Upgrade to Node.js 22.18.0 or later. Bun and Deno remain supported (experimental).
unrun is no longer bundled
If your environment relies on the unrun config loader (i.e. you're on a Node version without native TypeScript support and use the default auto loader), install it manually:
npm i -D unrun
# or, alternatively, the new tsx loader:
npm i -D tsxIf you use Node.js 22.18.0+ with native TypeScript support, no change is needed — the auto loader will pick native.
dts auto-enabled from tsconfig
If your tsconfig.json has compilerOptions.declaration: true but you do not want tsdown to emit .d.ts files, opt out explicitly:
// tsdown.config.ts
export default defineConfig({
dts: false,
})exports.bin auto-detection
Any entry chunk containing a shebang (e.g. #!/usr/bin/env node) now causes tsdown to write a bin field in package.json automatically. The semantics differ slightly from explicit bin: true:
| Value | Single shebang | Multiple shebangs | No shebangs |
|---|---|---|---|
| (unset) | Auto-set bin | Warn, skip | Silent |
true
| Auto-set bin | Throw | Warn |
false
| No bin | No bin | No bin |
To opt out entirely:
export default defineConfig({
exports: { bin: false },
})🚀 Features
🐞 Bug Fixes
- debug: Enhance debug logging for pack tarball - by @sxzz and Copilot (5de04)
- exports: Detect types fields nested in conditional exports - by @sxzz (82fa1)