Skip to content

Commit d99b574

Browse files
authored
pg-query-stream: remove through dependency (brianc#2518)
1 parent 6121bd3 commit d99b574

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

packages/pg-query-stream/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040
"pg": "^8.5.1",
4141
"stream-spec": "~0.3.5",
4242
"stream-tester": "0.0.5",
43-
"through": "~2.3.4",
4443
"ts-node": "^8.5.4",
4544
"typescript": "^4.0.3"
4645
},

packages/pg-query-stream/test/concat.ts

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import assert from 'assert'
22
import concat from 'concat-stream'
3-
import through from 'through'
3+
import { Transform } from 'stream'
44
import helper from './helper'
55
import QueryStream from '../src'
66

@@ -10,8 +10,11 @@ helper('concat', function (client) {
1010
const query = client.query(stream)
1111
query
1212
.pipe(
13-
through(function (row) {
14-
this.push(row.num)
13+
new Transform({
14+
transform(chunk, _, callback) {
15+
callback(null, chunk.num)
16+
},
17+
objectMode: true,
1518
})
1619
)
1720
.pipe(

0 commit comments

Comments
 (0)