---
title: "Bun v1.2.21"
description: "Bun v1.2.21 extends Bun.SQL into a unified, zero-dependency client for MySQL/MariaDB (via a driver written in Zig), SQLite and PostgreSQL using the same tagged-template API."
url: "https://swe.quest/articles/bun-v1-2-21-6b251a5a24ec2faf"
canonical: "https://bun.com/blog/bun-v1.2.21"
source: "Bun"
published: "2025-08-25"
difficulty: "medium"
kind: "Release"
reading_minutes: 12
tags: ["javascript","runtimes","databases","build-systems","supply-chain-security"]
---

# Bun v1.2.21

A post on [Bun](https://swe.quest/sources/bun.md), published 2025-08-25, 12 min read, Release. Original: [https://bun.com/blog/bun-v1.2.21](https://bun.com/blog/bun-v1.2.21)

## Summary

Bun v1.2.21 extends Bun.SQL into a unified, zero-dependency client for MySQL/MariaDB (via a driver written in Zig), SQLite and PostgreSQL using the same tagged-template API. It also adds native YAML import and parsing, Bun.secrets for OS credential stores (Keychain, libsecret, Windows Credential Manager), and a pluggable security scanner hook for bun install. Performance changes include 500x faster postMessage for strings, SIMD-accelerated Bun.stripANSI (6-57x faster than strip-ansi), lockfile-only installs that fetch only manifests, and no idle CPU wakeups in Bun.serve. Bun.build can now compile standalone executables programmatically, and the release fixes a batch of Node.js and N-API compatibility issues.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [JavaScript](https://swe.quest/tags/javascript.md) (Languages)
- [Runtimes & VMs](https://swe.quest/tags/runtimes.md) (Compilers & runtimes)
- [Databases](https://swe.quest/tags/databases.md) (Data & databases)
- [Build systems](https://swe.quest/tags/build-systems.md) (Engineering practices)
- [Supply chain security](https://swe.quest/tags/supply-chain-security.md) (Security)

## Prerequisites

- JavaScript runtimes ([easy posts on JavaScript](https://swe.quest/tags/javascript.md?difficulty=easy))
- npm packages

## Keywords

Bun, Bun.SQL, MySQL, SQLite, PostgreSQL, YAML, Bun.secrets, bun install

## Related posts

- [Bun v1.2.19](https://swe.quest/articles/bun-v1-2-19-81c69ec42f42be6c.md): Bun · 2025-07-19 · Medium · 16 min read · JavaScript, Build systems, Developer tools, Testing, PostgreSQL
  Bun v1.2.19 adds pnpm-style isolated installs (\`--linker=isolated\`) for monorepos, \`bun update --interactive\`, \`bun pm pkg\` for editing package.json, \`bun why\` for tracing dependency chains, and a fixed dependency-group priority order.
- [Bun v1.1.14](https://swe.quest/articles/bun-v1-1-14-d9093a5e7df90e79.md): Bun · 2024-06-19 · Medium · 11 min read · JavaScript, Runtimes & VMs, SQLite, Build systems, Debugging
  Bun v1.1.14 fixes 63 bugs and adds \`bun patch\`, which clones a dependency out of the global cache for local edits and saves the changes as a standard diff under \`patches/\` that \`bun install\` applies automatically. \`bun:sqlite\` gains \`query.as(Class)\` for prototype-based result mapping without constructors, a \`strict\` mode for unprefixed bindings, \`run()\` returning \`changes\` and \`lastInsertRowid\`, and \`safeIntegers\` for 64-bit BigInt results.
- [Bun v1.2.22](https://swe.quest/articles/bun-v1-2-22-c985f96b20e06efe.md): Bun · 2025-09-14 · Medium · 16 min read · JavaScript, Runtimes & VMs, Build systems, MySQL, Debugging
  Bun v1.2.22 adds async stack traces that include awaited caller frames, a fast path making postMessage and structuredClone up to ~240x faster for plain objects of primitives, and Bun.YAML.stringify.
- [Bun v1.1.16](https://swe.quest/articles/bun-v1-1-16-73af18d20e38e0ab.md): Bun · 2024-06-23 · Medium · 6 min read · JavaScript, Runtimes & VMs, Testing, Build systems
  Bun v1.1.16 fixes 41 bugs and adds lcov output for \`bun test --coverage\`, configurable in bunfig.toml.
- [Bun v1.2.3](https://swe.quest/articles/bun-v1-2-3-b29be138300c9cc9.md): Bun · 2025-02-22 · Medium · 15 min read · JavaScript, Runtimes & VMs, PostgreSQL, WebAssembly, Frontend
  Bun v1.2.3 adds a zero-config frontend dev server (run \`bun ./index.html\` or glob multiple HTML files) with hot reloading and bundling, plus a built-in \`routes\` option for Bun.serve() with typed path params so frontend and backend run in one process.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
