Skip to content

Releases: mongodb/node-mongodb-native

v4.2.1

30 Nov 18:15
99356eb

Choose a tag to compare

The MongoDB Node.js team is pleased to announce version 4.2.1 of the mongodb package!

Release Highlights

This release fixes an issue with the dbName being overridden by the authSource option. Additionally, we have ensured that cursors re-run server selection when fetching additional batches, which should reduce issues encountered in long running function as a service environments.

Bug Fixes

Documentation

We invite you to try the mongodb library immediately, and report any issues to the NODE project.

v4.2.0

17 Nov 16:22
a766f1c

Choose a tag to compare

Release Highlights

This release includes a number of features we’re happy to announce. You can now run aggregation pipelines that write write to a MongoDB collection using $out and $merge stages on secondaries! We’ve added an option to limit the number of hosts the driver will connect to when using SRV DNS lookups to manage your host addresses. And lastly, the authorizedCollection option is now usable on the db.listCollections() function.

Additionally, in this release, we’ve marked collection.mapReduce() as deprecated. The same functionality can be replicated in the much more flexible aggregation pipeline. Visit Map-Reduce to Aggregation Pipeline to learn more.

The minimum supported MongoDB version is 3.6. Attempts to connect to a MongoDB server older than 3.6 will result in an error.
Please take note of the MongoDB Software Lifecycle Schedules for timeframes of supported server versions.

Features

Bug Fixes

Documentation

We invite you to try the mongodb library immediately, and report any issues to the NODE project.

v4.1.4

03 Nov 21:12
c01b0ad

Choose a tag to compare

Release Highlights

This release includes a couple of bug fixes as noted below:

Bug Fixes

Documentation

We invite you to try the mongodb library immediately, and report any issues to the NODE project.

v3.7.3

20 Oct 17:40
b42e8b3

Choose a tag to compare

The MongoDB Node.js team is pleased to announce version 3.7.3 of the mongodb package!

What's Changed

Full Changelog: v3.7.2...v3.7.3

Documentation

We invite you to try the mongodb library immediately, and report any issues to the NODE project.

v4.1.3

05 Oct 19:35
d9daac5

Choose a tag to compare

The MongoDB Node.js team is pleased to announce version 4.1.3 of the mongodb package!

Release Highlights

This release includes a couple of TypeScript fixes as noted below:

Bug Fixes

Documentation

We invite you to try the mongodb library immediately, and report any issues to the NODE project.

v3.7.2

05 Oct 19:47
7c5a7bb

Choose a tag to compare

The MongoDB Node.js team is pleased to announce version 3.7.2 of the mongodb package!

Release Highlights

This release contains a fix for optional require of dependencies on yarn berry.

Bug Fixes

Documentation

We invite you to try the mongodb library immediately, and report any issues to the NODE project.

v4.1.2

14 Sep 17:43
78df6b9

Choose a tag to compare

The MongoDB Node.js team is pleased to announce version 4.1.2 of the mongodb package!

Release Highlights

This release addresses a number of bug fixes, please peruse the list below for more information on each fix.

Bug Fixes

Documentation

We invite you to try the mongodb library immediately, and report any issues to the NODE project.

v3.7.1

14 Sep 17:39
28f721d

Choose a tag to compare

The MongoDB Node.js team is pleased to announce version 3.7.1 of the mongodb package!

Release Highlights

This release contains an internal improvement that makes our monitor utilize the new hello handshake for monitoring when available.

Features

Documentation

We invite you to try the mongodb library immediately, and report any issues to the NODE project.

v3.7.0

31 Aug 21:12
44df7d7

Choose a tag to compare

The MongoDB Node.js team is pleased to announce version 3.7.0 of the mongodb package!

Release Highlights

Versioned API

Versioned API is a new feature in MongoDB 5.0 that allows user-selectable API versions, subsets of MongoDB server semantics, to be declared on a client. During communication with a server, clients with a declared API version will force the server to behave in a manner compatible with the API version. Declaring an API version on a client can be used to ensure consistent responses from a server, providing long term API stability for an application. The declared API version is applied to all commands run through the client, including those sent through the generic RunCommand helper. Specifying versioned API options in the command document AND declaring an API version on the client is not supported and will lead to undefined behavior.

Declare an API version on a client

// Declare API version "1" for the client
client = new MongoClient(uri, { serverApi: { version: '1' } });

cursor = client.db('database').collection('coll').find(...);

Strict mode

Declaring a strict API version will cause the MongoDB server to reject all commands that are not part of the declared API version. This includes command options and aggregation pipeline stages. For example, the following find call would fail because the tailable option is not part of version 1:

// Declare API version "1" for the client, with strict on
client = new MongoClient(uri, { serverApi: { version: '1', strict: true } });

// Fails with an error
cursor = client.db('database').collection('coll').find({ ... }, { tailable: true });

Deprecation Errors

The deprecationErrors option can be used to enable command failures when using functionality that is deprecated from version 1. Note that at the time of this writing, no deprecations in version 1 exist.

// Declare API version "1" for the client, with deprecationErrors on
client = new MongoClient(uri, { serverApi: { version: '1', deprecationErrors: true } });

// Note: since API version "1" is the initial version, there are no deprecated commands to provide as an example yet.

Features

Bug Fixes

Documentation

We invite you to try the mongodb library immediately, and report any issues to the NODE project.

v3.6.12

30 Aug 19:04
ffcd6ba

Choose a tag to compare

The MongoDB Node.js team is pleased to announce version 3.6.12 of the mongodb package!

Bug Fixes

Documentation

We invite you to try the mongodb library immediately, and report any issues to the NODE project.