File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ const once = require('once')
1111const parallel = require ( 'run-parallel' )
1212const queueMicrotask = require ( 'queue-microtask' )
1313const sha1 = require ( 'simple-sha1' )
14- const stream = require ( 'readable-stream ' )
14+ const { Transform , PassThrough } = require ( 'streamx ' )
1515
1616const getFiles = require ( './get-files' ) // browser exclude
1717
@@ -424,7 +424,7 @@ function getBlobStream (file) {
424424 */
425425function getBufferStream ( buffer ) {
426426 return ( ) => {
427- const s = new stream . PassThrough ( )
427+ const s = new PassThrough ( )
428428 s . end ( buffer )
429429 return s
430430 }
@@ -440,11 +440,11 @@ function getBufferStream (buffer) {
440440 */
441441function getStreamStream ( readable , file ) {
442442 return ( ) => {
443- const counter = new stream . Transform ( )
444- counter . _transform = function ( buf , enc , done ) {
445- file . length += buf . length
446- this . push ( buf )
447- done ( )
443+ const counter = new Transform ( )
444+ counter . _transform = function ( data , cb ) {
445+ file . length += data . length
446+ this . push ( data )
447+ cb ( )
448448 }
449449 readable . pipe ( counter )
450450 return counter
Original file line number Diff line number Diff line change 2828 "once" : " ^1.4.0" ,
2929 "piece-length" : " ^2.0.1" ,
3030 "queue-microtask" : " ^1.2.3" ,
31- "readable-stream" : " ^3.6.0" ,
3231 "run-parallel" : " ^1.2.0" ,
33- "simple-sha1" : " ^3.1.0"
32+ "simple-sha1" : " ^3.1.0" ,
33+ "streamx" : " ^2.12.4"
3434 },
3535 "devDependencies" : {
3636 "@webtorrent/semantic-release-config" : " 1.0.7" ,
You can’t perform that action at this time.
0 commit comments