Skip to content

build: upgrade bun to 1.4.3 and use bun check for typecheck - #126

Merged
amondnet merged 4 commits into
mainfrom
amondnet/bun-1.4.3
Oct 21, 2026
Merged

amondnet merged 4 commits into
mainfrom
amondnet/bun-1.4.3

Conversation

@amondnet

@amondnet amondnet commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Upgrade Bun to 1.4.3 and switch the typecheck scripts to Bun 1.4's built-in type checker (bun check), which reports the same errors as tsc and runs multithreaded.

What changed

  • Pin Bun 1.4.3 in mise.toml and the packageManager field, and refresh bun.lock.
  • Pin bun-version: 1.4.3 (was latest) in the lint, typecheck, and test jobs of .github/workflows/ci.yml and in .github/workflows/release-please.yml, so CI matches the local toolchain.
  • Change typecheck from tsc -p tsconfig.json --noEmit to bun check -p tsconfig.json in packages/{binaries,code,dora,format,logger,lsp} and hooks/scripts. The root turbo typecheck is unchanged.
  • In bun.lock, @types/bun and bun-types move to 1.4.3, and the transitive @types/node moves from 25.0.3 to 26.6.5.

Scope

examples/lsp-typescript is not a workspace and keeps tsc --noEmit.

Tradeoffs

bun-types 1.4.3 declares a process.on("memoryPressure") overload on Process. With @types/node 25, Process inherits on() from InternalEventEmitter<ProcessEventMap>, so the new overload hides it. Then process.on('SIGTERM'|'SIGINT') in packages/lsp/src/multiplexer.ts:306–307 fails with TS2345 under both tsc and bun check. @types/node 26 declares on() directly on Process, so the overloads merge. The lockfile-only bump to @types/node 26 is therefore required.

Blast radius

Re-resolving the lockfile with Bun 1.4 also deduped some lint-tooling dependencies (jsonc-eslint-parser 3.1.0, yaml 2.9.0) and synced stale workspace versions. These are lockfile-only changes. Contributors need Bun 1.4.3 (mise install).

Verification

  • bun install --frozen-lockfile reports no changes.
  • bun run typecheck passes for all 7 packages, and bun run lint passes.
  • Tests: code 100 pass, dora 53 pass. code-lsp has 186 pass and 8 fail (3 VueServer and 5 DartServer integration tests). The same 8 fail on unmodified main with Bun 1.3.5, so they are pre-existing and depend on external language servers.

Related issue

No linked issue.

Checklist

  • PR title follows Conventional Commits
  • Tests added or updated, and the suite passes (bun run test) — no new tests; the 8 failures listed above are pre-existing
  • Lint/format pass (bun run lint)
  • Documentation updated if behavior changed — no behavior change
  • No breaking change, or a BREAKING CHANGE: note is included

Summary by cubic

Upgrades Bun to 1.4.3 and switches the typecheck scripts from tsc to Bun's built-in bun check, which reports the same errors more quickly.

  • Pins Bun 1.4.3 in mise.toml, the packageManager and engines fields, ARCHITECTURE.md, and CI workflows; previously CI used latest and local dev used 1.3.5.
  • Replaces tsc -p tsconfig.json --noEmit with bun check -p tsconfig.json in all workspace packages except examples/lsp-typescript, which is not a workspace.
  • bun check reports the same errors as tsc and runs multithreaded.

Migration

  • Contributors with mise need to run mise install to pick up Bun 1.4.3.
  • @types/bun/bun-types move to 1.4.3 and @types/node becomes a direct dependency at version 26.6.5; the bump is required because bun-types 1.4.3 hides process.on overloads from @types/node 25.

Written for commit b29bf34. Summary will update on new commits.

Turn on auto-fix

Bump @types/bun and bun-types to 1.4.3.

This pulls @types/node 26, which keeps the process.on overload typechecking.
@amondnet
amondnet marked this pull request as ready for review October 21, 2026 19:53
@socket-security

socket-security Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updated@​types/​bun@​1.3.5 ⏵ 1.4.31001004893 +2100
Updated@​types/​node@​25.0.3 ⏵ 26.6.5100 +110081 +195100

View full report

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request updates the Bun version from 1.3.5 to 1.4.3 in mise.toml and package.json, updating the lockfile dependencies accordingly. Additionally, it replaces the typecheck script across multiple packages to use bun check instead of tsc --noEmit. The reviewer recommends explicitly declaring @types/node in the root package.json devDependencies to avoid fragile lockfile-only resolution and ensure build robustness.

Comment thread package.json
@greptile-apps

greptile-apps Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; the previous finding is fixed and no new actionable issues were found.

Summary

Pins Bun 1.4.3 for local development and CI, and switches seven workspace checks to bun check.

  • Workspace typechecks now run through Bun's built-in checker.
  • Local tooling and automation now use Bun 1.4.3.

Reviews (2) · Last reviewed commit: "chore: apply AI code review suggestions" · Reviewed by Greptile

Comment thread package.json
Declare @types/node ^26.6.5 explicitly and raise the Bun minimum
to 1.4.3 in engines and ARCHITECTURE.md.
@amondnet

Copy link
Copy Markdown
Contributor Author

/gemini review

@sonarqubecloud

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai 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.

Review completed against the latest diff

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

Comment thread packages/binaries/package.json

@cubic-dev-ai cubic-dev-ai 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.

No issues found across 13 files

Architecture diagram
sequenceDiagram
    participant Dev as Developer
    participant Mise as Mise Toolchain
    participant CI as GitHub Actions
    participant Turbo as Turborepo Orchestrator
    participant PKG as Workspace Packages
    participant Bun as Bun Runtime (1.4.3)
    participant TSC as TypeScript Compiler
    participant Lock as bun.lock

    Note over Dev,Bun: Toolchain Version Pinning
    Dev->>Mise: Run `mise install`
    Mise->>Bun: Install/activate Bun 1.4.3
    Dev->>Bun: Run `bun install --frozen-lockfile`
    Bun->>Lock: Resolve dependencies (1.4.3 lockfile)

    Note over CI,Turbo: CI Pipeline
    CI->>CI: Setup Bun 1.4.3 (pinned, not latest)
    CI->>Turbo: Run `turbo typecheck`

    Note over Turbo,PKG: Typecheck Pipeline
    Turbo->>PKG: Dispatch typecheck task
    PKG->>PKG: Run "typecheck" script
    PKG->>Bun: NEW: `bun check -p tsconfig.json`
    
    alt Workspace packages (binaries, code, dora, format, logger, lsp, hooks/scripts)
        Bun->>TSC: Invoke built-in TypeScript engine (multithreaded)
        TSC-->>Bun: Same diagnostics as tsc
        Bun-->>PKG: Typecheck results
    else Non-workspace (examples/lsp-typescript)
        PKG->>TSC: Keep `tsc --noEmit` (unchanged)
        TSC-->>PKG: Typecheck results
    end

    Note over PKG,Bun: Type Compatibility
    PKG->>Lock: Resolve bun-types 1.4.3 + @types/node 26.6.5
    Lock-->>Bun: Provide merged process.on() overloads
    Bun->>PKG: OK: process.on('SIGTERM'/'SIGINT') compiles (TS2345 resolved)

    Note over PKG,Bun: Success Path
    Bun-->>Turbo: All checks pass
    Turbo-->>CI: Pipeline green

    Note over CI,PKG: Unhappy Path (pre-existing)
    CI->>PKG: Integration tests (code-lsp)
    PKG->>Bun: Run test suite
    Bun-->>PKG: 8 pre-existing failures (VueServer/DartServer)
    PKG-->>CI: Failures self-contained (also fail on main)
    CI->>CI: Accept known failures (not from this PR)
Loading

Turn on auto-fix | Re-trigger cubic

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request upgrades the Bun package manager version from 1.3.5 to 1.4.3 across the repository's configuration files and updates the typecheck scripts in several package.json files to use bun check. However, feedback indicates that bun check is not a valid Bun command and will cause runtime errors, suggesting to revert to tsc or use bun x tsc --noEmit instead.

Comment thread package.json
@codecov

codecov Bot commented Oct 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@amondnet
amondnet merged commit 63c9886 into main Oct 21, 2026
10 checks passed
@amondnet
amondnet deleted the amondnet/bun-1.4.3 branch October 21, 2026 20:02
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.

1 participant