fix(js): include tsbuildinfo in narrowed tsc build-base outputs#35086
Merged
Conversation
The narrowed output globs from #35041 excluded .tsbuildinfo files. Since tsc --build always produces tsbuildinfo (incremental is implicit), extract a getTsBuildInfoOutputPath helper and call it unconditionally at the end of the output resolution loop. Fixes the missing cache output for tsbuildinfo files.
✅ Deploy Preview for nx-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for nx-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
|
View your CI Pipeline Execution ↗ for commit a68ec16
☁️ Nx Cloud last updated this comment at |
leosvelperez
approved these changes
Mar 31, 2026
FrozenPandaz
added a commit
that referenced
this pull request
Mar 31, 2026
## Current Behavior PR #35041 narrowed the `build-base` target outputs to only match tsc-produced file types (e.g. `**/*.{js,d.ts,...}{,.map}`), preventing cross-OS cache pollution from native binaries. However, `.tsbuildinfo` files were not included in the narrowed glob, so they are no longer captured as build outputs. The tsbuildinfo handling was also spread across multiple conditional branches with duplicated logic. ## Expected Behavior `.tsbuildinfo` files are always included as a build output since `tsc --build` implicitly enables `incremental: true` and always produces them. A new `getTsBuildInfoOutputPath` helper centralizes the logic for determining the tsbuildinfo file location (respecting `tsBuildInfoFile`, `outFile`, `outDir`, or the default), and is called once unconditionally at the end of the output resolution loop. ## Related Issue(s) Follow-up to #35041 (cherry picked from commit b1d8db3)
Contributor
|
This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request. |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Current Behavior
PR #35041 narrowed the
build-basetarget outputs to only match tsc-produced file types (e.g.**/*.{js,d.ts,...}{,.map}), preventing cross-OS cache pollution from native binaries. However,.tsbuildinfofiles were not included in the narrowed glob, so they are no longer captured as build outputs. The tsbuildinfo handling was also spread across multiple conditional branches with duplicated logic.Expected Behavior
.tsbuildinfofiles are always included as a build output sincetsc --buildimplicitly enablesincremental: trueand always produces them. A newgetTsBuildInfoOutputPathhelper centralizes the logic for determining the tsbuildinfo file location (respectingtsBuildInfoFile,outFile,outDir, or the default), and is called once unconditionally at the end of the output resolution loop.Related Issue(s)
Follow-up to #35041