Skip to content

Commit 1e257b2

Browse files
committed
chore: format with prettier v3
1 parent 64f24de commit 1e257b2

29 files changed

+221
-221
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@
4646
"eslint": "^8.44.0",
4747
"eslint-config-unjs": "^0.2.1",
4848
"jiti": "^1.19.1",
49-
"prettier": "^2.8.8",
49+
"prettier": "^3.0.0",
5050
"typescript": "^5.1.6",
5151
"unbuild": "^1.2.1"
5252
},
5353
"packageManager": "pnpm@8.6.6"
54-
}
54+
}

pnpm-lock.yaml

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/env.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export function env(...presets: Preset[]): Environment {
1414
// Sort aliases from specific to general (ie. fs/promises before fs)
1515
const aliases = Object.keys(preset.alias).sort(
1616
(a, b) =>
17-
b.split("/").length - a.split("/").length || b.length - a.length
17+
b.split("/").length - a.split("/").length || b.length - a.length,
1818
);
1919
for (const from of aliases) {
2020
_env.alias[from] = preset.alias[from];

src/presets/nodeless.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const nodeless: Preset & { alias: Map<string, string> } = {
2626
"url",
2727
"util",
2828
"util/types",
29-
].map((m) => [m, `unenv/runtime/node/${m}/index`])
29+
].map((m) => [m, `unenv/runtime/node/${m}/index`]),
3030
),
3131

3232
// npm

src/runtime/fetch/call.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { ServerResponse } from "../node/http/_response";
33

44
export type Handle = (
55
req: IncomingMessage,
6-
res: ServerResponse
6+
res: ServerResponse,
77
) => Promise<any>;
88

99
export type CallHandle = ReturnType<typeof createCall>;

src/runtime/fetch/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export type FetchOptions = globalThis.RequestInit & CallContext;
66
export function createFetch(call: CallHandle, _fetch = global.fetch) {
77
return async function ufetch(
88
input: string | Request,
9-
init: FetchOptions
9+
init: FetchOptions,
1010
): Promise<Response> {
1111
const url = input.toString();
1212
if (!url.startsWith("/")) {
@@ -21,7 +21,7 @@ export function createFetch(call: CallHandle, _fetch = global.fetch) {
2121
Object.entries(r.headers).map(([name, value]) => [
2222
name,
2323
Array.isArray(value) ? value.join(",") : value || "",
24-
])
24+
]),
2525
),
2626
});
2727
} catch (error: any) {

src/runtime/node/async_hooks/_async-hook.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export class AsyncHook implements asyncHooks.HookCallbacks {
5252
}
5353

5454
export const createHook: typeof asyncHooks.createHook = function createHook(
55-
callbacks
55+
callbacks,
5656
) {
5757
const asyncHook = new AsyncHook(callbacks);
5858
return asyncHook;

src/runtime/node/async_hooks/_async-resource.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export class AsyncResource implements asyncHooks.AsyncResource {
1414
type: string,
1515
triggerAsyncId:
1616
| number
17-
| asyncHooks.AsyncResourceOptions = executionAsyncId()
17+
| asyncHooks.AsyncResourceOptions = executionAsyncId(),
1818
) {
1919
this.type = type;
2020
this._asyncId = -1 * _asyncIdCounter++;
@@ -27,7 +27,7 @@ export class AsyncResource implements asyncHooks.AsyncResource {
2727
static bind<Func extends (this: ThisArg, ...args: any[]) => any, ThisArg>(
2828
fn: Func,
2929
type?: string,
30-
thisArg?: ThisArg
30+
thisArg?: ThisArg,
3131
) {
3232
const resource = new AsyncResource(type ?? "anonymous");
3333
return resource.bind(fn, thisArg);

src/runtime/node/buffer/_base64.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,8 @@ export function fromByteArray(uint8) {
126126
encodeChunk(
127127
uint8,
128128
i,
129-
i + maxChunkLength > len2 ? len2 : i + maxChunkLength
130-
)
129+
i + maxChunkLength > len2 ? len2 : i + maxChunkLength,
130+
),
131131
);
132132
}
133133

@@ -141,7 +141,7 @@ export function fromByteArray(uint8) {
141141
lookup[tmp >> 10] +
142142
lookup[(tmp >> 4) & 0x3f] +
143143
lookup[(tmp << 2) & 0x3f] +
144-
"="
144+
"=",
145145
);
146146
}
147147

0 commit comments

Comments
 (0)