Repository navigation
Internal: Add Bun type checks and parallelize CI builds - #12181
Merged
Merged
Conversation
Contributor
Contributor
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Bun 1.4.3 rollout — every
bun-versionpin (changelog, copilot-setup, pullfrog, push), the rootpackageManager,engines.bun, the contributing docs, and the@types/buncatalog now target 1.4.3 (types 1.4.2); no stale 1.3.3 references remain. - Bun type checks —
convert,remotion-media,jonnys-videos,skills-evals,canvas-capture-extension, and the Vercel scripts switch fromtsc/tsgotobun check;@typescript/native-previewis moved toit-tests; a roottypecheckscript is added. I confirmed each of thesebun checkinvocations passes under Bun 1.4.3 (bun check -p tsconfig.scripts.jsonincluded). - TypeScript 7 compatibility — tsconfigs drop
baseUrl, movemoduleResolution: node→bundler,target: es5→es2015, and add explicittypes;packages/tsconfig.settings.jsonaddsdom.iterableandtypes: ["bun", "deno"]. - CI build/test split — the
buildjob now runsturbo run make --concurrency=2thenturbo run test --concurrency=1; the rootciscript mirrors this. Thetesttask'sdependsOn: ["^make", "make"]keeps the second invocation a cache hit, so the split preserves task coverage. - Lockfile —
bun/bun-typesbumps plus pruning of stale webdriverio transitive deps and an@swc/helpersdedup to 0.5.23.
ℹ️ The new root typecheck only passes after a build
bun run typecheck fails on a clean checkout before any build: packages/vercel/src/create-sandbox.ts imports ./generated/*-script (emitted by bundle.ts during make; src/generated is gitignored), and packages/canvas-capture-extension/tsconfig.json extends a gitignored .wxt/tsconfig.json (emitted by wxt prepare). Locally this surfaces as TS2307/TS5083 errors that stop checking 11 files. Running after bun run build is clean — worth a one-line note in the contributing docs if "build, then typecheck" is the intended workflow.
Technical details
# Root `bun check` requires generated artifacts
## Affected sites
- `package.json:8` — the new `"typecheck": "bun check"` follows the root references into `packages/vercel` and `packages/canvas-capture-extension`.
- `packages/vercel/src/create-sandbox.ts:2-4`, `packages/vercel/src/internals/install-browser.ts:2` — import `./generated/*-script`, which is gitignored and emitted by `packages/vercel/bundle.ts`.
- `packages/canvas-capture-extension/tsconfig.json:2` — `extends` the gitignored `.wxt/tsconfig.json`.
## Required outcome
- Decide whether `bun run typecheck` should work on a fresh checkout (document that `bun run build` must run first) or be scoped to avoid unbuilt generated projects.
## Open questions for the human
- Is "build, then typecheck" the intended developer workflow? If so, a short note in `packages/docs/docs/contributing/index.mdx` would avoid the confusing first-run errors.deepseek-v4.1-flash | 𝕏
Contributor
|
Deployment failed for project remotion with the following error: |
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Use Bun 1.4.3 for faster internal type checks while retaining
tsgofor package builds, declaration generation, and existing native watch commands. Run CI builds with concurrency 2, followed by serial tests, preserving affected-package selection and Turbo caching.Replace type-only checks in convert, remotion-media, jonnys-videos, skills-evals, the canvas capture extension, and Vercel scripts with
bun check; add a root developer typecheck command.Use
tsgo --noEmitfor integration tests, where measurements show it is faster than Bun.Update compiler configuration for Bun's TypeScript 7 checker and resolve duplicate Vitest matcher types in media/web-renderer.
Update repository Bun 1.3.3 runtime pins and references to 1.4.3, and Bun type packages to the latest published 1.4.2. Keep TypeScript tooling for docs, compiler APIs, and public template commands.
Disable Bun module preloading in shared library builds so Studio ESM can be rebundled over HTTP without Rspack crashing on the generated
import.meta.url. Preserve code splitting and track shared build scripts in Turbo cache inputs, including the Google Fonts task override.Pin Vercel dependency installation and all nested build tasks to Bun 1.4.3 using a dedicated runtime directory. Keep the dashboard install/build settings aligned with
vercel.ts; the bootstrap avoids Vercel's preinstalled Bun and reuses the downloaded binary for subsequent install phases.Adapt existing HTTP tests to Bun 1.4.3: consume response bodies and close test connections, parse complete HTTP responses for unfinished oversized uploads, and accept DNS lookup failures in the renderer download test. Production code and assertion coverage remain unchanged.
Performance
Local medians from three runs per variant, using Bun 1.4.3 throughout. Build comparisons include all 81 tasks, disable Turbo cache reads, clear compiler build-info files, and retain warm filesystem caches.
All six Bun replacements also improve warm-run timings. Splitting the CI phases adds approximately 0.36s of local planning overhead; a subsequent build hits cache for all 81 tasks. Hosted CI timings remain to be measured.
Disabling library preloads keeps the Studio bundle build effectively unchanged: five alternating warm samples gave 30.04 ms enabled versus 30.76 ms disabled, with overlapping sample ranges. Output shrinks by 5,182 bytes while retaining all 25 files and 22 dynamic imports.
Validation
Hosted CI for
a967e38df63772b9fdea37a1bde4c70f6d2878ca: all required checks passed on Linux, Windows, and macOS, including browser suites and Vercel deployments. Successful workflow run.bun run build: 81 tasks passed.bun run stylecheck: 266 tasks passed, plus skill validation.bun run typecheck: 8,194 files across 101 referenced projects passed; this does not cover every repository project.bun publish.ts --check: 71 compiled packages validated.809 tests passed across core, convert, remotion-media, and CI planning.
Full monorepo package tests: all 141 Turbo tasks passed, including all 511 Studio server tests and all 377 renderer tests.
HTTP test fixes: red/green verified. The CORS test passed 30 consecutive runs; the protocol helper still rejects truncated Content-Length and chunked responses.
Browser Studio: all 15 Playwright tests pass; both HTTP fallback cases were reproduced failing before the fix and pass afterward.
Turbo dry-run confirms all 18 shared-builder consumers hash the builder and export validator while retaining default source inputs.
Vercel command validation: fresh and cached installs plus a nested Turbo task use Bun 1.4.3 with failing fake system Bun executables first in PATH; download failures stop without falling back. Commands also satisfy Vercel's 256-character limit.
Frozen dependency install, changed-file formatting, CI task coverage comparison, and Bun version audit passed.
Hosted Vercel validation: Bun 1.4.3 installation, the previously failing
@remotion/verceltypecheck, all 1,689 documentation code blocks, and all 85 build tasks passed. Successful immutable preview.Preview