Skip to content

Commit

Permalink
fix: reuse it-queueless-pushable (#134)
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 authored May 30, 2024
1 parent e6179f0 commit dd24081
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 140 deletions.
3 changes: 1 addition & 2 deletions packages/it-byte-stream/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,8 @@
"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",
"uint8arraylist": "^2.4.8"
},
"devDependencies": {
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 @@ -21,8 +21,8 @@
* ```
*/

import { queuelessPushable } from 'it-queueless-pushable'
import { Uint8ArrayList } from 'uint8arraylist'
import { pushable } from './pushable.js'
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 dd24081

Please sign in to comment.