Docs Menu
Docs Home
/ / /
Node.js

What's New

On this page

  • What's New in 6.0

Learn what's new in:

  • Version 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 the ConnectionPoolCreatedEvent 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 and tlsCertificateKeyFile connection options when you call the MongoClient.connect() method, not when you create a MongoClient instance.

  • Removal of the keepAlive and keepAliveInitialDelay connection options. The value of keepAlive is permanently set to true and the value of keepAliveInitialDelay 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.

Back

Quick Reference

On this page