chore: get builds passing in Deno canary (#3335)
This commit is contained in:
@@ -397,7 +397,9 @@ const EDIT_WARNING =
|
|||||||
`// WARNING: DO NOT EDIT THIS FILE. It is autogenerated by Fresh.`;
|
`// WARNING: DO NOT EDIT THIS FILE. It is autogenerated by Fresh.`;
|
||||||
|
|
||||||
export async function hashContent(
|
export async function hashContent(
|
||||||
content: Uint8Array | ReadableStream<Uint8Array>,
|
// This error poppued up since TS 5.9.2 but not sure why
|
||||||
|
// deno-lint-ignore no-explicit-any
|
||||||
|
content: Uint8Array<any> | ReadableStream<Uint8Array>,
|
||||||
): Promise<string> {
|
): Promise<string> {
|
||||||
const buffer = await new Response(content).arrayBuffer();
|
const buffer = await new Response(content).arrayBuffer();
|
||||||
|
|
||||||
|
|||||||
@@ -103,7 +103,9 @@ export function staticFiles<T>(): Middleware<T> {
|
|||||||
return new Response(null, { status: 200, headers });
|
return new Response(null, { status: 200, headers });
|
||||||
}
|
}
|
||||||
|
|
||||||
return new Response(file.readable, { headers });
|
// Errors in TS 5.9.2, not sure why
|
||||||
|
// deno-lint-ignore no-explicit-any
|
||||||
|
return new Response(file.readable as any, { headers });
|
||||||
} finally {
|
} finally {
|
||||||
span.end();
|
span.end();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -153,7 +153,7 @@ export async function renderRoute<State>(
|
|||||||
internals.layouts = [];
|
internals.layouts = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
const method = ctx.req.method as Method;
|
const method = ctx.req.method.toUpperCase() as Method;
|
||||||
|
|
||||||
const handlers = route.handler;
|
const handlers = route.handler;
|
||||||
if (handlers === undefined) {
|
if (handlers === undefined) {
|
||||||
|
|||||||
Reference in New Issue
Block a user