diff --git a/src/index.js b/src/index.js index 0826400..05f998a 100644 --- a/src/index.js +++ b/src/index.js @@ -39,25 +39,12 @@ const classesWithAsyncAPIs = new Map([ ['GridFSBucket', makeLegacyGridFSBucket], ['ClientSession', makeLegacyClientSession], ['MongoClient', makeLegacyMongoClient], - - // Need to be exported top-level still ['ClientSession', makeLegacyClientSession], ['GridFSBucketWriteStream', makeLegacyGridFSBucketWriteStream], ['OrderedBulkOperation', makeLegacyOrderedBulkOperation], ['UnorderedBulkOperation', makeLegacyUnorderedBulkOperation] ]); -const TODO_SPECIAL_IMPORTS = new Map([ - ['ClientSession', '/lib/sessions'], - ['GridFSBucketWriteStream', '/lib/gridfs/upload'], - ['OrderedBulkOperation', '/lib/bulk/ordered'], - ['UnorderedBulkOperation', '/lib/bulk/unordered'] -]); - -for (const [missingTopLevelClassName, location] of TODO_SPECIAL_IMPORTS) { - mongodb[missingTopLevelClassName] = require(`mongodb${location}`)[missingTopLevelClassName]; -} - for (const [mongodbExportName, mongodbExportValue] of Object.entries(mongodb)) { let makeLegacyClass = classesWithAsyncAPIs.get(mongodbExportName); if (makeLegacyClass != null) {