From 4fca1774777fb7d2961bd62f7da813414016f1ea Mon Sep 17 00:00:00 2001 From: teatimeguest Date: Sun, 10 Mar 2024 03:06:17 +0900 Subject: [PATCH] build: remove patch Merged: https://github.com/actions/toolkit/pull/1572 --- package.json | 1 - patches/@actions+http-client+2.2.0.patch | 35 ------------------------ 2 files changed, 36 deletions(-) delete mode 100644 patches/@actions+http-client+2.2.0.patch diff --git a/package.json b/package.json index b8dc3b80..0bbf5bee 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,6 @@ "fmt": "npm run dprint fmt", "fmt-check": "run-p --aggregate-output -c 'dprint check' fmt-check:ec", "fmt-check:ec": "git ls-files -z | xargs -0 ec", - "postinstall": "patch-package", "licenses": "webpack -c packages/config/webpack/config.mjs", "link-check": "markdown-link-check README.md", "lint": "npm run -ws --if-present lint", diff --git a/patches/@actions+http-client+2.2.0.patch b/patches/@actions+http-client+2.2.0.patch deleted file mode 100644 index 3c4bee19..00000000 --- a/patches/@actions+http-client+2.2.0.patch +++ /dev/null @@ -1,35 +0,0 @@ -diff --git a/node_modules/@actions/http-client/lib/index.js b/node_modules/@actions/http-client/lib/index.js -index 5a3cad3..363604a 100644 ---- a/node_modules/@actions/http-client/lib/index.js -+++ b/node_modules/@actions/http-client/lib/index.js -@@ -502,7 +502,7 @@ class HttpClient { - if (this._keepAlive && useProxy) { - agent = this._proxyAgent; - } -- if (this._keepAlive && !useProxy) { -+ if (!useProxy) { - agent = this._agent; - } - // if agent is already assigned use that agent. -@@ -535,15 +535,16 @@ class HttpClient { - this._proxyAgent = agent; - } - // if reusing agent across request and tunneling agent isn't assigned create a new agent -- if (this._keepAlive && !agent) { -+ // Always use a custom agent so that `keep-alive` works correctly -+ // on both `node16` and `node20` runtimes. See: -+ // - https://github.com/node-fetch/node-fetch/issues/1735 -+ // - https://github.com/nodejs/node/issues/37184 -+ // - https://github.com/nodejs/node/pull/43522 -+ if (!agent) { - const options = { keepAlive: this._keepAlive, maxSockets }; - agent = usingSsl ? new https.Agent(options) : new http.Agent(options); - this._agent = agent; - } -- // if not using private agent and tunnel agent isn't setup then use global agent -- if (!agent) { -- agent = usingSsl ? https.globalAgent : http.globalAgent; -- } - if (usingSsl && this._ignoreSslError) { - // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process - // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options