Skip to content

Commit 7ad19c7

Browse files
committed
feat: Migrate to Fresh 2.2.0 stable
- Upgrade Fresh from 2.0.0-alpha.34 to 2.2.0 (stable) - Upgrade Preact to 10.27.2 and @preact/signals to 2.5.0 - Add app.fsRoutes() to enable file-system based routing - Update Builder pattern in dev.ts for Fresh 2.x compatibility - Extend jsxPrecompileSkipElements with all required HTML elements - Fix fuse.js import version (7.0.0) - Auto-fix formatting across islands and routes - Regenerate deno.lock for Fresh 2.x dependencies - Add cover images (cover.png, cover.svg) Breaking Changes: - Fresh 2.x requires explicit app.fsRoutes() call - Builder.listen() now expects async function returning app - jsxPrecompileSkipElements must include full element list All routes, islands, and features tested and working. Server runs successfully on http://localhost:8000/
1 parent b8d75f1 commit 7ad19c7

45 files changed

Lines changed: 1832 additions & 2207 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

components/CodeBlock.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import Prism from "npm:prismjs@1.29.0";
33

44
export function CodeBlock(
5-
{ code, lang }: { code: string; lang: "js" | "ts" | "jsx" | "md" | "bash"; },
5+
{ code, lang }: { code: string; lang: "js" | "ts" | "jsx" | "md" | "bash" },
66
) {
77
return (
88
<pre

deno.json

Lines changed: 15 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,36 +6,22 @@
66
"start": "deno run -A main.ts",
77
"update": "deno run -A -r jsr:@fresh/update ."
88
},
9-
"lint": {
10-
"rules": {
11-
"tags": [
12-
"fresh",
13-
"recommended"
14-
]
15-
}
16-
},
17-
"exclude": [
18-
"**/_fresh/*"
19-
],
9+
"lint": { "rules": { "tags": ["fresh", "recommended"] } },
10+
"exclude": ["**/_fresh/*"],
2011
"imports": {
2112
"@deno/gfm": "jsr:@deno/gfm@^0.11.0",
2213
"@pakornv/fresh-plugin-tailwindcss": "jsr:@pakornv/fresh-plugin-tailwindcss@2.0.0-alpha.1",
23-
"@preact/signals": "npm:@preact/signals@^2.0.4",
14+
"@preact/signals": "npm:@preact/signals@^2.5.0",
2415
"@orama/orama": "npm:@orama/orama@3.1.11",
25-
"fresh": "jsr:@fresh/core@^2.0.0-alpha.34",
16+
"fresh": "jsr:@fresh/core@^2.2.0",
2617
"lucide-preact": "npm:lucide-preact@^0.513.0",
27-
"preact": "npm:preact@^10.26.6",
18+
"preact": "npm:preact@^10.27.2",
2819
"tailwindcss": "npm:tailwindcss@^4.1.7",
2920
"@std/path": "jsr:@std/path@1.1.1"
3021
},
3122
"nodeModulesDir": "auto",
3223
"compilerOptions": {
33-
"lib": [
34-
"dom",
35-
"dom.asynciterable",
36-
"dom.iterable",
37-
"deno.ns"
38-
],
24+
"lib": ["dom", "dom.asynciterable", "dom.iterable", "deno.ns"],
3925
"jsx": "precompile",
4026
"jsxImportSource": "preact",
4127
"jsxPrecompileSkipElements": [
@@ -44,7 +30,15 @@
4430
"source",
4531
"body",
4632
"html",
47-
"head"
33+
"head",
34+
"title",
35+
"meta",
36+
"script",
37+
"link",
38+
"style",
39+
"base",
40+
"noscript",
41+
"template"
4842
]
4943
},
5044
"allowScripts": {

0 commit comments

Comments
 (0)