Conversation
✅ Deploy Preview for tsdown-main ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
tsdown
create-tsdown
@tsdown/css
@tsdown/exe
tsdown-migrate
commit: |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR implements a set of breaking configuration and platform changes across tsdown’s dependency handling and DTS generation pipeline, aligning runtime behavior, tests, and documentation with the removal of long-deprecated options.
Changes:
- Removed deprecated dependency options (
skipNodeModulesBundle,deps.skipNodeModulesBundle,deps.onlyAllowBundle) and updated dependency subpath resolution default (resolveDepSubpath: false). - Removed
dts.cjsReexportand switched dual ESM+CJS declaration output to always use a full CJS DTS pass. - Dropped Node.js 25 support by tightening
engines.nodeand updated docs/tests/snapshots accordingly.
Reviewed changes
Copilot reviewed 28 out of 31 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/issues.test.ts | Migrates tests off removed deps/DTS options. |
| tests/e2e.test.ts | Updates resolveDepSubpath tests and removes cjsReexport e2e. |
| tests/snapshots/resolve-dep-subpath-without-exports-field/skipNodeModulesBundle-should-preserve-dep-file-when-resolveDepSubpath-is-false.snap.md | Removes snapshot for deleted skipNodeModulesBundle scenario. |
| tests/snapshots/resolve-dep-subpath-without-exports-field/skipNodeModulesBundle-dep-folder-should-resolve-to-dep-folder-index-js.snap.md | Removes snapshot for deleted skipNodeModulesBundle scenario. |
| tests/snapshots/resolve-dep-subpath-without-exports-field/skipNodeModulesBundle-dep-file-should-resolve-to-dep-file-js.snap.md | Removes snapshot for deleted skipNodeModulesBundle scenario. |
| src/features/rolldown.ts | Removes cjsReexport integration and updates type import path. |
| src/features/deps.ts | Removes deprecated deps options + changes resolveDepSubpath default. |
| src/features/deps.test.ts | Updates unit tests for new resolveDepSubpath default/behavior. |
| src/features/cjs.ts | Removes the CJS DTS re-export plugin implementation. |
| src/config/types.ts | Removes dts.cjsReexport and deprecated config fields from types. |
| src/build.ts | Always runs a CJS DTS-only pass when dts is enabled for CJS. |
| skills/tsdown/references/reference-cli.md | Removes CLI docs for deleted --deps.skip-node-modules-bundle. |
| skills/tsdown/references/option-dependencies.md | Removes docs for deleted deps options and updates migration section. |
| skills/tsdown-migrate/SKILL.md | Updates migration guidance to reflect removals. |
| skills/tsdown-migrate/references/guide-differences-detailed.md | Updates migration guidance to reflect removals. |
| packages/migrate/package.json | Updates Node engine range to exclude Node 25. |
| packages/exe/package.json | Updates Node engine range to exclude Node 25. |
| packages/css/package.json | Updates Node engine range to exclude Node 25. |
| packages/create-tsdown/package.json | Updates Node engine range to exclude Node 25. |
| package.json | Updates Node engine range; bumps inlined package-manager-detector. |
| docs/zh-CN/reference/cli.md | Removes CLI docs for deleted --deps.skip-node-modules-bundle. |
| docs/zh-CN/options/dependencies.md | Updates resolveDepSubpath docs/default and removes skipNodeModulesBundle section. |
| docs/zh-CN/guide/migrate-from-tsup.md | Adjusts migration tables for removed options. |
| docs/zh-CN/guide/how-it-works.md | Clarifies resolveDepSubpath is optional. |
| docs/reference/cli.md | Removes CLI docs for deleted --deps.skip-node-modules-bundle. |
| docs/options/dependencies.md | Updates resolveDepSubpath docs/default and removes skipNodeModulesBundle section. |
| docs/guide/migrate-from-tsup.md | Adjusts migration tables for removed options. |
| docs/guide/how-it-works.md | Clarifies resolveDepSubpath is optional. |
| snapshots/tsnapi/plugins.snapshot.d.ts | Updates public API snapshot for DepsPlugin signature. |
| snapshots/tsnapi/index.snapshot.d.ts | Updates public API snapshot for removed options/types and exports. |
| snapshots/tsnapi/config.snapshot.d.ts | Updates public API snapshot for removed config fields. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+114
to
+118
| @@ -128,8 +115,7 @@ export function resolveDepsConfig( | |||
| alwaysBundle, | |||
| onlyBundle, | |||
| onlyImport, | |||
| skipNodeModulesBundle, | |||
| resolveDepSubpath = true, | |||
| resolveDepSubpath = false, | |||
Comment on lines
129
to
133
| if (dts) { | ||
| const { dts: dtsPlugin } = await import('rolldown-plugin-dts') | ||
| const { cjsReexport: _, ...dtsPluginOptions } = dts | ||
| const options: DtsOptions = { | ||
| tsconfig, | ||
| logger, |
sxzz
force-pushed
the
next
branch
4 times, most recently
from
July 21, 2026 17:14
4d4e43b to
afaf188
Compare
sxzz
force-pushed
the
main
branch
3 times, most recently
from
July 23, 2026 18:06
4a1166d to
0525465
Compare
The CJS re-export stub option has been removed. Dual-format builds always run a separate CJS declaration pass again. Related: #944 (comment)
Use `deps.neverBundle: true` instead, which externalizes all dependencies. tsup configs are migrated automatically by `tsdown-migrate`.
Remove `inlineOnly`, `removeNodeProtocol`, `bundle`, `outExtension`, `injectStyle`, `publicDir` and the `--public-dir` CLI flag. tsdown-migrate now pins migrated projects to tsdown@^0.22.13, the last version accepting these options, so tsup users can resolve deprecation warnings before upgrading.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🚨 Breaking Changes
Deprecated tsup compatibility options removed
The following deprecated options have been removed. They were accepted (with deprecation warnings) up to v0.22.13 and now throw as unknown options:
skipNodeModulesBundle/deps.skipNodeModulesBundledeps: { neverBundle: true }deps.onlyAllowBundledeps: { onlyBundle: [...] }inlineOnlydeps: { onlyBundle: [...] }removeNodeProtocolnodeProtocol: 'strip'bundleunbundle(inverted)outExtensionoutExtensionsinjectStylecss: { inject: true }publicDir(and--public-dir)copy(and--copy)deps.neverBundle: trueis faster than the removedskipNodeModulesBundle(externalizes bare imports as written, without resolving them), works even when dependencies are not installed, and can be combined withdeps.alwaysBundleto selectively bundle a few packages.dts.cjsReexportremovedDual ESM+CJS builds now always generate full
.d.ctsdeclarations via a separate compilation pass, instead of optionally emitting a.d.ctsstub that re-exports from.d.mts.deps.resolveDepSubpathnow defaults tofalseSubpath imports of external dependencies (e.g.
my-dep/utils) are now preserved exactly as written by default. Previously, when a package had noexportsfield, tsdown resolved them to their actual package-relative paths (e.g.my-dep/utils.js). Setdeps: { resolveDepSubpath: true }to restore the old behavior.Node.js 25 support dropped
engines.nodeis now^22.18.0 || ^24.11.0 || >=26.0.0. Node.js 25 (odd-numbered, end-of-life) is no longer supported.Migration
Upgrading from tsdown v0.22.x: upgrade to v0.22.13 first, run your build, and resolve every deprecation warning — each warning names the replacement option. Once the build is warning-free, upgrade to this version.
Migrating from tsup:
npx tsdown-migratenow installstsdown@^0.22.13, the last version that still accepts deprecated tsup-compatible options. Migrate, resolve all deprecation warnings, then upgrade tsdown to the latest version.skipNodeModulesBundle: truedeps: { neverBundle: true }deps: { onlyAllowBundle: [...] }/inlineOnly: [...]deps: { onlyBundle: [...] }removeNodeProtocol: truenodeProtocol: 'strip'bundle: falseunbundle: trueoutExtension: () => ...outExtensions: () => ...injectStyle: truecss: { inject: true }publicDir: 'public'copy: 'public'dts: { cjsReexport: true }deps: { resolveDepSubpath: true }The still-deprecated
externalandnoExternaloptions continue to work with warnings for now.