yarn mongodb 3.4.0

The MongoDB Node.js team is pleased to announce version 3.4.0 of the driver

Release Highlights

Client Side Field Level Encryption (CSFLE)

The major functionality introduced in this release, and indeed the reason for the minor version bump, is full support for MongoDB's Client Side Field Level Encryption. The bulk of the support comes through an addon module mongodb-client-encryption, please refer to the reference documentation for more details.

TLS Option Variants

This release also introduces a number of new connection string options related to TLS. In order to unify uri options across all MongoDB drivers, and to better signal the technology the driver is actually using, all ssl related options now have a corresponding tls variant. NOTE: your application will not break if you continue to use the ssl variants, but deprecation warnings will be introduced prior to the 4.x driver release.

@adityapatadia initially pointed out that these tls variants had no effect, now they do. Thank you @adityapatadia!


A critical bug was found by @ephemer with the recently introduced "mongos discovery", where a typo caused DNS polling to occur at very fast intervals.

Additionally, user @mpilar identified and fixed a bug with our mongodb+srv parsing, where user-provided client options were not overriding those provided by a TXT record lookup.

Thank you very much @ephemer and @mpilar!

server selection

@adityapatadia also helped find a bug in the server selection code which rendered selection with a nearest read preference non-functional. Thanks again @adityapatadia!


A small bug was fixed causing errors in an unordered bulk write to be reported in incorrect order. If an error occurs in a bulk write now, then it will show up in the writeErrors field of the resulting BulkWriteError with an index that corresponds to the position the operation had in the initial input.

Release Notes


  • [NODE-1547] - Default Port is not applied

  • [NODE-1991] - replaceOne() also returns the replacement document?

  • [NODE-2089] - Only apply TransientTransactionError label within a transaction

  • [NODE-2308] - Bulk write error returns incorrect index in WriteError for unordered writes

  • [NODE-2334] - Driver must error if autoEncryption is attempted against wire version < 8

  • [NODE-2335] - Node Driver does not follow Initial DNS Seedlist Discovery spec

  • [NODE-2353] - Timed out connections should not half-close on destroy

  • [NODE-2356] - nearest server is not selected when useUnifiedTopology is set

  • [NODE-2359] - tls option in connection URI has no effect

  • [NODE-2375] - Typo in rescanIntervalSrvMS causes spike in DNS lookups

  • [NODE-2376] - Malicious server can accept incomplete SCRAM authentication and bypass mutual authentication

New Feature

  • [NODE-2094] - FLE GA Support


    • [NODE-2024] - Document createIndexes usage

    • [NODE-2052] - [FLE] Add a corpus test that exhaustively enumerates all ways to encrypt all BSON value types

    • [NODE-2053] - [FLE] Add prose test for explicit encryption with key alt name

    • [NODE-2298] - Add driver API documentation for Field Level Encryption

    • [NODE-2363] - Allow connection establishment to be cancelled

    • [NODE-2306] - Driver module does not export BulkWriteError

    • [NODE-2338] - build FLE addon on windows

  • latest releases: 4.0.0-beta.0, 3.6.3, 3.6.2...
    13 months ago