4.0.0 (2018-11-13)
Migration Guide
Please see the migration guide for detailed discussion of breaking changes in this release.
Bug Fixes
- buffer: replace deprecated Buffer constructor (5acdebf)
- dbPointer: fix utf8 bug for dbPointer (018c769)
- deserialize: fix deserialization of 0xFFFD (c682ae3), closes #277
- ext-json: deserialize doubles as
Number
in relaxed mode (a767fa1) - ObjectId: will now throw if an invalid character is passed (6f30b4e)
- ObjectID: ObjectId.isValid should check buffer length (06af813)
- package:
browser
section needs to point to correct index (08337e3) - random-bytes: fallback to insecure path if require is null (963b12b)
- random-bytes: wrap crypto require in try/catch for fallback (47fd5f7)
- serializer: do not use checkKeys for $clusterTime (cbb4724)
- serializer: map insert expects only string keys (aba3a18)
Code Refactoring
- symbol: rename Symbol to BSONSymbol (5d5b3d2)
Features
- BSON: simplify and flatten module exports (f8920c6)
- bsontype: move all
_bsontypes
to non-enumerable properties (16f5bf6) - ext-json: add extended JSON codecs directly to BSON types (10e5f00)
- ext-json: add extended JSON support to the bson library (d6b71ab)
- ext-json: export EJSON at top level of module (c356a5a)
- karma: test bson in the browser (cd593ca)
- long: replace long implementatin with long.js (545900d)
BREAKING CHANGES
- ObjectId: Where code was previously silently erroring, users may now
experience TypeErrors
- symbol: This was conflicting with the ES6 Symbol type
<a name="3.0.2"></a>