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

# mongodb breaking changes

mongodb 7.9.1 (November 19, 2026) is its newest release with breaking changes. The first: Behavior changed MongoClient. Every breaking API change we have recorded in mongodb on npm: 417 breaking changes in 12 versions. Below, its 12 versions with breaking changes, newest first, removals and renames first, each with its source.

Updated December 4, 2026

Latest version `7.10.0`, released December 3, 2026. [Source repository](https://github.com/mongodb/node-mongodb-native)

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.22.0](#v-6-22-0) to [7.9.1](#v-7-9-1): 128 breaking changes in 9 versions.
- From [5.0.0](#v-5-0-0) to [7.9.1](#v-7-9-1): 245 breaking changes in 11 versions.

## mongodb 7.9.1 breaking changes

mongodb 7.9.1, released November 19, 2026: 1 breaking change.

- **Behavior changed** `MongoClient`  

Credentials with a NUL character, from the connection string or the options object, now make the MongoClient constructor throw. Remove NUL characters from PLAIN credentials before creating the client. [github.com](https://github.com/mongodb/node-mongodb-native/releases/tag/v7.9.1)

## mongodb 7.9.0 breaking changes

mongodb 7.9.0, released November 12, 2026: 4 breaking changes.

- **Behavior changed** `dropIndexes`  

dropIndexes no longer swallows most errors; only NamespaceNotFound is ignored, and other errors are thrown. Code that relied on silent failures must handle them. [github.com](https://github.com/mongodb/node-mongodb-native/releases/tag/v7.9.0)
- **Behavior changed** `MongoClient`  

Passing an environment and an OIDC callback together, in the connection string or options, now fails. Remove one of them so the client uses only one authentication source. [github.com](https://github.com/mongodb/node-mongodb-native/releases/tag/v7.9.0)
- **Default changed** `autoSelectFamily`  

When unset, the driver no longer forces autoSelectFamily to true, so the runtime default applies. On runtimes other than Node.js this default may differ; set the option explicitly to keep the old behavior. [github.com](https://github.com/mongodb/node-mongodb-native/releases/tag/v7.9.0)
- **Signature changed** `Collection.createIndex`  

Was createIndex(indexSpec: IndexSpecification, options?: CreateIndexesOptions): Promise\<string>; now createIndex(indexSpec: IndexSpecification): Promise\<string> createIndex(indexSpec: IndexSpecification, options: CreateIndexesOptions |... [npmjs.com](https://www.npmjs.com/package/mongodb/v/7.9.0)

## mongodb 7.8.0 breaking changes

mongodb 7.8.0, released October 30, 2026: 7 breaking changes.

- **Signature changed** `AbstractCursor.close`  

Was close(options?: {timeoutMS?: number;}): Promise\<void>; now close(\_options?: {timeoutMS?: number;}): Promise\<void>. [npmjs.com](https://www.npmjs.com/package/mongodb/v/7.8.0)
- **Signature changed** `ClientEncryption.rewrapManyDataKey`  

Was rewrapManyDataKey(filter: Filter\<DataKey>, options?: ClientEncryptionRewrapManyDataKeyProviderOptions): Promise<{bulkWriteResult?: BulkWriteResult;}>; now rewrapManyDataKey(filter: Filter\<DataKey>, options?... [npmjs.com](https://www.npmjs.com/package/mongodb/v/7.8.0)
- **Signature changed** `ClientSession.commitTransaction`  

Was commitTransaction(options?: {timeoutMS?: number;}): Promise\<void>; now commitTransaction(\_options?: {timeoutMS?: number;}): Promise\<void>. [npmjs.com](https://www.npmjs.com/package/mongodb/v/7.8.0)
- **Signature changed** `Collection.createIndexes`  

Was createIndexes(indexSpecs: IndexDescription\[\], options?: CreateIndexesOptions): Promise\<string\[\]>; now createIndexes(indexSpecs: IndexDescription\[\], commandOptions: CreateIndexesOptions | undefined, allowUnknownIndexOptions: boolean)... [npmjs.com](https://www.npmjs.com/package/mongodb/v/7.8.0)
- **Signature changed** `GridFSBucket.delete`  

Was delete(id: ObjectId, options?: {timeoutMS: number;}): Promise\<void>; now delete(id: ObjectId, options?: {timeoutMS?: number;}): Promise\<void>. [npmjs.com](https://www.npmjs.com/package/mongodb/v/7.8.0)
- **Signature changed** `GridFSBucket.drop`  

Was drop(options?: {timeoutMS: number;}): Promise\<void>; now drop(options?: {timeoutMS?: number;}): Promise\<void>. [npmjs.com](https://www.npmjs.com/package/mongodb/v/7.8.0)
- **Signature changed** `GridFSBucket.rename`  

Was rename(id: ObjectId, filename: string, options?: {timeoutMS: number;}): Promise\<void>; now rename(id: ObjectId, filename: string, options?: {timeoutMS?: number;}): Promise\<void>. [npmjs.com](https://www.npmjs.com/package/mongodb/v/7.8.0)

## mongodb 7.6.0 breaking changes

mongodb 7.6.0, released August 24, 2026: 1 breaking change.

- **Removed**  

The driver now throws an error when connecting to a MongoDB server of version 4.2 or less. Upgrade the server to 4.4 or later before upgrading the driver. [github.com](https://github.com/mongodb/node-mongodb-native/releases/tag/v7.6.0)

## mongodb 7.5.0 breaking changes

mongodb 7.5.0, released July 7, 2026: 7 breaking changes.

- **Renamed** `TextOpts`  

The TextOpts API was replaced with StringOpts when Queryable Encryption string queries became generally available. Update code that uses TextOpts to use StringOpts. [github.com](https://github.com/mongodb/node-mongodb-native/releases/tag/v7.5.0)
- **Renamed** `TextPreview`  

The TextPreview algorithm was replaced with String when Queryable Encryption string queries became generally available. Use String in place of TextPreview. [github.com](https://github.com/mongodb/node-mongodb-native/releases/tag/v7.5.0)
- **Behavior changed** `MongoClient.close`  

MongoClient.close() now closes checked-out connections on every server, so in-flight operations on other servers are interrupted with MongoClientClosedError. Code that relied on those operations finishing after close must handle this error. [github.com](https://github.com/mongodb/node-mongodb-native/releases/tag/v7.5.0)
- **Signature changed** `ClientEncryptionEncryptOptions.algorithm`  

Was algorithm: 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic' | 'AEAD_AES_256_CBC_HMAC_SHA_512-Random' | 'Indexed' | 'Unindexed' | 'Range' | 'TextPreview'; now algorithm: 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic' |... [npmjs.com](https://www.npmjs.com/package/mongodb/v/7.5.0)
- **Signature changed** `ClientEncryptionEncryptOptions.queryType`  

Was queryType?: 'equality' | 'range' | 'prefixPreview' | 'suffixPreview' | 'substringPreview'; now queryType?: 'equality' | 'range' | 'prefix' | 'suffix' | 'substring' | 'prefixPreview' | 'suffixPreview' | 'substringPreview'. [npmjs.com](https://www.npmjs.com/package/mongodb/v/7.5.0)
- **Signature changed** `ClientEncryptionEncryptOptions.textOptions`  

Was textOptions?: TextQueryOptions; now textOptions?: StringQueryOptions. [npmjs.com](https://www.npmjs.com/package/mongodb/v/7.5.0)
- **Signature changed** `TextQueryOptions`  

Was interface TextQueryOptions; now type TextQueryOptions = StringQueryOptions. [npmjs.com](https://www.npmjs.com/package/mongodb/v/7.5.0)

## mongodb 7.2.0 breaking changes

mongodb 7.2.0, released April 20, 2026: 3 breaking changes.

- **Behavior changed**  

Retries now wait progressively longer between attempts, with randomized jitter, so retry timing changes for existing code. [github.com](https://github.com/mongodb/node-mongodb-native/releases/tag/v7.2.0)
- **Signature changed** `GridFSBucketWriteStream.bufToStore`  

Was bufToStore: Buffer; now bufToStore: Uint8Array. [npmjs.com](https://www.npmjs.com/package/mongodb/v/7.2.0)
- **Signature changed** `MongoOptions`  

Was interface MongoOptions extends Required\<Pick\<MongoClientOptions, 'autoEncryption' | 'connectTimeoutMS' | 'directConnection' | 'driverInfo' | 'forceServerObjectId' | 'minHeartbeatFrequencyMS' | 'heartbeatFrequencyMS' |... [npmjs.com](https://www.npmjs.com/package/mongodb/v/7.2.0)

## Older versions

6 older versions, each with its first changes. [Sign up to see every change](https://app.since.dev/login?mode=signup&src=package-page)

### mongodb 7.1.1 breaking changes

mongodb 7.1.1, released March 24, 2026: 1 breaking change.

- **Configuration changed**  

Wildcard entries \*. and \*/ in OIDC ALLOWED_HOSTS now need full subdomain or path matches, so partial suffix matches that were previously accepted are rejected. Check that your allowed host entries match exactly. [github.com](https://github.com/mongodb/node-mongodb-native/releases/tag/v7.1.1)

### mongodb 7.1.0 breaking changes

mongodb 7.1.0, released February 4, 2026: 3 breaking changes.

- **Removed** `SelectServerOptions.previousServer`  

SelectServerOptions.previousServer was removed in mongodb 7.1.0 [npmjs.com](https://www.npmjs.com/package/mongodb/v/7.1.0)
- **Behavior changed** `withTransaction`  

The convenient transaction API now uses exponential backoff between retries when a transaction must be retried, so retry timing changes. [github.com](https://github.com/mongodb/node-mongodb-native/releases/tag/v7.1.0)

And 1 more in this version.

### mongodb 7.0.0 breaking changes

mongodb 7.0.0, released November 6, 2025: 101 breaking changes.

- **Removed**  

The driver now requires Node.js v20.19.0 or later. Upgrade the Node.js runtime before adopting v7. [github.com](https://github.com/mongodb/node-mongodb-native/releases/tag/v7.0.0)
- **Removed**  

Use authMechanism=MONGODB-AWS only; credentials are fetched by the AWS SDK. [github.com](https://github.com/mongodb/node-mongodb-native/releases/tag/v7.0.0)

And 99 more in this version.

### mongodb 6.22.0 breaking changes

mongodb 6.22.0, released November 3, 2026: 6 breaking changes.

- **Behavior changed** `timeoutMS`  

Operations no longer time out because of timeoutMS, so code relying on it for timeouts must use the per-stage timeout options instead. [github.com](https://github.com/mongodb/node-mongodb-native/releases/tag/v6.22.0)
- **Signature changed** `AbstractCursor.close`  

Was close(options?: {timeoutMS?: number;}): Promise\<void>; now close(\_options?: {timeoutMS?: number;}): Promise\<void>. [npmjs.com](https://www.npmjs.com/package/mongodb/v/6.22.0)

And 4 more in this version.

### mongodb 6.0.0 breaking changes

mongodb 6.0.0, released August 28, 2023: 111 breaking changes.

- **Removed**  

Older Node.js runtimes are no longer supported; upgrade Node.js to v16.20.1 or later. [github.com](https://github.com/mongodb/node-mongodb-native/releases/tag/v6.0.0)
- **Removed** `AddUserOptions`  

AddUserOptions type removed in mongodb 6.0.0 [npmjs.com](https://www.npmjs.com/package/mongodb/v/6.0.0)

And 109 more in this version.

### mongodb 5.0.0 breaking changes

mongodb 5.0.0, released January 31, 2023: 172 breaking changes.

- **Removed**  

The driver no longer automatically uses bson-ext in place of the bson dependency. [github.com](https://github.com/mongodb/node-mongodb-native/blob/main/etc/notes/CHANGES%5F5.0.0.md)
- **Removed**  

Callback arguments are no longer accepted by driver methods. Migrate to Promises, or use the mongodb-legacy package to keep callbacks. [github.com](https://github.com/mongodb/node-mongodb-native/releases/tag/v5.0.0)

And 170 more in this version.

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