Skip to content

chore: upgrade TS 6 & Biome 2.5, drop Turborepo for Bun scripts#168

Merged
dmythro merged 4 commits into
mainfrom
chore/deps
Jun 14, 2026
Merged

chore: upgrade TS 6 & Biome 2.5, drop Turborepo for Bun scripts#168
dmythro merged 4 commits into
mainfrom
chore/deps

Conversation

@dmythro

@dmythro dmythro commented Jun 14, 2026

Copy link
Copy Markdown
Member

Upgrades the toolchain, migrates config for the breaking bits, drops Turborepo, and fixes the CI path filter.

Package Change Migration
typescript 5.9.3 → 6.0.3 tsconfig (below)
@biomejs/biome 2.4.5 → 2.5.0 config + 2 lint fixes
turbo removed replaced by Bun workspace scripts (below)
@types/bun 1.3.10 → 1.3.14 none
lefthook 2.1.2 → 2.1.9 none

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/*. In packages/countries/tsconfig*:

  • moduleResolution: "Node""Bundler", module: "NodeNext""ESNext" — fits the .ts-extension, tsup-bundled source. (nodenext was too strict — it then demanded type: "json" import attributes on the emoji JSON.)
  • Added types: ["node"] so tsup.config.ts's import path keeps its Node types (provided transitively via @types/bunbun-types@types/node).
  • Removed the now-vestigial per-build module overrides (ESNext / commonjs) — tsup/esbuild controls the output format.

Biome 2.5

  • linter.rules.recommended: true deprecated → preset: "recommended" (via biome migrate).
  • useOptionalChain now 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).
  • Kept the rule set at 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 reports Cached: 0/5. Meanwhile the cache is a real footgun — it masked the TS 6.0 failure in this PR's own history (a green Cached: 1 "pass" while check-types was actually broken).

Replaced the turbo task graph with plain Bun workspace 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"

Also removed turbo from the catalog / devDependencies / trustedDependencies, deleted turbo.json, and updated .gitignore, the CI path filter, the composer archive list, and the docs (README / AGENTS).

CI fix

The build-test (JS) workflow's pull_request filter only matched packages/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.ymlbuild-test.yml). phpunit is left as-is — it tests the committed dist/ 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 the bun --filter scripts work there. No dist/ committed (release-managed).

- 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).
Copilot AI review requested due to automatic review settings June 14, 2026 18:34
@coderabbitai

coderabbitai Bot commented Jun 14, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 83891398-54d0-4f91-81ff-210324d38325

📥 Commits

Reviewing files that changed from the base of the PR and between b88c15c and 1b5df05.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (8)
  • .github/workflows/build-test.yml
  • .gitignore
  • AGENTS.md
  • README.md
  • composer.json
  • package.json
  • packages/scripts/generateCurrencies.ts
  • turbo.json
💤 Files with no reviewable changes (3)
  • .github/workflows/build-test.yml
  • turbo.json
  • .gitignore
✅ Files skipped from review due to trivial changes (4)
  • AGENTS.md
  • composer.json
  • packages/scripts/generateCurrencies.ts
  • README.md

📝 Walkthrough

Walkthrough

This PR migrates the monorepo's build orchestration from Turbo to Bun, consolidates TypeScript configuration, and applies code quality improvements. Core scripts in package.json now use bun run with explicit package filtering instead of Turbo. Turbo is removed from devDependencies, trustedDependencies, and workspace catalogs. Dependency versions are bumped for @biomejs/biome, @types/bun, typescript, and lefthook. The TypeScript configuration for the countries package is refactored: tsconfig-base.json switches to ESNext/Bundler module resolution with explicit types: ["node"], while tsconfig-cjs.json and tsconfig.json drop their local module overrides to inherit from the base. The linter configuration in biome.json changes from "recommended": true to "preset": "recommended". Two utility functions in packages/scripts replace explicit null-and-length guards with optional chaining (!arr?.length). Turbo artifacts are cleaned up from .gitignore, composer.json, and documentation. The Countries JS workflow trigger is refined to limit execution to relevant file paths.

Poem

🐇 Hoppity-hop, let's migrate with glee,
From Turbo to Bun—efficient and free!
TypeScript configs inherit with care,
preset: "recommended" fills the Biome air.
Optional chains dance through utils so bright,
A cleaner monorepo—everything's right! ✨

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description is comprehensive with detailed context, but does not follow the repository's required template structure, which specifies sections for issue reference, data changes verification, and checklist items. Restructure the description to follow the repository template: include issue reference section, data changes verification URL, and pre-submission checklist items (tests passing, separate commits, data files in /data/, package.json paired with bun.lock, no dist/ changes).
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the three main changes: upgrading TypeScript 6 and Biome 2.5, and removing Turborepo in favor of Bun scripts.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/deps

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/countries TypeScript config to moduleResolution: "Bundler", module: "ESNext", and explicitly include Node types.
  • Migrate Biome config to the new rules.preset format 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.

Comment thread packages/scripts/utils.ts Outdated
Comment thread packages/scripts/tasks/generateSql.ts Outdated
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).

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 4edac1b and e6fc29a.

📒 Files selected for processing (1)
  • .github/workflows/build-test.yml

Comment thread .github/workflows/build-test.yml Outdated
dmythro added 2 commits June 14, 2026 21:51
- 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.
@dmythro dmythro changed the title chore(deps): upgrade TypeScript 6, Biome 2.5, Turbo 2.9 chore: upgrade TS 6 & Biome 2.5, drop Turborepo for Bun scripts Jun 14, 2026
@dmythro dmythro requested a review from Copilot June 14, 2026 19:00

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 13 out of 15 changed files in this pull request and generated no new comments.

@dmythro dmythro merged commit a1c9d77 into main Jun 14, 2026
3 checks passed
@dmythro dmythro deleted the chore/deps branch June 14, 2026 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants