Skip to content

Commit

Permalink
Merge pull request #3897 from github/github-action/bump-node-version
Browse files Browse the repository at this point in the history
Bump Node version to v20.18.1
  • Loading branch information
koesie10 authored Jan 15, 2025
2 parents 056e45a + 4607a45 commit 6cafa5d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
6 changes: 3 additions & 3 deletions extensions/ql-vscode/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion extensions/ql-vscode/src/common/jsonl-reader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,12 @@ export async function readJsonlFile<T>(
return new Promise((resolve, reject) => {
const stream = createReadStream(path, { encoding: "utf8" });
let buffer = "";
stream.on("data", async (chunk: string) => {
stream.on("data", async (chunk: string | Buffer) => {
if (typeof chunk !== "string") {
// This should never happen because we specify the encoding as "utf8".
throw new Error("Invalid chunk");
}

const parts = (buffer + chunk).split(doubleLineBreakRegexp);
buffer = parts.pop()!;
if (parts.length > 0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ describe("query-results", () => {
});

const finished = new Promise((res, rej) => {
validSarifStream.addListener("close", res);
validSarifStream.addListener("close", () => res(undefined));
validSarifStream.addListener("error", rej);
});

Expand Down Expand Up @@ -357,7 +357,7 @@ describe("query-results", () => {
});

const finished = new Promise((res, rej) => {
invalidSarifStream.addListener("close", res);
invalidSarifStream.addListener("close", () => res(undefined));
invalidSarifStream.addListener("error", rej);
});

Expand Down

0 comments on commit 6cafa5d

Please sign in to comment.