Deprecate @fedify/fedify/x/* modules and extract them into separate packages#388
Deprecate @fedify/fedify/x/* modules and extract them into separate packages#388dahlia merged 30 commits intofedify-dev:mainfrom
@fedify/fedify/x/* modules and extract them into separate packages#388Conversation
There was a problem hiding this comment.
Summary of Changes
Hello @2chanhaeng, I'm Gemini Code Assist1! 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 refactors the Fedify project by deprecating tightly coupled framework integrations and storage adapters within the core @fedify/fedify package. These functionalities have been extracted into new, standalone packages, such as @fedify/cfworkers, @fedify/denokv, @fedify/hono, and @fedify/sveltekit. This strategic move aims to enhance the overall modularity of the Fedify ecosystem, allowing for more flexible dependency management and a reduced bundle size for the core library, ultimately improving performance and maintainability. Comprehensive documentation updates accompany these changes, guiding users through the transition to the new package structure.
Highlights
- Deprecation of Internal Modules: The
@fedify/fedify/x/*modules, which previously contained framework integrations and KV/message queue adapters, have been deprecated. Users are advised to migrate to new, dedicated packages for these functionalities. - Extraction into Separate Packages: Key integrations and adapters, including Cloudflare Workers (
@fedify/cfworkers), Deno KV (@fedify/denokv), Hono (@fedify/hono), and SvelteKit (@fedify/sveltekit), have been extracted into their own independent packages. This improves modularity and reduces the core bundle size of@fedify/fedify. - Comprehensive Documentation Updates: All relevant documentation files, including
AGENTS.md,CHANGES.md,CONTRIBUTING.md, and specific integration/KV/MQ manuals, have been updated to reflect the new package structure and provide clear deprecation warnings and migration guidance. - New Package Infrastructure: New package directories have been added for
@fedify/cfworkers,@fedify/denokv,@fedify/hono, and@fedify/sveltekit, each complete with their owndeno.json,package.json, source files, and tests, ensuring independent development and release cycles.
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 in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.
| 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 issue 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 👍 and 👎 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.
Footnotes
-
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. ↩
There was a problem hiding this comment.
Code Review
This pull request effectively deprecates the @fedify/fedify/x/* modules by extracting them into separate packages, which is a great move for modularity and reducing bundle size. The changes are comprehensive, covering documentation, configuration, and the creation of new packages. The implementation of the new packages and the deprecation notices are well-executed. I have a few minor suggestions to improve documentation clarity and consistency.
2chanhaeng
left a comment
There was a problem hiding this comment.
Support for multi-package managers is still difficult for me. There are too many things to care about. 🥲
- Added descriptions to
@fedify/cfworkers,@fedify/hono,@fedify/sveltekitand replacedDeno.testwithnode:testin test code of them. - Deleted configuration file to publish
@fedify/denokvto NPM and removed from pnpm workspace.
|
The docs for this pull request have been published: |
dahlia
left a comment
There was a problem hiding this comment.
- It would be great if each package has its own README.md. The contents could be copied from docs/manual/integration/md.
- Could you add deprecation warnings using LogTape? See also the following pattern:
fedify/packages/fedify/src/federation/middleware.ts
Lines 347 to 350 in caa6bb9
2chanhaeng
left a comment
There was a problem hiding this comment.
- Added
README.mdfor new packages and fixedsince - Log warning for deprecated modules
|
|
The latest push to this pull request has been published to JSR and npm as a pre-release:
|
Summary
Deprecate
@fedify/fedify/x/*modules and extract them into separate packages.Related Issue
@fedify/fedify/x/*modules and extract them into separate packages #375Changes
@fedify/fedify/xinto dedicated packages.packages/fedify/x/*is deprecated and will be gone at v2.Benefits
By the separation,
@fedify/fedifywill improve modularity and reduce bundle size.Checklist
Did you write a regression test to reproduce the bug (if it's a bug fix)?deno task test-allon your machine?Additional Notes
The added package has not been released yet, so it has not been applied to the code in the example. A sub-issue is needed to modify this after the package is released.
Please modify the following code and documentation (there may be more):
README.mddocs/manual/deploy.mddocs/manual/inbox.mddocs/manual/integration.mddocs/manual/kv.mddocs/manual/log.mddocs/manual/mq.mddocs/manual/send.mdexamples/blogfederation/mod.tsroutes/_middleware.tspackages.jsonand other files related to packageexamples/cloudflare-workers/src/index.tspackages.jsonand other files related to packageexamples/hono-samplemain.tspackages.jsonand other files related to packagepackages/cli/src/init.ts