@octokit/webhooks
Advanced tools
Comparing version 12.0.8 to 12.0.9
@@ -516,7 +516,16 @@ "use strict"; | ||
return new Promise((resolve, reject) => { | ||
let data = ""; | ||
request.setEncoding("utf8"); | ||
let data = []; | ||
request.on("error", (error) => reject(new import_aggregate_error3.default([error]))); | ||
request.on("data", (chunk) => data += chunk); | ||
request.on("end", () => resolve(data)); | ||
request.on("data", (chunk) => data.push(chunk)); | ||
request.on( | ||
"end", | ||
() => ( | ||
// setImmediate improves the throughput by reducing the pressure from | ||
// the event loop | ||
setImmediate( | ||
resolve, | ||
data.length === 1 ? data[0].toString("utf8") : Buffer.concat(data).toString("utf8") | ||
) | ||
) | ||
); | ||
}); | ||
@@ -523,0 +532,0 @@ } |
@@ -6,7 +6,16 @@ import AggregateError from "aggregate-error"; | ||
return new Promise((resolve, reject) => { | ||
let data = ""; | ||
request.setEncoding("utf8"); | ||
let data = []; | ||
request.on("error", (error) => reject(new AggregateError([error]))); | ||
request.on("data", (chunk) => data += chunk); | ||
request.on("end", () => resolve(data)); | ||
request.on("data", (chunk) => data.push(chunk)); | ||
request.on( | ||
"end", | ||
() => ( | ||
// setImmediate improves the throughput by reducing the pressure from | ||
// the event loop | ||
setImmediate( | ||
resolve, | ||
data.length === 1 ? data[0].toString("utf8") : Buffer.concat(data).toString("utf8") | ||
) | ||
) | ||
); | ||
}); | ||
@@ -13,0 +22,0 @@ } |
@@ -477,7 +477,16 @@ // pkg/dist-src/createLogger.js | ||
return new Promise((resolve, reject) => { | ||
let data = ""; | ||
request.setEncoding("utf8"); | ||
let data = []; | ||
request.on("error", (error) => reject(new AggregateError3([error]))); | ||
request.on("data", (chunk) => data += chunk); | ||
request.on("end", () => resolve(data)); | ||
request.on("data", (chunk) => data.push(chunk)); | ||
request.on( | ||
"end", | ||
() => ( | ||
// setImmediate improves the throughput by reducing the pressure from | ||
// the event loop | ||
setImmediate( | ||
resolve, | ||
data.length === 1 ? data[0].toString("utf8") : Buffer.concat(data).toString("utf8") | ||
) | ||
) | ||
); | ||
}); | ||
@@ -484,0 +493,0 @@ } |
{ | ||
"name": "@octokit/webhooks", | ||
"version": "12.0.8", | ||
"version": "12.0.9", | ||
"description": "GitHub webhook events toolset for Node.js", | ||
@@ -5,0 +5,0 @@ "keywords": [], |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
182893
2087