---
title: Bun v1.1.28
description: "This release fixes 40 bugs (addressing 51 👍). Compile & run C from JavaScript. 30x faster path.resolve. Named pipes on Windows. Several Node.js compatibility improvements and bugfixes."
date: "2024-09-18T14:36:14.482Z"
author: dylan
---

Bun v1.1.28 is here! This release fixes 40 bugs (addressing 51 👍). Compile & run C from JavaScript. 30x faster `path.resolve`. Named pipes on Windows. Several Node.js compatibility improvements and bugfixes.

{% callout %}
We're hiring [systems engineers](/careers) in San Francisco to build the future of JavaScript!
{% /callout %}

#### To install Bun

{% codetabs %}

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

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

```sh#powershell
$ powershell -c "irm bun.sh/install.ps1|iex"
```

```sh#scoop
$ scoop install 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
```

## Compile & run C from JavaScript

Bun now supports compiling and running C from JavaScript. This is a simple way to use native system libraries from JavaScript without adding an extra build step.

Learn more about this feature [here](/blog/compile-and-run-c-in-js).

## 30x faster `path.resolve`

This release makes `path.resolve` 30x faster.

{% raw %}

<blockquote class="twitter-tweet"><p lang="en" dir="ltr">In the next version of Bun<br><br>path.resolve() gets 30x faster <a href="https://t.co/ukdAHtK6lT">pic.twitter.com/ukdAHtK6lT</a></p>&mdash; Jarred Sumner (@jarredsumner) <a href="https://twitter.com/jarredsumner/status/1834353346318401915?ref_src=twsrc%5Etfw">September 12, 2024</a></blockquote> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

{% /raw %}

## Named pipes on Windows

Bun now supports named pipes on Windows in many Node.js & Bun APIs, thanks to [@cirospaciari](https://github.com/cirospaciari)! Named pipes are interesting because they're not exactly files on disk. They're this other thing, sort of like Unix domain sockets but also not.

## Node.js compatibility improvements

### `process._exiting` is set to `false`

Previously, `process._exiting` would be set to `undefined` before the `exit` event was emitted. Now, it will be `false`

```js
console.log(process._exiting); // Previously: `undefined`, now: `false`

process.on("exit", () => {
  console.log(process._exiting); // true
});
```

### `workerData` from `worker_threads` defaults to `null`

The default value of `workerData` has been changed from `undefined` to `null`.

```js
import { workerData } from "worker_threads";

console.log(workerData); // Previously: `undefined`, now: `null`
```

### Missing constants from `perf_hooks` have been added

The following constants were previously missing from the `perf_hooks` module:

```js
import { constants } from "perf_hooks";
console.log(constants.NODE_PERFORMANCE_MILESTONE_BOOTSTRAP_COMPLETE); // 7
console.log(constants.NODE_PERFORMANCE_MILESTONE_ENVIRONMENT); // 2
console.log(constants.NODE_PERFORMANCE_MILESTONE_LOOP_EXIT); // 6
console.log(constants.NODE_PERFORMANCE_MILESTONE_LOOP_START); // 5
console.log(constants.NODE_PERFORMANCE_MILESTONE_NODE_START); // 3
console.log(constants.NODE_PERFORMANCE_MILESTONE_TIME_ORIGIN_TIMESTAMP); // 0
console.log(constants.NODE_PERFORMANCE_MILESTONE_TIME_ORIGIN); // 1
console.log(constants.NODE_PERFORMANCE_MILESTONE_V8_START); // 4
console.log(constants.NODE_PERFORMANCE_ENTRY_TYPE_DNS); // 4
console.log(constants.NODE_PERFORMANCE_ENTRY_TYPE_GC); // 0
console.log(constants.NODE_PERFORMANCE_ENTRY_TYPE_HTTP); // 1
console.log(constants.NODE_PERFORMANCE_ENTRY_TYPE_HTTP2); // 2
console.log(constants.NODE_PERFORMANCE_ENTRY_TYPE_NET); // 3
```

### Fixed logic for undefined options provided `node:zlib`

Option handling in `node:zlib` has been fixed, allowing options to be `undefined` without causing an error.

```js
import { createGzip } from "zlib";

createGzip({ level: undefined });
```

### `OutgoingMessage.headersSent` from `node:http` is now set to `true`

After headers have been sent, `req.headersSent` will be set to `true`

### Added `timers.promises`

Exports from `node:timers/promises` are now also available in `timers.promises` to better match Node.js.

```js
import { promises } from "timers";

console.time("timeout");
await promises.setTimeout(1000);
console.timeEnd("timeout"); // [1002.48ms] test
```

### Fixed: `cwd` is updated before searching for executables in `node:child_process` before spawning processes

Previously, Bun would search for executables to spawn in the calling process's `cwd`. If a different `cwd` was provided and a relative path was given for the executable path, the expected executable would fail to be found. Now, Bun will search from the target `cwd`.

```js
import { spawnSync } from "child_process";
import { join } from "path";

// This will search for `foo` in `./node_modules/package/bin/`
spawnSync("./bin/foo", { cwd: join(import.meta.dir, "node_modules/package") });
```

### Fixed: crash in napi escapable handle scopes

A bug where `napi` escapable handle scopes could crash Bun has been fixed, thanks to [@190n](https://github.com/190n)!

### Fixed: crash in napi handle scope finalization

A bug where a napi finalizer is called and then we attempt to allocate a handle scope has been fixed. This would cause a crash in certain cases in the `sqlite3` package. This was a regression from v1.1.27. Thanks to [@190n](https://github.com/190n) for the fix!

## More fixes and improvements

### Fixed an edgecase with `os` and `cpu` fields in `bun install`

In certain cases, the `os` and `cpu` fields in `bun install` would not handle exclusions properly, leading to always-skipped installs. This has been fixed.

We've also added an extra log message in `bun install --verbose` to make it easier to debug why a package is being skipped.

### Fixed: IPC through `bun run`

Previously, if you spawned a process that opened `bun run` with IPC enabled, the IPC socket would be closed before the child process could use it. This has been fixed, thanks to [@snoglobe](https://github.com/snoglobe)!

### Fixed: case-insensitive watch mode on Windows

On Windows, watch mode would not pick up on changes to case-sensitive files in certain cases. This has been fixed, thanks to [@dylan-conway](https://github.com/dylan-conway)!

### Fixed: `bun ./bun.lockb` would print env loaded message

If you ran `bun ./bun.lockb`, with a `.env` file in the same directory Bun would print a mesasge telling you it loaded the .env file. It shouldn't be loading the .env file, but regardless it also shouldn't be printing a message when it did load the .env file since that's noise when you're just trying to see a yarn.lock printed from the bun.lockb. This has been fixed, thanks to [@snoglobe](https://github.com/snoglobe)!

### Fixed: Bun.file(path).text() on Windows not reading to end of file sometimes

On Windows, in certain cases, `Bun.file(path).text()` would not read to the end of the file. This has been fixed, thanks to [@190n](https://github.com/190n)!

### Fixed: React 19 production mode SSR

React 19 changed the symbol used for identifying JSX elements. This broke Bun's JSX inlining optimization. To continue to support React 19, we've disabled the optimization for now.

Thanks to [@paperclover](https://github.com/paperclover) for the fix!

### Fixed: DOMJIT crash with TextDecoder

A crash that could occur when throwing an exception from a `TextDecoder` has been fixed. DOMJIT is a neat feature in JavaScriptCore that allows us to leverage type information at build-time to call natively-implemented JS functions around 30% faster. We added typed array support to this some time ago, but it has proven to cause crashes in certain cases - so we're disabling it for now and will re-enable it once we make this API more robust.

## Thanks to 12 contributors!

- [@190n](https://github.com/190n)
- [@cirospaciari](https://github.com/cirospaciari)
- [@DannyJJK](https://github.com/DannyJJK)
- [@dylan-conway](https://github.com/dylan-conway)
- [@Electroid](https://github.com/Electroid)
- [@Jarred-Sumner](https://github.com/Jarred-Sumner)
- [@levabala](https://github.com/levabala)
- [@nektro](https://github.com/nektro)
- [@paperclover](https://github.com/paperclover)
- [@snoglobe](https://github.com/snoglobe)
- [@stilt0n](https://github.com/stilt0n)
- [@wpaulino](https://github.com/wpaulino)
