chore: upgrade TS 6 & Biome 2.5, drop Turborepo for Bun scripts#168
Conversation
- typescript 5.9.3 -> 6.0.3: migrate off the now-removed `moduleResolution: node10` (-> `bundler`), add `types: ["node"]` (TS 6 no longer auto-includes transitive @types, breaking node builtins in tsup.config.ts), and drop the vestigial per-build `module` overrides (tsup/esbuild sets the output format) - @biomejs/biome 2.4.5 -> 2.5.0: `linter.rules.recommended` -> `preset` via `biome migrate`; apply new `useOptionalChain` findings - turbo 2.8.13 -> 2.9.18, @types/bun 1.3.14, lefthook 2.1.9: no migration needed Fresh `bun run ci` passes (turbo cache cleared).
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (8)
💤 Files with no reviewable changes (3)
✅ Files skipped from review due to trivial changes (4)
📝 WalkthroughWalkthroughThis PR migrates the monorepo's build orchestration from Turbo to Bun, consolidates TypeScript configuration, and applies code quality improvements. Core scripts in Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 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 |
There was a problem hiding this comment.
Pull request overview
This PR upgrades the repo toolchain (TypeScript 6, Biome 2.5, Turbo 2.9, @types/bun, lefthook) and updates TypeScript/Biome configuration to accommodate breaking changes, with a couple of small lint-driven refactors.
Changes:
- Bump toolchain dependency versions (TypeScript, Biome, Turbo, @types/bun, lefthook) and update
bun.lock. - Update
packages/countriesTypeScript config tomoduleResolution: "Bundler",module: "ESNext", and explicitly include Node types. - Migrate Biome config to the new
rules.presetformat and apply two optional-chaining style fixes.
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/scripts/utils.ts | Optional-chaining lint fix in getStringFromArray guard. |
| packages/scripts/tasks/generateSql.ts | Optional-chaining lint fix in sqlValues empty-input guard. |
| packages/countries/tsconfig.json | Remove per-build module override; rely on base config. |
| packages/countries/tsconfig-cjs.json | Remove module: commonjs override; rely on base config. |
| packages/countries/tsconfig-base.json | Switch to moduleResolution: Bundler, module: ESNext, add types: ["node"]. |
| package.json | Upgrade toolchain dependency versions (via catalogs + lefthook). |
| bun.lock | Lockfile updates for the upgraded toolchain versions. |
| biome.json | Migrate deprecated rules.recommended to rules.preset: "recommended". |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
The JS build-test workflow's pull_request filter only matched packages/countries/src/**, so dependency / tsconfig / biome / turbo / scripts changes (like this PR) merged with no pre-merge CI. Widen it to cover the JS packages and root config, and fix the self-reference (.github/workflows/nodejs.yml -> build-test.yml).
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 @.github/workflows/build-test.yml:
- Around line 22-24: The glob patterns in the build-test.yml file use
non-standard syntax for GitHub Actions' `@actions/glob` implementation. Update the
path exclusion patterns in the trigger configuration: change `!**LICENSE*` to
`!**/LICENSE*`, change `!**README*` to `!**/README*`, and change
`!.editorconfig` to `!**/.editorconfig` to ensure the `**` recursive wildcard is
properly used as a complete path segment with the trailing slash, allowing these
exclusions to match files at any directory level rather than only at the root.
🪄 Autofix (Beta)
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: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: d84a7652-227e-4266-ad19-764e86acc413
📒 Files selected for processing (1)
.github/workflows/build-test.yml
- use plain `!x.length` instead of `!x?.length` (params are non-optional arrays; also satisfies Biome's useOptionalChain) - CI path-filter negations to standard glob form (`!**/LICENSE*` etc.)
The full pipeline runs in <1s and turbo's cache gives no benefit here (4 of 5 tasks are cache:false, and re-runs report "Cached: 0") while creating stale-cache risk — it masked the TypeScript 6 failure earlier. Replace the turbo task graph with plain bun scripts: - build: bun run --filter scripts build && bun run --filter countries build - test: bun run build && bun run --filter test-js test - ci: bun run lint && bun run check-types && bun run test Drops turbo from the catalog / devDependencies / trustedDependencies, deletes turbo.json, and updates .gitignore, the CI path filter, the composer archive list, and the docs.
Upgrades the toolchain, migrates config for the breaking bits, drops Turborepo, and fixes the CI path filter.
TypeScript 6.0 (major)
TS 6.0 turns
moduleResolution: node10(the old"Node") into a hard error (removed in 7.0) and no longer auto-includes transitive@types/*. Inpackages/countries/tsconfig*:moduleResolution: "Node"→"Bundler",module: "NodeNext"→"ESNext"— fits the.ts-extension, tsup-bundled source. (nodenextwas too strict — it then demandedtype: "json"import attributes on the emoji JSON.)types: ["node"]sotsup.config.ts'simport pathkeeps its Node types (provided transitively via@types/bun→bun-types→@types/node).moduleoverrides (ESNext/commonjs) — tsup/esbuild controls the output format.Biome 2.5
linter.rules.recommended: truedeprecated →preset: "recommended"(viabiome migrate).useOptionalChainnow flags!x || !x.length; simplified to a plain!x.length(also addresses a review note that the optional chain was misleading on non-optional arrays).recommended(a trial of stricter rules mostly produced false-positives on the uppercase ISO-code data keys).Drop Turborepo
The whole pipeline runs in <1s, and turbo's caching gives zero benefit here: 4 of its 5 tasks are
cache: false, and even a warm re-run reportsCached: 0/5. Meanwhile the cache is a real footgun — it masked the TS 6.0 failure in this PR's own history (a greenCached: 1"pass" whilecheck-typeswas actually broken).Replaced the turbo task graph with plain Bun workspace scripts:
Also removed
turbofrom the catalog /devDependencies/trustedDependencies, deletedturbo.json, and updated.gitignore, the CI path filter, the composer archive list, and the docs (README / AGENTS).CI fix
The
build-test(JS) workflow'spull_requestfilter only matchedpackages/countries/src/**, so dependency / config / scripts PRs merged with no pre-merge CI (this PR originally ran only CodeRabbit). Widened it to also trigger on the JS packages and root config, and fixed a stale self-reference (nodejs.yml→build-test.yml).phpunitis left as-is — it tests the committeddist/and is unaffected by JS-toolchain changes.Verification
bun run ci(now turbo-free: lint → check-types → build → test) passes —check-types+ Biome clean, build + 11 tests green. The PR's own build-test job is green on the pinned Bun 1.3.3, confirming thebun --filterscripts work there. Nodist/committed (release-managed).