chore: adopt TypeScript 7, extend type-check coverage, align versions - #176
Conversation
Upgrade TypeScript 6.0.3 -> 7.0.2. TS 7 removed the `baseUrl` option and its rootDir handling was masking real errors in packages that CI never type-checked, so several fixes come along with the bump: - Drop `baseUrl` (removed in TS 7) and the dead `outDir` from the shared tsconfig; add explicit `types: [node, bun]` so globals resolve. - Add the `type: "json"` import attribute required under NodeNext. - Extend `check-types` to cover the scripts and test-js packages, which were previously only checked by the IDE (and masked by a rootDir error). Also align version metadata: - Bump the root workspace version 3.2.0 -> 3.4.0 to match the release, and have the version script keep it in sync going forward. - Set packageManager to bun@1.3.14.
📝 WalkthroughWalkthroughThe root package version changes to 3.4.0, with updated Bun and TypeScript versions and expanded type-checking coverage. TypeScript configurations remove Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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 |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
packages/tsconfig/tsconfig.json (1)
22-23: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winKeep Node/Bun globals out of the shared browser configuration.
packages/test-js/tsconfig.jsonextends this file and includes DOM libraries, so these entries expose server-runtime globals to browser-oriented typechecks. Move them to the Node/Bun-specific configuration unless every consumer is intentionally targeting those runtimes.🤖 Prompt for 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. In `@packages/tsconfig/tsconfig.json` around lines 22 - 23, Remove the Node/Bun entries from the shared tsconfig configuration so browser-oriented consumers extending it do not receive server-runtime globals. Add the corresponding types configuration to the Node/Bun-specific tsconfig instead, preserving those globals only for runtime-specific typechecks.
🤖 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.
Nitpick comments:
In `@packages/tsconfig/tsconfig.json`:
- Around line 22-23: Remove the Node/Bun entries from the shared tsconfig
configuration so browser-oriented consumers extending it do not receive
server-runtime globals. Add the corresponding types configuration to the
Node/Bun-specific tsconfig instead, preserving those globals only for
runtime-specific typechecks.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 9904b5fe-eda2-49dc-bbc4-78a7117f25f6
⛔ Files ignored due to path filters (1)
bun.lockis excluded by!**/*.lock
📒 Files selected for processing (5)
package.jsonpackages/countries/src/data/countries.emoji.tspackages/scripts/tsconfig.jsonpackages/scripts/version.tspackages/tsconfig/tsconfig.json
💤 Files with no reviewable changes (1)
- packages/scripts/tsconfig.json
Keep the shared config runtime-neutral: declare `types: [node, bun]` in the scripts and test-js configs that actually target those runtimes, instead of the shared base that a browser-oriented consumer could extend.
There was a problem hiding this comment.
Pull request overview
This PR upgrades the workspace to TypeScript 7.0.2, tightens type-checking by expanding CI coverage to additional packages, and aligns workspace/tooling versions to match the latest release.
Changes:
- Update TypeScript to 7.0.2 and remove now-invalid
baseUrl/deadoutDirconfig from shared tsconfig. - Expand
check-typesto runtscforcountries,scripts, andtest-js. - Align versions/tooling: bump workspace version to 3.4.0, update version script to keep root
package.jsonin sync, and setpackageManagertobun@1.3.14.
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/tsconfig/tsconfig.json | Removes deprecated/unused compiler options while keeping shared NodeNext defaults and path mappings. |
| packages/test-js/tsconfig.json | Adds explicit types to improve global type resolution under TS 7 and aligns trailing commas/style. |
| packages/scripts/version.ts | Updates the version bump script to also write the root package.json version. |
| packages/scripts/tsconfig.json | Removes invalid baseUrl and adds explicit types for node/bun environments. |
| packages/countries/src/data/countries.emoji.ts | Updates JSON import to use the required import attribute under NodeNext/TS 7. |
| package.json | Bumps workspace/tool versions and extends check-types to cover more packages. |
| bun.lock | Updates lockfile to reflect the TypeScript/workspace version changes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
Upgrades TypeScript 6.0.3 → 7.0.2 and fixes the fallout the bump exposed, plus some version/tooling alignment.
TS 7 removed the
baseUrloption, and its stricterrootDirhandling surfaced errors that were previously masked — errors in packages that CI never type-checked. So the upgrade comes with real fixes, not just a version number.Changes
TypeScript 7 + type-check coverage
baseUrl(removed in TS 7) and the deadoutDirfrom the sharedpackages/tsconfig/tsconfig.json, keeping the shared base runtime-neutral.types: ["node", "bun"]in thescriptsandtest-jsconfigs — the consumers that actually target those runtimes — so node/Bun globals resolve, rather than injecting them from the shared base.baseUrlfrompackages/scripts/tsconfig.json.with { type: "json" }import attribute required under NodeNext (countries.emoji.ts).check-typesto cover thescriptsandtest-jspackages — previously only thecountriespackage was type-checked in CI; the others were checked solely by the IDE, where arootDirerror masked genuine failures.Version / tooling alignment
3.2.0 → 3.4.0to match the released package, and update the version script so it keeps the root in sync going forward.packageManagertobun@1.3.14.Verification
bun run ci— lint + check-types (all 3 packages) + build + test: pass (16 tests)dist/changes