---
title: "raw-body 4.0.0 Breaking Changes on npm | Since.dev"
description: "What each raw-body release removed, renamed or changed: 16 breaking changes in 3 versions on npm, each with its source."
canonical_url: https://since.dev/packages/npm/raw-body
last_updated: 2026-12-04
---

# raw-body breaking changes

raw-body 4.0.0 (July 12, 2026) is its newest release with breaking changes, 13 of them. The first: Drops support for Node.js versions before 22 in raw-body 4.0.0. Every breaking API change we have recorded in raw-body on npm: 16 breaking changes in 3 versions. Below, its 3 versions with breaking changes, newest first, removals and renames first, each with its source.

Updated December 4, 2026

Latest version `4.0.0`, released July 12, 2026. [Source repository](https://github.com/stream-utils/raw-body)

Its 3.0.0-beta.1 release drops Node.js 0.8. [Node.js end of life dates](https://since.dev/calendar/nodejs.md).

- From [3.0.0](#v-3-0-0) to [4.0.0](#v-4-0-0): 13 breaking changes in 1 version.

## raw-body 4.0.0 breaking changes

raw-body 4.0.0, released July 12, 2026: 13 breaking changes.

- **Removed**  

Node.js versions prior to 22 are no longer supported. Upgrade Node.js to 22 or later before using this release. [github.com](https://github.com/stream-utils/raw-body/releases/tag/v4.0.0)
- **Removed**  

Streams must implement the readable stream interface (unpipe, pause); legacy streams1 streams are no longer supported. [github.com](https://github.com/stream-utils/raw-body/releases/tag/v4.0.0)
- **Behavior changed**  

Encodings outside the WHATWG Encoding Standard such as UTF-32 now throw a 415 error. utf-16 always decodes as little-endian; use utf-16be for big-endian content. [github.com](https://github.com/stream-utils/raw-body/releases/tag/v4.0.0)
- **Behavior changed**  

Node streams that emit string chunks now error with a 500 stream.encoding.set instead of being decoded silently or crashing. [github.com](https://github.com/stream-utils/raw-body/releases/tag/v4.0.0)
- **Behavior changed** `getRawBody`  

getRawBody itself keeps accepting only node streams; use the new getRawBodyWeb export for WHATWG ReadableStream bodies. [github.com](https://github.com/stream-utils/raw-body/releases/tag/v4.0.0)
- **Behavior changed** `limit`  

A limit that does not parse to a byte count now throws a TypeError instead of silently having no limit. Use limit: null to disable the limit. [github.com](https://github.com/stream-utils/raw-body/releases/tag/v4.0.0)
- **Behavior changed** `utf-16`  

utf-16 always decodes as little-endian now; use utf-16be for big-endian content. [github.com](https://github.com/stream-utils/raw-body/releases/tag/v4.0.0)
- **Configuration changed**  

CommonJS consumers must load the package through require(esm); plain require of the package no longer works. [github.com](https://github.com/stream-utils/raw-body/releases/tag/v4.0.0)
- **Signature changed** `default`  

Was function getRawBody(stream: NodeJS.ReadableStream, callback: (err: getRawBody.RawBodyError, body: Buffer) => void): void function getRawBody(stream: NodeJS.ReadableStream, options: (getRawBody.Options & {encoding: getRawBody.Encoding})... [npmjs.com](https://www.npmjs.com/package/raw-body/v/4.0.0)
- **Signature changed** `Options.encoding`  

Was encoding?: Encoding | null; now encoding?: Encoding | false | null. [npmjs.com](https://www.npmjs.com/package/raw-body/v/4.0.0)
- **Signature changed** `RawBodyError.status`  

Was status: number; now status?: number. [npmjs.com](https://www.npmjs.com/package/raw-body/v/4.0.0)
- **Signature changed** `RawBodyError.statusCode`  

Was statusCode: number; now statusCode?: number. [npmjs.com](https://www.npmjs.com/package/raw-body/v/4.0.0)
- **Signature changed** `RawBodyError.type`  

Was type: string; now type?: RawBodyErrorType. [npmjs.com](https://www.npmjs.com/package/raw-body/v/4.0.0)

## raw-body 3.0.0 breaking changes

raw-body 3.0.0, released July 25, 2024: 1 breaking change.

- **Signature changed** `default`  

Was function getRawBody(stream: Readable, callback: (err: getRawBody.RawBodyError, body: Buffer) => void): void function getRawBody(stream: Readable, options: (getRawBody.Options & {encoding: getRawBody.Encoding}) | getRawBody.Encoding)... [npmjs.com](https://www.npmjs.com/package/raw-body/v/3.0.0)

## raw-body 3.0.0-beta.1 breaking changes

raw-body 3.0.0-beta.1, released July 25, 2024: 2 breaking changes.

- **Removed**  

Node.js 0.8 is no longer supported, so upgrade the runtime before using this version. [github.com](https://github.com/stream-utils/raw-body/blob/v3.0.0/HISTORY.md)
- **Signature changed**  

The TypeScript type of the stream argument now uses the NodeJS.ReadableStream interface, so typed code may need updating. [github.com](https://github.com/stream-utils/raw-body/blob/v3.0.0/HISTORY.md)

## Check your code

These are the changes. To see which of them reach your code, [scan a public repository](https://since.dev/scan.md), or have your coding agent call `check_code` with your manifest or lockfile over [MCP](https://since.dev/docs.md#mcp). [The API](https://since.dev/docs.md#api) reads every change in every version. A fix pull request opens for the changes that reach a connected repository. Nothing merges or deploys.

## Put your code on continuous maintenance.

Scan a public repository now, or give your agent one line.

[Scan a repository](https://since.dev/scan.md). Any public GitHub repository. No sign-in.

### Tell your agent what changed since it was trained.

`claude mcp add --transport http since https://api.since.dev/mcp`

[Get an API key](https://app.since.dev/login?mode=signup)

Codex, Cursor and any MCP client use https://api.since.dev/mcp.

---

Every page on this site as Markdown: https://since.dev/sitemap.md. For agents: https://since.dev/llms.txt.
