Skip to content

Upgrading tsup 3 to 4

Breaking3.12.1 → 4.14.0Breaking1New13Changed3Fixed38

BreakingUpgrade verdict

1 breaking change.

  • tsup will no longer replace process.env.NODE_ENV with production or development, cuz tsup is designed for bundling Node.js libraries, therefore it doesn't make sense to replace it at build time…
1 item needs code or config changes

Adds debug ^4.3.1, execa ^5.0.0, tree-kill ^1.2.2.

Drops @rollup/plugin-node-resolve, rollup-plugin-dts.

Installs 81 packages in all (was 86).

Breaking1
tsup will no longer replace process.env.NODE_ENV with production or development, cuz tsup is designed for bundling Node.js libraries, therefore it doesn't make sense to replace it at build time…
process.env.NODE_ENVproductiondevelopment--replaceNodeEnv

Generated by DepDelta from published .d.ts files. Not mixed with prose notes.

  • added: function main(options?: Options): Promise<void>
  • removed: const makeLabel: (input: string, type: 'info' | 'success' | 'error') => string
  • changed: function build(options: Options): Promise<void> → function build(_options: Options): Promise<void>
  • changed: function runEsbuild(options: Options, { format }: { format: Format }): Promise<BuildResult | undefined> → function runEsbuild(options: NormalizedOptions, { format, css }: { format: Format; css?: Map<string, string> }): Promise<BuildResult | undefined>
  • changed: type Options = { entryPoints: string[]; legacyOutput?: boolean; target?: string; minify?: boolean; minifyWhitespace?: boolean; minifyIdentifiers?: boolean; minifySyntax?: boo… → type Options = { entryPoints?: string[]; legacyOutput?: boolean; target?: string; minify?: boolean; minifyWhitespace?: boolean; minifyIdentifiers?: boolean; minifySyntax?: bo…
  • added: const defineConfig: (options: Options) => Options
  • added: type NormalizedOptions = MarkRequired<Options, 'entryPoints' | 'format' | 'outDir'>