Skip to content

Migrate Fresh from 1.6.8 to 2.1.3 and move to JSR packages#16

Closed
Copilot wants to merge 6 commits intomainfrom
copilot/update-deno-fresh-and-migrate-dependencies
Closed

Migrate Fresh from 1.6.8 to 2.1.3 and move to JSR packages#16
Copilot wants to merge 6 commits intomainfrom
copilot/update-deno-fresh-and-migrate-dependencies

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Oct 30, 2025

Fresh 2.x moved from deno.land/x to JSR and requires npm packages for Preact. This PR migrates all imports and configurations to Fresh 2.1.3.

Changes

Fresh Framework

  • Updated from deno.land/x/fresh@1.6.8 to jsr:@fresh/core@^2.1.3
  • Changed all $fresh/* imports to fresh/* (22 files: routes, islands, components)
  • Added specific import mappings: fresh/server, fresh/dev, fresh/runtime

Preact Dependencies

  • Migrated from esm.sh to npm packages (Fresh 2.x requirement)
    • preact@^10.27.2
    • @preact/signals@^2.3.2

Configuration

  • Updated compiler options for JSX precompilation with skip elements
  • Added nodeModulesDir: "auto" for npm package handling
  • Updated update-fresh task to use jsr:@fresh/update
  • Updated CI to use Deno 2.x instead of 1.x

Before/After

- import { Handlers, PageProps } from "$fresh/server.ts";
+ import { Handlers, PageProps } from "fresh/server";

- "compilerOptions": { "jsx": "react-jsx" }
+ "compilerOptions": { 
+   "jsx": "precompile",
+   "jsxPrecompileSkipElements": ["a", "img", "source", ...]
+ }

- deno-version: [1.x]
+ deno-version: [2.x]

Deferred Migrations

The following deno.land/x packages remain and should be evaluated for JSR migration when access is available:

  • sqlite3@0.11.1 - potential @db/sqlite candidate
  • xml@2.1.3 - check for JSR alternatives
  • fresh_seo@1.0.1, localekit_fresh@0.5.2 - need Fresh 2.x compatibility verification

Testing Notes

⚠️ JSR registry access required for dependency resolution. All import paths and configurations are correct for Fresh 2.1.3. See FRESH_2_MIGRATION.md for testing checklist.

> [!WARNING]
>
>

Original prompt

Update Deno Fresh to latest (2.1), then migrate dependencies from deno.land/x to jsr where possible


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@Hexagon
Copy link
Copy Markdown
Owner

Hexagon commented Oct 30, 2025

@copilot Also update ci to use deno 2.x instead of 1

Copilot AI and others added 4 commits October 30, 2025 00:55
Co-authored-by: Hexagon <419737+Hexagon@users.noreply.github.com>
Co-authored-by: Hexagon <419737+Hexagon@users.noreply.github.com>
Co-authored-by: Hexagon <419737+Hexagon@users.noreply.github.com>
Co-authored-by: Hexagon <419737+Hexagon@users.noreply.github.com>
Copilot AI changed the title [WIP] Update Deno Fresh to version 2.1 and migrate dependencies Migrate Fresh from 1.6.8 to 2.1.3 and move to JSR packages Oct 30, 2025
Copilot AI requested a review from Hexagon October 30, 2025 01:00
Co-authored-by: Hexagon <419737+Hexagon@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Oct 30, 2025

@copilot Also update ci to use deno 2.x instead of 1

Updated CI to use Deno 2.x in f44d53a. The workflow now uses deno-version: [2.x] instead of [1.x].

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants