Skip to content

fix: replace experimentalDts with dts to fix TS2883 with nodenext module resolution#11072

Open
lokesh-7977 wants to merge 3 commits into
TanStack:mainfrom
lokesh-7977:fix/nodenext-ts2883-experimental-dts
Open

fix: replace experimentalDts with dts to fix TS2883 with nodenext module resolution#11072
lokesh-7977 wants to merge 3 commits into
TanStack:mainfrom
lokesh-7977:fix/nodenext-ts2883-experimental-dts

Conversation

@lokesh-7977

@lokesh-7977 lokesh-7977 commented Jul 17, 2026

Copy link
Copy Markdown

🎯 Changes

Replace experimentalDts: true with dts: true in all tsup configs to fix
TS2883 errors when using module: "nodenext" with declaration emit.

experimentalDts generates a shared _tsup-dts-rollup.cjs file that TypeScript
cannot reference portably from .d.cts re-exports under nodenext resolution.
Switching to dts generates per-entry declaration files, eliminating the
problematic internal path.

✅ Checklist

  • I have followed the steps in the Contributing guide.
  • I have tested this code locally with pnpm run test:pr.

🚀 Release Impact

  • This change affects published code, and I have generated a changeset.
  • This change is docs/CI/dev-only (no release).

Summary by CodeRabbit

  • Build Improvements
    • Updated package builds to use the standard TypeScript declaration generation setting.
    • Ensured modern and legacy builds continue producing type declaration files consistently.

@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The pull request replaces experimentalDts: true with dts: true in Angular, ESLint plugin, Preact devtools, and shared modern/legacy tsup configurations.

Changes

tsup declaration configuration

Layer / File(s) Summary
Replace experimental declaration option
packages/angular-query-persist-client/tsup.config.ts, packages/eslint-plugin-query/root.tsup.config.js, packages/preact-query-devtools/root.tsup.config.js, scripts/getTsupConfig.js
All affected package-specific and generated modern/legacy tsup configurations use dts: true instead of experimentalDts: true.

Estimated code review effort: 1 (Trivial) | ~3 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly summarizes the main change and its nodenext/TS2883 motivation.
Description check ✅ Passed The description matches the template with Changes, Checklist, and Release Impact sections filled in.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@lokesh-7977
lokesh-7977 marked this pull request as ready for review July 17, 2026 11:23
@lokesh-7977
lokesh-7977 requested a review from a team as a code owner July 17, 2026 11:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant