Skip to content

Conversation

@github-actions
Copy link

@github-actions github-actions bot commented Mar 20, 2025

Please run the release_notes action before releasing to generate release highlights

7.0.0 (2025-07-29)

⚠ BREAKING CHANGES

  • 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-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)
  • ObjectId:
  • symbol: This was conflicting with the ES6 Symbol type

Features

  • add extended json parsing for $uuid (b1b2a0e)
  • add support for primitives to EJSON.stringify (329857d)
  • BSON: simplify and flatten module exports (f8920c6)
  • bson: test bson in browser (223fbdf)
  • bsontype: move all _bsontypes to non-enumerable properties (16f5bf6)
  • convert to TypeScript (#393) (9aad874)
  • db-ref: support passing a namespace into a DBRef ctor (604831b)
  • 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)
  • Improve TS Typings (#389) (ae9ae2d)
  • karma: test bson in the browser (cd593ca)
  • long: replace long implementatin with long.js (545900d)
  • make circular input errors for EJSON expressive (#433) (7b351cc)
  • NODE-1921: validate serializer root input (#537) (95d5edf)
  • NODE-3034: deprecate number as an input to ObjectId constructor (#640) (44bec19)
  • NODE-3264: allow Decimal128(string), Long(string), Long(bigint) (#437) (392c1bc)
  • NODE-3504: add unambiguous Timestamp() constructor overload (#449) (0298dd8)
  • NODE-3740: Implement root and top level key utf-8 validation settings for BSON (#472) (07019a0)
  • 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)
  • NODE-4711: remove evalFunctions option (#539) (0427eb5)
  • NODE-4713: modernize bundling (#534) (28ce4d5)
  • 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-4789: support Map stringification in EJSON (#567) (c70c82d)
  • NODE-4855: add hex and base64 ctor methods to Binary and ObjectId (#569) (0d49a63)
  • 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-4938: improve react native bundle experience (#578) (7e16636)
  • NODE-5040: add color to BSON inspect (#635) (7802c66)
  • NODE-5223: remove deprecated cacheHexString (#595) (76eca2b)
  • NODE-5224: deprecate UUID hex string cache control (#573) (70aea75)
  • NODE-5504: bump bson major version (#605) (9615902)
  • NODE-5506: add Binary subtype sensitive (#657) (748ca60)
  • NODE-5594: add Decimal128.fromStringWithRounding() static method (#617) (6fee2d5)
  • NODE-5648: add Long.fromStringStrict() (#675) (9d5a5df)
  • NODE-5861: optimize parsing basic latin strings (#642) (cdb779b)
  • NODE-5909: optimize writing basic latin strings (#645) (ec51256)
  • NODE-5957: add BSON indexing API (#654) (2ac17ec)
  • NODE-5958: add BSON iterating API (#656) (269df91)
  • NODE-5959: make byte parsing utils available on onDemand library (#662) (efab49a)
  • NODE-6031: add t and i to Timestamp (#704) (b766d0f)
  • NODE-6086: add Double.fromString() method (#671) (e943cdb)
  • NODE-6087: add Int32.fromString method (#670) (5a21889)
  • NODE-6156: add signature to github releases (#692) (f0fbe91)
  • NODE-6537: add support for binary vectors (#730) (d7bdcec)
  • 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)
  • serialization: support arbitrary sizes for the internal serialization buffer (a6bd45c)
  • UintArray: Adds support for Uint8Arrays (2a54053)
  • UUID convenience class (#425) (76e1826)

Bug Fixes

  • 4.x-1.x interop (incl. ObjectID _bsontype) (f4b16d9)
  • accept Uint8Array where Buffer is accepted (#432) (4613763)
  • adds interfaces for EJSON objects (7f5f1a3)
  • backwards compatibility with older BSON package versions (#411) (5167be2)
  • binary: add type checking for buffer (cbfb25d)
  • browser: fixing browser property in package.json (095fba9)
  • bson: normalizedFunctionString handles named functions (6b49c23)
  • buffer: don't use deprecated Buffer constructors (7bb9c57)
  • Buffer: import buffer for binary, decimal128, and fnv1a (6be7b8d)
  • buffer: replace deprecated Buffer constructor (5acdebf)
  • clean up instanceof usage (9b6d52a)
  • Correct API Extractor config to omit definition file from dist (#407) (ace8647)
  • coverage (992e2e0)
  • dbPointer: fix utf8 bug for dbPointer (018c769)
  • 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)
  • deprecate cacheFunctionsCrc32 (ea83bf5)
  • deserialize: fix deserialization of 0xFFFD (c682ae3), closes #277
  • deserializeStream: allow multiple documents to be deserialized (6fc5984), closes #244
  • Downlevel type definitions (#410) (203402f)
  • ejson-serialize: prevent double serialization for nested documents (ab790c9)
  • ejson: enable serialization of legacy ObjectID (ba98ccb)
  • ejson: support array for replacer parameter in EJSON.stringify (9f43809)
  • ext-json: deserialize doubles as Number in relaxed mode (a767fa1)
  • improve ArrayBuffer brand check in ensureBuffer (#429) (99722f6)
  • improve EJSON generation for previously skipped edge cases (30f5a8f)
  • make inspect method for ObjectId work (#412) (a585a0c)
  • make inspection result of BSON types evaluable (#416) (616665f)
  • make Long inspect result evaluable (3a2eff1)
  • make sure all functions are named consistently (6df9022)
  • MONGOSH-1155: update error message in ObjectId class (#493) (67fbc7c)
  • NODE-3015: ObjectId.equals should use Buffer.equals for better performance (#478) (8305bdf)
  • NODE-3021: fix a long standing bug in Decimal128.fromString() (#458) (824939a)
  • NODE-3153: correctly deserialize __proto__ properties (#431) (f34cabc)
  • 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)
  • NODE-3451: fix performance regression from v1 (#451) (2330ab1)
  • NODE-3493: code and symbol tests are partially testing the wrong types (#459) (80d7f03)
  • NODE-3520: global not defined in esm bundles (#452) (cb82a80)
  • NODE-3534: add subtype 0x6 and 0x7 constants on Binary class (#461) (52cfe9c)
  • NODE-3561: umd bundle fails to require util (#455) (1c15155)
  • NODE-3582: fix internal marked APIs, add toString methods to Int32 and Double (#457) (b46ab5f)
  • NODE-3629: correct corpus runner and add null checks (#464) (d75102d)
  • NODE-3630: remove float parser and test edge cases for Double (#502) (54ca603)
  • 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)
  • NODE-3724: Fix BSONTypeError and BSONError to correctly handle instanceof checks (#471) (d8f334b)
  • 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)
  • NODE-3962: correct type for ObjectiId._bsontype (#480) (9671773)
  • 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)
  • NODE-4464: stringify and parse negative zero to and from $numberDouble: -0.0 (#531) (a469e91)
  • 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)
  • NODE-4960: UUID validation too strict (#572) (d239cd1)
  • 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)
  • NODE-5363: defer byte slicing to utf8 decoding API in nodejs (#585) (e087042)
  • 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)
  • NODE-5577: improve ObjectId serialization by around 10% (#614) (81c8fa1)
  • NODE-5640: BsonVersionError improve message clarity (#629) (eb98b8c)
  • NODE-5873: objectId symbol property not defined on instances from cross cjs and mjs (#643) (4d9884d)
  • NODE-6016: flip byte order depending on system endianness (#659) (6a7ef5d)
  • NODE-6042: Binary.toString output with respect to position (#663) (d7898f9)
  • NODE-6059: clean up experimental APIs (#665) (3289184)
  • NODE-6074: Removes top-level await in bson with separate node and browser ESM bundles (#749) (4602973)
  • 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)
  • NODE-6536: Binary.read never returns number[] and reads beyond content (#727) (f99fdfd)
  • NODE-6552: remove cache and use toStringTag in type helpers (#740) (3ede13e)
  • NODE-6608: calculateObjectSize returns the wrong value for bigint (#742) (1fed073)
  • NODE-6735, NODE-6711: add BSON vector validation to EJSON stringification, serialization and conversion to native types (#748) (64ff6a2)
  • NODE-6764: incorrect negative bigint handling (#752) (b3212b4)
  • object-id: correct serialization of old ObjectID types (8d57a8c)
  • object-id: harden the duck-typing (4b800ae)
  • ObjectID: ObjectId.isValid should check buffer length (06af813)
  • ObjectId: will now throw if an invalid character is passed (6f30b4e)
  • only upgrade symbol to string if promoteValues is true (067a7ba)
  • package: browser section needs to point to correct index (08337e3)
  • parse value of Int32 in constructor (5cda40f)
  • permit BSON types to be created without new (#424) (d2bc284)
  • random-bytes: fallback to insecure path if require is null (963b12b)
  • random-bytes: wrap crypto require in try/catch for fallback (47fd5f7)
  • readme: clarify documentation about deserialize methods (e311056)
  • Reduce floating point precision required of extended json implementations (#369) (5e35d1a)
  • regexp: properly construct new BSONRegExp when constructor called without new (#242) (93ae799)
  • remove stringify overloads (2df6b42)
  • remove tslib usage and fix Long method alias (#415) (2d9a8e6)
  • revert: Reverting v3.0.1 (efb0720)
  • Rework rollup config to output named and default exports (#404) (a48676b)
  • rollup: fixup dist and bundle in Buffer (3620ef8)
  • serialization: normalize function stringification (21eb0b0)
  • serializer: do not use checkKeys for $clusterTime (cbb4724)
  • serializer: ensure RegExp options are alphabetically sorted (d60659d)
  • serializer: map insert expects only string keys (aba3a18)
  • serializeWithBufferAndIndex: write documents to start of intermediate buffer (b4e4ac5)
  • spelling in deserializer errors (4c6f2e4)
  • support Number object in Int32 and Double constructors (fe3f0dc)
  • Throw on BigInt type values (#397) (2dd54e5)
  • timestamp: getTimestamp support times beyond 2038 (a0820d5)
  • Timestamp: make sure timestamp is always unsigned (36b2d43)
  • type issues with SerializeOptions and Long methods accepting Timestamp (c18ba71)

Performance Improvements

  • NODE-4194: improve objectId constructor performance (#498) (be5fe3e)
  • NODE-4726: bench many strings in large batch in parallel (#516) (62c7977)
  • 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)
  • NODE-6126: improve Long.fromBigInt performance (#681) (63eafcb)
  • NODE-6344: improve ObjectId.isValid(string) performance (#708) (064ba91)
  • NODE-6356: Improve serialization performance (#709) (61537f5)
  • NODE-6450: Lazy objectId hex string cache (#722) (7c37580)

Code Refactoring

  • symbol: rename Symbol to BSONSymbol (5d5b3d2)

This PR was generated with Release Please. See documentation.

@github-actions github-actions bot changed the title chore(main): release 7.0.0 [skip-ci] chore(main): release 7.0.0 Jul 29, 2025
@github-actions github-actions bot force-pushed the release-please--branches--main--components--bson branch from ca604b9 to 522b696 Compare July 29, 2025 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant