MyGit

v4.10.0

mongodb/node-mongodb-native

版本发布时间: 2022-09-19 23:15:58

mongodb/node-mongodb-native最新发布版本:v6.9.0(2024-09-13 01:12:41)

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

Release Highlights

Callback Deprecation

Looking to improve our API's consistency and handling of errors we are planning to remove callback support in the next major release of the driver. Today marks the notice of their removal. Migrating to a promise only API allows us to offer uniform error handling and better native support for automatic promise construction. In this release you will notice deprecation warnings in doc comments for all our callback overloads and if you are working in VSCode you should notice strikethroughs on these APIs. We encourage you to migrate to promises where possible:

MongoDB-Legacy Callback Support

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.

相关地址:原始地址 下载(tar) 下载(zip)

查看:2022-09-19发行的版本