chore: bump std to 208 and deal with deprecations (#2081)

Co-authored-by: Marvin Hagemeister <marvin@deno.com>
This commit is contained in:
Reed von Redwitz
2023-11-28 16:35:26 +00:00
committed by GitHub
co-authored by Marvin Hagemeister
parent 6a90fdbf1b
commit b902205feb
20 changed files with 137 additions and 131 deletions
+3 -3
View File
@@ -22,11 +22,11 @@ import * as router from "./router.ts";
import DefaultErrorHandler from "./default_error_page.tsx";
import {
basename,
contentType,
dirname,
extname,
join,
toFileUrl,
typeByExtension,
walk,
} from "./deps.ts";
import { BUILD_ID } from "./build_id.ts";
@@ -316,7 +316,7 @@ export async function extractRoutes(
const localUrl = toFileUrl(entry.path);
const path = localUrl.href.substring(staticDirUrl.href.length);
const stat = await Deno.stat(localUrl);
const contentType = typeByExtension(extname(path)) ??
const type = contentType(extname(path)) ??
"application/octet-stream";
const etag = await crypto.subtle.digest(
"SHA-1",
@@ -330,7 +330,7 @@ export async function extractRoutes(
localUrl,
path,
size: stat.size,
contentType,
contentType: type,
etag,
};
staticFiles.push(staticFile);