---
title: "Bun v1.2.22"
description: "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."
url: "https://swe.quest/articles/bun-v1-2-22-c985f96b20e06efe"
canonical: "https://bun.com/blog/bun-v1.2.22"
source: "Bun"
published: "2025-09-14"
difficulty: "medium"
kind: "Release"
reading_minutes: 16
tags: ["javascript","runtimes","build-systems","mysql","debugging"]
---

# Bun v1.2.22

A post on [Bun](https://swe.quest/sources/bun.md), published 2025-09-14, 16 min read, Release. Original: [https://bun.com/blog/bun-v1.2.22](https://bun.com/blog/bun-v1.2.22)

## Summary

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. The release fixes interactive /dev/tty reads after stdin closes and improves Bun.SQL's MySQL adapter with affectedRows and lastInsertRowid, corrected TINYINT and BIT type mapping, TLS, and mysql\_native\_password auth. It also fixes several Postgres driver bugs. Bundler and minifier changes cover new-expression and typeof-undefined minification, an onEnd plugin hook, jsxSideEffects and --keep-names, alongside Node compatibility additions (monitorEventLoopDelay, closeIdleConnections), RFC 6455 WebSocket subprotocol negotiation and Redis database selection via URL.

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)
- [Build systems](https://swe.quest/tags/build-systems.md) (Engineering practices)
- [MySQL](https://swe.quest/tags/mysql.md) (Data & databases)
- [Debugging](https://swe.quest/tags/debugging.md) (Engineering practices)

## Prerequisites

- JavaScript async/await ([easy posts on JavaScript](https://swe.quest/tags/javascript.md?difficulty=easy))
- Node.js APIs ([easy posts on JavaScript](https://swe.quest/tags/javascript.md?difficulty=easy))
- JavaScript bundlers ([easy posts on JavaScript](https://swe.quest/tags/javascript.md?difficulty=easy))

## Keywords

Bun, JavaScriptCore, Bun.SQL, MySQL, PostgreSQL, WebSocket, structuredClone, esbuild

## Related posts

- [Bun 1.3](https://swe.quest/articles/bun-1-3-14b383a02cc8854f.md): Bun · 2025-10-10 · Medium · 63 min read · JavaScript, Runtimes & VMs, Databases, Frontend, Developer tools
  Bun 1.3 turns Bun into a full-stack JavaScript runtime. Bun.serve() now includes a built-in frontend dev server with HMR and React Fast Refresh, parameterized routing, and standalone executables for full-stack apps.
- [Bun v0.7.2](https://swe.quest/articles/bun-v0-7-2-65b9975794c342cb.md): Bun · 2023-08-03 · Medium · 4 min read · JavaScript, Runtimes & VMs, Memory management
  Bun v0.7.2 adds node:worker\_threads, node:diagnostics\_channel and a global BroadcastChannel, lets structuredClone/postMessage clone Error objects, and adds \`bun .\` to run a project's main file.
- [Bun v1.2.21](https://swe.quest/articles/bun-v1-2-21-6b251a5a24ec2faf.md): Bun · 2025-08-25 · Medium · 12 min read · JavaScript, Runtimes & VMs, Databases, Build systems, Supply chain security
  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.
- [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.1.34](https://swe.quest/articles/bun-v1-1-34-d8b685a5be9be177.md): Bun · 2024-11-02 · Medium · 7 min read · JavaScript, Runtimes & VMs, Build systems
  Bun v1.1.34 fixes 64 bugs and adds Bun.randomUUIDv7() for sortable, database-friendly IDs, more aggressive garbage collection while idle in the event loop to cut memory in long-running processes, and Node-API type tagging (napi\_type\_tag\_object/napi\_check\_object\_type\_tag) that unblocks tree-sitter.

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)
