6.13.1 (2025-02-20)
The MongoDB Node.js team is pleased to announce version 6.13.1 of the mongodb
package!
Release Notes
Remove extraneous Promise<Document>
in Collection.replaceOne
return type
The return type signature of the replaceOne
method no longer includes the general Promise<Document>
type. Thanks to @arturmuller, the replaceOne
type signature is now more accurate! 🎉
Fix writeConcern omitted when timeoutMS is provided
When timeoutMS
and a write concern were provided, the writeConcern
was incorrectly omitted from the final command executed by the driver.
Thanks @stepanho for contributing the fix!
Update BSON version requirement to 6.10.3
This pulls in fixes made in bson
versions 6.10.3 and 6.10.2 into the driver.
BSON 6.10.2 fixed an issue in calculateObjectSize
ignoring the size contributed by BigInt
values to a BSON document. This impacted batch splitting logic in bulkWrite
operations: if the actual BSON was over the size returned by calculateObjectSize
the server would return an error.
Warning
BSON 6.10.3 addresses a potential data corruption risk with the use of useBigInt64
flag introduced in BSON 6.4.0, where negative Long
values would be deserialized into BigInt
as unsigned integers when the useBigInt64
flag was enabled. (Thanks to @rkistner for reporting this issue!)
Bug Fixes
- NODE-6407: use conversationId returned from server in saslContinue (#4368) (fbefa6b)
- NODE-6613: Update error messages when primaries go stale (#4397) (6528c8d)
- NODE-6690: Remove extraneous Document in replaceOne return type (#4383) (6c81d4e)
- NODE-6763: pass WriteConcernOptions instead on WriteConcernSettings (#4421) (26f15d7)
- NODE-6777: update BSON to 6.10.3 (#4428) (db5b9e0)
Documentation
We invite you to try the mongodb
library immediately, and report any issues to the NODE project.