Skip to content

Commit 0b568f5

Browse files
authored
upgrade https-proxy-agent (#747)
1 parent 1159038 commit 0b568f5

File tree

4 files changed

+38
-11
lines changed

4 files changed

+38
-11
lines changed

lib/install.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ function place_binary(uri, targetDir, opts, callback) {
5555
process.env.npm_config_proxy;
5656
let agent;
5757
if (proxyUrl) {
58-
const ProxyAgent = require('https-proxy-agent');
59-
agent = new ProxyAgent(proxyUrl);
58+
const { HttpsProxyAgent } = require('https-proxy-agent');
59+
agent = new HttpsProxyAgent(proxyUrl);
6060
log.log('download', `proxy agent configured using: "${proxyUrl}"`);
6161
}
6262

package-lock.json

Lines changed: 33 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"dependencies": {
2626
"consola": "^3.2.3",
2727
"detect-libc": "^2.0.0",
28-
"https-proxy-agent": "^5.0.0",
28+
"https-proxy-agent": "^7.0.5",
2929
"node-fetch": "^2.6.7",
3030
"nopt": "^8.0.0",
3131
"semver": "^7.5.3",

test/proxy-bcrypt.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const { createUnzip } = require('zlib');
66
const os = require('os');
77

88
const tar = require('tar-fs');
9-
const Agent = require('https-proxy-agent');
9+
const { HttpsProxyAgent } = require('https-proxy-agent');
1010
const fetch = require('node-fetch');
1111
const { rimraf } = require('rimraf');
1212

@@ -44,7 +44,7 @@ test('setup proxy server', (t) => {
4444
proxy.startServer({ port: proxyPort });
4545
process.env.https_proxy = process.env.http_proxy = proxyServer;
4646

47-
options.agent = new Agent(proxyServer);
47+
options.agent = new HttpsProxyAgent(proxyServer);
4848

4949
// make sure the download directory deleted then create an empty one
5050
rimraf(downloadDir).then(() => {

0 commit comments

Comments
 (0)