chore: bump dependencies (#1428)

This commit is contained in:
Lino Le Van
2023-07-08 22:47:12 +02:00
committed by GitHub
parent 92516e441e
commit 292b4c2d6f
15 changed files with 36 additions and 36 deletions
+1 -1
View File
@@ -45,7 +45,7 @@ export default function Home(props: PageProps<HomeProps>) {
<title>{TITLE}</title>
<link
rel="stylesheet"
href="https://esm.sh/prismjs@1.27.0/themes/prism-dark.min.css"
href="https://esm.sh/prismjs@1.29.0/themes/prism-dark.min.css"
/>
<meta name="description" content={DESCRIPTION} />
<meta property="og:title" content={TITLE} />
+4 -4
View File
@@ -1,6 +1,6 @@
import { RouteConfig } from "$fresh/server.ts";
import { Handlers } from "$fresh/server.ts";
import { parse } from "$std/semver/mod.ts";
import { format, parse } from "$std/semver/mod.ts";
import VERSIONS from "../../versions.json" assert { type: "json" };
import { extname } from "$std/path/mod.ts";
@@ -22,16 +22,16 @@ export const handler: Handlers = {
const isHTML = accept?.includes("text/html");
const { version, path } = ctx.params;
const semver = parse(version, { includePrerelease: true });
const semver = parse(version);
if (!semver) {
return new Response("Invalid version", { status: 400 });
}
if (!VERSIONS.includes(semver.version)) {
if (!VERSIONS.includes(format(semver))) {
return new Response("Version not found", { status: 404 });
}
const url = `${BASE_URL}${semver.version}/${path}`;
const url = `${BASE_URL}${format(semver)}/${path}`;
const r = await fetch(url, { redirect: "manual" });
const response = new Response(r.body, r);
response.headers.delete("content-encoding");