@@ -39,25 +39,12 @@ const classesWithAsyncAPIs = new Map([
3939 [ 'GridFSBucket' , makeLegacyGridFSBucket ] ,
4040 [ 'ClientSession' , makeLegacyClientSession ] ,
4141 [ 'MongoClient' , makeLegacyMongoClient ] ,
42-
43- // Need to be exported top-level still
4442 [ 'ClientSession' , makeLegacyClientSession ] ,
4543 [ 'GridFSBucketWriteStream' , makeLegacyGridFSBucketWriteStream ] ,
4644 [ 'OrderedBulkOperation' , makeLegacyOrderedBulkOperation ] ,
4745 [ 'UnorderedBulkOperation' , makeLegacyUnorderedBulkOperation ]
4846] ) ;
4947
50- const TODO_SPECIAL_IMPORTS = new Map ( [
51- [ 'ClientSession' , '/lib/sessions' ] ,
52- [ 'GridFSBucketWriteStream' , '/lib/gridfs/upload' ] ,
53- [ 'OrderedBulkOperation' , '/lib/bulk/ordered' ] ,
54- [ 'UnorderedBulkOperation' , '/lib/bulk/unordered' ]
55- ] ) ;
56-
57- for ( const [ missingTopLevelClassName , location ] of TODO_SPECIAL_IMPORTS ) {
58- mongodb [ missingTopLevelClassName ] = require ( `mongodb${ location } ` ) [ missingTopLevelClassName ] ;
59- }
60-
6148for ( const [ mongodbExportName , mongodbExportValue ] of Object . entries ( mongodb ) ) {
6249 let makeLegacyClass = classesWithAsyncAPIs . get ( mongodbExportName ) ;
6350 if ( makeLegacyClass != null ) {
0 commit comments