File tree Expand file tree Collapse file tree 4 files changed +6
-27
lines changed
Expand file tree Collapse file tree 4 files changed +6
-27
lines changed Original file line number Diff line number Diff line change 4545 " concat"
4646 ],
4747 "dependencies" : {
48- "@sec-ant/readable-stream" : " ^0.3.2 " ,
48+ "@sec-ant/readable-stream" : " ^0.4.1 " ,
4949 "is-stream" : " ^4.0.1"
5050 },
5151 "devDependencies" : {
Original file line number Diff line number Diff line change 11import { isReadableStream } from 'is-stream' ;
2- import { ponyfill } from './web -stream.js ' ;
2+ import { asyncIterator } from '@sec-ant/readable -stream/ponyfill ' ;
33
44export const getAsyncIterable = stream => {
55 if ( isReadableStream ( stream , { checkOpen : false } ) && nodeImports . on !== undefined ) {
@@ -12,7 +12,7 @@ export const getAsyncIterable = stream => {
1212
1313 // `ReadableStream[Symbol.asyncIterator]` support is missing in multiple browsers, so we ponyfill it
1414 if ( toString . call ( stream ) === '[object ReadableStream]' ) {
15- return ponyfill . asyncIterator . call ( stream ) ;
15+ return asyncIterator . call ( stream ) ;
1616 }
1717
1818 throw new TypeError ( 'The first argument must be a Readable, a ReadableStream, or an async iterable.' ) ;
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11import { Duplex , Readable } from 'node:stream' ;
22import { finished } from 'node:stream/promises' ;
33
4+ // @todo Use ReadableStream.from() after dropping support for Node 18
5+ export { fromAnyIterable as readableStreamFrom } from '@sec-ant/readable-stream/ponyfill' ;
6+
47export const createStream = streamDefinition => typeof streamDefinition === 'function'
58 ? Duplex . from ( streamDefinition )
69 : Readable . from ( streamDefinition ) ;
710
8- // @todo Use ReadableStream.from() after dropping support for Node 18
9- export const readableStreamFrom = chunks => new ReadableStream ( {
10- start ( controller ) {
11- for ( const chunk of chunks ) {
12- controller . enqueue ( chunk ) ;
13- }
14-
15- controller . close ( ) ;
16- } ,
17- } ) ;
18-
1911// Tests related to big buffers/strings can be slow. We run them serially and
2012// with a higher timeout to ensure they do not randomly fail.
2113export const BIG_TEST_DURATION = '2m' ;
You can’t perform that action at this time.
0 commit comments