diff --git a/tools/github_reporter/index.js b/tools/github_reporter/index.js index 9dc6f91a3faafc..68e9de5be2484c 100644 --- a/tools/github_reporter/index.js +++ b/tools/github_reporter/index.js @@ -1956,7 +1956,7 @@ var require_Dicer = __commonJS({ if (this._headerFirst && this._isPreamble) { if (!this._part) { this._part = new PartStream(this._partOpts); - if (this._events.preamble) { + if (this.listenerCount("preamble") !== 0) { this.emit("preamble", this._part); } else { this._ignore(); @@ -2019,7 +2019,7 @@ var require_Dicer = __commonJS({ } } if (this._dashes === 2) { - if (start + i < end && this._events.trailer) { + if (start + i < end && this.listenerCount("trailer") !== 0) { this.emit("trailer", data.slice(start + i, end)); } this.reset(); @@ -2042,9 +2042,9 @@ var require_Dicer = __commonJS({ this._part._read = function(n) { self._unpause(); }; - if (this._isPreamble && this._events.preamble) { + if (this._isPreamble && this.listenerCount("preamble") !== 0) { this.emit("preamble", this._part); - } else if (this._isPreamble !== true && this._events.part) { + } else if (this._isPreamble !== true && this.listenerCount("part") !== 0) { this.emit("part", this._part); } else { this._ignore(); @@ -2206,7 +2206,7 @@ var require_decodeText = __commonJS({ if (textDecoders.has(exports2.toString())) { try { return textDecoders.get(exports2).decode(data); - } catch (e) { + } catch { } } return typeof data === "string" ? data : data.toString(); @@ -2989,7 +2989,7 @@ var require_multipart = __commonJS({ return skipPart(part); } ++nfiles; - if (!boy._events.file) { + if (boy.listenerCount("file") === 0) { self.parser._ignore(); return; } @@ -13692,6 +13692,7 @@ var require_fetch = __commonJS({ } if (!sameOrigin(requestCurrentURL(request), locationURL)) { request.headersList.delete("authorization"); + request.headersList.delete("proxy-authorization", true); request.headersList.delete("cookie"); request.headersList.delete("host"); } @@ -17948,7 +17949,7 @@ var require_lib = __commonJS({ if (this._keepAlive && useProxy) { agent = this._proxyAgent; } - if (this._keepAlive && !useProxy) { + if (!useProxy) { agent = this._agent; } if (agent) { @@ -17977,14 +17978,11 @@ var require_lib = __commonJS({ agent = tunnelAgent(agentOptions); this._proxyAgent = agent; } - if (this._keepAlive && !agent) { + if (!agent) { const options = { keepAlive: this._keepAlive, maxSockets }; agent = usingSsl ? new https.Agent(options) : new http.Agent(options); this._agent = agent; } - if (!agent) { - agent = usingSsl ? https.globalAgent : http.globalAgent; - } if (usingSsl && this._ignoreSslError) { agent.options = Object.assign(agent.options || {}, { rejectUnauthorized: false diff --git a/tools/github_reporter/package.json b/tools/github_reporter/package.json index 638a489d135084..1c5f4fa5675b35 100644 --- a/tools/github_reporter/package.json +++ b/tools/github_reporter/package.json @@ -1,6 +1,6 @@ { "name": "@reporters/github", - "version": "1.6.0", + "version": "1.7.0", "description": "A github actions reporter for `node:test`", "type": "commonjs", "keywords": [