7.1.0 (2026-02-02)
The MongoDB Node.js team is pleased to announce version 7.1.0 of the mongodb package!
Release Notes
ð§© Runtime and platform compatibility improvements
aws4 package no longer required for AWS authentication
The aws4 package is no longer required to use AWS authentication, reducing the dependency footprint.
Usages of util.promisify have been removed
The driver no longer relies on Node.jsâs util.promisify() API, which improves compatibility with alternate runtimes.
Explicit node:process import instead of global.process
The driver now explicitly imports node:process instead of relying on global.process, allowing bundlers and alternate runtimes to supply and optimize the process implementation more consistently.
Node-specific platform APIs replaced with standards-based equivalents
The driver replaces several Node-specific APIs with standards-based equivalents:
process.archâos.arch()process.platformâos.platform()os.endianness()âBSON.NumberUtilsprocess.hrtime()âperformance.now()process.nextTick()âqueueMicrotask()
These changes reduce the number of patches required to run the driver outside of Node.js and improve compatibility with non-Node.js runtimes.
ð Connection resilience and retry behavior improvements
Connection churn avoidance in server overload scenarios
When server-side connection rate limiting is enabled and the rate limiter kicks in under periods of high connection establishment,the driver will additionally churn connections by clearing the pool every time the rate limiter rejects an incoming connection request.
In this new driver release, connection establishment failures no longer clear the pool, preventing unnecessary connection churn in these scenarios.
withTransaction now applies exponential backoff during transaction retries
The convenient transaction API, withTransaction, now uses exponential backoff between retries when a transaction must be retried. Under high server load, this can help prevent transaction retry storms.
Server selection deprioritizes servers during retries
When retrying a command, the driver now deprioritizes servers during server selection, improving stability and reducing the likelihood of repeatedly targeting overloaded or previously failed servers.
ð OIDC authentication improvements
Expanded the list of ALLOWED_HOSTS for OIDC
OIDC authentication now supports hosts matching *.mongo.com in its default ALLOWED_HOSTS list.
OIDC reauthentication now works with promoteValues: false
When MongoClient is configured with promoteValues: false (for applications that rely on raw BSON types), OIDC reauthentication now succeeds as expected.
â
Fixed read preference adherence for $merge and $out aggregations
Resolved an issue where the driver failed to detect MongoDB 5.0+ capabilities due to incorrect commonWireVersion initialization. As a result, aggregations with write stages now correctly respect secondary and secondaryPreferred read preferences, rather than forcing execution on the primary.
Huge thanks to @crehbichler for discovering and investigating this bug and for implementing a fix!
â ïž Deprecations
RenameCollectionOptions.new_collection
This option has been unused since driver 4.x. It is now deprecated and will be removed in a future major release. Existing code that sets this option can safely remove it with no behavioral change.
Features
- NODE-5393: aws4 no longer required for AWS authentication (#4824) (0f46db8)
- NODE-7121: prevent connection churn on backpressure errors when establishing connections (#4800) (4cb2b87)
- NODE-7122: exponential backoff between retries in convenient transaction API (#4765) (e70fdc9)
- NODE-7304: remove usages in src of promisify (#4799) (761b9bf)
- NODE-7306: Replace global process with import node:process (#4820) (cc503cb)
- NODE-7310: Replace process.arch with os.arch() (#4823) (f0af829)
- NODE-7311: Replace process.platform with os.platform() (#4822) (c58ca1f)
- NODE-7317: use BSON.NumberUtils to determine endianness (#4808) (4e9467e)
- NODE-7319: update allowed hosts list with *.mongo.com (#4802) (bfb7160)
- NODE-7330: deprecate RenameCollectionOptions.new_collection (#4815) (a96fa26)
- NODE-7333: add support for deprioritized servers to all topologies (#4821) (a4211e7)
- NODE-7307: Replace node:process.hrtime() with performance.now() (#4816) (ae2e037)
- NODE-7308: replace process.nextTick with queueMicrotask (#4817) (b1b6e81)
Bug Fixes
- NODE-7290: use valueof for error code check (#4791) (1cc3d1c)
- NODE-7298: ensure commonWireVersion is computed from server maxWireVersion (#4805) (2b2366d)
Documentation
We invite you to try the mongodb library immediately, and report any issues to the NODE project.