Repository navigation
Unify TypeScript 6 across workspaces and fix TS 6 typings defaults. - #127
Merged
Merged
Conversation
Pin typescript to ^6.0.3 in every workspace package so npm hoists one major version for builds and tooling. Extend tsconfig.base.json with typeRoots targeting the repo @types folder and types: [`*`] so TypeScript 6 still loads ambient typings (Node globals, tests) after its types default stopped auto-including packages under node_modules/@types. Made-with: Cursor
📝 WalkthroughWalkthroughThis PR updates TypeScript from version 5.x to 6.0.3 across six package workspaces and explicitly configures type resolution in the base tsconfig with Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
Make `npm i && npm run build` work from a fully clean state. Three issues surfaced after the TS 6 unification commit and Vite 8 bump: - tsconfig.base.json typeRoots was workspace-relative only, so only workspaces that nested their own @types/ (report-web) found Node types; the rest hit TS2591 on `node:*` imports. Add the repo-root path so hoisted @types are visible from every workspace. - Add @types/node at the root so a modern version hoists, instead of relying on an ancient transitive @types/node@12 that predates the `node:` module-name protocol. - Vite 8 lists rolldown and lightningcss as regular deps, but npm workspace hoisting drops them. Declare both explicitly in report-web (rolldown was already there; lightningcss was missing). Also replace the brittle hoisted-package check in scripts/ensure-dev-install.mjs with a simple root node_modules check so it stops false-firing on packages npm chose to nest.
droid-ash
approved these changes
Apr 28, 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.
Pin typescript to ^6.0.3 in every workspace package so npm hoists one major version for builds and tooling. Extend tsconfig.base.json with typeRoots targeting the repo @types folder and types: [
*] so TypeScript 6 still loads ambient typings (Node globals, tests) after its types default stopped auto-including packages under node_modules/@types.What was broken
Building from a clean checkout (no
node_modules) didn't work. Three separate issues:Node's built-in types weren't found. After the TS 6 bump, TypeScript was told to look for type definitions inside each package's own folder. In a monorepo those folders are usually empty — the types live at the repo root. Most packages couldn't find types for
node:fs,node:path, etc.Fix: also point TypeScript at the repo-root types folder, and add modern Node type definitions at the root so they exist.
Vite 8 has a fragile install. Vite 8 needs
rolldownandlightningcss. It declares them as dependencies, but our monorepo setup silently drops them, so Vite crashed mid-build.Fix: declare both directly in
report-webso they always get installed.The pre-build sanity check was lying. A guard script checked "is everything installed?" by looking in the wrong place. Even on a working install it would abort with "missing packages, run
npm ci".Fix: simplified to just check that install was run at all.
Worth flagging
package-lock.jsonis gitignored, so every fresh install picks slightly different versions. That's why these issues showed up "randomly" and why a build can be green on one laptop and red on another. Worth a separate discussion on committing it.Validation
npm run build(from a cleanrm -rf node_modules && npm i)npm testnpm run lintSummary by CodeRabbit