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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(main): release 6.6.0 [skip-ci] #661

Merged
merged 1 commit into from Apr 2, 2024

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Mar 15, 2024

馃尡 A new release!

6.6.0 (2024-04-01)

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

Release Notes

Binary.toString and Binary.toJSON align with BSON serialization

When BSON serializes a Binary instance it uses the bytes between 0 and binary.position since Binary supports pre-allocating empty space and writing segments of data using .put()/.write(). Erroneously, the toString() and toJSON() methods did not use the position property to limit how much of the underlying buffer to transform into the final value, potentially returning more string than relates to the actual data of the Binary instance.

In general, you may not encounter this bug if Binary instances are created from a data source (new Binary(someBuffer)) or are returned by the database because in both of these cases binary.position is equal to the length of the underlying buffer.

Fixed example creating an empty Binary:

new BSON.Binary().toString();
// old output: '\x00\x00\x00\x00...' (256 zeros)
// new output: '' 

Experimental APIs

This release contains experimental APIs that are not suitable for production use. As a reminder, anything marked @experimental is not a part of the stable semantically versioned API and is subject to change in any subsequent release.

Bug Fixes

Documentation

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


@github-actions github-actions bot force-pushed the release-please--branches--main--components--bson branch 2 times, most recently from 5d620ad to fa9e20a Compare March 26, 2024 18:33
@github-actions github-actions bot force-pushed the release-please--branches--main--components--bson branch from fa9e20a to 4648aae Compare April 1, 2024 20:49
@nbbeeken
Copy link
Contributor

nbbeeken commented Apr 1, 2024

run release_notes

@nbbeeken nbbeeken merged commit eeab1e8 into main Apr 2, 2024
@nbbeeken nbbeeken deleted the release-please--branches--main--components--bson branch April 2, 2024 16:09
Copy link
Contributor Author

github-actions bot commented Apr 2, 2024

馃 Release is at https://github.com/mongodb/js-bson/releases/tag/v6.6.0 馃尰

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant