Upgrading tsdown 0.21 to 0.22
Breaking0.21.10 → 0.22.14Breaking2Platform4New10Changed7Fixed19Other5
BreakingUpgrade verdict
2 breaking changes and 4 platform requirement changes.
In plain terms
- dts: Auto-enable dts when tsconfig declaration is true - (085f0).
- publint: Use pkg from publint results, require publint v0.3.8+ - (413bb).
- The exe feature now requires a consistent minimum version of Node.js.
- If you run this package on Node.js 24, you need version 24.11 or newer.
Must act Top 5 of 6 that need code or config changes
Node.js requirement changed in 0.22.3: >=20.19.0 → ^22.18.0 || >=24.11.0.
Adds verkit ^0.3.0.
Drops semver, unrun.
Installs 66 packages in all (was 64).
What you must change
Breaking2
dts: Auto-enable dts when tsconfig declaration is true - (085f0).
publint: Use pkg from publint results, require publint v0.3.8+ - (413bb).
Platform4
Standardizes the minimum Node.js version required by the exe feature.
exeDrops support for Node.js 24.0 through 24.10.
Drop Node.js < 22.18.0 support, make unrun optional, add tsx config loader - (a1042).
Explicitly drop node 23 support - (85e65).
API changes
Generated by DepDelta from published .d.ts files. Not mixed with prose notes.
- changed:
function r(userConfig: UserConfig, inlineConfig: InlineConfig, configDeps: Set<string>): Promise<ResolvedConfig[]> → function r(userConfig: UserConfig, inlineConfig: InlineConfig, configDeps: Set<string>, runBuild?: ConcurrencyExecutor): Promise<ResolvedConfig[]>
- added:
const version: string
- removed:
const i: Logger - removed:
index t[key: string]: any - removed:
interface r - removed:
interface t - removed:
property r.clearScreen: (type: LogType) => void - removed:
property r.error: (...args: any[]) => void - removed:
property r.info: (...args: any[]) => void - removed:
property r.level: LogLevel - removed:
property r.options?: LoggerOptions - removed:
property r.success: (...args: any[]) => void - removed:
property r.warn: (...args: any[]) => void - removed:
property r.warnOnce: (...args: any[]) => void - removed:
property t.author?: PackageJsonPerson - removed:
property t.bin?: string | Record<string, string> - removed:
property t.browser?: string | Record<string, string | false> - removed:
property t.bugs?: string | { url?: string; email?: string } - removed:
property t.contributors?: PackageJsonPerson[] - removed:
property t.cpu?: string[] - removed:
property t.dependencies?: Record<string, string> - removed:
property t.description?: string - removed:
property t.devDependencies?: Record<string, string> - removed:
property t.exports?: PackageJsonExports - removed:
property t.files?: string[] - removed:
property t.funding?: PackageJsonFunding | PackageJsonFunding[] - removed:
property t.homepage?: string - removed:
property t.imports?: Record<string, string | Record<string, string>> - removed:
property t.keywords?: string[] - removed:
property t.license?: string - removed:
property t.main?: string - removed:
property t.man?: string | string[] - removed:
property t.module?: string - removed:
property t.name?: string - removed:
property t.optionalDependencies?: Record<string, string> - removed:
property t.os?: string[] - removed:
property t.packageManager?: string - removed:
property t.peerDependencies?: Record<string, string> - removed:
property t.private?: boolean - removed:
property t.publishConfig?: { registry?: string; tag?: string; access?: 'public' | 'restricted'; executableFiles?: string[]; directory?: string; linkDirectory?: boolean } & Pick<PackageJson, 'bin' | 'main' | 'exports' | 'types' | 'typings' | 'module' | 'browser' | 'unpkg' | 'typesVersions' | 'os' | 'cpu'> - removed:
property t.repository?: string | { type: string; url: string; directory?: string } - removed:
property t.scripts?: PackageJsonScripts - removed:
property t.type?: 'module' | 'commonjs' - removed:
property t.types?: string - removed:
property t.typesVersions?: Record<string, Record<string, string[]>> - removed:
property t.typings?: string - removed:
property t.unpkg?: string - removed:
property t.version?: string - removed:
property t.workspaces?: string[] | { packages?: string[]; nohoist?: string[] } - removed:
type a<T> = T | T[] - removed:
type c<T, U> = Omit<T, keyof U> & U - removed:
type n = LogType | 'silent' - removed:
type o<T> = T | Promise<T> - removed:
type s<T, K extends keyof T> = Omit<Required<T>, K> & Partial<Pick<T, K>>
- removed:
function importWithError<T>(moduleName: string): Promise<T> - removed:
function resolveComma<T extends string>(arr: T[]): T[] - removed:
function toArray<T>(val: T | T[] | null | undefined, defaultValue?: T): T[] - added:
export { NODE_SEA_MIN_VERSION } - added:
export { NODE_SEA_MIN_VERSION_PARSED } - added:
export { importWithError } - added:
export { resolveComma } - added:
export { toArray }
- removed:
function R({ pkg, deps: { alwaysBundle, onlyBundle, skipNodeModulesBundle }, logger, nameLabel }: ResolvedConfig, tsdownBundle: TsdownBundle): Plugin - removed:
interface B - removed:
interface O - removed:
interface P extends ExeExtensionOptions - removed:
interface g - removed:
interface j - removed:
interface v<A = any> extends Plugin<A> - removed:
interface x - removed:
property B.alwaysBundle?: NoExternalFn - removed:
property B.neverBundle?: ExternalOption - removed:
property B.onlyBundle?: Array<string | RegExp> | false - removed:
property B.skipNodeModulesBundle: boolean - removed:
property E.format: NormalizedFormat - removed:
property E.options: InputOptions - removed:
property E.pkgType?: PackageType - removed:
property F.assets?: Record<string, string> - removed:
property F.disableExperimentalSEAWarning?: boolean - removed:
property F.execArgv?: string[] - removed:
property F.execArgvExtension?: 'none' | 'env' | 'cli' - removed:
property F.executable?: string - removed:
property F.main?: string - removed:
property F.mainFormat?: 'commonjs' | 'module' - removed:
property F.output?: string - removed:
property F.useCodeCache?: boolean - removed:
property F.useSnapshot?: boolean - removed:
property H.chunks: RolldownChunk[] - removed:
property H.config: ResolvedConfig - removed:
property H.inlinedDeps: Map<string, Set<string>> - removed:
property I.clean?: boolean - removed:
property I.ui?: boolean | Partial<StartOptions> - removed:
property L.alwaysBundle?: Arrayable<string | RegExp> | NoExternalFn - removed:
property L.neverBundle?: ExternalOption - removed:
property L.onlyAllowBundle?: Arrayable<string | RegExp> | false - removed:
property L.onlyBundle?: Arrayable<string | RegExp> | false - removed:
property L.skipNodeModulesBundle?: boolean - removed:
property M.buildOptions: BuildOptions - removed:
property N.'build:before': (ctx: BuildContext & RolldownContext) => void | Promise<void> - removed:
property N.'build:done': (ctx: BuildContext & { chunks: RolldownChunk[] }) => void | Promise<void> - removed:
property N.'build:prepare': (ctx: BuildContext) => void | Promise<void> - removed:
property O.dts?: string - removed:
property O.js?: string - removed:
property P.fileName?: string | ((chunk: RolldownChunk) => string) - removed:
property P.outDir?: string - removed:
property P.seaConfig?: Omit<SeaConfig, 'main' | 'output' | 'mainFormat'> - removed:
property S.ignoreRules?: ('no-resolution' | 'untyped-resolution' | 'false-cjs' | 'false-esm' | 'cjs-resolves-to-esm' | 'fallback-condition' | 'cjs-only-exports-default' | 'named-exports' | 'false-export-default' | 'missing-export-equals' | 'unexpected-module-syntax' | 'internal-resolution-error' | (string & {}))[] - removed:
property S.level?: 'error' | 'warn' - removed:
property S.module?: typeof _$_arethetypeswrong_core0 - removed:
property S.profile?: 'strict' | 'node16' | 'esm-only' - removed:
property T.css?: string - removed:
property T.dts?: string - removed:
property T.js?: string - removed:
property U.flatten?: boolean - removed:
property U.from: string | string[] - removed:
property U.rename?: string | ((name: string, extension: string, fullPath: string) => string) - removed:
property U.to?: string - removed:
property U.verbose?: boolean - removed:
property b.module?: [typeof _$publint, typeof _$publint_utils0] - removed:
property g.brotli?: boolean - removed:
property g.gzip?: boolean - removed:
property g.maxCompressSize?: number - removed:
property j.hooks: Hookable<TsdownHooks> - removed:
property j.options: ResolvedConfig - removed:
property k.packageJsonPath: string - removed:
property v.tsdownConfig?: (config: UserConfig, inlineConfig: InlineConfig) => Awaitable<UserConfig | void | null> - removed:
property v.tsdownConfigResolved?: (resolvedConfig: ResolvedConfig) => Awaitable<void> - removed:
property x.all?: boolean - removed:
property x.bin?: boolean | string | Record<string, string> - removed:
property x.customExports?: Record<string, any> | ((exports: Record<string, any>, context: { pkg: PackageJson; chunks: ChunksByFormat; isPublish: boolean }) => Awaitable<Record<string, any>>) - removed:
property x.devExports?: boolean | string - removed:
property x.exclude?: (RegExp | string)[] - removed:
property x.extensions?: boolean - removed:
property x.inlinedDependencies?: boolean - removed:
property x.legacy?: boolean - removed:
property x.packageJson?: boolean - removed:
type A = 'module' | 'commonjs' | undefined - removed:
type V = (OutputChunk | OutputAsset) & { outDir: string } - removed:
type W = Arrayable<string | CopyEntry> - removed:
type w = (ctx: { format: Format; fileName: string }) => ChunkAddonObject | string | undefined - removed:
type y<A = any> = Awaitable<TsdownPlugin<A> | RolldownPlugin<A> | { name: string } | undefined | null | void | false | TsdownPluginOption<A>[]> - removed:
type z = (id: string, importer: string | undefined) => boolean | null | undefined | void - changed:
function _(config: ResolvedConfig, cjsDts?: boolean, isDualFormat?: boolean): Plugin → function _<T>(moduleName: string): Promise<T> - changed:
interface E → interface E extends CheckPackageOptions - changed:
interface H extends AsyncDisposable → interface H extends NonNullable<InputOptions['devtools']> - changed:
interface I extends NonNullable<InputOptions['devtools']> → interface I - changed:
interface N → interface N extends PackageJson - changed:
interface S extends CheckPackageOptions → interface S<A = any> extends Plugin<A> - changed:
interface b extends Omit<Options, 'pack' | 'pkgDir'> → interface b - changed:
interface k extends PackageJson → interface k - changed:
property d.css?: _$_tsdown_css0.CssOptions → property d.css?: CssOptions - changed:
property h.include?: Arrayable<string> | 'auto' → property h.include?: 'auto' | (string & {}) | string[] - changed:
property i.configLoader?: 'auto' | 'native' | 'unrun' → property i.configLoader?: 'auto' | 'native' | 'tsx' | 'unrun' - changed:
type C = ChunkAddonObject | ChunkAddonFunction | string → type C<A = any> = Awaitable<TsdownPlugin<A> | RolldownPlugin<A> | { name: string } | undefined | null | void | false | TsdownPluginOption<A>[]> - changed:
type D = (context: OutExtensionContext) => OutExtensionObject | undefined → type D = ChunkAddonObject | ChunkAddonFunction | string - changed:
type G = (options: ResolvedConfig) => Awaitable<CopyOptions> → type G = (id: string, importer: string | undefined) => boolean | null | undefined | void - changed:
type o = Overwrite<MarkPartial<Omit<UserConfig, 'workspace' | 'fromVite' | 'publicDir' | 'bundle' | 'injectStyle' | 'removeNodeProtocol' | 'external' | 'noExternal' | '… → type o = Overwrite<MarkPartial<Omit<UserConfig, 'workspace' | 'fromVite' | 'publicDir' | 'bundle' | 'injectStyle' | 'removeNodeProtocol' | 'outExtension' | 'external' |… - added:
const B: SemVer - added:
const J: Logger - added:
const z: string - added:
function W({ pkg, deps: { neverBundle, alwaysBundle: jsAlwaysBundle, onlyBundle, onlyImport, skipNodeModulesBundle, resolveDepSubpath: shouldResolveDepSubpath, dts }, logger, nameLabel, platform }: ResolvedConfig, tsdownBundle: TsdownBundle): Plugin - added:
function v<T extends string>(arr: T[]): T[] - added:
function x(config: ResolvedConfig, cjsDts?: boolean, isDualFormat?: boolean): Plugin - added:
function y<T>(val: T | T[] | null | undefined, defaultValue?: T): T[] - added:
interface A - added:
interface K extends Pick<DepsConfig, 'neverBundle' | 'skipNodeModulesBundle' | 'resolveDepSubpath'> - added:
interface R extends ExeExtensionOptions - added:
interface V - added:
interface X extends AsyncDisposable - added:
interface Z - added:
interface q - added:
interface w extends Omit<Options, 'pack' | 'pkgDir'> - added:
property A.format: NormalizedFormat - added:
property A.options: InputOptions - added:
property A.pkgType?: PackageType - added:
property E.ignoreRules?: ('no-resolution' | 'untyped-resolution' | 'false-cjs' | 'false-esm' | 'cjs-resolves-to-esm' | 'fallback-condition' | 'cjs-only-exports-default' | 'named-exports' | 'false-export-default' | 'missing-export-equals' | 'unexpected-module-syntax' | 'internal-resolution-error' | (string & {}))[] - added:
property E.level?: 'error' | 'warn' - added:
property E.module?: typeof import('@arethetypeswrong/core') - added:
property E.profile?: 'strict' | 'node16' | 'esm-only' - added:
property F.hooks: Hookable<TsdownHooks> - added:
property F.options: ResolvedConfig - added:
property H.clean?: boolean - added:
property H.ui?: boolean | Partial<StartOptions> - added:
property I.buildOptions: BuildOptions - added:
property K.alwaysBundle?: NoExternalFn - added:
property K.dts: Pick<ResolvedDepsConfig, 'alwaysBundle' | 'neverBundle'> - added:
property K.onlyBundle?: Array<string | RegExp> | false - added:
property K.onlyImport?: Array<string | RegExp> - added:
property L.'build:before': (ctx: BuildContext & RolldownContext) => void | Promise<void> - added:
property L.'build:done': (ctx: BuildContext & { chunks: RolldownChunk[] }) => void | Promise<void> - added:
property L.'build:prepare': (ctx: BuildContext) => void | Promise<void> - added:
property M.dts?: string - added:
property M.js?: string - added:
property N.packageJsonPath: string - added:
property R.fileName?: string | ((chunk: RolldownChunk) => string) - added:
property R.outDir?: string - added:
property R.seaConfig?: Omit<SeaConfig, 'main' | 'output' | 'mainFormat'> - added:
property S.tsdownConfig?: (config: UserConfig, inlineConfig: InlineConfig) => Awaitable<UserConfig | void | null> - added:
property S.tsdownConfigResolved?: (resolvedConfig: ResolvedConfig) => Awaitable<void> - added:
property T.all?: boolean - added:
property T.bin?: boolean | string | Record<string, string> - added:
property T.customExports?: Record<string, any> | ((exports: Record<string, any>, context: { pkg: PackageJson; chunks: ChunksByFormat; isPublish: boolean }) => Awaitable<Record<string, any>>) - added:
property T.devExports?: boolean | string - added:
property T.exclude?: (RegExp | string)[] - added:
property T.extensions?: boolean - added:
property T.inlinedDependencies?: boolean - added:
property T.legacy?: boolean - added:
property T.packageJson?: boolean - added:
property U.alwaysBundle?: Arrayable<string | RegExp> | NoExternalFn - added:
property U.dts?: Pick<DepsConfig, 'alwaysBundle' | 'neverBundle'> - added:
property U.neverBundle?: true | ExternalOption - added:
property U.onlyAllowBundle?: Arrayable<string | RegExp> | false - added:
property U.onlyBundle?: Arrayable<string | RegExp> | false - added:
property U.onlyImport?: Arrayable<string | RegExp> - added:
property U.resolveDepSubpath?: boolean - added:
property U.skipNodeModulesBundle?: boolean - added:
property V.assets?: Record<string, string> - added:
property V.disableExperimentalSEAWarning?: boolean - added:
property V.execArgv?: string[] - added:
property V.execArgvExtension?: 'none' | 'env' | 'cli' - added:
property V.executable?: string - added:
property V.main?: string - added:
property V.mainFormat?: 'commonjs' | 'module' - added:
property V.output?: string - added:
property V.useCodeCache?: boolean - added:
property V.useSnapshot?: boolean - added:
property X.chunks: RolldownChunk[] - added:
property X.config: ResolvedConfig - added:
property X.inlinedDeps: Map<string, Set<string>> - added:
property Z.flatten?: boolean - added:
property Z.from: string | string[] - added:
property Z.rename?: string | ((name: string, extension: string, fullPath: string) => string) - added:
property Z.to?: string - added:
property Z.verbose?: boolean - added:
property b.brotli?: boolean - added:
property b.gzip?: boolean - added:
property b.maxCompressSize?: number - added:
property d.outExtension?: OutExtensionFactory - added:
property d.suppressWarnings?: Arrayable<RegExp | string> | ((msg: string) => boolean) - added:
property i.concurrency?: number - added:
property k.css?: string - added:
property k.dts?: string - added:
property k.js?: string - added:
property q.clearScreen: (type: LogType) => void - added:
property q.error: (...args: any[]) => void - added:
property q.info: (...args: any[]) => void - added:
property q.level: LogLevel - added:
property q.options?: LoggerOptions - added:
property q.success: (...args: any[]) => void - added:
property q.warn: (...args: any[]) => void - added:
property q.warnOnce: (...args: any[]) => void - added:
property w.module?: [typeof import('publint'), typeof import('publint/utils')] - added:
type $ = (options: ResolvedConfig) => Awaitable<CopyOptions> - added:
type O = (ctx: { format: Format; fileName: string }) => ChunkAddonObject | string | undefined - added:
type P = 'module' | 'commonjs' | undefined - added:
type Q = Arrayable<string | CopyEntry> - added:
type Y = (OutputChunk | OutputAsset) & { outDir: string } - added:
type et<T> = T | T[] - added:
type g = <T>(task: () => Promise<T>) => Promise<T> - added:
type j = (context: OutExtensionContext) => OutExtensionObject | undefined - added:
type nt<T, U> = Omit<T, keyof U> & U - added:
type tt<T, K extends keyof T> = Omit<Required<T>, K> & Partial<Pick<T, K>>