chore(tsconfig.json): exclude tsup bundled config files to prevent TS6053 race conditions#10522
Draft
chore(tsconfig.json): exclude tsup bundled config files to prevent TS6053 race conditions#10522
Conversation
…6053 race conditions
Contributor
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
View your CI Pipeline Execution ↗ for commit af137b2
☁️ Nx Cloud last updated this comment at |
Contributor
🚀 Changeset Version PreviewNo changeset entries found. Merging this PR will not cause a version bump for any packages. |
Contributor
size-limit report 📦
|
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.
🎯 Changes
Add
"exclude": ["**/*.bundled_*.mjs"]to allpackages/*/tsconfig.jsonfiles.Why
tsup bundles
tsup.config.tsinto a temporary ESM file namedtsup.config.bundled_<random>.mjsbefore 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.,buildandtest: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:These failures typically disappear on CI re-run because the dependency's
buildtask hits Nx Cloud cache and doesn't execute tsup again.Real CI failures
main)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.jsonis updated withinclude→exclude→referencesorder, matching the TypeScript documentation convention.✅ Checklist
pnpm run test:pr.🚀 Release Impact