Skip to content

v4.7.0

Compare
Choose a tag to compare
@nbbeeken nbbeeken released this 18 Aug 17:25
· 160 commits to main since this release
853bbb0

The MongoDB Node.js team is pleased to announce version 4.7.0 of the bson package!

Release Highlights

This release adds automatic UUID support. Now when serializing or deserializing BSON you can work directly with the UUID type without explicit conversion methods. The UUID class is now a subclass of binary so all existing code will continue to work (including the explicit conversion methods .toUUID/.toBinary). The same automatic support for UUID is also present in EJSON .parse/.stringify.

Take a look at the following for the expected behavior:

const document = BSON.deserialize(bytes)
// { uuid: UUID('xxx') }
BSON.serialize(document)
// Buffer < document with uuid (binary subtype 4) >

Special thanks to @aditi-khare-mongoDB for all her hard work on this feature!! 🎉

Features


Documentation

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