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
On this page
Latest version 7.3.4, released November 5, 2026. Source repository
Its 7.0.0 release requires Node.js 20.19.0 or later. Node.js end of life dates.
- From 6.0.0 to 7.0.0: 13 breaking changes in 1 version.
- From 5.0.0 to 7.0.0: 28 breaking changes in 2 versions.
bson 7.0.0 breaking changes
- Removed
atob
React Native builds no longer include these polyfills; the Hermes engine provides them natively. github.com - 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 - Behavior changed
BSON now uses JavaScript BigInt literal syntax and needs an engine that supports it. github.com - Behavior changed
ObjectId
Creating an ObjectId from a numeric timestamp through the constructor no longer works; use ObjectId.createFromTime() instead. github.com - 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 - Signature changed
BSON.BSONValue._bsontype
Was readonly abstract _bsontype: string; now readonly abstract _bsontype: BSONTypeTag. npmjs.com - 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 - 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 - Signature changed
BSON.TimestampOverrides
Was type TimestampOverrides = '_bsontype' | 'toExtendedJSON' | 'fromExtendedJSON' | 'inspect'; now type TimestampOverrides = '_bsontype' | 'toExtendedJSON' | 'fromExtendedJSON' | 'inspect' | typeof bsonType. npmjs.com - Signature changed
BSONValue._bsontype
Was readonly abstract _bsontype: string; now readonly abstract _bsontype: BSONTypeTag. npmjs.com - Signature changed
ObjectId.constructor
Was constructor(inputId: number) constructor(inputId?: string | number | ObjectId | ObjectIdLike | Uint8Array); now constructor(inputId?: string | ObjectId | ObjectIdLike | Uint8Array). npmjs.com - 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 - Signature changed
TimestampOverrides
Was type TimestampOverrides = '_bsontype' | 'toExtendedJSON' | 'fromExtendedJSON' | 'inspect'; now type TimestampOverrides = '_bsontype' | 'toExtendedJSON' | 'fromExtendedJSON' | 'inspect' | typeof bsonType. npmjs.com
bson 6.0.0 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 - Removed
BSON.Decimal128.fromStringWithRounding
BSON.Decimal128.fromStringWithRounding was removed in bson 6.0.0 npmjs.com - Removed
BSON.UUID.cacheHexString
BSON.UUID.cacheHexString was removed in bson 6.0.0 npmjs.com - Removed
Decimal128.fromStringWithRounding
Decimal128.fromStringWithRounding was removed in bson 6.0.0 npmjs.com - Removed
UUID.cacheHexString
The deprecated cacheHexString property on UUID was removed because it was unused. Stop referencing it. npmjs.com - Behavior changed
BSON_MAJOR_VERSION is now 6, so only objects with major version 6 can be serialized; mismatched objects throw BSONVersionError. github.com - 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 - 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 - Configuration changed
The package now requires Node.js v16.20.1 or later. Upgrade your Node.js runtime before installing this version. github.com - Signature changed
Binary.constructor
Was constructor(buffer?: string | BinarySequence, subType?: number); now constructor(buffer?: BinarySequence, subType?: number). npmjs.com
And 5 more in this version. Sign up to see every change
bson 5.0.0 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 - Removed
BSONTypeError
Catch BSONError instead, and use BSONError.isBSONError to filter library errors. npmjs.com - Removed
Decimal128.prototype.toObject
Decimal128 can no longer have a custom toObject mapper; transform values manually instead. github.com - Removed
default
The default export is gone; use named imports or require the package directly. npmjs.com - Removed
DeserializeOptions.cacheFunctions
The cacheFunctions option was removed from deserialize. npmjs.com - Removed
DeserializeOptions.cacheFunctionsCrc32
The cacheFunctionsCrc32 option was removed from deserialize. npmjs.com - Removed
DeserializeOptions.evalFunctions
The evalFunctions option was removed from deserialize. npmjs.com - Removed
EJSON.deserialize
EJSON.deserialize was removed in bson 5.0.0 npmjs.com - Removed
EJSON.JSONPrimitive
EJSON.JSONPrimitive was removed in bson 5.0.0 npmjs.com - Removed
EJSON.Options
EJSON.Options was removed in bson 5.0.0 npmjs.com
And 94 more in this version. Sign up to see every change
Check your code
These are the changes. To see which of them reach your code, scan a public repository, or have your coding agent call check_code with your manifest or lockfile over MCP. The 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.
See how out of date your code is.
Tell your agent what changed since it was trained.
claude mcp add --transport http since https://api.since.dev/mcpCodex, Cursor and any MCP client use https://api.since.dev/mcp.