Switch to mongodb-legacy

GitOrigin-RevId: 11e09528c153de6b7766d18c3c90d94962190371
This commit is contained in:
andrew rumble
2024-08-02 17:27:31 +01:00
committed by Copybot
parent 69e7fceb64
commit b00d1336d4
113 changed files with 156 additions and 129 deletions

View File

@@ -5,7 +5,7 @@ const modulePath = path.join(
__dirname,
'../../../../app/src/Features/InactiveData/InactiveProjectManager'
)
const { ObjectId, ReadPreference } = require('mongodb')
const { ObjectId, ReadPreference } = require('mongodb-legacy')
const { expect } = require('chai')
describe('InactiveProjectManager', function () {
@@ -26,7 +26,7 @@ describe('InactiveProjectManager', function () {
this.ProjectGetter = { promises: { getProject: sinon.stub() } }
this.InactiveProjectManager = SandboxedModule.require(modulePath, {
requires: {
mongodb: { ObjectId },
'mongodb-legacy': { ObjectId },
'@overleaf/settings': this.settings,
'../Docstore/DocstoreManager': this.DocstoreManager,
'../Project/ProjectUpdateHandler': this.ProjectUpdateHandler,