v4.4.0
The MongoDB Node.js team is pleased to announce version 4.4.0 of the bson module!
Release Highlights
This release of the BSON library brings some additional convenience to our Decimal128
and Long
classes.
Users can now specify the construction of these types as shown below:
const longFromBigInt = new Long(23n)
const d128FromString = new Decimal128('4.23')
Here is the new API specification:
[new] Decimal128(string)
[new] Long(string[, unsigned])
[new] Long(bigint[, unsigned])
Thanks so much to @addaleax to contributing a number of the fixes listed below! 🚀
Features
- NODE-3264: allow Decimal128(string), Long(string), Long(bigint) (#437) (392c1bc)
- NODE-3226: make circular input errors for EJSON expressive (#433) (7b351cc)
Bug Fixes
- NODE-3256: make Long inspect result evaluable (3a2eff1)
- NODE-3153: correctly deserialize
__proto__
properties (#431) (f34cabc) - NODE-3223, NODE-2963: accept Uint8Array where Buffer is accepted (#432) (4613763)
- NODE-3208: clean up instanceof usage (9b6d52a)
- NODE-3195: improve ArrayBuffer brand check in ensureBuffer (#429) (99722f6)
Documentation
- API: https://github.com/mongodb/js-bson#readme
- Changelog: https://github.com/mongodb/js-bson/blob/master/HISTORY.md#change-log
We invite you to try the bson library immediately, and report any issues to the NODE project.