Commit cdf4605 1 parent 8a0e3dc commit cdf4605 Copy full SHA for cdf4605
File tree 3 files changed +9
-6
lines changed
3 files changed +9
-6
lines changed Original file line number Diff line number Diff line change 18
18
"compression" : " ^1.7.4" ,
19
19
"debug" : " ^4.3.1" ,
20
20
"express" : " ^4.17.1" ,
21
- "https- proxy-agent" : " ^5.0 .0" ,
21
+ "proxy-agent" : " ^6.4 .0" ,
22
22
"inquirer" : " ^6.3.1" ,
23
23
"isomorphic-fetch" : " ^3.0.0" ,
24
24
"lighthouse" : " 12.1.0" ,
Original file line number Diff line number Diff line change 6
6
'use strict' ;
7
7
8
8
const fetch = require ( 'isomorphic-fetch' ) ;
9
- const { HttpsProxyAgent } = require ( 'https- proxy-agent' ) ;
9
+ const { ProxyAgent } = require ( 'proxy-agent' ) ;
10
10
11
11
/** @type import('isomorphic-fetch') */
12
12
module . exports = ( url , options ) => {
13
- /** @type {Parameters<import('isomorphic-fetch')>[1] & { agent?: import('https- proxy-agent').HttpsProxyAgent } } */
13
+ /** @type {Parameters<import('isomorphic-fetch')>[1] & { agent?: import('proxy-agent').ProxyAgent } } */
14
14
const instanceOptions = {
15
15
...options ,
16
16
} ;
17
17
18
- if ( ! instanceOptions . agent && process . env . HTTP_PROXY ) {
19
- instanceOptions . agent = new HttpsProxyAgent ( process . env . HTTP_PROXY ) ;
18
+ if (
19
+ ! instanceOptions . agent &&
20
+ ( process . env . HTTP_PROXY || process . env . HTTPS_PROXY || process . env . NO_PROXY )
21
+ ) {
22
+ instanceOptions . agent = new ProxyAgent ( ) ;
20
23
}
21
24
22
25
return fetch ( url , instanceOptions ) ;
Original file line number Diff line number Diff line change 15822
15822
proxy-from-env "^1.1.0"
15823
15823
socks-proxy-agent "^8.0.2"
15824
15824
15825
-
15825
+ [email protected] , proxy-agent@^6.4.0 :
15826
15826
version "6.4.0"
15827
15827
resolved "https://registry.yarnpkg.com/proxy-agent/-/proxy-agent-6.4.0.tgz#b4e2dd51dee2b377748aef8d45604c2d7608652d"
15828
15828
integrity sha512-u0piLU+nCOHMgGjRbimiXmA9kM/L9EHh3zL81xCdp7m+Y2pHIsnmbdDoEDoAz5geaonNR6q6+yOPQs6n4T6sBQ==
You can’t perform that action at this time.
0 commit comments