chore(main): release 5.4.0 [skip-ci] #588
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🌱 A new release!
5.4.0 (2023-07-03)
The MongoDB Node.js team is pleased to announce version 5.4.0 of the
bsonpackage!Release Notes
Improved React Native experience
The BSON package now ships a bundle made to work on React Native without additional polyfills preconfigured. The necessary APIs (
TextEncoder/TextDecoder&atob/btoa) are now vendored into the RN bundle directly. Users should still installreact-native-get-random-valuesthemselves to get securely generated UUIDs and ObjectIds. Read more in the React Native section of our readme.Improved BSON UTF8 Decoding Performance
In the v5 major release of BSON we internally abstracted the different byte manipulation APIs used based on whether the library is running in Node.js or in a browser. This abstraction required us to create a
subarraybefore invoking the environment's UTF8 decoding API. Creating the subarray before invoking Node.js'Buffer.prototype.toStringAPI turns out to cause an unnecessary slow down. We have now updated the UTF8 stringification step on Node.js to invokeBuffer.prototype.toStringwith thestartandendoffsets. See #585 for our research.Features
Bug Fixes
Documentation
We invite you to try the
bsonlibrary immediately, and report any issues to the NODE project.