All notable changes to this project will be documented in this file. See standard-version for commit guidelines.
6.9.0 (2024-10-15)
- NODE-6344: improve ObjectId.isValid(string) performance (#708) (064ba91)
- NODE-6356: Improve serialization performance (#709) (61537f5)
6.8.0 (2024-06-27)
6.7.0 (2024-05-01)
- NODE-5648: add Long.fromStringStrict() (#675) (9d5a5df)
- NODE-6086: add Double.fromString() method (#671) (e943cdb)
- NODE-6087: add Int32.fromString method (#670) (5a21889)
- NODE-6102: Double.fromString prohibiting '+' character and prohibiting exponential notation (#674) (c58d1e2)
- NODE-6123: utf8 validation is insufficiently strict (#676) (ae8bac7)
- NODE-6144: Long.fromString incorrectly coerces valid inputs to Long.ZERO in special cases (#677) (208f7e8)
6.6.0 (2024-04-01)
- NODE-5958: add BSON iterating API (#656) (269df91)
- NODE-5959: make byte parsing utils available on onDemand library (#662) (efab49a)
- NODE-6042: Binary.toString output with respect to position (#663) (d7898f9)
- NODE-6059: clean up experimental APIs (#665) (3289184)
6.5.0 (2024-03-12)
- NODE-5506: add Binary subtype sensitive (#657) (748ca60)
- NODE-5957: add BSON indexing API (#654) (2ac17ec)
6.4.0 (2024-02-29)
- NODE-5873: objectId symbol property not defined on instances from cross cjs and mjs (#643) (4d9884d)
- NODE-5557: move DataView and Set allocation used for double parsing and utf8 validation to nested path (#611) (9a150e1)
- NODE-5910: optimize small byte copies (#651) (24d035e)
- NODE-5934: replace DataView uses with bit math (#649) (6d343ab)
- NODE-5955: use pooled memory when possible (#653) (78c4264)
6.3.0 (2024-01-31)
- NODE-3034: deprecate number as an input to ObjectId constructor (#640) (44bec19)
- NODE-5861: optimize parsing basic latin strings (#642) (cdb779b)
6.2.0 (2023-10-16)
6.1.0 (2023-09-12)
6.0.0 (2023-08-24)
- NODE-5504: bump bson major version (#605)
- NODE-4770: remove 12 length string support from ObjectId constructor (#601)
- NODE-4769: remove ISO-8859-1 string support from Binary (#602)
- NODE-5223: remove deprecated cacheHexString (#595)
- NODE-4787: bump minimum Node.js version to v16.20.1 (#590)
- NODE-4769: remove ISO-8859-1 string support from Binary (#602) (74f7f8a)
- NODE-4770: remove 12 length string support from ObjectId constructor (#601) (409c592)
- NODE-4787: bump minimum Node.js version to v16.20.1 (#590) (1dcca92)
- NODE-5223: remove deprecated cacheHexString (#595) (76eca2b)
- NODE-5504: bump bson major version (#605) (9615902)
- NODE-5509: Allow undefined or null params in ObjectId.equals (#607) (e2674c6)
- NODE-5546: decimal 128 fromString performs inexact rounding (#613) (1384cee)
- NODE-5559: account for quotes when inspecting Code and BSONSymbol (#612) (0664840)
6.0.0-alpha.0 (2023-08-15)
- NODE-5504: bump bson major version (#605)
- NODE-4770: remove 12 length string support from ObjectId constructor (#601)
- NODE-4769: remove ISO-8859-1 string support from Binary (#602)
- NODE-5223: remove deprecated cacheHexString (#595)
- NODE-4787: bump minimum Node.js version to v16.20.1 (#590)
- NODE-4769: remove ISO-8859-1 string support from Binary (#602) (74f7f8a)
- NODE-4770: remove 12 length string support from ObjectId constructor (#601) (409c592)
- NODE-4787: bump minimum Node.js version to v16.20.1 (#590) (1dcca92)
- NODE-5223: remove deprecated cacheHexString (#595) (76eca2b)
- NODE-5504: bump bson major version (#605) (9615902)
5.4.0 (2023-07-03)
5.3.0 (2023-05-10)
5.2.0 (2023-04-04)
5.1.0 (2023-03-16)
5.0.1 (2023-02-16)
- NODE-5025: no type definitions for es module (#563) (50e90fc)
- NODE-5048: webpack unable to bundle import with leading 'node:' (#564) (3aed24a)
- NODE-5056: EJSON.parse date handling when useBigInt64=true (#562) (d5088af)
5.0.0 (2023-01-31)
5.0.0-alpha.3 (2023-01-20)
- NODE-4892: error on bson types not from this version (#543)
- NODE-4890: make all thrown errors into BSONErrors (#545)
- NODE-4713: modernize bundling (#534)
- NODE-1921: validate serializer root input (#537)
- NODE-4711: remove evalFunctions option (#539)
- NODE-1921: validate serializer root input (#537) (95d5edf)
- NODE-4711: remove evalFunctions option (#539) (0427eb5)
- NODE-4713: modernize bundling (#534) (28ce4d5)
- NODE-4870: Support BigInt serialization (#541) (e9e40a2)
- NODE-4871: Add support for int64 deserialization to BigInt (#542) (9ff60ba)
- NODE-4873: support EJSON stringify from BigInt to $numberLong (#547) (37e8690)
- NODE-4874: support EJSON parse for BigInt from $numberLong (#552) (854aa70)
- NODE-4890: make all thrown errors into BSONErrors (#545) (5b837a9)
- NODE-4892: error on bson types not from this version (#543) (d9f0eaa)
- NODE-4927: exports in package.json for react native and document how to polyfill for BSON (#550) (3b4b61e)
- NODE-4771: serializeFunctions breaks function names outside of basic latin (#538) (35a9234)
- NODE-4887: serializeInto does not check for the presence of a toBSON method for values in Map entries (#555) (ebc1c76)
- NODE-4905: double precision accuracy in canonical EJSON (#548) (e0dbb17)
- NODE-4932: remove .0 suffix from double extended json values (#554) (946866d)
4.7.0 (2022-08-18)
- NODE-4405: support serializing UUID class (#508) (f5dc9ed)
- NODE-4419: UUID class deserialization (#509) (ff2b975)
- NODE-4506: Make UUID a subclass of binary (#512) (e9afa9d)
- NODE-4535: automatically promote UUIDs when deserializing and parsing UUIDs (#513) (1dc7eae)
4.6.5 (2022-07-07)
- NODE-3630: remove float parser and test edge cases for Double (#502) (54ca603)
- NODE-4211: Do not require crypto in browser builds (#500) (b32ab40)
- NODE-4302: remove downlevel ts and typesVersions (#501) (651b60e)
- NODE-4381: handle
__proto__
well in EJSON (#506) (4bda57d)
4.6.4 (2022-05-19)
4.6.3 (2022-04-20)
4.6.2 (2022-03-22)
- MONGOSH-1155: update error message in ObjectId class (#493) (67fbc7c)
- NODE-3015: ObjectId.equals should use Buffer.equals for better performance (#478) (8305bdf)
- NODE-3962: correct type for ObjectiId._bsontype (#480) (9671773)
4.6.1 (2022-01-06)
- NODE-3760: ObjectId.isValid string and byte length match (#475) (187d1c4)
- NODE-3815: update Decimal128 constructor validation (#476) (95e8293)
- NODE-3821: nullish check before using toBSON override function (#477) (1d898b6)
4.6.0 (2021-11-23)
4.5.4 (2021-11-03)
- NODE-3640: Fix Int32 constructor to coerce its argument to int32 (#466) (d388f1e)
- NODE-3662: error checking to make sure that ObjectId results in object with correct properties (#467) (5f99b1b)
4.5.3 (2021-10-05)
- NODE-3493: code and symbol tests are partially testing the wrong types (#459) (80d7f03)
- NODE-3534: add subtype 0x6 and 0x7 constants on Binary class (#461) (52cfe9c)
- NODE-3629: correct corpus runner and add null checks (#464) (d75102d)
4.5.2 (2021-09-14)
- NODE-3021: fix a long standing bug in Decimal128.fromString() (#458) (824939a)
- NODE-3582: fix internal marked APIs, add toString methods to Int32 and Double (#457) (b46ab5f)
4.5.1 (2021-08-24)
4.5.0 (2021-08-19)
- NODE-3451: fix performance regression from v1 (#451) (2330ab1)
- NODE-3520: global not defined in esm bundles (#452) (cb82a80)
4.4.1 (2021-07-06)
- NODE-3247: DBRef special handling (#443) (f5d984d)
- NODE-3282: BSONRegExp options not alphabetized (#441) (18c3512)
- NODE-3376: use standard JS methods for copying Buffers (#444) (804050d)
- NODE-3390: serialize non-finite doubles correctly in EJSON (#445) (7eb7998)
4.4.0 (2021-05-18)
- NODE-3264: allow Decimal128(string), Long(string), Long(bigint) (#437) (392c1bc)
- make circular input errors for EJSON expressive (#433) (7b351cc)
- make Long inspect result evaluable (3a2eff1)
- NODE-3153: correctly deserialize
__proto__
properties (#431) (f34cabc) - accept Uint8Array where Buffer is accepted (#432) (4613763)
- clean up instanceof usage (9b6d52a)
- improve ArrayBuffer brand check in ensureBuffer (#429) (99722f6)
4.3.0 (2021-04-06)
4.2.3 (2021-03-02)
-
make inspection result of BSON types evaluable (#416) (616665f)
-
permit BSON types to be created without new (#424) (d2bc284)
4.2.2 (2020-12-01)
4.2.1 (2020-12-01)
- backwards compatibility with older BSON package versions (#411) (5167be2)
- Downlevel type definitions (#410) (203402f)
- make inspect method for ObjectId work (#412) (a585a0c)
- remove stringify overloads (2df6b42)
4.2.0 (2020-10-13)
- add extended json parsing for $uuid (b1b2a0e)
- convert to TypeScript (#393) (9aad874)
- Improve TS Typings (#389) (ae9ae2d)
- adds interfaces for EJSON objects (7f5f1a3)
- Correct API Extractor config to omit definition file from dist (#407) (ace8647)
- coverage (992e2e0)
- deprecate cacheFunctionsCrc32 (ea83bf5)
- Rework rollup config to output named and default exports (#404) (a48676b)
- Throw on BigInt type values (#397) (2dd54e5)
- type issues with SerializeOptions and Long methods accepting Timestamp (c18ba71)
4.1.0 (2020-08-10)
- spelling in deserializer errors (4c6f2e4)
- object-id: harden the duck-typing (4b800ae)
- parse value of Int32 in constructor (5cda40f)
- Reduce floating point precision required of extended json implementations (#369) (5e35d1a)
- add support for primitives to EJSON.stringify (329857d)
4.0.4 (2020-03-26)
- improve EJSON generation for previously skipped edge cases (30f5a8f)
- only upgrade
symbol
tostring
ifpromoteValues
is true (067a7ba)
4.0.3 (2020-01-09)
- support Number object in Int32 and Double constructors (fe3f0dc)
- Timestamp: make sure timestamp is always unsigned (36b2d43)
4.0.2 (2019-03-08)
- buffer: don't use deprecated Buffer constructors (7bb9c57)
- Buffer: import buffer for binary, decimal128, and fnv1a (6be7b8d)
- ejson: enable serialization of legacy
ObjectID
(ba98ccb), closes #303 - ejson: support array for replacer parameter in
EJSON.stringify
(9f43809), closes #303 #302 #303 - ejson-serialize: prevent double serialization for nested documents (ab790c9), closes #303
- object-id: correct serialization of old ObjectID types (8d57a8c)
- timestamp: getTimestamp support times beyond 2038 (a0820d5)
- 4.x-1.x interop (incl. ObjectID _bsontype) (f4b16d9)
4.0.1 (2018-12-06)
- object-id: correct serialization of old ObjectID types (8d57a8c)
4.0.0 (2018-11-13)
Please see the migration guide for detailed discussion of breaking changes in this release.
- 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)
- symbol: rename Symbol to BSONSymbol (5d5b3d2)
- 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)
- ObjectId: Where code was previously silently erroring, users may now experience TypeErrors
- symbol: This was conflicting with the ES6 Symbol type
3.0.2 (2018-07-13)
- revert: Reverting v3.0.1 (efb0720)
3.0.0 (2018-06-13)
- ObjectID: use FNV-1a hash for objectId (4f545b1)
- rollup: initial commit of rollup-generated bundle (474b8f7)
- rollup: switch from webpack to rollup for bundling (98068fa)
2.0.8 (2018-06-06)
- readme: clarify documentation about deserialize methods (e311056)
- serialization: normalize function stringification (21eb0b0)
2.0.7 (2018-05-31)
- binary: add type checking for buffer (cbfb25d)
2.0.6 (2018-04-27)
2.0.5 (2018-04-06)
2.0.4 (2018-03-12)
2.0.3 (2018-03-12)
- serialization: support arbitrary sizes for the internal serialization buffer (a6bd45c)
2.0.2 (2018-03-02)
- make sure all functions are named consistently (6df9022)
2.0.1 (2018-02-28)
- serializer: ensure RegExp options are alphabetically sorted (d60659d)
- db-ref: support passing a namespace into a DBRef ctor (604831b)
- browser: fixing browser property in package.json (095fba9)
- dbref: only upgrade objects with allowed $keys to DBRefs (98eb9e2)
- decimal128: add basic guard against REDOS attacks (511ecc4)
- Decimal128: update toString and fromString methods to correctly handle the case of too many significant digits (25ed43e)
- objectid: if pid is 1, use random value (e188ae6)
- serializeWithBufferAndIndex: write documents to start of intermediate buffer (b4e4ac5)
- #204 remove Buffer.from as it's partially broken in early 4.x.x. series of node releases.
- Fixed toString for ObjectId so it will work with inspect.
- Minor optimizations for ObjectID to use Buffer.from where available.
- Reverse behavior for undefined to be serialized as NULL. MongoDB 3.4 does not allow for undefined comparisons.
- Introduced new BSON API and documentation.
- NODE-848 BSON Regex flags must be alphabetically ordered.
- NODE-833, Detects cyclic dependencies in documents and throws error if one is found.
- Fix(deserializer): corrected the check for (size + index) comparison… (Issue #195, https://github.com/JoelParke).
- Added DBPointer up conversion to DBRef
- Added promoteValues flag (default to true) allowing user to specify if deserialization should be into wrapper classes only.
- Throw error if ObjectId is not a string or a buffer.
- All values encoded big-endian style for ObjectId.
- Fixed encoding/decoding issue in ObjectId timestamp generation.
- Removed BinaryParser dependency from the serializer/deserializer.
- Added Decimal128 type and extended test suite to include entire bson corpus.
- Allow for proper detection of ObjectId or objects that look like ObjectId, improving compatibility across third party libraries.
- Remove one package from dependency due to having been pulled from NPM.
- Fix "TypeError: data.copy is not a function" in Electron (Issue #170, https://github.com/kangas).
- Fixed issue with undefined type on deserializing.
- Minor optimizations to avoid non needed object creation.
- Added bower file to repository.
- Fixed browser pid sometimes set greater than 0xFFFF on browsers (Issue #155, https://github.com/rahatarmanahmed)
- Remove all support for bson-ext.
- ObjectID equality check should return boolean instead of throwing exception for invalid oid string #139
- add option for deserializing binary into Buffer object #116
- Validate regexp string for null bytes and throw if there is one.
- Fixed issue with return statement in Map.js.
- Exposed Map correctly via index.js file.
- Exposed Map correctly via bson.js file.
- Added ES6 Map type serialization as well as a polyfill for ES5.
- Made ignore undefined an optional parameter.
- Minor fix for invalid key checking.
- NODE-38 Added new BSONRegExp type to allow direct serialization to MongoDB type.
- Some performance improvements by in lining code.
- Undefined fields are omitted from serialization in objects.
- Fixed size validation to ensure we can deserialize from dumped files.
- Added ability to instruct deserializer to return raw BSON buffers for named array fields.
- Minor deserialization optimization by moving inlined function out.
- Fixed serializeWithBufferAndIndex bug.
- Removed any references to the shared buffer to avoid non GC collectible bson instances.
- Fixed rethrowing of error when not RangeError.
- Start buffer at 64K and double as needed, meaning we keep a low memory profile until needed.
- More fixes for corrupt Bson
- More fixes for corrupt Bson
- New JS serializer serializing into a single buffer then copying out the new buffer. Performance is similar to current C++ parser.
- Removed bson-ext extension dependency for now.
- Removed node-gyp from install script in package.json.
- Return pure js version on native() call if failed to initialize.
- Pulled out all C++ code into bson-ext and made it an optional dependency.
- Updated Nan to 1.7.0 to support io.js and node 0.12.0
- Updated Nan to 1.6.2 to support io.js and node 0.12.0
- Updated Nan to 1.5.1 to support io.js
- Made pid cycle on 0xffff to avoid weird overflows on creation of ObjectID's
- Fixes for fortify review of c++ extension
- toBSON correctly allows returns of non objects
- Drying of ObjectId code for generation of id (Issue #54, https://github.com/moredip)
- Fixed issue where corrupt CString's could cause endless loop
- Support for Node 0.11.X > (Issue #49, https://github.com/kkoopa)
- Added precompiled c++ native extensions for win32 ia32 and x64