Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Render 11 min read How-to mediumAdept

Hello Bun: How Sveld now deploys 2x faster on GitHub and Render

Migrating the Sveld open source library (TypeScript definitions and docs for Svelte components) from Yarn and Vitest to Bun v1.1.3 roughly halved CI/CD time on GitHub Actions and Render. Most of the gain came from package installs, which were 2-20x faster on GitHub runners and about 16x faster locally. Unit tests ran 1.6-2.2x faster because Bun executes TypeScript natively, and Render static-site deploys dropped from 124s to 50s. The migration has a few gotchas: reserved commands like `bun build`, required file extensions, the `--bun` flag needed to run packages under Bun, and pinning the version in the setup-bun Action to get caching. tsc and npm remain in the stack because Bun lacks type checking, CJS bundling and npm provenance publishing.

Related posts

  • Bun v1.3.1

    Bun mediumAdept

    Bun v1.3.1 makes `bun build` up to 2x faster for symlink-heavy projects (isolated linker, pnpm). It also adds sourcemaps for legal comments and inlines `import.meta` fields as CommonJS equivalents when building with `--format=cjs`. `bun test` gains a global Vitest-compatible `vi`, `--pass-with-no-tests` and `--only-failures`. `bun install` drops an unnecessary peer-dependency sleep, supports `:email` in `.npmrc` and selective hoisting via `publicHoistPattern`/`hoistPattern`. The release also adds `FileHandle.readLines()` and a long list of fixes, including fuzzer-found memory-safety bugs reported by Cloudflare, a MySQL TLS busy-loop, and determinism issues in isolated installs.

  • The Bun Bundler

    Bun mediumAdept

    Bun now ships a native bundler in beta, exposed as the `bun build` CLI and the `Bun.build()` JavaScript API. It shares one plugin API with the runtime, returns Blob-compatible build artifacts, can compile standalone executables, and supports browser, bun and node targets. Bundles built for the bun target carry a `// @bun` pragma so the runtime skips re-transpilation. It includes tree shaking (sideEffects, __PURE__, NODE_ENV/--define, ESM and limited CommonJS-to-ESM conversion), source maps and a new minifier, and it benchmarks at 1.75x faster than esbuild and 220x faster than Webpack on a three.js workload. Only ESM output is supported for now, and its architecture follows esbuild's design.

  • Bun v1.1.3

    Bun mediumAdept

    Bun v1.1.3 makes bun install up to 50% faster on Windows (about 1.6x in a hyperfine benchmark on a Next/SvelteKit project) by parallelizing some file copying and hardlinking. It also fixes five bugs: a rare install deadlock when many packages finish extracting at once, spurious "Install failed" errors with nested node_modules, missing non-zero exit codes on some filesystem-permission errors, cmd.exe console mode not being reset on exit, and a crash when loading unreadable modules. Windows builds still use ReleaseSafe mode, and the team plans to switch to ReleaseFast once bug reports decline.

  • Bun v1.3.2

    Bun mediumAdept

    Bun 1.3.2 restores hoisted installs as the default for existing workspaces and adds a lockfile configVersion field so future default changes don't break existing projects. New projects using workspaces still default to isolated installs. The release speeds up bun install by smarter postinstall script handling, reported as 6x faster in a Next.js plus Vite repo. It also adds --cpu-prof CPU profiling in Chrome DevTools format, an onTestFinished test hook, a ServerWebSocket subscriptions getter and a spawnSync isolated event loop. Many Node.js, N-API, TLS, CSS and install compatibility bugs are fixed.

  • Bun v1.2.20

    Bun mediumAdept

    Bun v1.2.20 fixes 141 issues and cuts idle CPU usage by no longer over-scheduling the garbage collector. AbortSignal.timeout is 40x faster because it now shares setTimeout's implementation. bun install migrates yarn.lock v1 files automatically, and bun:test adds return-value matchers, Vitest-compatible expectTypeOf and mock.clearAllMocks. Other changes include automatic ETag/304 handling for Bun.serve static routes, Windows long-path support via an application manifest, streaming WebAssembly compilation, recursive workspace support in bun outdated and bun update, and many crash fixes across Node compatibility, the bundler, the dev server and Bun.SQL.

The quest for software engineering knowledge.

Look:
Layout: