Skip to content

Swap the 15 workspace type checks from tsc to bun check #794

Open

Description

@HMarzban

Part of #554. Comes from #654: its adopt rule passed, and the maintainer ruled the swap on 2026-11-14. Related: #649, and #554 Q7.

Benchmark

Field Value
Metric (1) bun run typecheck wall time, all 15 workspaces, median of 5, in seconds. (2) "bun check only" diagnostic lines, exact count. (3) CI 📝 Type Check All step time, median of 5 runs, in seconds.
Before From the #654 Measured comment, laptop Mac17,6, Bun 1.4.4, cfac48d87: (1) tsc 5.53 s, range 5.27–6.74 s, n = 5. (2) 0 in 18 configs. (3) 22 s, range 18–32 s, n = 7, 2026-11-07 to 2026-11-11.
After Not measured yet.
Condition The #654 laptop and method: n = 5 after one discarded warm-up, /usr/bin/time -l, the 1-minute load average under 6 at each start. The swap commit SHA.
Pass rule bun check exits 0 in all 18 configs. (2) stays 0. The seeded-error control fails in all 18 configs with the same TS codes as tsc. (1) is at least 2x faster than the before, median against median.
Guard This gate is the only type check before a webapp deploy, because #560 skips the one in the webapp Docker build (#554 Q7). A checker that misses an error ships it.
Rollback One line per typecheck script, back to tsc --noEmit. The typescript package stays installed.
Owner Agent in the repo: Steps 1 to 4 and the Measured comment. The maintainer pushes.
Claim "Type-checking all 15 docs.plus workspaces fell from 5.53 s to s on one laptop (median of 5)."

Rulings (2026-11-14)

  1. Swap every workspace typecheck script, not only the check:ci gate. One checker then runs everywhere.
  2. Keep the typescript package. Editors, next build, the tsup dts builds and typescript-eslint still need it.

Steps

  1. Clear the 12 "TS 7 change" lines first, in their own commit. bun check exits 1 on them today. TS 7.0.2 reports all 12 too.
    • apps/admin-dashboard/tsconfig.json: drop baseUrl (TS5102) and add ./ to the 8 paths entries (TS5090). tsc 5.9.3 passes with that config (Benchmark bun check against tsc in every workspace #654).
    • apps/hocuspocus.server/src/modules/document-conversion/domain/markdownExport.ts:34 and :35: 2 TS2322 lines, from Tiptap extension types.
    • extensions/extension-hyperlink/src/link-icons/__tests__/setupDom.ts:38: 1 TS2322 line. Element.matches must be a type predicate.
  2. Swap the 15 typecheck scripts to the command shape that Benchmark bun check against tsc in every workspace #654 Step 4 timed. Three of them also check tsconfig.test.json: extension-hyperlink, extension-indent and extension-mermaid.
    • apps: admin-dashboard, hocuspocus.server, webapp
    • extensions: extension-hyperlink, extension-hypermultimedia, extension-indent, extension-inline-code, extension-mermaid, extension-placeholder
    • packages: document-swarm, email-templates, floating-popover, floating-tooltip, pad-url, playground
    • The root typecheck script, scripts/check-ci.ts:244 and the 📝 Type Check job in prod.docs.plus.yml call bun run typecheck, so they need no change.
  3. Run the seeded-error control in all 18 configs. Both checkers must fail with TS2305, TS2345 and TS2741 at the same positions.
  4. Post a Measured comment with (1) and (2) from the laptop. Post (3) after 5 CI runs where the job ran.

Acceptance

  • The 12 lines are cleared in their own commit, and tsc still passes everywhere.
  • All 15 scripts are swapped, and bun check exits 0 in all 18 configs.
  • The seeded-error control passes.
  • A Measured comment holds (1), (2) and (3), with the pass rule judged.

Activity

  1. added this to the v2.3.7 milestone on Nov 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions