Skip to content

Commit

Permalink
fix: reuse it-queueless-pushable
Browse files Browse the repository at this point in the history
Use the queueless pushable from `it-queueless-pushable` as it was
extracted from this module.
  • Loading branch information
achingbrain committed May 30, 2024
1 parent e6179f0 commit 85f390f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 138 deletions.
1 change: 1 addition & 0 deletions packages/it-byte-stream/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@
"release": "aegir release"
},
"dependencies": {
"it-queueless-pushable": "^1.0.0",
"it-stream-types": "^2.0.1",
"p-defer": "^4.0.1",
"race-signal": "^1.0.2",
Expand Down
4 changes: 2 additions & 2 deletions packages/it-byte-stream/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
*/

import { Uint8ArrayList } from 'uint8arraylist'
import { pushable } from './pushable.js'
import { queuelessPushable } from 'it-queueless-pushable'
import type { Duplex } from 'it-stream-types'

export class CodeError extends Error {
Expand Down Expand Up @@ -76,7 +76,7 @@ export interface ByteStreamOpts {
}

export function byteStream <Stream extends Duplex<any, any, any>> (duplex: Stream, opts?: ByteStreamOpts): ByteStream<Stream> {
const write = pushable()
const write = queuelessPushable()

duplex.sink(write).catch(async (err: Error) => {
await write.end(err)
Expand Down
136 changes: 0 additions & 136 deletions packages/it-byte-stream/src/pushable.ts

This file was deleted.

0 comments on commit 85f390f

Please sign in to comment.