chore(main): release 6.1.0 [skip-ci] #3853
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!
6.1.0 (2023-09-14)
The MongoDB Node.js team is pleased to announce version 6.1.0 of the
mongodb
package!Release Notes
Bump bson version to expose new
Decimal128.fromStringWithRounding()
methodIn this release, we have adopted the changes made to Decimal128 in bson version 6.1.0. We have added a new
fromStringWithRounding()
method which exposes the previously available inexact rounding behaviour.See the bson v6.1.0 release notes for more information.
Use region settings for STS AWS credentials request
When using IAM AssumeRoleWithWebIdentity AWS authentication the driver uses the @aws-sdk/credential-providers package to contact the Security Token Service API for temporary credentials. AWS recommends using Regional AWS STS endpoints instead of the global endpoint to reduce latency, build-in redundancy, and increase session token validity. Unfortunately, environment variables
AWS_STS_REGIONAL_ENDPOINTS
andAWS_REGION
do not directly control the region the SDK's STS client contacts for credentials.The driver now has added support for detecting these variables and setting the appropriate options when calling the SDK's API: fromNodeProviderChain().
Important
The driver will only set region options if BOTH environment variables are present.
AWS_STS_REGIONAL_ENDPOINTS
MUST be set to either'legacy'
or'regional'
, andAWS_REGION
must be set.Fix memory leak with ChangeStreams
In a previous release, 5.7.0, we refactored cursor internals from callbacks to async/await. In particular, the
next
function that powers cursors was written with callbacks and would recursively call itself depending on the cursor type. ForChangeStreams
, this function would call itself if there were no new changes to return to the user. After converting that code to async/await each recursive call created a new promise that saved the current async context. This would slowly build up memory usage if no new changes came in to unwind the recursive calls.The function is now implemented as a loop, memory leak be gone!
Features
Bug Fixes
Documentation
We invite you to try the
mongodb
library immediately, and report any issues to the NODE project.