feat(typescript-config): refine tsconfig.json for typescript v7 readiness - #115
Conversation
…ness Delete `strict` and `esModuleInterop` from tsconfig.json now that both are mandatory, non-overridable defaults from TypeScript 6.0 onward (#110 already put every internal consumer on typescript ~6.0.3, so the deletion changes nothing observable there); bump the peer/dev typescript ranges to >=7.0.0 / ~7.0.2, and target/lib from ES2023 to ES2024, since the workspace's engines.node floor (^22.23.1) already ships every ES2024 runtime feature TypeScript 7's lib.es2024.*.d.ts exposes. Verified empirically in an isolated scratch directory against both typescript@5.9.3 and typescript@7.0.2 (see PR description for the full methodology and output) rather than relying on secondary sources. Refs #111
This comment has been minimized.
This comment has been minimized.
|
Warning Review limit reached
Next review available in: 18 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughThe TypeScript configuration package now uses TypeScript 7. Its peer dependency requires TypeScript 7 or newer. The compiler target and library use ES2024. The explicit ChangesTypeScript 7 readiness
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related issues
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Warning Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/typescript-config/package.json`:
- Around line 36-37: Align the TypeScript peer requirement in
packages/typescript-config with the workspace’s supported compiler version by
either updating the root dependency and direct consumers (including
vite-lib-config, example-cli, example-lib, and sea-builder) to TypeScript 7 or
lowering the peer boundary to remain compatible with TypeScript ~6.0.3; ensure
the resulting workspace resolution satisfies all consumers consistently.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 3927c104-51a9-4588-a2b3-56f7edea9e6b
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (2)
packages/typescript-config/package.jsonpackages/typescript-config/tsconfig.json
Chatgpt-codex flagged that the prior commit raised the peer floor to TypeScript 7 without an ! or a BREAKING CHANGE footer, and that README.md still documented the old >=5.7.x requirement. Documenting here rather than amending the prior commit, per this repository's policy against rewriting already-pushed history. BREAKING CHANGE: consumers on TypeScript <7 will see an unsatisfied (but optional) peerDependencies.typescript warning when installing @kurone-kito/typescript-config, same class of warning this workspace already tolerates for typedoc@0.28.20. Upgrade to typescript@7.0.0 or later, or pin to a pre-0.22.0 release of this package. Refs #111
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 4 changed files in this pull request and generated no new comments.
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
Suppressed comments (1)
packages/typescript-config/tsconfig.json:13
libwas bumped toES2024here, but all in-repo consumers that extend this config currently overridecompilerOptions.libto['DOM', 'ES2023'](e.g.packages/example-cli/tsconfig.json:3,example-lib:3,sea-builder:3,vite-lib-config:3). That means the ES2024 lib typings won’t actually apply to the workspace packages, and they’ll now be in a potentially confusing state oftarget: ES2024(inherited) withlib: ES2023(overridden). Consider updating those consumer tsconfigs (and the README example) to['DOM', 'ES2024']in the same change set, or reverting the baselib/targetbump until the consumers are aligned.
"lib": ["ES2024"],
"module": "nodenext",
Copilot flagged (as a suppressed comment) that all four in-repo consumers of typescript-config's tsconfig override compilerOptions.lib to ['DOM', 'ES2023'], which TypeScript replaces wholesale rather than merging -- so the base config's ES2024 lib bump had zero effect on any of them, leaving target: ES2024 (inherited) paired with lib: ES2023 (overridden), a confusing mismatched state. Updated every override (and the README's matching example) to ['DOM', 'ES2024'] to keep target and lib consistent workspace-wide. Refs #111
|
Accepted — Copilot's review on commit 5430edf buried a real finding in a collapsed "Suppressed comments" section (never posted as a normal comment/thread): all four in-repo consumers ( Verified against the actual consumer tsconfig.json files, then updated every override (and the README's matching example) to |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Rejected — coderabbitai[bot] did not review HEAD 2f71d2c (review limit reached / rate limited); this is not a completed review (source: #issuecomment-5241122683) |
This comment has been minimized.
This comment has been minimized.
|
F4 Cleanup Evidence (server-side fallback via
|
Summary
Refine
packages/typescript-config/tsconfig.jsonfor TypeScript v7readiness, per the issue's proposed change:
"strict": trueand"esModuleInterop": true— both aremandatory, non-overridable defaults from TypeScript 6.0 onward, and
Align workspace typescript devDependencies to ~6.0.3 #110 already put every internal consumer (
example-cli,example-lib,sea-builder,vite-lib-config) ontypescript ~6.0.3, so the deletion changes nothing observable forthem.
peerDependencies.typescriptfrom>=5.7.xto>=7.0.0and
devDependencies.typescriptfrom~6.0.3to~7.0.2(current
latest). Breaking for any external consumer still onTypeScript <7 — same class of peer-mismatch warning this workspace
already tolerates for
typedoc@0.28.20, not a hard failure.target/libfromES2023toES2024(investigationbelow).
Investigation outcomes
target/lib→ES2024Checked whether every engine in
engines.node's full range(
^22.23.1 || ^24.2.0 || >=26.0.0) supports the runtime featuresTypeScript 7's
lib.es2024.*.d.tsexposes. The floor version,Node.js
22.23.1, is what this environment actually runs, so Ichecked it directly rather than reasoning from release notes:
All present on the range's floor version. Node.js
24.2.0and26.0.0ship strictly newer V8 releases, so they carry every featurethe floor already has. Compiling a file that calls all of the above
under
typescript@7.0.2withtarget/lib: "ES2024"type-checkswith zero errors. Decision: bumped to
ES2024.noErrorTruncation/preserveWatchOutputBoth vanish from
tsc --showConfig's output undertypescript@7.0.2(confirmed, matching the issue's own finding), but
--showConfigonlyechoes options that were explicitly set somewhere in the config
chain — it does not enumerate implicit defaults at all (verified
with a bare
{}tsconfig:--showConfigreports"compilerOptions": {}",even though TypeScript still applies
strict: trueetc. during anactual compile). So the vanished
--showConfigentry doesn't implythe option itself stopped working; I tested actual behavior instead:
noErrorTruncation: compiled a file that produces a message longenough to truncate. Without the option,
typescript@7.0.2truncateswith
...; with"noErrorTruncation": true, the full type isprinted untruncated. Still takes effect.
preserveWatchOutput: rantsc -wundertypescript@7.0.2andcaptured raw bytes. Without the option, each recompilation is
preceded by
\x1b[2J\x1b[3J\x1b[H(clear screen + clear scrollback +cursor home); with
"preserveWatchOutput": true, those escape codesare absent and output is only appended. Still takes effect.
Decision: kept both.
Acceptance-criteria note on
--showConfigThe issue's last acceptance-criteria bullet expected
pnpm --filter @kurone-kito/typescript-config exec tsc --showConfigagainst a consuming file to still show
strict: trueandesModuleInterop: trueafter the deletions, as proof TypeScript 7supplies both as mandatory defaults. As found above,
--showConfigdoes not enumerate implicit defaults at all (verified with a bare
{}config under
typescript@7.0.2—compilerOptionsreports empty).Both keys are absent from the resolved
--showConfigoutput afterthis change, exactly as they would be for any unset option,
regardless of TypeScript version.
The underlying claim — that TypeScript 7 still enforces both as
non-overridable defaults — is verified instead by actual compile
behavior:
const v: string | null = null; v.length;still errorsTS18047('possibly null') under
typescript@7.0.2with nostrictsetanywhere in the config.
"esModuleInterop": falsestill hard-errorsTS5108("Option'esModuleInterop=false' has been removed") under the same version.
Test plan
pnpm run lintpassespnpm run buildsucceeds across the workspacepnpm run testpasses (68/68 tests, includingtest:ts's workspace-widetsc --noEmit)packages/typescript-config/tsconfig.jsonno longer containsstrictoresModuleInteroppeerDependencies.typescriptis>=7.0.0;devDependencies.typescriptis~7.0.2Closes #111
Summary by CodeRabbit