chore(main): release 6.3.0 [skip-ci] #3904
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.3.0 (2023-11-15)
The MongoDB Node.js team is pleased to announce version 6.3.0 of the
mongodb
package!Release Notes
New client option
serverMonitoringMode
For users that want to control the behaviour of the monitoring connection between each node in the topology, a new option,
serverMonitoringMode
, has been added. This defaults toauto
but can be forced into a specific mode by providing a value ofpoll
orstream
. When the setting isauto
the monitoring mode will be determined by the environment the driver is running in, specifically, FaaS environments prefer "polling" mode and all others prefer "streaming".A polling monitor periodically issues a
hello
command to the node at an interval ofheartbeatFrequencyMS
. A streaming monitor sends an initialhello
and then will automatically get a response from the Node when a change in server configuration occurs or at a maximum time ofheartbeatFrequencyMS
. The value of that option defaults to 10000 milliseconds.This new option can be provided in the connection string or as an option to the
MongoClient
.Fix connection leak when
serverApi
is enabledWhen enabling
serverApi
the driver's RTT measurement logic (used to determine the closest node) still sent the legacy hello command "isMaster" causing the server to return an error. Unfortunately, the error handling logic did not correctly destroy the socket which would cause a leak.Both sending the correct hello command and the error handling connection clean-up logic are fixed in this change.
GridFS fields deprecated
The GridFS
contentType
andaliases
options are deprecated. According to the GridFS spec, applications wishing to storecontentType
andaliases
should add a corresponding field to themetadata
document instead.Remove deprecation warning about punycode
The
mongodb-connection-string-url
package which parses connection strings relied on Node's punycode module, the package now imports the community package removing the deprecation warning on Node.js 20+.Features
Bug Fixes
Documentation
We invite you to try the
mongodb
library immediately and report any issues to the NODE project.