Skip to content

Commit cf73606

Browse files
committed
Bump prettier
1 parent 5a35a03 commit cf73606

12 files changed

Lines changed: 19 additions & 49 deletions

File tree

package-lock.json

Lines changed: 4 additions & 4 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
@@ -53,7 +53,7 @@
5353
"ajv-formats": "3.x",
5454
"eventsource": "4.x",
5555
"lean-test": "2.x",
56-
"prettier": "3.8.3",
56+
"prettier": "3.9.4",
5757
"rollup": "4.x",
5858
"rollup-plugin-dts": "6.x",
5959
"typescript": "6.0.x",

performance/StreamSearch.test.mts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ const implementations: ImplementationDef[] = [
5656
const h = haystack[0];
5757
const needleLen = needle.byteLength;
5858
const r: number[] = [];
59-
for (let pos = 0; (pos = h.indexOf(needle, pos)) !== -1; ) {
59+
for (let pos = 0; (pos = h.indexOf(needle, pos)) !== -1;) {
6060
r.push(pos);
6161
pos += needleLen;
6262
}
@@ -153,7 +153,7 @@ function buildHaystack(size: number, needle: Buffer, needlePositions: number[])
153153
}
154154
}
155155
// remove any occurrences of the needle that appeared by random chance
156-
for (let pos = 0; (pos = haystack.indexOf(needle, pos)) !== -1; ) {
156+
for (let pos = 0; (pos = haystack.indexOf(needle, pos)) !== -1;) {
157157
pos += needle.length - 1;
158158
haystack[pos] = (haystack[pos] + 1) & 0xff;
159159
}

src/bin/config/loader.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ async function loadConfigFileNetwork(
423423
content = await readAnyFile(absFile);
424424
}
425425
const config = parser(JSON.parse(content), { file: absFile, path: '' });
426-
for (let i = 0; i < config.servers.length; ) {
426+
for (let i = 0; i < config.servers.length;) {
427427
const server = config.servers[i]!;
428428
if (server.mount) {
429429
for (let j = 0; j < server.mount.length; ++j) {

src/bin/routes/modules/PackageInfo.mts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,7 @@ export interface PackageJson {
2929

3030
export type MaybeArray<T> = T | T[];
3131
export type ImportMapping =
32-
| { [condition: string]: MaybeArray<ImportMapping> | undefined }
33-
| string
34-
| null;
32+
{ [condition: string]: MaybeArray<ImportMapping> | undefined } | string | null;
3533

3634
export async function readPackageGraph(packageJsonPath: string): Promise<PackageInfo[]> {
3735
const inputStat = await stat(packageJsonPath);

src/core/Router.mts

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -32,34 +32,18 @@ import {
3232
} from './handler.mts';
3333

3434
export type CommonMethod =
35-
| 'DELETE'
36-
| 'GET'
37-
| 'HEAD'
38-
| 'OPTIONS'
39-
| 'PATCH'
40-
| 'POST'
41-
| 'PUT'
42-
| 'TRACE';
35+
'DELETE' | 'GET' | 'HEAD' | 'OPTIONS' | 'PATCH' | 'POST' | 'PUT' | 'TRACE';
4336

4437
export type CommonUpgrade = 'http/2' | 'http/3' | 'https' | 'h2c' | 'websocket';
4538

4639
type RelaxedRequestHandler<Req = {}> =
47-
| RequestHandlerFn<Req>
48-
| RequestHandler<Req>
49-
| ErrorHandler<Req>
50-
| null
51-
| undefined;
40+
RequestHandlerFn<Req> | RequestHandler<Req> | ErrorHandler<Req> | null | undefined;
5241

5342
type RelaxedRequestHandlerOrExplicitUpgrade<Req = {}> =
54-
| RelaxedRequestHandler<Req>
55-
| UpgradeHandler<Req>;
43+
RelaxedRequestHandler<Req> | UpgradeHandler<Req>;
5644

5745
type RelaxedUpgradeHandler<Req = {}> =
58-
| UpgradeHandlerFn<Req>
59-
| UpgradeHandler<Req>
60-
| ErrorHandler<Req>
61-
| null
62-
| undefined;
46+
UpgradeHandlerFn<Req> | UpgradeHandler<Req> | ErrorHandler<Req> | null | undefined;
6347

6448
type MethodWrapper<Req, This> = <Path extends string>(
6549
path: ValidPath<Path>,

src/core/handler.mts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,7 @@ export type ErrorHandlerFn<Req = {}> = (
7171
export interface ErrorHandler<Req = {}> {
7272
handleError: ErrorHandlerFn<Req>;
7373
shouldHandleError?:
74-
| ((error: unknown, req: IncomingMessage & Req, output: ErrorOutput) => boolean)
75-
| undefined;
74+
((error: unknown, req: IncomingMessage & Req, output: ErrorOutput) => boolean) | undefined;
7675
}
7776

7877
export const errorHandler = <Req = {},>(

src/core/path.mts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,7 @@ import { decodeSlashes } from '../util/parseURL.mts';
33

44
type Perm2<A extends string, B extends string> = '' | A | B | `${A}${B}` | `${B}${A}`;
55
type Perm3<A extends string, B extends string, C extends string> =
6-
| ''
7-
| `${A}${Perm2<B, C>}`
8-
| `${B}${Perm2<A, C>}`
9-
| `${C}${Perm2<A, B>}`;
6+
'' | `${A}${Perm2<B, C>}` | `${B}${Perm2<A, C>}` | `${C}${Perm2<A, B>}`;
107
type PathFlags = Perm3<'~', '!', '%'>;
118
export type ValidPath<Path extends string> = Path &
129
(string extends Path ? string : `${PathFlags}/${string}`);

src/extras/auth/bearer.mts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ interface BearerAuthOptions<Req, Token> {
1717
req: IncomingMessage & Req,
1818
) => MaybePromise<Token | null | undefined>;
1919
fallbackTokenFetcher?:
20-
| ((req: IncomingMessage & Req) => MaybePromise<string | null | undefined>)
21-
| undefined;
20+
((req: IncomingMessage & Req) => MaybePromise<string | null | undefined>) | undefined;
2221
closeOnExpiry?: boolean | undefined;
2322
softCloseBufferTime?: number | undefined;
2423
onSoftCloseError?: ServerErrorCallback | undefined;

src/extras/filesystem/readZip.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ export async function readZip(source: string): Promise<ZipDirectory> {
107107
const extra = sub(cd, pos + 46 + nameLength, extraFieldLength);
108108
pos += 46 + nameLength + extraFieldLength + commentLength;
109109

110-
for (let extPos = 0; extPos < extraFieldLength; ) {
110+
for (let extPos = 0; extPos < extraFieldLength;) {
111111
const size = read16LE(extra, extPos + 2);
112112
const field = sub(extra, extPos + 4, size);
113113
switch (read16LE(extra, extPos)) {

0 commit comments

Comments
 (0)