mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-15 14:43:46 +01:00
Merge pull request #29948 from overleaf/ar/docstore-conversion-to-esm
[docstore] conversion to esm GitOrigin-RevId: 9d255047bd7ae25f2b0b38f3a721741e8a0b7ad8
This commit is contained in:
@@ -1,9 +1,12 @@
|
||||
// @ts-check
|
||||
|
||||
const Metrics = require('@overleaf/metrics')
|
||||
const Settings = require('@overleaf/settings')
|
||||
const MongoUtils = require('@overleaf/mongo-utils')
|
||||
const { MongoClient, ObjectId } = require('mongodb-legacy')
|
||||
import Metrics from '@overleaf/metrics'
|
||||
|
||||
import Settings from '@overleaf/settings'
|
||||
import MongoUtils from '@overleaf/mongo-utils'
|
||||
import mongodb from 'mongodb-legacy'
|
||||
|
||||
const { MongoClient, ObjectId } = mongodb
|
||||
|
||||
const mongoClient = new MongoClient(Settings.mongo.url, Settings.mongo.options)
|
||||
const mongoDb = mongoClient.db()
|
||||
@@ -18,7 +21,7 @@ async function cleanupTestDatabase() {
|
||||
await MongoUtils.cleanupTestDatabase(mongoClient)
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
export default {
|
||||
db,
|
||||
mongoClient,
|
||||
ObjectId,
|
||||
|
||||
Reference in New Issue
Block a user