Add `@fedify/fresh` package for Fresh 2.0 integration
Summary
This PR introduces a new @fedify/fresh package that provides seamless integration between Fedify and Fresh 2.0, replacing the deprecated @fedify/fedify/x/fresh module that was designed for Fresh 1.x.
Related Issue
- closes #466
Changes
- Created new @fedify/fresh package with Fresh 2.0 compatible middleware
- Added Fresh 2.0 example application.
- Updated documentation in docs/manual/integration.md
- Changes root
deno.json'snodeModulesDirfield toautofrom 'none`.
Benefits
- Fresh 2.0 compatibility
- Future-proof: Aligns with Fresh's modern architecture and Vite-based build system
- Clear migration path: Documentation provides examples for migrating from the deprecated
@fedify/fedify/x/freshmodule
Checklist
- [x] Did you add a changelog entry to the CHANGES.md?
- [x] Did you write some relevant docs about this change (if it's a new feature)?
- [ ] Did you write a regression test to reproduce the bug (if it's a bug fix)?
- [ ] Did you write some tests for this change (if it's a new feature)?
- [x] Did you run
deno task test-allon your machine?
Additional Notes
- The package only supports Fresh 2.0+; users on Fresh 1.x should continue using @fedify/fedify/x/fresh until they upgrade
- Due to a CJS issue with the
multicodecdependency, users must externalize @fedify/fedify in theirvite.config.ts(documented in the integration guide) - Due to an unknown error, the preact frontend of examples doesn't work.
Summary of Changes
Hello @dodok8, I'm Gemini Code Assist[^1]! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
This pull request significantly enhances Fedify's compatibility by introducing a dedicated integration package for Fresh 2.0. This update ensures that developers can leverage Fedify's capabilities within the modern Fresh framework, complete with an example application and updated documentation to guide the transition from older Fresh versions.
Highlights
- New Fresh 2.0 Integration Package: Introduced a new
@fedify/freshpackage to provide seamless integration with Fresh 2.0, replacing the previously deprecated module designed for Fresh 1.x. - Fresh 2.0 Example Application: Added a comprehensive example application demonstrating how to use Fedify with Fresh 2.0, including middleware setup and configuration.
- Updated Documentation: The
docs/manual/integration.mdfile has been updated with detailed instructions and code examples for integrating Fedify with Fresh 2.0, including a necessary workaround for amulticodecCJS issue. - Dependency Updates: Numerous dependencies in
deno.lockhave been updated and new ones added to support Fresh 2.0, Preact, Vite, and Babel, ensuring compatibility with the latest ecosystem.
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.
| Feature | Command | Description |
|---|---|---|
| Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
| Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
| Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in pull request comments and review comments. |
| Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with :thumbsup: and :thumbsdown: on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
[^1]: Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.
Summary of Changes
Hello @dodok8, I'm Gemini Code Assist[^1]! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
This pull request significantly enhances Fedify's compatibility with the Fresh framework by introducing a dedicated integration package for Fresh 2.0. This update ensures that Fedify users can leverage the latest features and architecture of Fresh, providing a robust and future-proof solution for building federated applications on Deno.
Highlights
- New Fresh 2.0 Integration Package: Introduced a new
@fedify/freshpackage to provide seamless integration between Fedify and Fresh 2.0, replacing the older, now deprecated, Fresh 1.x module. - Fresh 2.0 Example Application: Added a comprehensive example application demonstrating how to use Fedify with Fresh 2.0, including middleware setup and basic functionality.
- Updated Documentation: The integration manual (
docs/manual/integration.md) has been updated with detailed instructions and code examples for setting up Fedify with Fresh 2.0. - CJS Dependency Workaround: Addressed a known CJS issue with the
multicodecdependency by documenting the necessity to externalize@fedify/fedifyinvite.config.tsfor Fresh 2.0 projects.
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.
| Feature | Command | Description |
|---|---|---|
| Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
| Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
| Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in pull request comments and review comments. |
| Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with :thumbsup: and :thumbsdown: on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
[^1]: Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.
Summary of Changes
Hello @dodok8, I'm Gemini Code Assist[^1]! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
This pull request introduces a new package, @fedify/fresh, to facilitate integration between Fedify and Fresh 2.0. It includes an example application and updated documentation, ensuring compatibility with Fresh's modern architecture. The changes address issue #466 and provide a clear migration path for users upgrading from Fresh 1.x.
Highlights
- New Package: Introduces the
@fedify/freshpackage, providing integration between Fedify and Fresh 2.0, replacing the deprecated@fedify/fedify/x/freshmodule. - Example Application: Adds a Fresh 2.0 example application to demonstrate the usage of the new package.
- Documentation Update: Updates the documentation in
docs/manual/integration.mdto reflect the changes and provide a migration path. - Configuration Note: Documents the requirement to externalize
@fedify/fedifyinvite.config.tsdue to a CJS issue with themulticodecdependency.
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.
| Feature | Command | Description |
|---|---|---|
| Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
| Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
| Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in pull request comments and review comments. |
| Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with :thumbsup: and :thumbsdown: on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
[^1]: Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests. :white_check_mark: All tests successful. No failed tests found.
:rocket: New features to boost your workflow:
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
@dodok8 Looks like there's a conflict with the next branch. Could you please do a rebase?
The latest push to this pull request has been published to JSR and npm as a pre-release:
| Package | Version | JSR | npm |
|---|---|---|---|
| @fedify/fedify | 2.0.0-pr.478.1918+b54c0fbd | JSR | npm |
| @fedify/cli | 2.0.0-pr.478.1918+b54c0fbd | JSR | npm |
| @fedify/amqp | 2.0.0-pr.478.1918+b54c0fbd | JSR | npm |
| @fedify/cfworkers | 2.0.0-pr.478.1918+b54c0fbd | JSR | npm |
| @fedify/denokv | 2.0.0-pr.478.1918+b54c0fbd | JSR | |
| @fedify/elysia | 2.0.0-pr.478.1918+b54c0fbd | npm | |
| @fedify/express | 2.0.0-pr.478.1918+b54c0fbd | JSR | npm |
| @fedify/h3 | 2.0.0-pr.478.1918+b54c0fbd | JSR | npm |
| @fedify/hono | 2.0.0-pr.478.1918+b54c0fbd | JSR | npm |
| @fedify/koa | 2.0.0-pr.478.1918+b54c0fbd | JSR | npm |
| @fedify/nestjs | 2.0.0-pr.478.1918+b54c0fbd | npm | |
| @fedify/next | 2.0.0-pr.478.1918+b54c0fbd | npm | |
| @fedify/postgres | 2.0.0-pr.478.1918+b54c0fbd | JSR | npm |
| @fedify/redis | 2.0.0-pr.478.1918+b54c0fbd | JSR | npm |
| @fedify/sqlite | 2.0.0-pr.478.1918+b54c0fbd | JSR | npm |
| @fedify/sveltekit | 2.0.0-pr.478.1918+b54c0fbd | JSR | npm |
| @fedify/testing | 2.0.0-pr.478.1918+b54c0fbd | JSR | npm |
I fixed the blank screen issue in commit 4cb9fdaf9387ec91ca58d433b73e05cd90549e5f