Skip to content

fix(js): include tsbuildinfo in narrowed tsc build-base outputs#35086

Merged
FrozenPandaz merged 1 commit into
masterfrom
fix-tsbuild
Mar 31, 2026
Merged

fix(js): include tsbuildinfo in narrowed tsc build-base outputs#35086
FrozenPandaz merged 1 commit into
masterfrom
fix-tsbuild

Conversation

@FrozenPandaz

Copy link
Copy Markdown
Contributor

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

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.
@netlify

netlify Bot commented Mar 30, 2026

Copy link
Copy Markdown

Deploy Preview for nx-dev ready!

Name Link
🔨 Latest commit a68ec16
🔍 Latest deploy log https://app.netlify.com/projects/nx-dev/deploys/69cad2f91dee12000825123e
😎 Deploy Preview https://deploy-preview-35086--nx-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Mar 30, 2026

Copy link
Copy Markdown

Deploy Preview for nx-docs ready!

Name Link
🔨 Latest commit a68ec16
🔍 Latest deploy log https://app.netlify.com/projects/nx-docs/deploys/69cad2f983026f00088253cd
😎 Deploy Preview https://deploy-preview-35086--nx-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@nx-cloud

nx-cloud Bot commented Mar 30, 2026

Copy link
Copy Markdown
Contributor

View your CI Pipeline Execution ↗ for commit a68ec16

Command Status Duration Result
nx affected --targets=lint,test,build,e2e,e2e-c... ✅ Succeeded 59m 6s View ↗
nx run-many -t check-imports check-lock-files c... ✅ Succeeded 6s View ↗
nx-cloud record -- pnpm nx conformance:check ✅ Succeeded 8s View ↗
nx build workspace-plugin ✅ Succeeded <1s View ↗
nx-cloud record -- nx format:check ✅ Succeeded 2s View ↗
nx-cloud record -- nx sync:check ✅ Succeeded <1s View ↗

☁️ Nx Cloud last updated this comment at 2026-03-30 20:50:07 UTC

@FrozenPandaz FrozenPandaz marked this pull request as ready for review March 30, 2026 21:20
@FrozenPandaz FrozenPandaz requested a review from a team as a code owner March 30, 2026 21:20
@FrozenPandaz FrozenPandaz enabled auto-merge (squash) March 31, 2026 01:15
@FrozenPandaz FrozenPandaz merged commit b1d8db3 into master Mar 31, 2026
24 checks passed
@FrozenPandaz FrozenPandaz deleted the fix-tsbuild branch March 31, 2026 07:32
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)
@github-actions

github-actions Bot commented Apr 6, 2026

Copy link
Copy Markdown
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.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Apr 6, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants