Skip to content

Commit

Permalink
fix(deps): upgrade http-proxy-agent to v7 (#2071)
Browse files Browse the repository at this point in the history
fix(deps): upgrade https-proxy-agent to v7
  • Loading branch information
chingor13 authored Sep 12, 2023
1 parent 13cba14 commit cc50a34
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 59 deletions.
79 changes: 32 additions & 47 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@
"detect-indent": "^6.1.0",
"diff": "^5.0.0",
"figures": "^3.0.0",
"http-proxy-agent": "^5.0.0",
"https-proxy-agent": "^5.0.1",
"http-proxy-agent": "^7.0.0",
"https-proxy-agent": "^7.0.0",
"js-yaml": "^4.0.0",
"jsonpath": "^1.1.1",
"node-html-parser": "^6.0.0",
Expand Down
15 changes: 5 additions & 10 deletions src/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,16 +224,11 @@ export class GitHub {
}

const {host, port} = defaultProxy;

return new URL(baseUrl).protocol.replace(':', '') === 'http'
? new HttpProxyAgent({
host,
port,
})
: new HttpsProxyAgent({
host,
port,
});
if (new URL(baseUrl).protocol.replace(':', '') === 'http') {
return new HttpProxyAgent(`http://${host}:${port}`);
} else {
return new HttpsProxyAgent(`https://${host}:${port}`);
}
}

/**
Expand Down

0 comments on commit cc50a34

Please sign in to comment.