Skip to content

Commit

Permalink
Reformat
Browse files Browse the repository at this point in the history
Also, remove auto-formatting changes in other packages
  • Loading branch information
jportner committed May 16, 2023
1 parent 2ddd92f commit a841e14
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
5 changes: 4 additions & 1 deletion packages/http-proxy-agent/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,10 @@ export class HttpProxyAgent<Uri extends string> extends Agent {
};
}

setRequestProps(req: HttpProxyAgentClientRequest, opts: AgentConnectOpts): void {
setRequestProps(
req: HttpProxyAgentClientRequest,
opts: AgentConnectOpts
): void {
const hostname = req.getHeader('host') || 'localhost';
const base = `http://${hostname}`;
const url = new URL(req.path, base);
Expand Down
5 changes: 1 addition & 4 deletions packages/pac-proxy-agent/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -236,10 +236,7 @@ export class PacProxyAgent<Uri extends string> extends Agent {
const servername = opts.servername || opts.host;
socket = tls.connect({
...opts,
servername:
!servername || net.isIP(servername)
? undefined
: servername,
servername: (!servername || net.isIP(servername)) ? undefined : servername,
});
} else {
socket = net.connect(opts);
Expand Down
2 changes: 1 addition & 1 deletion packages/proxy-agent/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export type ProxyAgentOptions = HttpProxyAgentOptions<''> &
httpsAgent?: http.Agent;
/**
* A callback for dynamic provision of proxy for url.
* Defaults to standard proxy environment variables,
* Defaults to standard proxy environment variables,
* see https://www.npmjs.com/package/proxy-from-env for details
*/
getProxyForUrl?: GetProxyForUrlCallback;
Expand Down
4 changes: 2 additions & 2 deletions packages/proxy-agent/test/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ describe('ProxyAgent', () => {

it('should call provided function with getProxyForUrl option', async () => {
let gotCall = false;
let urlParameter = '';
let urlParameter = "";
httpsServer.once('request', function (req, res) {
res.end(JSON.stringify(req.headers));
});
Expand All @@ -267,7 +267,7 @@ describe('ProxyAgent', () => {
gotCall = true;
urlParameter = u;
return httpsProxyServerUrl.href;
},
}
});
const requestUrl = new URL('/test', httpsServerUrl);
const res = await req(requestUrl, {
Expand Down

0 comments on commit a841e14

Please sign in to comment.