Skip to content

Releases: mongodb-js/nodejs-mongodb-legacy

v6.0.1

18 Oct 21:37
a7ea096
Compare
Choose a tag to compare

6.0.1 (2023-10-18)

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

Release Notes

Bug Fixes

Documentation

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

v6.0.0

28 Aug 21:03
293f56c
Compare
Choose a tag to compare

6.0.0 (2023-08-28)

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

Release Notes

Adopt MongoDB Node.js Driver v6

v6.0.0 of this package depends on driver version ^6.0.0. It can be used to migrate existing callback using codebases to promises incrementally while pulling in the latest and greatest MongoDB has to offer!

Minimum Node.js version is now v16.20.1

The minimum supported Node.js version is now v16.20.1. We strive to keep our minimum supported Node.js version in sync with the runtime's release cadence to keep up with the latest security updates and modern language features.

db.addUser() and admin.addUser() removed

The deprecated addUser APIs have been removed. The driver maintains support across many server versions and the createUser command has support for different features based on the server's version. Since applications can generally write code to work against a uniform and perhaps more modern server, the path forward is for applications to send the createUser command directly.

See the createUser documentation for more information.

const db = client.db('admin');
// Example addUser usage
db.addUser(
  'myUsername', 
  'myPassword', 
  { roles: [ { role: 'readWrite', db: 'mflix' } ] },
  (error) => {
    if (error) {
      console.log('Failed to create user', error);
      return;
    }
    console.log('Created user!');
  }
);
// Example equivalent command usage
db.command(
  { 
    createUser: 'myUsername', 
    pwd: 'myPassword', 
    roles: [ { role: 'readWrite', db: 'mflix' } ] 
  },
  (error) => {
    if (error) {
      console.log('Failed to create user', error);
      return;
    }
    console.log('Created user!');
  }
);

collection.stats() removed

The collStats command is deprecated starting in server v6.2 so the driver is removing its bespoke helper in this major release. The collStats command is still available to run manually via await db.command(). However, the recommended migration is to use the $collStats aggregation stage.

⚠ BREAKING CHANGES

Documentation

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

v5.0.0

31 Jan 21:31
23fa100
Compare
Choose a tag to compare

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

Release Highlights

This release adopts the v5.0.0 major release of the MongoDB Node.js driver.
Upgrading to this version will pull in all the changes from that major release.

See the release highlights for v5.0.0 of the Node.js driver for further information.

⚠ BREAKING CHANGES

Features

Bug Fixes

Documentation

We invite you to try the mongodb-legacy library and report any issues to the NODE project.

v4.0.2

25 Jan 21:35
8cb2b2d
Compare
Choose a tag to compare

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

Bug Fixes

Documentation

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

v4.0.1

17 Jan 21:58
f69b5fe
Compare
Choose a tag to compare

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

Thanks @xxxLukskyxxx for adding the missing Typescript overloads to insertOne!

Bug Fixes

Documentation

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

v4.0.0

19 Sep 15:14
848872b
Compare
Choose a tag to compare

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

Release Highlights

Official release of the legacy callback support library. This library continues to support automatically utilizing a callback if provided or returning a promise if no callback was passed in.

While the 4.10.0 version only deprecates our support of callbacks, there will be a major version that removes the support altogether. In order to keep using callbacks after v5 is released, we recommend migrating your driver version to mongodb-legacy (github link). This package wraps every single async API our driver offers and is designed to provide the exact behavior of the MongoDB 4.10.0 release (both callbacks and promises are supported). Any new features added to MongoDB will be automatically inherited but will only support promises. This package is fully tested against our current suite and adoption should be confined to changing an import require('mongodb') -> require('mongodb-legacy'). If this package is useful to you and your use case we encourage you to adopt it before v5 to ensure it continues to work as expected.

Read more about it on the package's readme here:

Features

Bug Fixes

Documentation

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