Skip to content

v5.4.0

Compare
Choose a tag to compare
@nbbeeken nbbeeken released this 04 May 19:45
· 287 commits to main since this release
c69b0b1

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

Release Highlights

ChangeStream.tryNext Typescript fix

We have corrected the tryNext method on ChangeStream to use the TChange schema generic instead of the untyped Document interface. This may increase strictness for existing usages but aligns with the rest of the methods on the change stream class to accurately reflect the type returned from the driver.

Deprecations

The db.command() API has a number of options deprecated that were incorrectly included in the typescript interface the method reportedly accepts. A majority of the options relate to fields that must be attached to the command directly: readConcern, writeConcern, and comment.

Additionally, the collStats helper has been deprecated in favor of using database aggregations to get the same result: https://www.mongodb.com/docs/manual/reference/operator/aggregation/collStats/

​​NOTE: This release includes some experimental features that are not yet ready for production use. As a reminder, anything marked experimental is not a part of the stable driver API and is subject to change without notice.

Features and Deprecations

Bug Fixes

Documentation

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