Skip to content

Commit 74bd7af

Browse files
authoredFeb 27, 2023
Use readable-stream instead of Node streams
1 parent 676cfba commit 74bd7af

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed
 

‎lib/RdfParser.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { ActionContext, Actor } from "@comunica/core";
22
import * as RDF from "@rdfjs/types";
3-
import {Readable, PassThrough} from "stream";
3+
import { Readable, PassThrough } from "readable-stream";
44
import { MediatorRdfParseHandle, MediatorRdfParseMediaTypes } from '@comunica/bus-rdf-parse';
55

66
/**
@@ -92,7 +92,7 @@ export class RdfParser<Q extends RDF.BaseQuad = RDF.Quad> {
9292
})
9393
.catch((e) => readable.emit('error', e));
9494

95-
return readable;
95+
return readable as unknown as Readable & RDF.Stream;
9696
}
9797

9898
/**

‎package.json

+1
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@
110110
"@comunica/mediator-number": "^2.0.1",
111111
"@comunica/mediator-race": "^2.0.1",
112112
"@rdfjs/types": "*",
113+
"readable-stream": "^4.3.0",
113114
"stream-to-string": "^1.2.0"
114115
}
115116
}

‎yarn.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -3693,7 +3693,7 @@ readable-stream@^2.2.2, readable-stream@~2.3.6:
36933693
string_decoder "~1.1.1"
36943694
util-deprecate "~1.0.1"
36953695

3696-
readable-stream@^4.0.0, readable-stream@^4.2.0:
3696+
readable-stream@^4.0.0, readable-stream@^4.2.0, readable-stream@^4.3.0:
36973697
version "4.3.0"
36983698
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-4.3.0.tgz#0914d0c72db03b316c9733bb3461d64a3cc50cba"
36993699
integrity sha512-MuEnA0lbSi7JS8XM+WNJlWZkHAAdm7gETHdFK//Q/mChGyj2akEFtdLZh32jSdkWGbRwCW9pn6g3LWDdDeZnBQ==

0 commit comments

Comments
 (0)
Please sign in to comment.