---
title: Bun v1.0.11
description: "Fixes 5 bugs, adds Bun.semver, fixes a bug in bun install and fixes bugs impacting astro and @google-cloud/storage"
date: "2023-11-08T07:39:33.767Z"
author: jarred
draft: false
---

Bun v1.0.11 fixes 5 bugs, adds `Bun.semver`, fixes a bug in bun install and fixes bugs impacting `astro` and `@google-cloud/storage`

Bun is an incredibly fast JavaScript runtime, bundler, transpiler, and package manager &mdash; all in one. In case you missed it, here are some of the recent changes to Bun:

- [`v1.0.0`](/blog/bun-v1.0) - First stable release!
- [`v1.0.1`](/blog/bun-v1.0.1) - Named imports for .json and .toml files, fixes to `bun install`, `node:path`, and `Buffer`
- [`v1.0.2`](/blog/bun-v1.0.2) - Make `--watch` faster and lots of bug fixes
- [`v1.0.3`](/blog/bun-v1.0.3) - `emitDecoratorMetadata` and Nest.js support, fixes for private registries and more
- [`v1.0.4`](/blog/bun-v1.0.4) - `server.requestIP`, virtual modules in runtime plugins, and more
- [`v1.0.5`](/blog/bun-v1.0.5) - Fixed memory leak with `fetch()`, `KeyObject` support in `node:crypto` module, `expect().toEqualIgnoringWhitespace` in `bun:test`, and more
- [`v1.0.6`](/blog/bun-v1.0.6) - Fixes 3 bugs (addressing 85 👍 reactions), implements `overrides` & `resolutions` in `package.json`, and fixes regression impacting Docker usage with Bun
- [`v1.0.7`](/blog/bun-v1.0.7) - Fixes 59 bugs (addressing 78 👍 reactions), implements optional peer dependencies in `bun install`, and makes improvements to Node.js compatibility.
- [`v1.0.8`](/blog/bun-v1.0.8) - Fixes 138 bugs (addressing 257 👍 reactions), makes `require()` use 30% less memory, adds module mocking to `bun test`, fixes more `bun install` bugs
- [`v1.0.9`](/blog/bun-v1.0.9) - Fixes a glibc symbol version error, illegal instruction error, a Bun.spawn bug, an edgecase with peer dependency installs, and a JSX transpiler bugfix
- [`v1.0.10`](/blog/bun-v1.0.10) - Fixes 14 bugs (addressing 102 👍 reactions), node:http gets 14% faster, stability improvements to Bun for Linux ARM64, bun install bugfix, and node:http bugfixes

To install Bun:

{% codetabs %}

```sh#curl
$ curl -fsSL https://bun.sh/install | bash
```

```sh#npm
$ npm install -g bun
```

```sh#brew
$ brew tap oven-sh/bun
$ brew install bun
```

```sh#docker
$ docker pull oven/bun
$ docker run --rm --init --ulimit memlock=-1:-1 oven/bun
```

{% /codetabs %}

To upgrade Bun:

```sh
$ bun upgrade
```

## Bun.semver is a fast builtin SemVer parser

`bun install`'s fast node-semver compatible parser is now available as a builtin Bun API: `Bun.semver`.

```js
import { semver } from "bun";

semver.satisfies("1.0.0", "^1.0.0"); // true
semver.satisfies("1.0.0", "^2.0.0"); // false

const versions = ["2.1.0", "1.0.0", "1.0.1", "1.1.0", "2.0.0", "2.0.1"];
versions.sort(semver.compare); // ["1.0.0", "1.0.1", "1.1.0", "2.0.0", "2.0.1", "2.1.0"]
```

It's 20x faster than `node-semver`, and passes `node-semver`'s test suite.

{% raw %}

<blockquote class="twitter-tweet"><p lang="en" dir="ltr">The next version of Bun gets a builtin API for comparing semver ranges<br><br>20x faster than node-semver, and passes their tests <a href="https://t.co/Vcli83ZDB3">pic.twitter.com/Vcli83ZDB3</a></p>&mdash; Jarred Sumner (@jarredsumner) <a href="https://twitter.com/jarredsumner/status/1722225679570473173?ref_src=twsrc%5Etfw">November 8, 2023</a></blockquote> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

{% /raw %}

### Fixed: Semver sorting bug with build tags

Previously, Bun was sorting semver versions incorrectly when build tags with multiple segments containing the `.` character were present. This has been fixed, thanks to [@dylan-conway](https://github.com/dylan-conway).

### Fixed: `=` and `v` prefix in package.json versions

Previously, Bun only supported `=` and `v` prefixes in dependency versions, but not in `package.json` versions. This has been fixed, thanks to [@dylan-conway](https://github.com/dylan-conway).

## Fixed: potential crash when printing exceptions

A crash that has been present since before Bun v0.1.0 has been fixed. When displaying the preview of the source code that caused an exception, sometimes Bun would crash. This has been fixed.

## Fixed: TLS handshaking error-handling issue

A bug in `Bun.serve` that could cause Bun to eventually no longer respond to incoming requests with client-side certificates has been fixed, thanks to [@cirospaciari](https://github.com/cirospaciari).

## A bug impacting `@google-cloud/storage` has been fixed

A Node.js compatibilty bug caused `@google-cloud/storage` to not work as expected.

With `DEBUG="*"`, it would print a message like this:

```js
  retry-request Current retry attempt: 1 +0ms
  retry-request Next retry delay: 2351 +221ms
  retry-request Current retry attempt: 2 +2s
  retry-request Next retry delay: 4143 +150ms
  retry-request Current retry attempt: 3 +4s
  retry-request Next retry delay: 8135 +185ms
  retry-request Current retry attempt: 4 +8s
TypeError: undefined is not an object
```

This has been fixed. It no longer errors, and it no longer erroneously retries (which would cause it to take a long time to fail).

## A bug impacting Astro has been fixed

A Node.js compatibility bug caused `astro dev` to return "file not found" errors when using Bun in v1.0.10. This has been fixed. We will soon add an integration test that runs Astro to prevent this from happening again.

Full changelog: [bun-v1.0.10...bun-v1.0.11](https://github.com/oven-sh/bun/compare/bun-v1.0.10...bun-v1.0.11)
