> ## Content Index
> Fetch the complete content index at: https://www.stirup.si/llms.txt
> Use this file to discover other available public pages before exploring further.

# Bun v1.3.12: Enhanced Browser Automation, Markdown Rendering, and Native Error Debugging
- URL: https://www.stirup.si/bun-v1-3-12-enhanced-browser-automation-markdown-rendering-and-native-e37b65e1/
- Published: 2026-10-12T03:25:16.000Z
- Updated: 2026-10-12T03:25:16.000Z
- Description: Bun v1.3.12 introduces significant improvements in headless browser automation, Markdown rendering in the terminal, and native error debugging. These updates enhance developer productivity and align Bun more closely with industry standards.
- Author: Satish Das
- Tags: Development, Stirup Research

## Headless Browser Automation with Bun.WebView

Bun v1.3.12 introduces **Bun.WebView**, a native headless browser automation tool that supports both WebKit and Chrome backends. This feature allows developers to programmatically control a headless browser directly within the Bun runtime, eliminating the need for external dependencies. The API is designed to be intuitive, with methods like `view.click()` and `view.scroll()` that wait for elements to be actionable before executing, similar to Playwright's behavior. This ensures that interactions are reliable and consistent across platforms.

Bun.WebView dispatches OS-level events, making it difficult for websites to distinguish between automated actions and real user input. This is particularly useful for tasks like form submission, navigation, and screenshot capture. The API also supports capturing page logs, persistent browser profiles, and raw Chrome DevTools Protocol calls, providing a comprehensive tool for web automation.

## Markdown Rendering in the Terminal

Bun v1.3.12 adds the ability to render Markdown files directly in the terminal using the command `bun ./file.md`. This feature leverages Bun's native capabilities to produce beautifully formatted ANSI output without the overhead of a JavaScript VM startup. Developers can also use the `Bun.markdown.ansi()` API programmatically to render Markdown to ANSI-colored strings, with options for plain text, hyperlinks, and custom line wrapping. This is particularly useful for generating documentation, logs, and user-facing content directly in the terminal.

## Async Stack Traces for Native Errors

Another notable improvement in Bun v1.3.12 is the support for async stack traces on native APIs such as `node:fs`, `Bun.write`, and `node:http`. This enhancement makes debugging more straightforward by providing detailed stack traces for asynchronous operations, helping developers identify and resolve issues more efficiently.

## In-Process Bun.cron() Scheduler

Bun's `Bun.cron()` scheduler now supports an in-process callback overload, allowing developers to run functions on a cron schedule within the same process. This is ideal for long-running servers and containers where scheduled tasks need to share state with the rest of the application. The in-process variant is lighter and more consistent across platforms compared to the OS-level `Bun.cron(path, schedule, title)` variant, which registers persistent crontab entries.

## UDP Socket Improvements

Bun v1.3.12 also includes improvements to `Bun.udpSocket()`, such as better handling of ICMP errors and truncation detection. These changes bring Bun's UDP socket behavior closer to that of libuv and Node.js, ensuring that sockets remain open even when encountering errors like `ECONNREFUSED`. Additionally, the `flags` argument in the `data` callback now allows developers to detect truncated datagrams.

## Unix Domain Socket Lifecycle Alignment

Bun's Unix domain socket behavior has been updated to match Node.js semantics. Previously, Bun would silently steal a live socket from another process or leave socket files on disk after closing. Now, binding to an existing socket file correctly returns `EADDRINUSE`, and closing a listener automatically cleans up the socket file. This change ensures better compatibility with existing Unix domain socket practices.

## JavaScriptCore Engine Upgrade

Bun's underlying JavaScript engine, JavaScriptCore, has been upgraded with over 1,650 upstream commits. This brings significant performance improvements, new language features, and bug fixes. The upgrade also includes support for `using` and `await using` declarations from the TC39 Explicit Resource Management proposal, enhancing resource management in JavaScript.

**Source:** [Bun](https://bun.com/blog/bun-v1.3.12?ref=stirup.si). Analysis based on publicly available information; no hands-on testing is claimed.