Skip to content

Commit 2c5ebd6

Browse files
committed
Prettier
1 parent 66b4c63 commit 2c5ebd6

File tree

6 files changed

+14
-10
lines changed

6 files changed

+14
-10
lines changed

packages/agent-base/src/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,7 @@ export abstract class Agent extends http.Agent {
125125

126126
get protocol(): string {
127127
return (
128-
this[INTERNAL].protocol ??
129-
(isSecureEndpoint() ? 'https:' : 'http:')
128+
this[INTERNAL].protocol ?? (isSecureEndpoint() ? 'https:' : 'http:')
130129
);
131130
}
132131

packages/agent-base/test/test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,9 @@ describe('Agent (TypeScript)', () => {
6161
err = _err as Error;
6262
}
6363
assert(err);
64-
expect(err.message).toEqual('Protocol "http:" not supported. Expected "other:"');
64+
expect(err.message).toEqual(
65+
'Protocol "http:" not supported. Expected "other:"'
66+
);
6567
});
6668
});
6769

packages/pac-proxy-agent/src/index.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,10 @@ export class PacProxyAgent<Uri extends string> extends Agent {
236236
const servername = opts.servername || opts.host;
237237
socket = tls.connect({
238238
...opts,
239-
servername: (!servername || net.isIP(servername)) ? undefined : servername,
239+
servername:
240+
!servername || net.isIP(servername)
241+
? undefined
242+
: servername,
240243
});
241244
} else {
242245
socket = net.connect(opts);

packages/proxy-agent/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export type ProxyAgentOptions = HttpProxyAgentOptions<''> &
6565
httpsAgent?: http.Agent;
6666
/**
6767
* A callback for dynamic provision of proxy for url.
68-
* Defaults to standard proxy environment variables,
68+
* Defaults to standard proxy environment variables,
6969
* see https://www.npmjs.com/package/proxy-from-env for details
7070
*/
7171
getProxyForUrl?: GetProxyForUrlCallback;

packages/proxy-agent/test/test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ describe('ProxyAgent', () => {
254254

255255
it('should call provided function with getProxyForUrl option', async () => {
256256
let gotCall = false;
257-
let urlParameter = "";
257+
let urlParameter = '';
258258
httpsServer.once('request', function (req, res) {
259259
res.end(JSON.stringify(req.headers));
260260
});
@@ -265,7 +265,7 @@ describe('ProxyAgent', () => {
265265
gotCall = true;
266266
urlParameter = u;
267267
return httpsProxyServerUrl.href;
268-
}
268+
},
269269
});
270270
const requestUrl = new URL('/test', httpsServerUrl);
271271
const res = await req(requestUrl, {

packages/proxy/src/proxy.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const hostname = os.hostname();
2020

2121
export interface ProxyServer extends http.Server {
2222
authenticate?: (req: http.IncomingMessage) => boolean | Promise<boolean>;
23-
localAddress?: string;
23+
localAddress?: string;
2424
}
2525

2626
/**
@@ -196,7 +196,7 @@ async function onrequest(
196196
...parsed,
197197
method: req.method,
198198
headers,
199-
localAddress: this.localAddress
199+
localAddress: this.localAddress,
200200
});
201201
debug.proxyRequest('%s %s HTTP/1.1 ', proxyReq.method, proxyReq.path);
202202

@@ -415,7 +415,7 @@ async function onconnect(
415415
const lastColon = req.url.lastIndexOf(':');
416416
const host = req.url.substring(0, lastColon);
417417
const port = parseInt(req.url.substring(lastColon + 1), 10);
418-
const localAddress = this.localAddress
418+
const localAddress = this.localAddress;
419419
const opts = { host: host.replace(/^\[|\]$/g, ''), port, localAddress };
420420

421421
debug.proxyRequest('connecting to proxy target %o', opts);

0 commit comments

Comments
 (0)