Skip to content

fix(js): track extends of internal tsconfig refs - #37582

Open
trollixx wants to merge 1 commit into
nrwl:masterfrom
trollixx:fix/js-internal-ref-extends
Open

trollixx wants to merge 1 commit into
nrwl:masterfrom
trollixx:fix/js-internal-ref-extends

Conversation

@trollixx

Copy link
Copy Markdown

Current Behavior

@nx/js/typescript follows extends only for the tsconfig a target is inferred from, not for that tsconfig's internal project references. In this common layout:

// libs/my-lib/tsconfig.json
{ "files": [], "references": [{ "path": "./tsconfig.lib.json" }, { "path": "./tsconfig.spec.json" }] }

// libs/my-lib/tsconfig.lib.json
{ "extends": ["./tsconfig.json", "../../tsconfig.lib.base.json"] }

tsconfig.lib.base.json is not a typecheck input, so editing it affects no projects and keeps stale cache hits. It is also missing from the createNodes cache key, so inferred targets don't update when it changes (e.g. its ${configDir} include).

Expected Behavior

Configs extended by internal project references, recursively, are typecheck and build inputs and part of the createNodes cache key. Duplicate config inputs are dropped, since references usually extend ./tsconfig.json.

Related Issue(s)

None filed. #35457 fixed this for external references only. It skips workspace-root files, assuming the project's own extends walk covers them, which isn't true for internal references.

Configs extended by a project's internal project references (e.g. a
shared root tsconfig.lib.base.json) are now typecheck and build inputs
and part of the createNodes cache key. Previously editing them affected
no projects and left inferred targets stale.
@trollixx
trollixx requested a review from a team as a code owner October 24, 2026 17:47
@trollixx
trollixx requested a review from MaxKless October 24, 2026 17:47
@netlify

netlify Bot commented Oct 24, 2026

Copy link
Copy Markdown

👷 Deploy request for nx-docs pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 21ede9c

@netlify

netlify Bot commented Oct 24, 2026

Copy link
Copy Markdown

👷 Deploy request for nx-dev pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 21ede9c

This branch has not been deployed

No deployments
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.

1 participant