---
title: Bun v1.0.25
description: "Fixes 4 bugs, adds vm.createScript. Fixes a crash in fs.readFile, a crash in Bun.file().text(), a crash in IPC, and a transpiler bug involving loose equals"
date: "2024-01-21T14:30:03.192Z"
author: jarred
draft: false
---

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.

This release fixes 4 bugs, adds vm.createScript. Fixes a crash in fs.readFile, a crash in Bun.file().text(), a crash in IPC, and a transpiler bug involving loose equals

#### Previous releases

- [`v1.0.24`](/blog/bun-v1.0.24) fixes 9 bugs and adds Bun Shell, a fast cross-platform shell with seamless JavaScript interop. Fixes a socket timeout bug, a potential crash when socket closes, a Node.js compatibility issue with Hapi, a process.exit bug, and bun install binlinking bug, bun inspect regression, and bun:test expect().toContain bug
- [`v1.0.23`](/blog/bun-v1.0.23) fixes 40 bugs (addressing 194 👍 reactions). import & embed sqlite databases in Bun, Resource Management ('using' TC39 stage3) support, bundler improvements when building for Node.js, bugfix for peer dependency resolution, semver bugfix, 4% faster TCP on linux, Node.js compatibility improvements and more"
- [`v1.0.22`](/blog/bun-v1.0.22) fixes 29 bugs (addressing 118 👍 reactions), fixes `bun install` issues on Vercel, adds `performance.mark()` APIs, adds `child_process` support for extra pipes, makes `Buffer.concat` faster, adds `toBeEmptyObject` and `toContainKeys` matchers, fixes `console.table` width using emojis, and support for `argv` and `execArgv` options in `worker_threads`, and supports Brotli in `fetch`.

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

## Fixed: crash in fs.readFile

In certain cases, Bun would crash when reading a file with `fs.readFile`, `fs.readFileSync`, or `fs.promises.readFile`. This was caused by an unintiailized memory access introduced when Bun added support for standalone modules.

## Fixed: crash in Bun.file().text()

A crash when reading a file with `Bun.file().text()` that had a Byte Order Mark has been fixed. This crash was introduced in Bun v1.0.24.

## Fixed: crash in IPC

A crash in IPC that would occur 4-5 seconds after the process started has been fixed. This crash was introduced when upgrading our version of uSockets to gain "long timeout" support. The crash was a null-pointer dereference when calling the timeout callback.

## Fixed: transpiler loose equality comparison bug

The following input would be constant-folded incorrectly:

```js
"" == 0;
"-0" == 0;
1234n == 5678n;
```

This has been fixed, thanks to [@dylan-conway](https://github.com/dylan-conway).

## `vm.createScript`

The `node:vm` function `createScript` has been added. This calls `new vm.Script` with the same arguments.

## Windows is coming soon

10 days away.

## Thanks to 5 contributors!

- [@bjon](https://github.com/bjon)
- [@dylan-conway](https://github.com/dylan-conway)
- [@Hanaasagi](https://github.com/Hanaasagi)
- [@Jarred-Sumner](https://github.com/Jarred-Sumner)
- [@nektro](https://github.com/nektro)
