snyk 1.981.0 → 1.982.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -161501,11 +161501,11 @@ async function streamToString(stream, streamSize, encoding = "utf8") {
161501
161501
  const chunks = [];
161502
161502
  return new Promise((resolve, reject) => {
161503
161503
  stream.on("end", () => {
161504
- resolve(chunks.join(""));
161504
+ resolve(Buffer.concat(chunks).toString(encoding));
161505
161505
  });
161506
161506
  stream.on("error", (error) => reject(error));
161507
161507
  stream.on("data", (chunk) => {
161508
- chunks.push(chunk.toString(encoding));
161508
+ chunks.push(chunk);
161509
161509
  });
161510
161510
  });
161511
161511
  }