Skip to content

chore(main): release 6.0.0 [skip-ci] #19

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Jul 10, 2023

🌱 A new release!

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.


@github-actions github-actions bot force-pushed the release-please--branches--main--components--mongodb-legacy branch 2 times, most recently from fd0b0df to 10f8d9f Compare July 26, 2023 20:43
@github-actions github-actions bot force-pushed the release-please--branches--main--components--mongodb-legacy branch 2 times, most recently from 6382a00 to 7dd3ed2 Compare August 14, 2023 20:17
@github-actions github-actions bot force-pushed the release-please--branches--main--components--mongodb-legacy branch 2 times, most recently from d6f6b94 to c2c19d8 Compare August 28, 2023 20:47
@nbbeeken nbbeeken force-pushed the release-please--branches--main--components--mongodb-legacy branch from c2c19d8 to dc80675 Compare August 28, 2023 20:56
@nbbeeken nbbeeken merged commit 293f56c into main Aug 28, 2023
@nbbeeken nbbeeken deleted the release-please--branches--main--components--mongodb-legacy branch August 28, 2023 21:03
@github-actions
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant