Uh oh!
There was an error while loading. Please reload this page.
fix(scripts): add allowImportingTsExtensions to tsconfig.scripts.json - #5974
Merged
yinlianghui-tw merged 1 commit intoAug 24, 2026
Merged
Conversation
tsconfig.scripts.json's header claims it matches apps/console/tsconfig.node.json's option set so a file shared between the two programs (scripts/vite-crypto-stub.ts, scripts/vite-maplibre-worker.ts) cannot be green in one and red in the other. It omitted allowImportingTsExtensions, which the console project sets because vite.config.ts imports the shared files with explicit .ts extensions (objectui#3384). Add the option (legal under noEmit: true) and pin the parity against apps/console/tsconfig.node.json directly in scripts-type-check.test.ts, per the issue's own suggestion for where the choice should be pinned. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019b5UBNMtTzKbVtZZGvFuxe
yinlianghui-tw
marked this pull request as ready for review
August 24, 2026 10:33
Uh oh!
There was an error while loading. Please reload this page.
yinlianghui-tw
deleted the
claude/issue-4926-scripts-tsconfig-option-parity
branch
August 24, 2026 10:34
This was referenced Aug 24, 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 freeto 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.
Fixes#4926
What
tsconfig.scripts.json's header claims it matchesapps/console/tsconfig.node.json's option set so the two files shared between both programs (scripts/vite-crypto-stub.ts,scripts/vite-maplibre-worker.ts) "cannot be green in one project and red in the other." It omittedallowImportingTsExtensions, which the console project sets (line 30) becauseapps/console/vite.config.tsimports the shared files with explicit.tsextensions (objectui#3384)."allowImportingTsExtensions": truetotsconfig.scripts.json(legal under its existingnoEmit: true), and expanded the header comment to name it as part of the matched set.scripts/__tests__/scripts-type-check.test.tsthat reads both parsed tsconfigs and assertsstrict,module,moduleResolution,allowImportingTsExtensions, and the absence ofnoImplicitReturnsagree — narrowly scoped to only the options the header itself claims are matched (notcomposite/outDir/rootDir/allowJs/target/emit, which differ by design). This is the pin location the issue itself named.Mechanism finding (dispatch's open question)
The dispatch asked whether the divergence produces a live red today or is latent. Confirmed latent —
pnpm type-check:scriptsis green both before and after this change; neither shared file itself contains a.ts-extension import.I did find where
allowImportingTsExtensionsis actually exercised (something the PM's./-relative grep missed, since these are../../-relative):That's on the console side, inside
apps/console/tsconfig.node.json's own program — not insidetsconfig.scripts.json's (include: ["scripts/**/*.ts"]never reachesapps/console/vite.config.ts). To reproduce the issue's own repro exactly, I widened a scratch copy oftsconfig.scripts.jsonto also includeapps/console/vite.config.ts(not committed) and rerantsc:Same three TS5097s the issue reported. So: invariant restoration, not a live-bug fix — the gap surfaces only if a shared file gains a
.ts-extension import, or the scripts program'sincludewidens to reach a file that has one (exactly the shape the header defends against). Reverse-verified the new pin test on the committed fix by checking out the pre-fixtsconfig.scripts.jsonfromorigin/mainand rerunning — the new assertion failed with the expected message, then I restored the fix fromHEAD.Scope
Per dispatch: this PR touches only the one option-set divergence.
tsconfig.scripts.jsonis not restructured toextendsanything (its header'stsconfig.base.json-excludereasoning stands, unchallenged). No other option differences between the two projects were found or touched.Tests
pnpm type-check:scripts— clean (before and after).pnpm --filter '@object-ui/console^...' buildthenpnpm --filter '@object-ui/console' type-check(tsc --noEmit && tsc -b tsconfig.node.json --force) — clean.npx vitest run scripts/__tests__— 62 test files, 1665 tests, all passing (includes the new assertion, 9/9 inscripts-type-check.test.ts, up from 8/8).node scripts/check-type-check-coverage.mjs— ✅ (45/46 viatype-check, unrelated pre-existing 1 not-compiled; 41/41 test coverage).node scripts/check-changeset-presence.mjs— ✅ no changeset owed (tooling config + test file, not a published package'ssrc/).node scripts/check-control-bytes.mjs— ✅ clean.npx eslint scripts/__tests__/scripts-type-check.test.ts --no-inline-config— 0 errors.Verified at
2ce7ee4de(branch head).Generated by Claude Code
Generated by Claude Code