Skip to content

Releases: mongodb/node-mongodb-native

v5.6.0

01 Jun 17:30
f98f26c
Compare
Choose a tag to compare

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

Release Highlights

Node 20 support

The MongoDB Node.js Driver now supports Node.js 20! 🎉

runCursorCommand API

We have added the Db#runCursorCommand method which can be used to execute generic cursor commands. This API complements the generic Db#command method.

TypeScript support for new time series options

The driver now has TypeScript support for the bucketMaxSpanSeconds and bucketRoundingSeconds options which will be available in MongoDB 7.0. You can read more about these options here.

Features

Bug Fixes

Documentation

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

v5.5.0

11 May 21:49
ba3437d
Compare
Choose a tag to compare

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

Features

Bug Fixes

Documentation

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

v5.4.0

04 May 19:45
c69b0b1
Compare
Choose a tag to compare

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

Release Highlights

ChangeStream.tryNext Typescript fix

We have corrected the tryNext method on ChangeStream to use the TChange schema generic instead of the untyped Document interface. This may increase strictness for existing usages but aligns with the rest of the methods on the change stream class to accurately reflect the type returned from the driver.

Deprecations

The db.command() API has a number of options deprecated that were incorrectly included in the typescript interface the method reportedly accepts. A majority of the options relate to fields that must be attached to the command directly: readConcern, writeConcern, and comment.

Additionally, the collStats helper has been deprecated in favor of using database aggregations to get the same result: https://www.mongodb.com/docs/manual/reference/operator/aggregation/collStats/

​​NOTE: This release includes some experimental features that are not yet ready for production use. As a reminder, anything marked experimental is not a part of the stable driver API and is subject to change without notice.

Features and Deprecations

Bug Fixes

Documentation

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

v5.3.0

18 Apr 17:42
6506aed
Compare
Choose a tag to compare

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

Features

Bug Fixes

Documentation

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

v4.16.0

18 Apr 17:55
134d32f
Compare
Choose a tag to compare

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

Features

Bug Fixes

Documentation

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

v5.2.0

04 Apr 18:06
c5db16b
Compare
Choose a tag to compare

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

Release Highlights

This release includes driver support for automatically obtaining Azure credentials when using automatic client side encryption. You can find a tutorial for using Azure and automatic encryption here: Use Automatic Queryable Encryption with Azure

Additionally, we have a number of minor bug fixes listed below.

NOTE: This release includes some experimental features that are not yet ready for use. As a reminder, anything marked experimental is not a part of the stable driver API and is subject to change without notice.

Features

Bug Fixes

Documentation

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

v4.15.0

04 Apr 17:39
49fa638
Compare
Choose a tag to compare

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

Features

Bug Fixes

Documentation

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

v5.1.0

23 Feb 18:58
687f51a
Compare
Choose a tag to compare

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

Release Highlights

Support for JavaScript bigints in the driver

The driver now supports automatic serialization of JavaScript bigints to BSON.Longs. It also supports deserializing of BSON.Long values returned from the server to bigint values when the useBigInt64 flag is passed as true.

import { MongoClient } from 'mongodb';

(async () => {
  const client = new MongoClient('<YOUR CONNECTION STRING>');
  const db = client.db('test');
  const coll = db.collection('bigints');

  await coll.insertOne({ a: 10n }); // The driver automatically serializes bigints to BSON.Long before being sent to the server

  const docBigInt = await coll.findOne({ a: 10n }, { useBigInt64: true }); // Must provide the useBigInt64 flag to specify that bigints get returned
  console.log(docBigInt);
  // { _id: ObjectId(...), a: 10n }
  const doc = await coll.findOne({ a: 10n }); // Must provide the useBigInt64 flag to specify that bigints get returned
  console.log(doc);
  // { _id: ObjectId(...), a: 10 }
  await client.close();
})()

Features

Bug Fixes

Documentation

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

v5.0.1

07 Feb 18:08
60f4232
Compare
Choose a tag to compare

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

This release reverts a fix that unintentionally caused a leak of internal driver resources.

Bug Fixes

  • NODE-5027: revert "ensure that MessageStream is destroyed when connections are destroyed" (#3552) (2d178d0)

Documentation

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

v4.14.0

07 Feb 18:20
908b3b6
Compare
Choose a tag to compare

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

Deprecations

Bug Fixes

Documentation

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