What's New
Learn what's new in:
What's New in 6.3
The Node.js driver v6.3 release includes the following features:
Adds the
serverMonitoringMode
client option to control the behavior of the monitoring connection among the nodes in a topology. This option takes a value ofauto
(default),poll
, orstream
. To learn more, see the entry for this option in the Connection Options guide.You can set the
serverMonitoringMode
option in aMongoClientOptions
instance or as a connection string option. The following example shows how to create a client with the option set tostream
:new MongoClient('<connection string>', { serverMonitoringMode: 'stream' }); Fixes a connection leak when the
serverApi
client option is set.Deprecates the
contentType
andaliases
GridFS options. To store the content type and aliases of a file, addcontentType
andaliases
fields to themetadata
document.
To learn more about this release, see the v6.3.0 Release Highlights.
What's New in 6.2
The Node.js driver v6.2 release includes the following features:
Updates the
bson
package version to 6.2.0 to include color visualization of types, as shown in the following image:To learn more, see the bson v6.2.0 release notes.
Ensures that the
result.insertedIds
property of a bulk write error type contains the_id
values of successfully inserted documents. In previous versions, when a bulk write operation rejected an insert operation, theresult.insertedIds
property contained the_id
values for all attempted inserts.Closes the implicit session created when running the
findOne()
method on a time series collection regardless of the outcome of the operation.Allows the creation of collections that have names that start or end with the
.
character. This change aligns the driver's database and collection name-checking behavior with the server's.
To learn more about this release, see the v6.2.0 Release Highlights.
What's New in 6.1
The Node.js driver v6.1 release includes the following features:
Updates the
bson
package version to 6.1.0 to expose theDecimal128.fromStringWithRounding()
method. To learn more, see the v6.1.0 bson release notes.Detects environment variables for region settings when authenticating by using the
MONGODB-AWS
authentication mechanism. To instruct the driver to use your region options, you must set both of the following environment variables:AWS_STS_REGIONAL_ENDPOINTS
AWS_REGION
Fixes a memory leak issue caused by recursive calls to the
next()
method of theChangeStream
type.
To learn more about this release, see the v6.1.0 Release Highlights.
What's New in 6.0
Warning
Breaking Changes in v6.0
This driver version introduces breaking changes. For a list of these changes, see the Version 6.0 Breaking Changes section in the Upgrade guide.
The Node.js driver v6.0 release includes the following features:
Important
Deprecation Notice
All of the ssl
-prefixed options in the MongoClientOptions
type are deprecated. In addition, the tlsCertificateFile
option
is deprecated.
Instead, you should store your certificates in a SecureContext
object or set the tls
-prefixed options in your
MongoClientOptions
instance. To learn more, see Enable TLS on a Connection.
Removal of support for the
addUser()
helper command. Use the createUser MongoDB Shell command instead.Removal of support for the
collStats
operation. Use the $collStats aggregation operator instead.The
options
field of theConnectionPoolCreatedEvent
type contains only the following fields, which are the non-default pool options:maxConnecting
maxPoolSize
minPoolSize
maxIdleTimeMS
waitQueueTimeoutMS
The driver asynchronously reads files set in the
tlsCAFile
andtlsCertificateKeyFile
connection options when you call theMongoClient.connect()
method, not when you create aMongoClient
instance.Removal of the
keepAlive
andkeepAliveInitialDelay
connection options. The value ofkeepAlive
is permanently set totrue
and the value ofkeepAliveInitialDelay
is set to 300000 milliseconds (300 seconds).To learn how to set keepalive settings at a system level, see the Does TCP keepalive time affect MongoDB Deployments? FAQ entry in the Server manual.
Removes the following options for the
Db.command()
method:willRetryWrite
omitReadPreference
writeConcern
explain
readConcern
collation
maxTimeMS
comment
retryWrites
dbName
authdb
noResponse
Although you cannot pass these options to the
Db.command()
method, you can still set them in the command document. To learn more, see the Command Options section of the Run a Command guide.
To learn more about this release, see the v6.0.0 Release Highlights.