Skip to content

Commit a07e549

Browse files
committed
Update imports
1 parent 438607d commit a07e549

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

extensions/ql-vscode/src/sarif-parser.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
import * as Sarif from 'sarif';
22
import * as fs from 'fs-extra';
3-
import Assembler = require('stream-json/Assembler');
3+
import { connectTo } from 'stream-json/Assembler';
44
import { getErrorMessage } from './pure/helpers-pure';
5-
import Pick = require('stream-json/filters/Pick');
5+
import { withParser } from 'stream-json/filters/Pick';
66

77
const DUMMY_TOOL: Sarif.Tool = { driver: { name: '' } };
88

99
export async function sarifParser(interpretedResultsPath: string): Promise<Sarif.Log> {
1010
try {
1111
// Parse the SARIF file into token streams, filtering out only the results array.
12-
const pipeline = fs.createReadStream(interpretedResultsPath).pipe(Pick.withParser({ filter: 'runs.0.results' }));
12+
const pipeline = fs.createReadStream(interpretedResultsPath).pipe(withParser({ filter: 'runs.0.results' }));
1313

1414
// Creates JavaScript objects from the token stream
15-
const asm = Assembler.connectTo(pipeline);
15+
const asm = connectTo(pipeline);
1616

1717
// Returns a constructed Log object with the results of an empty array if no results were found.
1818
// If the parser fails for any reason, it will reject the promise.

0 commit comments

Comments
 (0)