+4
-4
@@ -6,10 +6,10 @@
|
||||
"twind": "https://esm.sh/twind@0.16.17",
|
||||
"twind/": "https://esm.sh/twind@0.16.17/",
|
||||
|
||||
"preact": "https://esm.sh/preact@10.8.2",
|
||||
"preact/": "https://esm.sh/preact@10.8.2/",
|
||||
"preact-render-to-string": "https://esm.sh/preact-render-to-string@5.2.0?external=preact",
|
||||
"preact": "https://esm.sh/preact@10.10.0",
|
||||
"preact/": "https://esm.sh/preact@10.10.0/",
|
||||
"preact-render-to-string": "https://esm.sh/preact-render-to-string@5.2.1?external=preact",
|
||||
|
||||
"$semver/": "https://deno.land/x/semver@v1.4.0/"
|
||||
"$std/": "https://deno.land/std@0.150.0/"
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
import { RouteConfig } from "$fresh/server.ts";
|
||||
import { Handlers } from "$fresh/server.ts";
|
||||
import { parse } from "$semver/mod.ts";
|
||||
import { parse } from "$std/semver/mod.ts";
|
||||
import VERSIONS from "../../versions.json" assert { type: "json" };
|
||||
|
||||
const BASE_URL = "https://raw.githubusercontent.com/denoland/fresh/";
|
||||
@@ -11,7 +11,7 @@ export const handler: Handlers = {
|
||||
const isHTML = accept?.includes("text/html");
|
||||
const { version, path } = ctx.params;
|
||||
|
||||
const semver = parse(version, { includePrerelease: true, loose: false });
|
||||
const semver = parse(version, { includePrerelease: true });
|
||||
if (!semver) {
|
||||
return new Response("Invalid version", { status: 400 });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user