v6.2.0
版本发布时间: 2023-10-20 23:05:19
mongodb/node-mongodb-native最新发布版本:v6.9.0(2024-09-13 01:12:41)
6.2.0 (2023-10-19)
The MongoDB Node.js team is pleased to announce version 6.2.0 of the mongodb
package!
Release Notes
Updated to BSON 6.2.0
BSON now prints in full color! :rainbow: :rocket:
See our release notes for BSON 6.2.0 here for more examples!
insertedIds
in bulk write now contain only successful insertions
Prior to this fix, the bulk write error's result.insertedIds
property contained the _id
of each attempted insert in a bulk operation.
Now, when a bulkwrite()
or an insertMany()
operation rejects one or more inserts, throwing an error, the error's result.insertedIds
property will only contain the _id
fields of successfully inserted documents.
Fixed edge case leak in findOne()
When running a findOne
against a time series collection, the driver left the implicit session for the cursor un-ended due to the way the server returns the resulting cursor information. Now the cursor will always be cleaned up regardless of the outcome of the find operation.
Removed client-side collection and database name validation
Database and collection name checking will now be in sync with the MongoDB server's naming restrictions. Specifically, users can now create collections that start or end with the '.' character.
Features
-
NODE-5613: add
awaited
field to SDAM heartbeat events (#3895) (b50aadc) - update bson to 6.2.0 (#3898) (32b7176)
Bug Fixes
- NODE-5496: remove client-side collection and database name check validation (#3873) (98550c6)
- NODE-5628: bulkWriteResult.insertedIds does not filter out _ids that are not actually inserted (#3867) (09f2a67)
- NODE-5706: make findOne() close implicit session to avoid memory leak (#3897) (995d138)
Documentation
We invite you to try the mongodb
library immediately, and report any issues to the NODE project.