The MongoDB Node.js team is pleased to announce version 6.4.0 of the mongodb package!
Release Notes
Server selection will use a different Mongos on retry
When retrying reads or writes on a sharded cluster, the driver will attempt to select a different mongos for the retry if multiple are present. This should heuristically avoid encountering the original error that caused the need to retry the operation.
Caching AWS credentials provider per client
Instead of creating a new AWS provider for each authentication, we cache the AWS credentials provider per client to prevent overwhelming the auth endpoint and ensure that cached credentials are not shared with other clients.
BSON upgraded to ^6.4.0
BSON has had a number of performance increases in the last two releases (6.3.0 and 6.4.0). Small basic latin (ASCII) only strings, small memory allocations (ObjectId and Decimal128) and numeric parsing operations (int32, doubles, and longs) have all had optimizations applied to them.
For details check out the release notes here: BSON 6.3.0 and BSON 6.4.0 :racehorse:
ExceededTimeLimit was made a retryable reads error
Read operations will be retried after receiving an error with the ExceededTimeLimit label.
Fixed unresolved request issue in KMS requester
Internal to the field-level encryption machinery is a helper that opens a TLS socket to the KMS provider endpoint and submits a KMS request. The code neglected to add a 'close' event listener to the socket, which had the potential to improperly leave the promise pending indefinitely if no error was encountered.
The base64 padding is now preserved in the saslContinue command
The authentication was rejected by the saslContinue command from mongosh due to missing "=" padding from the client. We fixed the way we parse payload to preserve trailing "="s.
countDocuments now types the filter using the collection Schema
Previously, countDocuments had a weakly typed Document type for the filter allowing any JS object as input. The filter is now typed as Filter<Schema> to enable autocompletion, and, hopefully, catch minor bugs.
Thank you to @pashok88895 for contributing to this improvement.
The type error with $addToSet in bulkWrite was fixed
Previously the following code sample would show a type error:
This version was pushed to npm by dbx-node, a new releaser for mongodb since your current version.
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.13.0 to 6.4.0.
Release notes
Sourced from mongodb's releases.
... (truncated)
Changelog
Sourced from mongodb's changelog.
... (truncated)
Commits
9ac2e38
chore(main): release 6.4.0 [skip-ci] (#3935)5f62f56
docs: generate docs from latest main [skip-ci] (#3977)90f2f70
feat(NODE-5978): upgrade BSON to ^6.4.0 (#4007)99a0059
test(NODE-5731): add serverless proxy testing (#4003)1ca6269
test(NODE-5929): convert txn legacy spec tests (#3987)f26de76
fix(NODE-5944): make AWS session token optional (#4002)09c9b0b
chore(NODE-5972): specify TS 5.0 in package.json and package-lock (#4004)eb5e2ab
chore(NODE-5829): update driver dependencies (#3994)233a2e0
refactor(NODE-5964): clean up prepareHandshakeDocument (#4001)ff8b5f5
refactor(NODE-5912): make server.command an async function (#3986)Maintainer changes
This version was pushed to npm by dbx-node, a new releaser for mongodb since your current version.
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