@@ -3,7 +3,7 @@ import * as child_process from 'child_process';
33import * as fs from 'fs-extra' ;
44import * as path from 'path' ;
55import { chain } from 'stream-chain' ;
6- import { Parser } from 'stream-json' ;
6+ import { parser } from 'stream-json' ;
77import Assembler = require( 'stream-json/Assembler' ) ;
88import * as sarif from 'sarif' ;
99import { SemVer } from 'semver' ;
@@ -20,7 +20,6 @@ import { assertNever } from './pure/helpers-pure';
2020import { QueryMetadata , SortDirection } from './pure/interface-types' ;
2121import { Logger , ProgressReporter } from './logging' ;
2222import { CompilationMessage } from './pure/messages' ;
23- import Chain = require( 'stream-chain' ) ;
2423
2524/**
2625 * The version of the SARIF format that we are using.
@@ -673,12 +672,11 @@ export class CodeQLCliServer implements Disposable {
673672
674673 async interpretBqrs ( metadata : QueryMetadata , resultsPath : string , interpretedResultsPath : string , sourceInfo ?: SourceInfo ) : Promise < sarif . Log > {
675674 await this . runInterpretCommand ( SARIF_FORMAT , metadata , resultsPath , interpretedResultsPath , sourceInfo ) ;
676- let pipeline : Chain ;
677-
675+ let pipeline ;
678676 try {
679677 pipeline = chain ( [
680678 fs . createReadStream ( interpretedResultsPath ) ,
681- new Parser ( )
679+ parser ( )
682680 ] ) ;
683681 } catch ( e ) {
684682 throw new Error ( 'Reading output of interpretation failed.' ) ;
@@ -688,7 +686,7 @@ export class CodeQLCliServer implements Disposable {
688686 const asm = Assembler . connectTo ( pipeline ) ;
689687 asm . on ( 'done' , ( asm ) => asm . current ) ;
690688 // need to return asm.current in place of {}
691- return { } as sarif . Log ;
689+ return { } as unknown as sarif . Log ;
692690 } catch ( err ) {
693691 throw new Error ( `Parsing output of interpretation failed: ${ err . stderr || err } ` ) ;
694692 }
0 commit comments