yarn mongodb 6.13.1
v6.13.1

latest releases: 6.13.1-dev.20250222.sha.421ddeb3, 6.13.1-dev.20250221.sha.21f2cb91
2 days ago

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

Documentation

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

Don't miss a new mongodb release

NewReleases is sending notifications on new releases.