Pin composite/declaration in client/tsconfig-reference.json#112243
Merged
Conversation
client/tsconfig-reference.json extends client/tsconfig.json and relies on it to provide composite/declaration/declarationMap (inherited from the shared calypso-typescript-config). apps/odyssey-stats references this config as a composite project, so it requires composite: true. Re-declare these settings explicitly on the reference config so it no longer depends on the leaf config keeping them. This is a no-op on trunk (the values match what is currently inherited) and prevents a TS6306 regression when the leaf tsconfig sets composite: false. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Jetpack Cloud Live (direct link)
Automattic for Agencies Live (direct link)
Dashboard Live (dotcom) (direct link)
|
paulopmt1
marked this pull request as ready for review
July 3, 2026 00:05
10 tasks
kangzj
approved these changes
Jul 3, 2026
paulopmt1
added this pull request to the merge queue
Jul 3, 2026
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.
Task-related: DOTCOM-17552
Addressing this feedback: #112095 (comment)
Proposed Changes
composite,declaration, anddeclarationMapinclient/tsconfig-reference.jsoninstead of relying on them being inherited fromclient/tsconfig.json.This is a no-op on trunk today:
client/tsconfig.jsonextends the shared@automattic/calypso-typescript-config(viamixed-package.json→ts-package.json), which already sets all three totrue, and the reference config inherits them. This PR just pins those values at the reference config itself.Why are these changes being made?
client/tsconfig-reference.jsonextendsclient/tsconfig.jsonand is consumed byapps/odyssey-stats/tsconfig.jsonas a composite project reference (references: [ … { "path": "../../client/tsconfig-reference.json" } ]). A referenced project must havecomposite: true, otherwisetscaborts withTS6306: Referenced project must have setting "composite": true.Today the reference config satisfies this only by inheritance. The upcoming React 19 upgrade (#112095) sets
composite: falseon the leafclient/tsconfig.jsonas a declaration-emit workaround, which the reference config would silently inherit — breaking odyssey-stats' type resolution withTS6306.Decoupling the reference config from the leaf config's
compositesetting immunizes odyssey-stats against that regression while leaving the React 19 leaf-config workaround (and the realtypecheck-clientCI gate) untouched.Testing Instructions
tsc --noEmit --project apps/odyssey-stats/tsconfig.json— noTS6306. (odyssey-stats has ~66 pre-existing, unrelated typecheck errors on trunk — untyped.jsimports, SCSS side-effect imports, missing pre-built.d.ts— that are not gated by CI and are unchanged by this PR.)yarn typecheck-clientstill passes.tsc --buildpath emits from it (odyssey-stats builds via calypso-build/webpack), so no declaration-emit output changes.Pre-merge Checklist
🤖 Generated with Claude Code