Merge pull request #3897 from github/github-action/bump-node-version

Bump Node version to v20.18.1
This commit is contained in:
Koen Vlaswinkel
2025-01-15 16:15:09 +01:00
committed by GitHub
3 changed files with 11 additions and 6 deletions

View File

@@ -6461,9 +6461,9 @@
"license": "MIT"
},
"node_modules/@types/node": {
"version": "20.17.12",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.12.tgz",
"integrity": "sha512-vo/wmBgMIiEA23A/knMfn/cf37VnuF52nZh5ZoW0GWt4e4sxNquibrMRJ7UQsA06+MBx9r/H1jsI9grYjQCQlw==",
"version": "20.17.13",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.13.tgz",
"integrity": "sha512-RNf+4dEeV69PIvyp++4IKM2vnLXtmp/JovfeQm5P5+qpKb6wHoH7INywLdZ7z+gVX46kgBP/fwJJvZYaHxtdyw==",
"dev": true,
"license": "MIT",
"dependencies": {

View File

@@ -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) {

View File

@@ -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);
});
@@ -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);
});