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

build(deps): bump bson from 6.9.0 to 6.10.0 #2951

Merged
merged 1 commit into from
Nov 20, 2024

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Nov 20, 2024

Bumps bson from 6.9.0 to 6.10.0.

Release notes

Sourced from bson's releases.

v6.10.0

6.10.0 (2024-11-18)

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

Release Notes

BSON Binary Vector Support!

The Binary class has new helpers to assist with using the newly minted Vector sub_type of Binary sub_type == 9 🎉! For more on how these types can be used with MongoDB take a look at How to Ingest Quantized Vectors!

Here's a summary of the API:

class Binary {
  toInt8Array(): Int8Array;
  toFloat32Array(): Float32Array;
  toPackedBits(): Uint8Array;
static fromInt8Array(array: Int8Array): Binary;
static fromFloat32Array(array: Float32Array): Binary;
static fromPackedBits(array: Uint8Array, padding: number = 0): Binary;
}

Relatively self-explanatory: each one supports converting to and constructing from a native Javascript data type that corresponds to one of the three vector types: Int8, Float32, PackedBit.

Vector Bytes Format

When a Binary is sub_type 9 the first two bytes are set to important metadata about the vector.

  • binary.buffer[0] - The datatype that indicates what the following bytes are.
  • binary.buffer[1] - The padding amount, a value 0-7 that indicates how many bits to ignore in a PackedBit vector.

Packed Bits 📦

static fromPackedBits(array: Uint8Array, padding: number = 0)

When handling packed bits, the last byte may not be entirely used. For example, a PackedBit vector = [0xFF, 0xF0] with padding = 4 ignores those last four 0s making the bit vector logically equal to 12 ones.

    F    F    F    0
[1111 1111 1111]   // ignored: the four 0s are padding

[!IMPORTANT] When using the fromPackedBits method to set your padding amount to avoid inadvertently extending your bit vector.

Unpacking Bits 🧳

... (truncated)

Changelog

Sourced from bson's changelog.

6.10.0 (2024-11-18)

Features

  • NODE-6537: add support for binary vectors (#730) (d7bdcec)

Bug Fixes

  • NODE-6536: Binary.read never returns number[] and reads beyond content (#727) (f99fdfd)
Commits
  • 2e86183 chore(main): release 6.10.0 [skip-ci] (#731)
  • d7bdcec feat(NODE-6537): add support for binary vectors (#730)
  • f6e86bb test(NODE-6534): add spec test runner for Binary vector (#729)
  • f99fdfd fix(NODE-6536): Binary.read never returns number[] and reads beyond content (...
  • 887849d chore(NODE-6018): run entire BSON suite on a big endian machine (#726)
  • eba09e7 docs: TOC fix in upgrade-to-v5.md
  • 1508112 chore: update migration guide TLA (#728)
  • d37f52e chore(deps-dev): bump the development-dependencies group across 1 directory w...
  • 5dbff3f chore(deps-dev): bump rollup from 4.20.0 to 4.24.4 (#724)
  • c3bbd32 chore(deps-dev): bump braces from 3.0.2 to 3.0.3 in /etc/eslint/no-bigint-usa...
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.

Dependabot will merge this PR once CI passes on it, as requested by @PierreBrisorgueil.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [bson](https://github.com/mongodb/js-bson) from 6.9.0 to 6.10.0.
- [Release notes](https://github.com/mongodb/js-bson/releases)
- [Changelog](https://github.com/mongodb/js-bson/blob/main/HISTORY.md)
- [Commits](mongodb/js-bson@v6.9.0...v6.10.0)

---
updated-dependencies:
- dependency-name: bson
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added the dependencies Pull requests that update a dependency file label Nov 20, 2024
Copy link
Contributor

@PierreBrisorgueil PierreBrisorgueil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dependabot merge

Copy link

codeclimate bot commented Nov 20, 2024

Code Climate has analyzed commit af6ee61 and detected 0 issues on this pull request.

View more on Code Climate.

@dependabot dependabot bot merged commit d76b1c0 into master Nov 20, 2024
4 checks passed
@dependabot dependabot bot deleted the dependabot/npm_and_yarn/bson-6.10.0 branch November 20, 2024 04:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant