Skip to content

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

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

fix: replace experimentalDts with dts to fix TS2883 with nodenext module resolution#11072
lokesh-7977 wants to merge 4 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

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 9f25070a-1de6-41cd-9db5-e92a3b2a542e

📥 Commits

Reviewing files that changed from the base of the PR and between 5bb089d and f2bb4c1.

📒 Files selected for processing (4)
  • 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

📝 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
Title check ✅ Passed The title clearly states the main change: replacing experimentalDts with dts to fix TS2883 under nodenext.
Description check ✅ Passed The description matches the template with Changes, Checklist, and Release Impact sections filled in.
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.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 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
@lokesh-7977
lokesh-7977 marked this pull request as draft July 21, 2026 18:45
@lokesh-7977
lokesh-7977 marked this pull request as draft July 21, 2026 18:45
@lokesh-7977
lokesh-7977 marked this pull request as draft July 21, 2026 18:45
@lokesh-7977
lokesh-7977 marked this pull request as draft July 21, 2026 18:45
@lokesh-7977
lokesh-7977 marked this pull request as draft July 21, 2026 18:45
@lokesh-7977
lokesh-7977 marked this pull request as draft July 21, 2026 18:45
@lokesh-7977
lokesh-7977 marked this pull request as ready for review July 21, 2026 18:48
@lokesh-7977
lokesh-7977 force-pushed the fix/nodenext-ts2883-experimental-dts branch from 32a9c45 to e97820b Compare July 25, 2026 14:14
@coderabbitai

coderabbitai Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@nx-cloud

nx-cloud Bot commented Aug 18, 2026

Copy link
Copy Markdown

🤖 Nx Cloud AI Fix Eligible

An automatically generated fix could have helped fix failing tasks for this run, but Self-healing CI is disabled for this workspace. Visit workspace settings to enable it and get automatic fixes in future runs.

To disable these notifications, a workspace admin can disable them in workspace settings.


View your CI Pipeline Execution ↗ for commit f2bb4c1

Command Status Duration Result
nx affected --targets=test:sherif,test:knip,tes... ❌ Failed 8m 34s View ↗
nx run-many --target=build --exclude=examples/*... ❌ Failed 6s View ↗

☁️ Nx Cloud last updated this comment at 2026-08-18 08:05:28 UTC

@TkDodo

TkDodo commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator

sadly this fails the build now. we have plans to move away from tsup in the near future.

@TkDodo TkDodo closed this Aug 18, 2026
@lokesh-7977

Copy link
Copy Markdown
Author

Got it. Since the TS2883 issue is still open, would it make sense to address it as part of the planned tsup migration? If so, is there already a preferred replacement/build setup I could work with?

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.

2 participants