Skip to content

Commit 6cafa5d

Browse files
authored
Merge pull request #3897 from github/github-action/bump-node-version
Bump Node version to v20.18.1
2 parents 056e45a + 4607a45 commit 6cafa5d

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

extensions/ql-vscode/package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

extensions/ql-vscode/src/common/jsonl-reader.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,12 @@ export async function readJsonlFile<T>(
2424
return new Promise((resolve, reject) => {
2525
const stream = createReadStream(path, { encoding: "utf8" });
2626
let buffer = "";
27-
stream.on("data", async (chunk: string) => {
27+
stream.on("data", async (chunk: string | Buffer) => {
28+
if (typeof chunk !== "string") {
29+
// This should never happen because we specify the encoding as "utf8".
30+
throw new Error("Invalid chunk");
31+
}
32+
2833
const parts = (buffer + chunk).split(doubleLineBreakRegexp);
2934
buffer = parts.pop()!;
3035
if (parts.length > 0) {

extensions/ql-vscode/test/vscode-tests/no-workspace/query-results.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ describe("query-results", () => {
291291
});
292292

293293
const finished = new Promise((res, rej) => {
294-
validSarifStream.addListener("close", res);
294+
validSarifStream.addListener("close", () => res(undefined));
295295
validSarifStream.addListener("error", rej);
296296
});
297297

@@ -357,7 +357,7 @@ describe("query-results", () => {
357357
});
358358

359359
const finished = new Promise((res, rej) => {
360-
invalidSarifStream.addListener("close", res);
360+
invalidSarifStream.addListener("close", () => res(undefined));
361361
invalidSarifStream.addListener("error", rej);
362362
});
363363

0 commit comments

Comments
 (0)