---
title: Bun v1.0.6
description: "Fixes 3 bugs (addressing 85 👍 reactions), implements support for the 'overrides' & 'resolutions' fields in package.json and a regression impacting Docker usage with Bun"
date: "2023-10-11T23:39:51.626Z"
author: jarred
draft: false
---

Bun v1.0.6 fixes 3 bugs (addressing 85 👍 reactions), including a regression impacting Docker usage with Bun and implements support for the `overrides` & `resolutions` fields in `package.json`.

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

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
```

## Docker "abort" regression bugfix

In Bun v1.0.5 (released earlier today), we introduced a regression that caused Bun to `abort()` at start when used in Docker on some systems that lack support for the v1 version of cgroups. This has been fixed in Bun v1.0.6.

## `overrides` & `resolutions` support

This release implements support for [`"overrides"` in package.json](https://docs.npmjs.com/cli/v9/configuring-npm/package-json#overrides). `"overrides"` lets you override the version of a dependency to a specific package version. This is useful when you want to force a dependency to use a specific version, or point to a different package

One usecase is to ensure only a single version of a package is used in a project. For example:

```json
{
  "dependencies": {
    "react": "^17.0.0",
    "react-dom": "^17.0.0",
    "some-other-package": "^1.0.0"
  },
  "overrides": {
    "react": "17.0.0",
    "react-dom": "17.0.0"
  }
}
```

Now, even if `"some-other-package"` specifies `"react-dom": "^16.0.0"`, Bun will use `"react-dom": "17.0.0"` instead.

In Bun's implementation, only one level deep is supported, meaning the version you set applies to every package in the dependency tree. In the future, we may implement support for nested overrides.

Yarn implements a similar field called [`"resolutions"`](https://classic.yarnpkg.com/en/docs/selective-version-resolutions/), which is also supported in Bun:

```json
{
  "dependencies": {
    "something-depending-on-typescript": "^1.0.0"
  },
  "resolutions": {
    "**/typescript": "5.2.2"
  }
}
```

We want Bun to be easily adoptable, and that philosophy is why we decided to support both `"overrides"` and `"resolutions"`.

Another use case of this is to assign completely different specifiers. This makes it possible to use a patched version of a dependency, or replace it with something completely different.

```json
{
  "overrides": {
    // override any package that uses "react-native" with "react-native-web"
    "react-native": "npm:react-native-web@0.19.9",
    // create a symlink to the given directory instead of installing from npm
    "lodash": "file:./not-lodash",
    // or a tarball (can be a url or local path)
    "hello": "file:./some-package.tgz"
  }
}
```

These specifiers work the same way as the ones in `"dependencies"`, but forces all dependencies to use the version you specified.

Thanks to [@paperclover](https://github.com/paperclover) for implementing this feature!

## Bug impacting pre-release tags with latest version

A bug causing Bun to choose an incorrect version when using a pre-release tag (e.g. `-0`) that was marked as the latest version has been fixed, thanks to [@dylan-conway](https://github.com/dylan-conway).

To view the full list of changes, check out the [Bun changelog](https://github.com/oven-sh/bun/compare/bun-v1.0.5...bun-v1.0.6).
