---
title: "Bun v1.0.8"
description: "Bun v1.0.8 fixes 138 bugs, fixes a require() memory leak (introduced when built-in modules moved from ESM to CommonJS) that cuts memory up to 30%, and adds runtime module mocking to bun test via mock.module, which updates existing ESM and CJS imports in place. bun install no longer duplicates peer dependencies and now orders pre-release tags by semver precedence."
url: "https://swe.quest/articles/bun-v1-0-8-561e5f115e18943c"
canonical: "https://bun.com/blog/bun-v1.0.8"
source: "Bun"
published: "2023-11-02"
difficulty: "medium"
kind: "Release"
reading_minutes: 7
tags: ["javascript","runtimes","testing"]
---

# Bun v1.0.8

A post on [Bun](https://swe.quest/sources/bun.md), published 2023-11-02, 7 min read, Release. Original: [https://bun.com/blog/bun-v1.0.8](https://bun.com/blog/bun-v1.0.8)

## Summary

Bun v1.0.8 fixes 138 bugs, fixes a require() memory leak (introduced when built-in modules moved from ESM to CommonJS) that cuts memory up to 30%, and adds runtime module mocking to bun test via mock.module, which updates existing ESM and CJS imports in place. bun install no longer duplicates peer dependencies and now orders pre-release tags by semver precedence. Notable runtime fixes include a waitpid-thread fallback for Bun.spawn where pidfd\_open is unavailable (gVisor, older kernels), a kqueue process-exit race on macOS, Node-aligned setTimeout(0) and setImmediate semantics, and fetch() silently accepting untrusted TLS certificates due to BoringSSL error handling.

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)
- [Testing](https://swe.quest/tags/testing.md) (Engineering practices)

## Prerequisites

- JavaScript runtimes ([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))

## Keywords

Bun, bun test, bun install, pidfd\_open, kqueue, BoringSSL, gVisor

## Related posts

- [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.
- [Bun v1.0.7](https://swe.quest/articles/bun-v1-0-7-b09b1a042388dc2a.md): Bun · 2023-10-20 · Medium · 6 min read · JavaScript, Runtimes & VMs, Build systems
  Bun v1.0.7 fixes 59 bugs and adds support for optional peer dependencies in \`bun install\`, so packages marked optional in \`peerDependenciesMeta\` are no longer installed unless the root project lists them.
- [Bun v1.3.1](https://swe.quest/articles/bun-v1-3-1-ee365f019ab94793.md): Bun · 2025-10-22 · Medium · 9 min read · JavaScript, Runtimes & VMs, Build systems, Testing, Developer tools
  Bun v1.3.1 makes \`bun build\` up to 2x faster for symlink-heavy projects (isolated linker, pnpm).
- [Bun v1.2.20](https://swe.quest/articles/bun-v1-2-20-d97fc960ddc0e406.md): Bun · 2025-08-10 · Medium · 10 min read · JavaScript, Runtimes & VMs, Testing, Build systems
  Bun v1.2.20 fixes 141 issues and cuts idle CPU usage by no longer over-scheduling the garbage collector.
- [Bun v1.0.31](https://swe.quest/articles/bun-v1-0-31-9173b12d836487e8.md): Bun · 2024-03-14 · Medium · 10 min read · JavaScript, Runtimes & VMs, Supply chain security, Linux
  Bun v1.0.31 adds \`bun --print\` (Node-compatible eval with top-level await, TypeScript and JSX), running code from stdin via \`bun run -\`, \`bun add --trust\` plus \`bun pm untrusted\`/\`trust\` for managing blocked postinstall scripts, and \`fetch()\`/\`node:http\` support for Unix and Linux abstract domain sockets.

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)
