add mongo-legacy to ensure compatibility and incremental migration

This commit is contained in:
Nacho Codoñer
2024-10-28 17:22:29 +01:00
parent 48611c5e3d
commit 895967ddbd
2 changed files with 2 additions and 1 deletions

View File

@@ -9,6 +9,7 @@ Package.describe({
Npm.depends({
mongodb: "5.0.0",
"mongodb-legacy": "5.0.0"
});
Package.onUse(function (api) {

View File

@@ -3,7 +3,7 @@ try {
// Silence deprecation warnings introduced in a patch update to mongodb:
// https://github.com/meteor/meteor/pull/9942#discussion_r218564879
process.noDeprecation = true;
NpmModuleMongodb = Npm.require('mongodb');
NpmModuleMongodb = Npm.require('mongodb-legacy');
} finally {
process.noDeprecation = oldNoDeprecationValue;
}