Skip to content

chore(tsconfig.json): exclude tsup bundled config files to prevent TS6053 race conditions#10522

Draft
sukvvon wants to merge 2 commits intomainfrom
chore/tsconfig-exclude-tsup-bundled-files
Draft

chore(tsconfig.json): exclude tsup bundled config files to prevent TS6053 race conditions#10522
sukvvon wants to merge 2 commits intomainfrom
chore/tsconfig-exclude-tsup-bundled-files

Conversation

@sukvvon
Copy link
Copy Markdown
Collaborator

@sukvvon sukvvon commented Apr 19, 2026

🎯 Changes

Add "exclude": ["**/*.bundled_*.mjs"] to all packages/*/tsconfig.json files.

Why

tsup bundles tsup.config.ts into a temporary ESM file named tsup.config.bundled_<random>.mjs before loading it. This temporary file exists on disk for a few milliseconds during tsup builds.

All package tsconfigs use "include": ["*.config.*", ...], which matches this temporary file. When Nx runs multiple tasks in parallel (e.g., build and test:types), the TypeScript compiler may enumerate the temporary file, but by the time it tries to read it, tsup has already deleted it. This results in intermittent CI failures such as:

error TS6053: File '/.../packages/query-devtools/tsup.config.bundled_<random>.mjs' not found.

These failures typically disappear on CI re-run because the dependency's build task hits Nx Cloud cache and doesn't execute tsup again.

Real CI failures

Scope

Applied to all 26 packages using the *.config.* include pattern. Even packages that don't currently exhibit the issue are fixed preemptively, since any future tsup-using package could trigger the same race condition.

Order

Each tsconfig.json is updated with includeexcludereferences order, matching the TypeScript documentation convention.

✅ 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).

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 19, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 389e4d60-14c3-4fbd-821c-ef3c3bd2ee97

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/tsconfig-exclude-tsup-bundled-files

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

@nx-cloud
Copy link
Copy Markdown

nx-cloud bot commented Apr 19, 2026

View your CI Pipeline Execution ↗ for commit af137b2

Command Status Duration Result
nx run-many --target=build --exclude=examples/*... ✅ Succeeded 2s View ↗
nx affected --targets=test:sherif,test:knip,tes... ✅ Succeeded 46s View ↗

☁️ Nx Cloud last updated this comment at 2026-04-20 05:10:59 UTC

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 19, 2026

🚀 Changeset Version Preview

No changeset entries found. Merging this PR will not cause a version bump for any packages.

@sukvvon sukvvon self-assigned this Apr 19, 2026
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Apr 19, 2026

More templates

@tanstack/angular-query-experimental

npm i https://pkg.pr.new/@tanstack/angular-query-experimental@10522

@tanstack/eslint-plugin-query

npm i https://pkg.pr.new/@tanstack/eslint-plugin-query@10522

@tanstack/preact-query

npm i https://pkg.pr.new/@tanstack/preact-query@10522

@tanstack/preact-query-devtools

npm i https://pkg.pr.new/@tanstack/preact-query-devtools@10522

@tanstack/preact-query-persist-client

npm i https://pkg.pr.new/@tanstack/preact-query-persist-client@10522

@tanstack/query-async-storage-persister

npm i https://pkg.pr.new/@tanstack/query-async-storage-persister@10522

@tanstack/query-broadcast-client-experimental

npm i https://pkg.pr.new/@tanstack/query-broadcast-client-experimental@10522

@tanstack/query-core

npm i https://pkg.pr.new/@tanstack/query-core@10522

@tanstack/query-devtools

npm i https://pkg.pr.new/@tanstack/query-devtools@10522

@tanstack/query-persist-client-core

npm i https://pkg.pr.new/@tanstack/query-persist-client-core@10522

@tanstack/query-sync-storage-persister

npm i https://pkg.pr.new/@tanstack/query-sync-storage-persister@10522

@tanstack/react-query

npm i https://pkg.pr.new/@tanstack/react-query@10522

@tanstack/react-query-devtools

npm i https://pkg.pr.new/@tanstack/react-query-devtools@10522

@tanstack/react-query-next-experimental

npm i https://pkg.pr.new/@tanstack/react-query-next-experimental@10522

@tanstack/react-query-persist-client

npm i https://pkg.pr.new/@tanstack/react-query-persist-client@10522

@tanstack/solid-query

npm i https://pkg.pr.new/@tanstack/solid-query@10522

@tanstack/solid-query-devtools

npm i https://pkg.pr.new/@tanstack/solid-query-devtools@10522

@tanstack/solid-query-persist-client

npm i https://pkg.pr.new/@tanstack/solid-query-persist-client@10522

@tanstack/svelte-query

npm i https://pkg.pr.new/@tanstack/svelte-query@10522

@tanstack/svelte-query-devtools

npm i https://pkg.pr.new/@tanstack/svelte-query-devtools@10522

@tanstack/svelte-query-persist-client

npm i https://pkg.pr.new/@tanstack/svelte-query-persist-client@10522

@tanstack/vue-query

npm i https://pkg.pr.new/@tanstack/vue-query@10522

@tanstack/vue-query-devtools

npm i https://pkg.pr.new/@tanstack/vue-query-devtools@10522

commit: af137b2

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 19, 2026

size-limit report 📦

Path Size
react full 11.99 KB (0%)
react minimal 9.02 KB (0%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment