From 46e6b3a6cd916ad9319dd30e1eb32e5863162d31 Mon Sep 17 00:00:00 2001 From: Asher Gomez Date: Tue, 24 Jun 2025 10:20:21 +1000 Subject: [PATCH 1/3] refactor: use npm instead of `esm.sh` --- deno.json | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/deno.json b/deno.json index 4d3eccae..8e88dd10 100644 --- a/deno.json +++ b/deno.json @@ -20,8 +20,7 @@ "imports": { "@/": "./", "$fresh/": "https://deno.land/x/fresh@1.7.3/", - "preact": "https://esm.sh/preact@10.22.1", - "preact/": "https://esm.sh/preact@10.22.1/", + "preact": "npm:preact@10.22.1", "@std/assert": "jsr:@std/assert@^1.0.13", "@std/datetime": "jsr:@std/datetime@^0.225.5", "@std/front-matter": "jsr:@std/front-matter@^1.0.9", @@ -30,9 +29,8 @@ "@std/path": "jsr:@std/path@^1.1.0", "@std/testing": "jsr:@std/testing@^1.0.14", "@std/ulid": "jsr:@std/ulid@^1.0.0", - "preact-render-to-string": "https://esm.sh/*preact-render-to-string@6.2.2", - "@preact/signals": "https://esm.sh/*@preact/signals@1.2.2", - "@preact/signals-core": "https://esm.sh/*@preact/signals-core@1.5.1", + "preact-render-to-string": "npm:preact-render-to-string@6.2.2", + "@preact/signals": "npm:@preact/signals@1.2.2", "tailwindcss": "npm:tailwindcss@3.4.1", "tailwindcss/": "npm:/tailwindcss@3.4.1/", "tailwindcss/plugin": "npm:/tailwindcss@3.4.1/plugin.js", From 641a827452df14a30c23e16460b8cc59a290cdf6 Mon Sep 17 00:00:00 2001 From: Asher Gomez Date: Tue, 24 Jun 2025 10:51:24 +1000 Subject: [PATCH 2/3] refactor: use `jsr:@preact-icons/tb` --- components/Footer.tsx | 6 +++--- components/Header.tsx | 4 ++-- components/Share.tsx | 8 ++++---- deno.json | 2 +- islands/ItemsList.tsx | 2 +- routes/pricing.tsx | 2 +- routes/submit.tsx | 6 +++--- routes/users/[login].tsx | 2 +- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/components/Footer.tsx b/components/Footer.tsx index d52b14bf..98001098 100644 --- a/components/Footer.tsx +++ b/components/Footer.tsx @@ -1,8 +1,8 @@ // Copyright 2023-2025 the Deno authors. All rights reserved. MIT license. import { SITE_NAME } from "@/utils/constants.ts"; -import IconBrandDiscord from "tabler_icons_tsx/brand-discord.tsx"; -import IconBrandGithub from "tabler_icons_tsx/brand-github.tsx"; -import IconRss from "tabler_icons_tsx/rss.tsx"; +import IconBrandDiscord from "@preact-icons/tb/TbBrandDiscord"; +import IconBrandGithub from "@preact-icons/tb/TbBrandGithub"; +import IconRss from "@preact-icons/tb/TbRss"; function MadeWithFreshBadge() { return ( diff --git a/components/Header.tsx b/components/Header.tsx index c74967e4..f44228a5 100644 --- a/components/Header.tsx +++ b/components/Header.tsx @@ -1,8 +1,8 @@ // Copyright 2023-2025 the Deno authors. All rights reserved. MIT license. import { SITE_NAME } from "@/utils/constants.ts"; import { isStripeEnabled } from "@/utils/stripe.ts"; -import IconX from "tabler_icons_tsx/x.tsx"; -import IconMenu from "tabler_icons_tsx/menu-2.tsx"; +import IconX from "@preact-icons/tb/TbX"; +import IconMenu from "@preact-icons/tb/TbMenu2"; import { User } from "@/utils/db.ts"; export interface HeaderProps { diff --git a/components/Share.tsx b/components/Share.tsx index 880cf714..827d6e49 100644 --- a/components/Share.tsx +++ b/components/Share.tsx @@ -1,8 +1,8 @@ // Copyright 2023-2025 the Deno authors. All rights reserved. MIT license. -import IconBrandFacebook from "tabler_icons_tsx/brand-facebook.tsx"; -import IconBrandLinkedin from "tabler_icons_tsx/brand-linkedin.tsx"; -import IconBrandReddit from "tabler_icons_tsx/brand-reddit.tsx"; -import IconBrandTwitter from "tabler_icons_tsx/brand-twitter.tsx"; +import IconBrandFacebook from "@preact-icons/tb/TbBrandFacebook"; +import IconBrandLinkedin from "@preact-icons/tb/TbBrandLinkedin"; +import IconBrandReddit from "@preact-icons/tb/TbBrandReddit"; +import IconBrandTwitter from "@preact-icons/tb/TbBrandTwitter"; interface ShareProps { url: URL; diff --git a/deno.json b/deno.json index 8e88dd10..6f827049 100644 --- a/deno.json +++ b/deno.json @@ -20,6 +20,7 @@ "imports": { "@/": "./", "$fresh/": "https://deno.land/x/fresh@1.7.3/", + "@preact-icons/tb": "jsr:@preact-icons/tb@^1.0.14", "preact": "npm:preact@10.22.1", "@std/assert": "jsr:@std/assert@^1.0.13", "@std/datetime": "jsr:@std/datetime@^0.225.5", @@ -36,7 +37,6 @@ "tailwindcss/plugin": "npm:/tailwindcss@3.4.1/plugin.js", "stripe": "npm:/stripe@13.5.0", "kv_oauth/": "https://deno.land/x/deno_kv_oauth@v0.9.1/", - "tabler_icons_tsx/": "https://deno.land/x/tabler_icons_tsx@0.0.4/tsx/", "fresh_charts/": "https://deno.land/x/fresh_charts@0.3.1/" }, "lint": { "rules": { "tags": ["fresh", "recommended", "jsx", "react"] } }, diff --git a/islands/ItemsList.tsx b/islands/ItemsList.tsx index eea4a55c..45647a5a 100644 --- a/islands/ItemsList.tsx +++ b/islands/ItemsList.tsx @@ -2,7 +2,7 @@ import { Signal, useComputed, useSignal } from "@preact/signals"; import { useEffect } from "preact/hooks"; import { type Item } from "@/utils/db.ts"; -import IconInfo from "tabler_icons_tsx/info-circle.tsx"; +import IconInfo from "@preact-icons/tb/TbInfoCircle"; import { fetchValues } from "@/utils/http.ts"; import { decodeTime } from "@std/ulid/decode-time"; import { timeAgo } from "@/utils/display.ts"; diff --git a/routes/pricing.tsx b/routes/pricing.tsx index 0fddc5bd..0816e5cf 100644 --- a/routes/pricing.tsx +++ b/routes/pricing.tsx @@ -3,7 +3,7 @@ import type { State } from "@/plugins/session.ts"; import { assertIsPrice, isStripeEnabled, stripe } from "@/utils/stripe.ts"; import { formatCurrency } from "@/utils/display.ts"; import Stripe from "stripe"; -import IconCheckCircle from "tabler_icons_tsx/circle-check.tsx"; +import IconCheckCircle from "@preact-icons/tb/TbCircleCheck"; import Head from "@/components/Head.tsx"; import { defineRoute } from "$fresh/server.ts"; import { PremiumBadge } from "@/components/PremiumBadge.tsx"; diff --git a/routes/submit.tsx b/routes/submit.tsx index da41dc5b..c7b5fbe0 100644 --- a/routes/submit.tsx +++ b/routes/submit.tsx @@ -1,7 +1,7 @@ // Copyright 2023-2025 the Deno authors. All rights reserved. MIT license. import Head from "@/components/Head.tsx"; -import IconCheckCircle from "tabler_icons_tsx/circle-check.tsx"; -import IconCircleX from "tabler_icons_tsx/circle-x.tsx"; +import IconCheckCircle from "@preact-icons/tb/TbCircleCheck"; +import IconCircleX from "@preact-icons/tb/TbCircleX"; import { defineRoute, Handlers } from "$fresh/server.ts"; import { createItem } from "@/utils/db.ts"; import { redirect } from "@/utils/http.ts"; @@ -11,7 +11,7 @@ import { State, } from "@/plugins/session.ts"; import { ulid } from "@std/ulid/ulid"; -import IconInfo from "tabler_icons_tsx/info-circle.tsx"; +import IconInfo from "@preact-icons/tb/TbInfoCircle"; const SUBMIT_STYLES = "w-full text-white text-center rounded-[7px] transition duration-300 px-4 py-2 block hover:bg-white hover:text-black hover:dark:bg-gray-900 hover:dark:!text-white"; diff --git a/routes/users/[login].tsx b/routes/users/[login].tsx index c2450f8d..9fd4a0a9 100644 --- a/routes/users/[login].tsx +++ b/routes/users/[login].tsx @@ -1,7 +1,7 @@ // Copyright 2023-2025 the Deno authors. All rights reserved. MIT license. import type { State } from "@/plugins/session.ts"; import { getUser } from "@/utils/db.ts"; -import IconBrandGithub from "tabler_icons_tsx/brand-github.tsx"; +import IconBrandGithub from "@preact-icons/tb/TbBrandGithub"; import Head from "@/components/Head.tsx"; import GitHubAvatarImg from "@/components/GitHubAvatarImg.tsx"; import ItemsList from "@/islands/ItemsList.tsx"; From ef1ada1710a540867b9357410a883951dbd1add2 Mon Sep 17 00:00:00 2001 From: Asher Gomez Date: Thu, 26 Jun 2025 12:02:49 +1000 Subject: [PATCH 3/3] fixes --- deno.json | 3 --- 1 file changed, 3 deletions(-) diff --git a/deno.json b/deno.json index 4149e9cc..6f827049 100644 --- a/deno.json +++ b/deno.json @@ -20,10 +20,7 @@ "imports": { "@/": "./", "$fresh/": "https://deno.land/x/fresh@1.7.3/", -<<<<<<< preact-icons "@preact-icons/tb": "jsr:@preact-icons/tb@^1.0.14", -======= ->>>>>>> main "preact": "npm:preact@10.22.1", "@std/assert": "jsr:@std/assert@^1.0.13", "@std/datetime": "jsr:@std/datetime@^0.225.5",