7.3.2 (2026-07-31)
The MongoDB Node.js team is pleased to announce version 7.3.2 of the bson package!
Release Notes
calculateObjectSize() now returns accurate byte counts for Int32 and BSONSymbol
Previously, each Int32 or BSONSymbol value caused a 12-byte overcount.
calculateObjectSize() now yields proper size calculations on ES Map's
This release of js-bson fixes an issue where we were incorrectly considering ES Map objects inside calculateObjectSize. This issue did not impact serialization, just size calculation.
Fixed incorrect date boundary in relaxed EJSON
This release of js-bson fixes an issue where the date boundary for relaxed EJSON was incorrectly set to a date 5 hours after the maximum limit of 10,000 AD.
Fixed an issue with ObjectId initialization in Cloudflare Workers
This release of js-bson fixes an issue where we were making crypto calls during module initialization, which is forbidden by Cloudflare Workers and other environments.
Memory optimization via smaller ObjectIds
ObjectId now stores its 12 bytes as four inline integers instead of a Uint8Array, cutting per-ObjectId memory by about 63% (and roughly 45 to 47% across large result sets) with no serialization slowdown. Deep equality and cloning are preserved (assert.deepStrictEqual, and lodash isEqual / cloneDeep).
Thanks to @spokodev for contributing their fixes! (NODE-7631 (#901), NODE-7645 (#917), NODE-7646 (#910))
Bug Fixes
- NODE-7631: count Int32 and BSONSymbol in calculateObjectSize (#901) (7f948a6)
- NODE-7645: use the first instant of year 10000 as the relaxed EJSON date bound (#917) (9272c9a)
- NODE-7646: count ES Map entries in calculateObjectSize (#910) (8d28b12)
- NODE-7667: remove early initialization from ObjectId (#916) (665286f)
Performance Improvements
Documentation
We invite you to try the bson library immediately, and report any issues to the NODE project.