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

# bson breaking changes

bson 7.0.0 (November 5, 2025) is its newest release with breaking changes, 13 of them. The first: Removed atob. Every breaking API change we have recorded in bson on npm: 132 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 `7.3.4`, released November 5, 2026. [Source repository](https://github.com/mongodb/js-bson)

Its 7.0.0 release requires Node.js 20.19.0 or later. [Node.js end of life dates](https://since.dev/calendar/nodejs.md).

- From [6.0.0](#v-6-0-0) to [7.0.0](#v-7-0-0): 13 breaking changes in 1 version.
- From [5.0.0](#v-5-0-0) to [7.0.0](#v-7-0-0): 28 breaking changes in 2 versions.

## bson 7.0.0 breaking changes

bson 7.0.0, released November 5, 2025: 13 breaking changes.

- **Removed** `atob`  

React Native builds no longer include these polyfills; the Hermes engine provides them natively. [github.com](https://github.com/mongodb/js-bson/releases/tag/v7.0.0)
- **Behavior changed**  

The Node.js bundle now uses globalThis.crypto for random bytes and no longer requires node:crypto, which may affect bundler setups. [github.com](https://github.com/mongodb/js-bson/releases/tag/v7.0.0)
- **Behavior changed**  

BSON now uses JavaScript BigInt literal syntax and needs an engine that supports it. [github.com](https://github.com/mongodb/js-bson/releases/tag/v7.0.0)
- **Behavior changed** `ObjectId`  

Creating an ObjectId from a numeric timestamp through the constructor no longer works; use ObjectId.createFromTime() instead. [github.com](https://github.com/mongodb/js-bson/releases/tag/v7.0.0)
- **Configuration changed**  

The minimum supported Node.js version is now v20.19.0. Users on Node 16 or 18 must upgrade their runtime before using bson 7. [github.com](https://github.com/mongodb/js-bson/releases/tag/v7.0.0)
- **Signature changed** `BSON.BSONValue._bsontype`  

Was readonly abstract \_bsontype: string; now readonly abstract \_bsontype: BSONTypeTag. [npmjs.com](https://www.npmjs.com/package/bson/v/7.0.0)
- **Signature changed** `BSON.ObjectId.constructor`  

Was constructor(inputId: number) constructor(inputId?: string | number | ObjectId | ObjectIdLike | Uint8Array); now constructor(inputId?: string | ObjectId | ObjectIdLike | Uint8Array). [npmjs.com](https://www.npmjs.com/package/bson/v/7.0.0)
- **Signature changed** `BSON.ObjectId.isValid`  

Was static isValid(id: string | number | ObjectId | ObjectIdLike | Uint8Array): boolean; now static isValid(id: string | ObjectId | ObjectIdLike | Uint8Array): boolean. [npmjs.com](https://www.npmjs.com/package/bson/v/7.0.0)
- **Signature changed** `BSON.TimestampOverrides`  

Was type TimestampOverrides = '\_bsontype' | 'toExtendedJSON' | 'fromExtendedJSON' | 'inspect'; now type TimestampOverrides = '\_bsontype' | 'toExtendedJSON' | 'fromExtendedJSON' | 'inspect' | typeof bsonType. [npmjs.com](https://www.npmjs.com/package/bson/v/7.0.0)
- **Signature changed** `BSONValue._bsontype`  

Was readonly abstract \_bsontype: string; now readonly abstract \_bsontype: BSONTypeTag. [npmjs.com](https://www.npmjs.com/package/bson/v/7.0.0)
- **Signature changed** `ObjectId.constructor`  

Was constructor(inputId: number) constructor(inputId?: string | number | ObjectId | ObjectIdLike | Uint8Array); now constructor(inputId?: string | ObjectId | ObjectIdLike | Uint8Array). [npmjs.com](https://www.npmjs.com/package/bson/v/7.0.0)
- **Signature changed** `ObjectId.isValid`  

Was static isValid(id: string | number | ObjectId | ObjectIdLike | Uint8Array): boolean; now static isValid(id: string | ObjectId | ObjectIdLike | Uint8Array): boolean. [npmjs.com](https://www.npmjs.com/package/bson/v/7.0.0)
- **Signature changed** `TimestampOverrides`  

Was type TimestampOverrides = '\_bsontype' | 'toExtendedJSON' | 'fromExtendedJSON' | 'inspect'; now type TimestampOverrides = '\_bsontype' | 'toExtendedJSON' | 'fromExtendedJSON' | 'inspect' | typeof bsonType. [npmjs.com](https://www.npmjs.com/package/bson/v/7.0.0)

## bson 6.0.0 breaking changes

bson 6.0.0, released August 28, 2023: 15 breaking changes.

- **Removed** `Binary`  

The Binary constructor and write() no longer accept strings such as 'latin1' or 'binary'. Convert your data to a Buffer or Uint8Array first, and use value() to get correctly sized bytes. [github.com](https://github.com/mongodb/js-bson/releases/tag/v6.0.0)
- **Removed** `BSON.Decimal128.fromStringWithRounding`  

BSON.Decimal128.fromStringWithRounding was removed in bson 6.0.0 [npmjs.com](https://www.npmjs.com/package/bson/v/6.0.0)
- **Removed** `BSON.UUID.cacheHexString`  

BSON.UUID.cacheHexString was removed in bson 6.0.0 [npmjs.com](https://www.npmjs.com/package/bson/v/6.0.0)
- **Removed** `Decimal128.fromStringWithRounding`  

Decimal128.fromStringWithRounding was removed in bson 6.0.0 [npmjs.com](https://www.npmjs.com/package/bson/v/6.0.0)
- **Removed** `UUID.cacheHexString`  

The deprecated cacheHexString property on UUID was removed because it was unused. Stop referencing it. [npmjs.com](https://www.npmjs.com/package/bson/v/6.0.0)
- **Behavior changed**  

BSON_MAJOR_VERSION is now 6, so only objects with major version 6 can be serialized; mismatched objects throw BSONVersionError. [github.com](https://github.com/mongodb/js-bson/releases/tag/v6.0.0)
- **Behavior changed** `Decimal128`  

Decimal128 constructor and Decimal128.fromString now throw a BSONError instead of silently rounding numbers with more than 34 significant digits. Handle the error or pass values within 34 digits. [github.com](https://github.com/mongodb/js-bson/releases/tag/v6.0.0)
- **Behavior changed** `ObjectId`  

The ObjectId constructor no longer treats a 12-length string as UTF-8 bytes; pass a 24-character hex string, a Uint8Array or a 12-byte buffer instead. [github.com](https://github.com/mongodb/js-bson/releases/tag/v6.0.0)
- **Configuration changed**  

The package now requires Node.js v16.20.1 or later. Upgrade your Node.js runtime before installing this version. [github.com](https://github.com/mongodb/js-bson/releases/tag/v6.0.0)
- **Signature changed** `Binary.constructor`  

Was constructor(buffer?: string | BinarySequence, subType?: number); now constructor(buffer?: BinarySequence, subType?: number). [npmjs.com](https://www.npmjs.com/package/bson/v/6.0.0)

And 5 more in this version. [Sign up to see every change](https://app.since.dev/login?mode=signup&src=package-page)

## bson 5.0.0 breaking changes

bson 5.0.0, released January 31, 2023: 104 breaking changes.

- **Removed**  

The minimum supported Node.js is now v14.20.1, so code on older Node.js versions must upgrade before using this release. [github.com](https://github.com/mongodb/js-bson/releases/tag/v5.0.0)
- **Removed** `BSONTypeError`  

Catch BSONError instead, and use BSONError.isBSONError to filter library errors. [npmjs.com](https://www.npmjs.com/package/bson/v/5.0.0)
- **Removed** `Decimal128.prototype.toObject`  

Decimal128 can no longer have a custom toObject mapper; transform values manually instead. [github.com](https://github.com/mongodb/js-bson/blob/main/docs/upgrade-to-v5.md)
- **Removed** `default`  

The default export is gone; use named imports or require the package directly. [npmjs.com](https://www.npmjs.com/package/bson/v/5.0.0)
- **Removed** `DeserializeOptions.cacheFunctions`  

The cacheFunctions option was removed from deserialize. [npmjs.com](https://www.npmjs.com/package/bson/v/5.0.0)
- **Removed** `DeserializeOptions.cacheFunctionsCrc32`  

The cacheFunctionsCrc32 option was removed from deserialize. [npmjs.com](https://www.npmjs.com/package/bson/v/5.0.0)
- **Removed** `DeserializeOptions.evalFunctions`  

The evalFunctions option was removed from deserialize. [npmjs.com](https://www.npmjs.com/package/bson/v/5.0.0)
- **Removed** `EJSON.deserialize`  

EJSON.deserialize was removed in bson 5.0.0 [npmjs.com](https://www.npmjs.com/package/bson/v/5.0.0)
- **Removed** `EJSON.JSONPrimitive`  

EJSON.JSONPrimitive was removed in bson 5.0.0 [npmjs.com](https://www.npmjs.com/package/bson/v/5.0.0)
- **Removed** `EJSON.Options`  

EJSON.Options was removed in bson 5.0.0 [npmjs.com](https://www.npmjs.com/package/bson/v/5.0.0)

And 94 more in this version. [Sign up to see every change](https://app.since.dev/login?mode=signup&src=package-page)

## 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.
