From a5d18635c3b568ac9fbbc2d5009d75dbbedf24a7 Mon Sep 17 00:00:00 2001 From: Reed von Redwitz Date: Wed, 6 Dec 2023 10:18:21 +0100 Subject: [PATCH] chore: uptake fresh 1.6.0 and std 0.208.0 --- deno.json | 4 +- e2e_test.ts | 74 +++++++++++++++++------------------ plugins/error_handling.ts | 11 +++--- plugins/session.ts | 6 +-- routes/_500.tsx | 4 +- routes/api/stripe-webhooks.ts | 7 ++-- routes/api/vote.ts | 5 ++- utils/github_test.ts | 4 +- utils/http.ts | 4 +- utils/http_test.ts | 4 +- 10 files changed, 62 insertions(+), 61 deletions(-) diff --git a/deno.json b/deno.json index a2d403d8e..d77717674 100644 --- a/deno.json +++ b/deno.json @@ -22,7 +22,7 @@ "compilerOptions": { "jsx": "react-jsx", "jsxImportSource": "preact" }, "imports": { "@/": "./", - "$fresh/": "https://deno.land/x/fresh@1.5.4/", + "$fresh/": "https://deno.land/x/fresh@1.6.0/", "$gfm": "https://deno.land/x/gfm@0.2.5/mod.ts", "preact": "https://esm.sh/preact@10.18.1", "preact/": "https://esm.sh/preact@10.18.1/", @@ -31,7 +31,7 @@ "@preact/signals-core": "https://esm.sh/*@preact/signals-core@1.5.0", "twind-preset-tailwind/": "https://esm.sh/@twind/preset-tailwind@1.1.4/", "twind-preset-ext": "https://esm.sh/@twind/preset-ext@1.0.7/", - "std/": "https://deno.land/std@0.205.0/", + "std/": "https://deno.land/std@0.208.0/", "stripe": "npm:/stripe@13.5.0", "feed": "npm:/feed@4.2.2", "kv_oauth/": "https://deno.land/x/deno_kv_oauth@v0.9.1/", diff --git a/e2e_test.ts b/e2e_test.ts index 4098aea54..76a561096 100644 --- a/e2e_test.ts +++ b/e2e_test.ts @@ -1,6 +1,6 @@ // Copyright 2023 the Deno authors. All rights reserved. MIT license. -import { createHandler, Status } from "$fresh/server.ts"; +import { createHandler } from "$fresh/server.ts"; import manifest from "@/fresh.gen.ts"; import { collectValues, @@ -24,7 +24,7 @@ import { assertObjectMatch, assertStringIncludes, } from "std/assert/mod.ts"; -import { isRedirectStatus } from "std/http/status.ts"; +import { isRedirectStatus, STATUS_CODE } from "std/http/status.ts"; import { resolvesNext, returnsNext, stub } from "std/testing/mock.ts"; import Stripe from "stripe"; import options from "./fresh.config.ts"; @@ -94,7 +94,7 @@ Deno.test("[e2e] security headers", async () => { Deno.test("[e2e] GET /", async () => { const resp = await handler(new Request("http://localhost")); - assertEquals(resp.status, Status.OK); + assertEquals(resp.status, STATUS_CODE.OK); assertHtml(resp); }); @@ -184,7 +184,7 @@ Deno.test("[e2e] GET /blog", async () => { new Request("http://localhost/blog"), ); - assertEquals(resp.status, Status.OK); + assertEquals(resp.status, STATUS_CODE.OK); assertHtml(resp); }); @@ -192,7 +192,7 @@ Deno.test("[e2e] GET /pricing", async () => { const req = new Request("http://localhost/pricing"); const resp = await handler(req); - assertEquals(resp.status, Status.NotFound); + assertEquals(resp.status, STATUS_CODE.NotFound); assertHtml(resp); }); @@ -255,7 +255,7 @@ Deno.test("[e2e] GET /dashboard/stats", async (test) => { }), ); - assertEquals(resp.status, Status.OK); + assertEquals(resp.status, STATUS_CODE.OK); assertHtml(resp); assertStringIncludes(await resp.text(), "