@@ -24,7 +24,6 @@ const concat = require('concat-stream');
24
24
import * as is from 'is' ;
25
25
// eslint-disable-next-line @typescript-eslint/no-var-requires
26
26
const pumpify = require ( 'pumpify' ) ;
27
- import * as through from 'through2' ;
28
27
29
28
import {
30
29
Family ,
@@ -814,19 +813,22 @@ Please use the format 'prezzy' or '${instance.name}/tables/prezzy'.`);
814
813
rowStream = pumpify . obj ( [
815
814
requestStream ,
816
815
chunkTransformer ,
817
- through . obj ( ( rowData , enc , next ) => {
818
- if (
819
- chunkTransformer . _destroyed ||
820
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
821
- ( userStream as any ) . _writableState . ended
822
- ) {
823
- return next ( ) ;
824
- }
825
- numRequestsMade = 0 ;
826
- rowsRead ++ ;
827
- const row = this . row ( rowData . key ) ;
828
- row . data = rowData . data ;
829
- next ( null , row ) ;
816
+ new PassThrough ( {
817
+ objectMode : true ,
818
+ transform : ( rowData , enc , next ) => {
819
+ if (
820
+ chunkTransformer . _destroyed ||
821
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
822
+ ( userStream as any ) . _writableState . ended
823
+ ) {
824
+ return next ( ) ;
825
+ }
826
+ numRequestsMade = 0 ;
827
+ rowsRead ++ ;
828
+ const row = this . row ( rowData . key ) ;
829
+ row . data = rowData . data ;
830
+ next ( null , row ) ;
831
+ } ,
830
832
} ) ,
831
833
] ) ;
832
834
@@ -1571,11 +1573,14 @@ Please use the format 'prezzy' or '${instance.name}/tables/prezzy'.`);
1571
1573
reqOpts,
1572
1574
gaxOpts : gaxOptions ,
1573
1575
} ) ,
1574
- through . obj ( ( key , enc , next ) => {
1575
- next ( null , {
1576
- key : key . rowKey ,
1577
- offset : key . offsetBytes ,
1578
- } ) ;
1576
+ new PassThrough ( {
1577
+ objectMode : true ,
1578
+ transform : ( key , enc , next ) => {
1579
+ next ( null , {
1580
+ key : key . rowKey ,
1581
+ offset : key . offsetBytes ,
1582
+ } ) ;
1583
+ } ,
1579
1584
} ) ,
1580
1585
] ) ;
1581
1586
}
0 commit comments