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! 🎉
WriteConcern omitted with 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 the contribution!
Update BSON version requirement to 6.10.3
This pulls in fixes made in 6.10.3 and 6.10.2 to be pulled into the driver.
BSON 6.10.2 fixed an issue in calculateObjectSize
where it was ignoring the size contributed by bigints 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.
BSON 6.10.3 addresses an issue with the useBigInt64
flag:
⚠️ Fixed potential data corruption bug when useBigInt64
is enabled
After refactoring to improve deserialization performance in #649, we inadvertently introduced a bug that manifested when deserializing Long
values with the useBigInt64
flag enabled. The bug would lead to negative Long
values being deserialized as unsigned integers. This issue has been resolved here.
Thanks to @rkistner for reporting this bug!
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.