Skip to content

Update tsdown 0.20.1 → 0.21.6 (major)#161

Closed
depfu[bot] wants to merge 1 commit intomainfrom
depfu/update/pnpm/tsdown-0.21.6
Closed

Update tsdown 0.20.1 → 0.21.6 (major)#161
depfu[bot] wants to merge 1 commit intomainfrom
depfu/update/pnpm/tsdown-0.21.6

Conversation

@depfu
Copy link
Copy Markdown
Contributor

@depfu depfu bot commented Mar 28, 2026

Here is everything you need to know about this upgrade. Please take a good look at what changed and the test results before merging this pull request.

What changed?

✳️ tsdown (0.20.1 → 0.21.6) · Repo

Release Notes

0.21.6

   🚀 Features

  • Upgrade rolldown to v1.0.0-rc.12  -  by @sxzz (51292)
  • config:
    • Pass root config to workspace config functions  -  by @sxzz (76169)
    • Use mergeConfig for workspace config merging and support variadic overrides  -  by @sxzz (148aa)
  • dts:
  • exports:
    • Add bin option to auto-generate package.json bin field  -  by @sxzz in #869 (7ebd6)

   🐞 Bug Fixes

  • css:
    • Compile preprocessor langs in virtual CSS modules  -  by @sxzz in #865 (7b2e0)
    • Strip .module from CSS output filenames  -  by @sxzz in #866 (03ade)
    • Default splitting to true in unbundle mode for CSS inject  -  by @sxzz in #867 (a4da6)
    • Split CSS plugin into pre/post phases for scoped CSS support  -  by @sxzz in #870 (ff0c4)
  • entry:
    • Correctly output relative paths in logger output  -  by @sxzz (00050)
    View changes on GitHub

0.21.5

   🚀 Features

   🐞 Bug Fixes

    View changes on GitHub

0.21.4

   🚀 Features

   🐞 Bug Fixes

  • exports: Preserve CRLF line endings in package.json  -  by @sxzz (a4d4e)
    View changes on GitHub

0.21.3

   🚀 Features

   🐞 Bug Fixes

  • css: Watch inline CSS files in watch mode  -  by @sxzz (2051a)
  • exports: Sort inlined dependencies by package name  -  by @sxzz (0ec71)
  • publint: Support Yarn v1  -  by @sxzz (4a291)
  • unbundle: Root should be lowest common ancestor of entry files  -  by @sxzz (f1823)
    View changes on GitHub

0.21.2

   🚨 Breaking Changes

  • exe: Add exe.outDir for separate executable output dir, defaults to build  -  by @sxzz (d49ef)

Note: Executable is still an experimental feature and does not follow SemVer. Breaking changes may occur in any release.

   🚀 Features

   🐞 Bug Fixes

  • css: Skip data URIs and external URLs in CSS url() rebasing  -  by @sxzz (13907)
    View changes on GitHub

0.21.1

   🚨 Breaking Changes

  • css: Move all CSS support to @tsdown/css package  -  by @sxzz in #809 (1b1a1)

Important

If you are using CSS features (e.g., CSS imports), you now need to manually install the @tsdown/css package:

npm install @tsdown/css -D
# or
pnpm add @tsdown/css -D

Note: CSS support is still an experimental feature and does not follow SemVer. Breaking changes may occur in any release.

   🚀 Features

  • css:
    • Add css.inject option to preserve CSS imports in JS output  -  by @sxzz and Claude Haiku 4.5 in #808 (ad745)
    • Support ?inline query for CSS imports  -  by @sxzz in #810 (b7379)
    • Support node_modules package resolution  -  by @sxzz and Claude Haiku 4.5 in #812 (b06b4)

   🐞 Bug Fixes

    View changes on GitHub

0.21.0

v0.21.0 - Notable Changes

Breaking Changes

Dependency options renamed to deps namespace

The dependency-related options have been moved under a new deps namespace with clearer names:

  • external -> deps.neverBundle
  • noExternal -> deps.alwaysBundle
  • inlineOnly -> deps.onlyAllowBundle
  • skipNodeModulesBundle -> deps.skipNodeModulesBundle

Before:

export default defineConfig({
  external: ['vue'],
  noExternal: ['lodash'],
})

After:

export default defineConfig({
  deps: {
    neverBundle: ['vue'],
    alwaysBundle: ['lodash'],
  },
})

The old options still work but are deprecated and will emit warnings.

failOnWarn default changed from 'ci-only' to false

If you relied on the previous behavior where warnings would fail the build in CI environments, you now need to explicitly set failOnWarn: true or failOnWarn: 'ci-only' in your config.

Node.js < 22.18.0 deprecated

tsdown now emits a deprecation warning when running on Node.js versions below 22.18.0. Plan to upgrade your Node.js version accordingly.

New Features

Experimental Node.js SEA executable bundling (exe)

tsdown can now bundle your TypeScript project into a standalone executable using Node.js Single Executable Applications (SEA). A new @tsdown/exe package provides cross-platform executable building support. See the exe documentation for details.

export default defineConfig({
  exe: true, // or { useCodeCache: true, useSnapshot: true }
})

Full CSS pipeline with @tsdown/css

CSS handling has been reimplemented as a native Rolldown plugin and extracted into the @tsdown/css package, providing a complete CSS pipeline with Lightning CSS and PostCSS support via the css.transformer option. See the CSS documentation for details.

inlinedDependencies field in package.json

When using the exports feature, tsdown now auto-generates an inlinedDependencies field in your package.json, listing dependencies that are bundled into the output.

Object option for customExports

customExports now supports an object format for more fine-grained control over the generated exports field.

Migration Guide

  1. Update dependency options: Rename external -> deps.neverBundle, noExternal -> deps.alwaysBundle, etc.
  2. Check failOnWarn: If you need warnings to fail the build in CI, explicitly set failOnWarn: 'ci-only' or failOnWarn: true.
  3. Upgrade Node.js: Ensure you're running Node.js >= 22.18.0 to avoid deprecation warnings.

Links


   🚨 Breaking Changes

  • Change failOnWarn default from 'ci-only' to false  -  by @sxzz (ad8db)
  • exe: Require Node >=25.7 and default format to esm  -  by @sxzz in #798 (0173c)

   🚀 Features

   🐞 Bug Fixes

    View changes on GitHub

0.20.3

   🐞 Bug Fixes

  • package: Ignore scripts when packing  -  by @sxzz (0b10b)
    View changes on GitHub

0.20.2

   🚀 Features

   🐞 Bug Fixes

    View changes on GitHub

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.


Depfu Status

Depfu will automatically keep this PR conflict-free, as long as you don't add any commits to this branch yourself. You can also trigger a rebase manually by commenting with @depfu rebase.

All Depfu comment commands
@​depfu rebase
Rebases against your default branch and redoes this update
@​depfu recreate
Recreates this PR, overwriting any edits that you've made to it
@​depfu merge
Merges this PR once your tests are passing and conflicts are resolved
@​depfu cancel merge
Cancels automatic merging of this PR
@​depfu close
Closes this PR and deletes the branch
@​depfu reopen
Restores the branch and reopens this PR (if it's closed)
@​depfu pause
Ignores all future updates for this dependency and closes this PR
@​depfu pause [minor|major]
Ignores all future minor/major updates for this dependency and closes this PR
@​depfu resume
Future versions of this dependency will create PRs again (leaves this PR as is)

@depfu depfu bot added the depfu label Mar 28, 2026
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 28, 2026

⚠️ No Changeset found

Latest commit: 5248f2b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@depfu
Copy link
Copy Markdown
Contributor Author

depfu bot commented Mar 29, 2026

Closed in favor of #163.

@depfu depfu bot closed this Mar 29, 2026
@depfu depfu bot deleted the depfu/update/pnpm/tsdown-0.21.6 branch March 29, 2026 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants