---
title: "Bun v1.2.7"
description: "Bun v1.2.7 adds built-in cookie handling: Bun.serve() exposes a Map-like request.cookies that is parsed lazily on first access and automatically emits the right Set-Cookie headers when modified, with standalone Bun.Cookie and Bun.CookieMap classes for use outside the server."
url: "https://swe.quest/articles/bun-v1-2-7-9513fda7a96d5f16"
canonical: "https://bun.com/blog/bun-v1.2.7"
source: "Bun"
published: "2025-03-27"
difficulty: "medium"
kind: "Release"
reading_minutes: 4
tags: ["javascript","runtimes","typescript"]
---

# Bun v1.2.7

A post on [Bun](https://swe.quest/sources/bun.md), published 2025-03-27, 4 min read, Release. Original: [https://bun.com/blog/bun-v1.2.7](https://bun.com/blog/bun-v1.2.7)

## Summary

Bun v1.2.7 adds built-in cookie handling: Bun.serve() exposes a Map-like request.cookies that is parsed lazily on first access and automatically emits the right Set-Cookie headers when modified, with standalone Bun.Cookie and Bun.CookieMap classes for use outside the server. Bun's TypeScript declarations were rewritten to stop conflicting with Node.js and DOM types (e.g. Buffer vs Uint8Array iterator errors). The release also fixes a node:http crash regression, lowercase hash names in node:crypto, Set-Cookie array handling in node:http, undefined options in node:vm, and gives clearer errors when NAPI modules call unsupported libuv functions.

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)
- [TypeScript](https://swe.quest/tags/typescript.md) (Languages)

## Prerequisites

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

## Keywords

Bun, Bun.serve, CookieMap, node:http, node:crypto, node:vm, NAPI, libuv

## Related posts

- [Bun v0.2.0](https://swe.quest/articles/bun-v0-2-0-c0c3775be874dec7.md): Bun · 2022-10-13 · Medium · 5 min read · JavaScript, Runtimes & VMs, Performance engineering
  Bun v0.2.0 adds \`bun --hot\` for server-side hot reloading that preserves global state and in-flight HTTP requests, \`Bun.spawn\`/\`Bun.spawnSync\` for process spawning with flexible stdin sources and ReadableStream output, and streaming request bodies in \`Bun.serve\`.
- [Bun v0.8.1](https://swe.quest/articles/bun-v0-8-1-ecd25e5146563167.md): Bun · 2023-08-26 · Medium · 6 min read · Runtimes & VMs, JavaScript, Performance engineering, Memory management
  Bun v0.8.1 adds unix domain socket support to Bun.serve() via a new \`unix\` option and fixes a 2.8x request-body throughput regression from v0.8.0 (about 38.6k to 110k req/s).
- [Bun v1.1.22](https://swe.quest/articles/bun-v1-1-22-2b177fc67a458073.md): Bun · 2024-08-07 · Medium · 11 min read · JavaScript, Runtimes & VMs, Performance engineering, Build systems
  Bun v1.1.22 fixes 79 bugs and makes Express 3x faster than on Node.js through node:http improvements.
- [Bun v1.0.10](https://swe.quest/articles/bun-v1-0-10-49e5b151965cc45d.md): Bun · 2023-11-07 · Medium · 5 min read · Runtimes & VMs, JavaScript, Performance engineering, Linux
  Bun v1.0.10 makes node:http 14% faster by building Node.js headers, rawHeaders and url strings directly in native code.
- [Bun v1.0.12](https://swe.quest/articles/bun-v1-0-12-7e77f90bbca6622e.md): Bun · 2023-11-16 · Medium · 12 min read · JavaScript, Runtimes & VMs, Testing, Developer tools
  Bun v1.0.12 fixes 24 bugs and adds \`bun -e\` for evaluating inline scripts (with TypeScript, JSX and top-level await), \`--env-file\` for choosing which .env files to load, \`server.url\`, \`import.meta.env\`, and \`expect.unreachable()\` in bun:test.

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)
