The MongoDB Node.js team is pleased to announce version 6.2.0 of the
Updated to BSON 6.2.0
BSON now prints in full color! 🌈 🚀
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
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.
- NODE-5613: add
awaitedfield to SDAM heartbeat events (#3895) (b50aadc)
- update bson to 6.2.0 (#3898) (32b7176)
- 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)
We invite you to try the
mongodb library immediately, and report any issues to the NODE project.