Skip to content

chore(main): release 7.2.0#4861

Merged
tadjik1 merged 2 commits intomainfrom
release-please--branches--main--components--mongodb
Apr 20, 2026
Merged

chore(main): release 7.2.0#4861
tadjik1 merged 2 commits intomainfrom
release-please--branches--main--components--mongodb

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot commented Feb 4, 2026

🌱 A new release!

7.2.0 (2026-04-17)

The MongoDB Node.js team is pleased to announce version 7.2.0 of the mongodb package!

Release Notes

⚙️ Added support for MongoDB's Intelligent Workload Management

Added support for MongoDB's Intelligent Workload Management (IWM) and ingress connection rate limiting features. The driver now gracefully handles write-blocking scenarios and optimizes connection establishment during high-load conditions to maintain application availability.

Two new client options are available:

  • maxAdaptiveRetries (default: 2) - configures the maximum number of retries during server overload. Set to 0 to disable overload retries.
  • enableOverloadRetargeting (default: false) - when enabled, the driver will deprioritize servers that return overload errors during retry server selection.

🧩 Runtime and platform compatibility improvements

Node-specific platform APIs replaced with standards-based equivalents

The following Node-specific APIs have been replaced with standards-based equivalents:

  • The driver now uses the standard Uint8Array APIs instead of the Node‑specific Buffer APIs.
  • The driver now uses the standard Web Crypto API globalThis.crypto instead of the Node‑specific crypto API.

These changes reduce the number of patches required to run the driver outside of Node.js and improve compatibility with non-Node.js runtimes.

Experimental Support for Dependency Injection of Nodejs Runtime Dependencies

This release introduces a new MongoClient option, runtimeAdapters. runtimeAdapters allows injection of core Nodejs APIs, to allow users of the driver to use alternative runtimes that don't support Nodejs compatibility or work in restricted environments.

Warning

runtimeAdapters is experimental and the actual interface of each dependency might change at any time.

Notes about usage of runtimeAdapters:

  1. If no runtimeAdapter is provided for a core Nodejs module that the driver uses, the driver will import the corresponding module from Nodejs.
  2. Adapters are per-client.
  3. Each adapter specifies the required APIs as a part of its Typescript API definition. There are no runtime checks to ensure all required functions are provided; the onus is on users to ensure that all required module dependencies are provided.
  4. The runtimeAdapters Typescript types currently rely on Nodejs' type definitions (@types/node). To use runtimeAdapters in a Typescript project, @types/node must be installed as well.
  5. When providing a module in runtimeAdapters, all required functions inside that module must be provided. For example, when injecting the os module, the platform() function cannot be omitted.
runtimeAdapters supports injecting Nodejs' os module

The os module is pluggable using runtimeAdapters:

const os: OsAdapter = {
  // implement the required OSAdapter interface
}

// `client` will never import or make use of the `os` module and instead only rely on the `os` adapter specified above.
const client = new MongoClient(<uri>, {
  runtimeAdapters: { os }
});

☀️ ChangeStreams now have a bufferedCount() method that matches cursors

In some circumstances it may be desirable to determine if there are local documents stored in your change stream before invoking one of the async methods (tryNext, hasNext etc.). The changeStream.bufferedCount() returns the number of documents remaining inside the change stream from the last batch.

Shout out to @typesafe for contributing this feature!

Features

Documentation

We invite you to try the mongodb library immediately, and report any issues to the NODE project.


@github-actions github-actions Bot requested a review from a team as a code owner February 4, 2026 15:46
@github-actions github-actions Bot force-pushed the release-please--branches--main--components--mongodb branch 4 times, most recently from f51ba6e to 9224c90 Compare February 12, 2026 09:06
@github-actions github-actions Bot force-pushed the release-please--branches--main--components--mongodb branch 3 times, most recently from 72a2e8b to ce16586 Compare March 2, 2026 09:04
@github-actions github-actions Bot force-pushed the release-please--branches--main--components--mongodb branch 4 times, most recently from 4d279b2 to 2c3048d Compare March 13, 2026 00:30
@tadjik1
Copy link
Copy Markdown
Member

tadjik1 commented Mar 16, 2026

run release_notes

@github-actions github-actions Bot force-pushed the release-please--branches--main--components--mongodb branch 8 times, most recently from e89beef to 061ed9b Compare March 23, 2026 13:19
@github-actions github-actions Bot force-pushed the release-please--branches--main--components--mongodb branch 4 times, most recently from 9403fd2 to 4292424 Compare March 30, 2026 21:17
@github-actions github-actions Bot force-pushed the release-please--branches--main--components--mongodb branch 2 times, most recently from eba0147 to 0fdd3f3 Compare April 14, 2026 15:00
@github-actions github-actions Bot force-pushed the release-please--branches--main--components--mongodb branch 2 times, most recently from 57f8567 to 433f6a0 Compare April 17, 2026 00:34
@dariakp
Copy link
Copy Markdown
Contributor

dariakp commented Apr 17, 2026

run release_notes

1 similar comment
@tadjik1
Copy link
Copy Markdown
Member

tadjik1 commented Apr 17, 2026

run release_notes

@github-actions github-actions Bot force-pushed the release-please--branches--main--components--mongodb branch from 433f6a0 to e622b92 Compare April 17, 2026 16:18
@dariakp
Copy link
Copy Markdown
Contributor

dariakp commented Apr 17, 2026

run release_notes

@dariakp
Copy link
Copy Markdown
Contributor

dariakp commented Apr 17, 2026

🌱 A new release!

7.2.0 (2026-04-17)

The MongoDB Node.js team is pleased to announce version 7.2.0 of the mongodb package!

Release Notes

⚙️ Added support for MongoDB's Intelligent Workload Management

Added support for MongoDB's Intelligent Workload Management (IWM) and ingress connection rate limiting features. The driver now gracefully handles write-blocking scenarios and optimizes connection establishment during high-load conditions to maintain application availability.

Two new client options are available:

  • maxAdaptiveRetries (default: 2) - configures the maximum number of retries during server overload. Set to 0 to disable overload retries.
  • enableOverloadRetargeting (default: false) - when enabled, the driver will deprioritize servers that return overload errors during retry server selection.

🧩 Runtime and platform compatibility improvements

Node-specific platform APIs replaced with standards-based equivalents

The following Node-specific APIs have been replaced with standards-based equivalents:

  • The driver now uses the standard Uint8Array APIs instead of the Node‑specific Buffer APIs.
  • The driver now uses the standard Web Crypto API globalThis.crypto instead of the Node‑specific crypto API.

These changes reduce the number of patches required to run the driver outside of Node.js and improve compatibility with non-Node.js runtimes.

Experimental Support for Dependency Injection of Nodejs Runtime Dependencies

This release introduces a new MongoClient option, runtimeAdapters. runtimeAdapters allows injection of core Nodejs APIs, to allow users of the driver to use alternative runtimes that don't support Nodejs compatibility or work in restricted environments.

Warning

runtimeAdapters is experimental and the actual interface of each dependency might change at any time.

Notes about usage of runtimeAdapters:

  1. If no runtimeAdapter is provided for a core Nodejs module that the driver uses, the driver will import the corresponding module from Nodejs.
  2. Adapters are per-client.
  3. Each adapter specifies the required APIs as a part of its Typescript API definition. There are no runtime checks to ensure all required functions are provided; the onus is on users to ensure that all required module dependencies are provided.
  4. The runtimeAdapters Typescript types currently rely on Nodejs' type definitions (@types/node). To use runtimeAdapters in a Typescript project, @types/node must be installed as well.
  5. When providing a module in runtimeAdapters, all required functions inside that module must be provided. For example, when injecting the os module, the platform() function cannot be omitted.
runtimeAdapters supports injecting Nodejs' os module

The os module is pluggable using runtimeAdapters:

const os: OsAdapter = {
  // implement the required OSAdapter interface
}

// `client` will never import or make use of the `os` module and instead only rely on the `os` adapter specified above.
const client = new MongoClient(<uri>, {
  runtimeAdapters: { os }
});

☀️ ChangeStreams now have a bufferedCount() method that matches cursors

In some circumstances it may be desirable to determine if there are local documents stored in your change stream before invoking one of the async methods (tryNext, hasNext etc.). The changeStream.bufferedCount() returns the number of documents remaining inside the change stream from the last batch.

Shout out to @typesafe for contributing this feature!

Features

Documentation

We invite you to try the mongodb library immediately, and report any issues to the NODE project.


@RaschidJFR
Copy link
Copy Markdown

run release_notes

@tadjik1 tadjik1 merged commit 7e53685 into main Apr 20, 2026
29 of 32 checks passed
@tadjik1 tadjik1 deleted the release-please--branches--main--components--mongodb branch April 20, 2026 15:10
@github-actions
Copy link
Copy Markdown
Contributor Author

🤖 Created releases:

🌻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants