From e1fd75e2436718948bcd1076083b13279c54351b Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 12 May 2023 17:11:03 -0700 Subject: [PATCH] chore(deps): update dependency proxy to v2 (#560) * chore(deps): update dependency proxy to v2 * adapt for `proxy@2` --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Gregor Martynus <39992+gr2m@users.noreply.github.com> --- package-lock.json | 68 ++++++++++++----------- package.json | 2 +- test/agent-proxy/agent-proxy-test.test.ts | 4 +- 3 files changed, 38 insertions(+), 36 deletions(-) diff --git a/package-lock.json b/package-lock.json index 300312f46..9fe5df686 100644 --- a/package-lock.json +++ b/package-lock.json @@ -32,7 +32,7 @@ "jest": "^29.0.0", "lolex": "^6.0.0", "prettier": "2.8.8", - "proxy": "^1.0.1", + "proxy": "^2.0.0", "semantic-release": "^21.0.0", "semantic-release-plugin-update-version-in-files": "^1.0.0", "ts-jest": "^29.0.0", @@ -4212,9 +4212,9 @@ } }, "node_modules/args": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/args/-/args-5.0.1.tgz", - "integrity": "sha512-1kqmFCFsPffavQFGt8OxJdIcETti99kySRUPMpOhaGjL6mRJn8HFU1OxKY5bMqfZKUwTQc1mZkAjmGYaVOHFtQ==", + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/args/-/args-5.0.3.tgz", + "integrity": "sha512-h6k/zfFgusnv3i5TU08KQkVKuCPBtL/PWQbWkHUxvJrZ2nAyeaUupneemcrgn1xmqxPQsPIzwkUhOpoqPDRZuA==", "dev": true, "dependencies": { "camelcase": "5.0.0", @@ -4507,12 +4507,6 @@ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, - "node_modules/basic-auth-parser": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/basic-auth-parser/-/basic-auth-parser-0.0.2.tgz", - "integrity": "sha1-zp5xp38jwSee7NJlmypGJEwVbkE=", - "dev": true - }, "node_modules/before-after-hook": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.2.tgz", @@ -12875,19 +12869,25 @@ "dev": true }, "node_modules/proxy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/proxy/-/proxy-1.0.2.tgz", - "integrity": "sha512-KNac2ueWRpjbUh77OAFPZuNdfEqNynm9DD4xHT14CccGpW8wKZwEkN0yjlb7X9G9Z9F55N0Q+1z+WfgAhwYdzQ==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/proxy/-/proxy-2.1.0.tgz", + "integrity": "sha512-kOepwHzK82z4qNTXR2i2vxBA0M85bTd1rHD9R+qEEEIdo8iVx6BMQEDz7GmjMHpEF+/i4fIo4c90I1OOTaPnaA==", "dev": true, "dependencies": { - "args": "5.0.1", - "basic-auth-parser": "0.0.2", - "debug": "^4.1.1" + "args": "^5.0.3", + "basic-auth-parser": "0.0.2-1", + "debug": "^4.3.4" }, - "bin": { - "proxy": "bin/proxy.js" + "engines": { + "node": ">= 14" } }, + "node_modules/proxy/node_modules/basic-auth-parser": { + "version": "0.0.2-1", + "resolved": "https://registry.npmjs.org/basic-auth-parser/-/basic-auth-parser-0.0.2-1.tgz", + "integrity": "sha512-GFj8iVxo9onSU6BnnQvVwqvxh60UcSHJEDnIk3z4B6iOjsKSmqe+ibW0Rsz7YO7IE1HG3D3tqCNIidP46SZVdQ==", + "dev": true + }, "node_modules/pump": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", @@ -18177,9 +18177,9 @@ } }, "args": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/args/-/args-5.0.1.tgz", - "integrity": "sha512-1kqmFCFsPffavQFGt8OxJdIcETti99kySRUPMpOhaGjL6mRJn8HFU1OxKY5bMqfZKUwTQc1mZkAjmGYaVOHFtQ==", + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/args/-/args-5.0.3.tgz", + "integrity": "sha512-h6k/zfFgusnv3i5TU08KQkVKuCPBtL/PWQbWkHUxvJrZ2nAyeaUupneemcrgn1xmqxPQsPIzwkUhOpoqPDRZuA==", "dev": true, "requires": { "camelcase": "5.0.0", @@ -18409,12 +18409,6 @@ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, - "basic-auth-parser": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/basic-auth-parser/-/basic-auth-parser-0.0.2.tgz", - "integrity": "sha1-zp5xp38jwSee7NJlmypGJEwVbkE=", - "dev": true - }, "before-after-hook": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.2.tgz", @@ -24505,14 +24499,22 @@ "dev": true }, "proxy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/proxy/-/proxy-1.0.2.tgz", - "integrity": "sha512-KNac2ueWRpjbUh77OAFPZuNdfEqNynm9DD4xHT14CccGpW8wKZwEkN0yjlb7X9G9Z9F55N0Q+1z+WfgAhwYdzQ==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/proxy/-/proxy-2.1.0.tgz", + "integrity": "sha512-kOepwHzK82z4qNTXR2i2vxBA0M85bTd1rHD9R+qEEEIdo8iVx6BMQEDz7GmjMHpEF+/i4fIo4c90I1OOTaPnaA==", "dev": true, "requires": { - "args": "5.0.1", - "basic-auth-parser": "0.0.2", - "debug": "^4.1.1" + "args": "^5.0.3", + "basic-auth-parser": "0.0.2-1", + "debug": "^4.3.4" + }, + "dependencies": { + "basic-auth-parser": { + "version": "0.0.2-1", + "resolved": "https://registry.npmjs.org/basic-auth-parser/-/basic-auth-parser-0.0.2-1.tgz", + "integrity": "sha512-GFj8iVxo9onSU6BnnQvVwqvxh60UcSHJEDnIk3z4B6iOjsKSmqe+ibW0Rsz7YO7IE1HG3D3tqCNIidP46SZVdQ==", + "dev": true + } } }, "pump": { diff --git a/package.json b/package.json index 055cbeea4..47b88b5be 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "jest": "^29.0.0", "lolex": "^6.0.0", "prettier": "2.8.8", - "proxy": "^1.0.1", + "proxy": "^2.0.0", "semantic-release": "^21.0.0", "semantic-release-plugin-update-version-in-files": "^1.0.0", "ts-jest": "^29.0.0", diff --git a/test/agent-proxy/agent-proxy-test.test.ts b/test/agent-proxy/agent-proxy-test.test.ts index eb7e5940b..674e28ea5 100644 --- a/test/agent-proxy/agent-proxy-test.test.ts +++ b/test/agent-proxy/agent-proxy-test.test.ts @@ -7,7 +7,7 @@ */ const http = require("http"); -const HttpProxy = require("proxy"); +const { createProxy } = require("proxy"); const { HttpProxyAgent } = require("http-proxy-agent"); import { Octokit } from "../../src"; @@ -18,7 +18,7 @@ describe("client proxy", () => { // start HTTP proxy & http server beforeAll((done) => { - proxy = HttpProxy(); + proxy = createProxy(); proxy.listen(() => { proxyUrl = "http://localhost:" + proxy.address().port; done();