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() method
In 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.
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 and AWS_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_ENDPOINTSMUST be set to either 'legacy' or 'regional', and AWS_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. For ChangeStreams, 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
NODE-5634: bump bson version to ^6.1.0 (#3866) (c6edabb)
Bug Fixes
NODE-5551: set AWS region from environment variable for STSClient (#3831) (e9a5079)
NODE-5588: recursive calls to next cause memory leak (#3841) (9a8fdb2)
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 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 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 mongodb from 4.17.1 to 6.1.0.
Release notes
Sourced from mongodb's releases.
... (truncated)
Changelog
Sourced from mongodb's changelog.
... (truncated)
Commits
e02534e
chore(main): release 6.1.0 [skip-ci] (#3853)c6edabb
feat(NODE-5634): bump bson version to ^6.1.0 (#3866)5b9fafd
deps(NODE-5446): bump dependencies again for v6 (#3860)b1c0eac
refactor(NODE-5379): cursor internals to use async-await (#3804)2a3de19
chore: skip failing aggregate explain tests (#3863)68e5d67
test(NODE-5606): use npm 9 on eol node versions (#3858)177a4fc
test(NODE-3049): add astrolabe support to the UnifiedTestRunner (#3805)3c4feae
ci(NODE-5424): test driver latest, client-encryption 6.0.0 in CI (#3855)9a8fdb2
fix(NODE-5588): recursive calls to next cause memory leak (#3841)e9a5079
fix(NODE-5551): set AWS region from environment variable for STSClient (#3831)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 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