Skip to content

4.3.0

Compare
Choose a tag to compare
@nbbeeken nbbeeken released this 06 Apr 16:29
f60c404

The MongoDB Node.js team is pleased to announce version 4.3.0 of the bson module!

Release Highlight

UUID Support

With this feature release we are introducing improved support for UUID usage in BSON.
UUIDs in BSON are still a subset of Binary so there is a translation that must occur to use UUIDs in BSON documents.

For example:

// import { UUID, serialize, deserialize } from 'bson'
const { UUID, serialize, deserialize } = require('bson')

const myId = new UUID();
const bsonBuffer = serialize({ myId: myId.toBinary() })
const bsonResult = deserialize(bsonBuffer)
myId.equals(bsonResult.myId.toUUID()) // true!

Full API documentation for the new class will be available here soon after this release.

Documentation

We invite you to try the bson library immediately, and report any issues to the NODE project. A special thanks to @steffenagger for his contribution to the library!