Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update dependency bson to v6 #2111

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Aug 28, 2023

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
bson ^4.7.2 -> ^6.10.1 age adoption passing confidence

Release Notes

mongodb/js-bson (bson)

v6.10.1

Compare Source

Bug Fixes
  • NODE-6552: remove cache and use toStringTag in type helpers (#​740) (3ede13e)
Performance Improvements

v6.10.0

Compare Source

Features
Bug Fixes
  • NODE-6536: Binary.read never returns number[] and reads beyond content (#​727) (f99fdfd)

v6.9.0

Compare Source

Features
Performance Improvements
  • NODE-6344: improve ObjectId.isValid(string) performance (#​708) (064ba91)
  • NODE-6356: Improve serialization performance (#​709) (61537f5)

v6.8.0

Compare Source

Features
Performance Improvements

v6.7.0

Compare Source

Features
Bug Fixes
  • 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)

v6.6.0

Compare Source

Features
  • NODE-5958: add BSON iterating API (#​656) (269df91)
  • NODE-5959: make byte parsing utils available on onDemand library (#​662) (efab49a)
Bug Fixes

v6.5.0

Compare Source

Features
Bug Fixes
  • NODE-6016: flip byte order depending on system endianness (#​659) (6a7ef5d)

v6.4.0

Compare Source

Features
Bug Fixes
  • NODE-5873: objectId symbol property not defined on instances from cross cjs and mjs (#​643) (4d9884d)
Performance Improvements
  • 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)

v6.3.0

Compare Source

Features
  • NODE-3034: deprecate number as an input to ObjectId constructor (#​640) (44bec19)
  • NODE-5861: optimize parsing basic latin strings (#​642) (cdb779b)

v6.2.0

Compare Source

Features
Bug Fixes
  • NODE-5640: BsonVersionError improve message clarity (#​629) (eb98b8c)

v6.1.0

Compare Source

Features
  • NODE-5594: add Decimal128.fromStringWithRounding() static method (#​617) (6fee2d5)
Bug Fixes
  • NODE-5577: improve ObjectId serialization by around 10% (#​614) (81c8fa1)

v6.0.0

Compare Source

⚠ 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)
Features
  • 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)
Bug Fixes
  • 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)

v5.5.1

Compare Source

The MongoDB Node.js team is pleased to announce version 5.5.1 of the bson package!

Release Notes

Clarify BSONVersionError message

Previously, our thrown BSONVersionError stated that the "bson type must be from 6.0 or later". Our intention is to prevent cross-major BSON types from reaching the serialization logic as breaking changes to the types could lead to silent incompatibilities in the serialization process. We've updated the message to make that intention clear: "bson types must be from bson 6.x.x".

Bug Fixes
  • NODE-5641: BsonVersionError improve message clarity (#​630) (d1ca218)

Documentation

We invite you to try the bson library immediately, and report any issues to the NODE project.

v5.5.0

Compare Source

The MongoDB Node.js team is pleased to announce version 5.5.0 of the bson package!

Release Notes

This release is focused on a bug fix and a new feature for our Decimal128 class.

Decimal128 constructor and Decimal128.fromString now throw when detecting loss of precision

Prior to this release, Decimal128 would round numbers with more than 34 significant digits and lose precision. Now, on detecting loss of precision, Decimal128's constructor and Decimal128.fromString will throw a BSONError. This behaviour should have been the default as the Decimal128 class was always intended to be high-precision floating point value. As such, silently performing inexact rounding is undesirable behaviour.

New Decimal128.fromStringWithRounding static method

We understand that some of our users may have depended on the rounding behaviour of Decimal128.fromString for their applications. To support these users, we have exposed this behaviour via the Decimal128.fromStringWithRounding method. Anywhere that Decimal128.fromString was used with the expectation that rounding would occur can be replaced with a call to this new method.

We also want to express our gratitude to @​hconn-riparian for reporting a related rounding bug and fix in #​560 which has been included in our implementation of this feature.

// pre v5.5
> let d = Decimal128.fromString('127341286781293491234791234667890123')
new Decimal128("1.273412867812934912347912346678901E+35")

// >= v5.5
> let d = Decimal128.fromString('127341286781293491234791234667890123')
Uncaught:
BSONError: "127341286781293491234791234667890123" is not a valid Decimal128 string - inexact rounding
    at invalidErr (./js-bson/lib/bson.cjs:1402:11)
    at Decimal128.fromStringInternal (./js-bson/lib/bson.cjs:1633:25)
    at Decimal128.fromString (./js-bson/lib/bson.cjs:1424:27)

> d = Decimal128.fromStringWithRounding('127341286781293491234791234667890123')
new Decimal128("1.273412867812934912347912346678901E+35")

Read more about inexact rounding and the rationale for this change in our Decimal128 specification.

Features
  • NODE-5579: add Decimal128.fromStringWithRounding() static method (#​621) (70ca4fc)
Bug Fixes
  • NODE-5586: Decimal128 fromString performs inexact rounding (#​620) (63fb316)

Documentation

We invite you to try the bson library immediately, and report any issues to the NODE project.

v5.4.0

Compare Source

Features
  • NODE-4938: improve react native bundle experience (#​578) (7e16636)
Bug Fixes
  • NODE-5363: defer byte slicing to utf8 decoding API in nodejs (#​585) (e087042)

v5.3.0

Compare Source

Features
  • NODE-5224: deprecate UUID hex string cache control (#​573) (70aea75)
Bug Fixes

v5.2.0

Compare Source

Features
  • NODE-4855: add hex and base64 ctor methods to Binary and ObjectId (#​569) (0d49a63)

v5.1.0

Compare Source

Features
5.0.1 (2023-02-16)
Bug Fixes
  • 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)

v5.0.1

Compare Source

v5.0.0

Compare Source


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot force-pushed the renovate/bson-6.x branch 10 times, most recently from e15eb5d to 7d5ed41 Compare September 18, 2023 06:42
@renovate renovate bot force-pushed the renovate/bson-6.x branch 6 times, most recently from fa65f4b to a113a19 Compare September 28, 2023 22:45
@renovate renovate bot force-pushed the renovate/bson-6.x branch from a113a19 to 5d09345 Compare October 7, 2023 02:12
@renovate renovate bot force-pushed the renovate/bson-6.x branch 9 times, most recently from 537b436 to a38fe19 Compare October 21, 2023 00:22
@renovate renovate bot force-pushed the renovate/bson-6.x branch 3 times, most recently from d17d387 to 7f63ce6 Compare October 30, 2023 03:32
@renovate renovate bot force-pushed the renovate/bson-6.x branch 2 times, most recently from 3b75a3e to e51ca0b Compare November 4, 2024 05:07
@renovate renovate bot force-pushed the renovate/bson-6.x branch 5 times, most recently from 2bc1428 to ebcc4c8 Compare November 17, 2024 22:12
@renovate renovate bot force-pushed the renovate/bson-6.x branch 5 times, most recently from 848a209 to c5081da Compare November 22, 2024 18:49
@renovate renovate bot force-pushed the renovate/bson-6.x branch 4 times, most recently from 902884c to 8dfdc20 Compare December 2, 2024 03:46
@renovate renovate bot force-pushed the renovate/bson-6.x branch 8 times, most recently from 912eb7d to f8c2f95 Compare December 9, 2024 04:12
@renovate renovate bot force-pushed the renovate/bson-6.x branch 3 times, most recently from d240bd7 to 127d931 Compare December 18, 2024 16:07
@renovate renovate bot force-pushed the renovate/bson-6.x branch from 127d931 to 00c89d9 Compare December 23, 2024 04:21
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
@renovate renovate bot force-pushed the renovate/bson-6.x branch from 00c89d9 to 4e52456 Compare December 30, 2024 05:15
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.

0 participants