Skip to content

Commit

Permalink
fix(deps): update https-proxy-agent to 7.0.1 and fix imports and tests (
Browse files Browse the repository at this point in the history
  • Loading branch information
ddelgrosso1 committed Jul 27, 2023
1 parent 041a201 commit 5c877e2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
},
"dependencies": {
"extend": "^3.0.2",
"https-proxy-agent": "^5.0.0",
"https-proxy-agent": "^7.0.1",
"is-stream": "^2.0.0",
"node-fetch": "^2.6.9"
}
Expand Down
3 changes: 2 additions & 1 deletion src/gaxios.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import {
} from './common';
import {getRetryConfig} from './retry';
import {Stream} from 'stream';
import {HttpsProxyAgent as httpsProxyAgent} from 'https-proxy-agent';

/* eslint-disable @typescript-eslint/no-explicit-any */

Expand Down Expand Up @@ -69,7 +70,7 @@ function loadProxy() {
process?.env?.HTTP_PROXY ||
process?.env?.http_proxy;
if (proxy) {
HttpsProxyAgent = require('https-proxy-agent');
HttpsProxyAgent = httpsProxyAgent;
}
return proxy;
}
Expand Down
3 changes: 1 addition & 2 deletions test/test.getch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ import sinon from 'sinon';
import stream from 'stream';
import {describe, it, afterEach} from 'mocha';
import fetch from 'node-fetch';
// eslint-disable-next-line @typescript-eslint/no-var-requires
const HttpsProxyAgent = require('https-proxy-agent');
import {HttpsProxyAgent} from 'https-proxy-agent';
import {
Gaxios,
GaxiosError,
Expand Down

0 comments on commit 5c877e2

Please sign in to comment.