Skip to content

Commit 0f12010

Browse files
authoredMay 28, 2023
fix(deps): update dependency https-proxy-agent to v7 (#636)
1 parent 3dc59ec commit 0f12010

File tree

3 files changed

+119
-115
lines changed

3 files changed

+119
-115
lines changed
 

‎lib/get-client.js

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const urljoin = require('url-join');
2-
const HttpProxyAgent = require('http-proxy-agent');
3-
const HttpsProxyAgent = require('https-proxy-agent');
2+
const {HttpProxyAgent} = require('http-proxy-agent');
3+
const {HttpsProxyAgent} = require('https-proxy-agent');
44

55
const SemanticReleaseOctokit = require('./semantic-release-octokit');
66

@@ -12,8 +12,10 @@ module.exports = ({githubToken, githubUrl, githubApiPathPrefix, proxy}) => {
1212
request: {
1313
agent: proxy
1414
? baseUrl && new URL(baseUrl).protocol.replace(':', '') === 'http'
15-
? new HttpProxyAgent(proxy)
16-
: new HttpsProxyAgent(proxy)
15+
? // Some `proxy.headers` need to be passed as second arguments since version 6 or 7
16+
// For simplicity, we just pass the same proxy object twice. It works 🤷🏻
17+
new HttpProxyAgent(proxy, proxy)
18+
: new HttpsProxyAgent(proxy, proxy)
1719
: undefined,
1820
},
1921
});

‎package-lock.json

+111-109
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
"dir-glob": "^3.0.0",
2727
"fs-extra": "^11.0.0",
2828
"globby": "^11.0.0",
29-
"http-proxy-agent": "^5.0.0",
30-
"https-proxy-agent": "^5.0.0",
29+
"http-proxy-agent": "^7.0.0",
30+
"https-proxy-agent": "^7.0.0",
3131
"issue-parser": "^6.0.0",
3232
"lodash": "^4.17.4",
3333
"mime": "^3.0.0",

0 commit comments

Comments
 (0)
Please sign in to comment.