v4.0.0
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
- NODE-4541: implement legacy callback wrapper library (#1) (a539ec3)
- NODE-4559: add mongodb-legacy metadata (#5) (41437ea)
- NODE-4592: add type defs for wrapped methods (#3) (d59a002)
Bug Fixes
Documentation
- Reference: https://docs.mongodb.com/drivers/node/current/
- API: https://mongodb.github.io/node-mongodb-native/4.10
- Changelog: https://github.com/mongodb/node-mongodb-native/blob/main/HISTORY.md
We invite you to try the mongodb library immediately, and report any issues to the NODE project.