Skip to content

Separated @fedify/fedify/runtime with @fedify/vocab-tools#458

Merged
dahlia merged 71 commits intofedify-dev:nextfrom
2chanhaeng:vocab/tools
Oct 13, 2025
Merged

Separated @fedify/fedify/runtime with @fedify/vocab-tools#458
dahlia merged 71 commits intofedify-dev:nextfrom
2chanhaeng:vocab/tools

Conversation

@2chanhaeng
Copy link
Contributor

Summary

Separated @fedify/fedify/codegen to @fedify/vocab-tools.

Related Issue

Changes

  • Moved files in packages/fedify/src/codegen to packages/vocab-tools.

Benefits

This PR improve modularity and extend Activity Vocabulary with custom types or use the vocabulary in non-Deno environments.

Checklist

  • Did you add a changelog entry to the CHANGES.md?
  • 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)?
  • Did you run deno task test-all on your machine?

Additional Notes

@gemini-code-assist
Copy link
Contributor

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 project's architecture by separating the Activity Vocabulary code generation utilities into a new, independent package named @fedify/vocab-tools. This strategic move aims to improve the overall modularity of the Fedify ecosystem, making it easier to extend the Activity Vocabulary with custom types and enabling the use of these tools in diverse environments beyond Deno. The change involves migrating existing code generation files, updating build configurations, and integrating the new package into the Fedify CLI.

Highlights

  • Code Generation Separation: The code generation logic for Activity Vocabulary, previously located within @fedify/fedify/codegen, has been extracted into a new, dedicated package: @fedify/vocab-tools.
  • Improved Modularity: This refactoring significantly enhances the modularity of the Fedify project, allowing for greater flexibility and reusability of the vocabulary tools across different contexts.
  • Extended Vocabulary Support: The new @fedify/vocab-tools package enables easier extension of Activity Vocabulary with custom types and facilitates its use in non-Deno environments, broadening its applicability.
  • CLI Integration: A new generate-vocab command has been added to the Fedify CLI, which now utilizes the functionalities provided by the @fedify/vocab-tools package for code generation.
  • Dependency Updates: Project dependencies, including @types/node and yaml, have been updated across the monorepo to reflect the new package structure and ensure compatibility.
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 👍 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

  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.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request effectively separates the code generation utilities into a new @fedify/vocab-tools package, which is a great step towards better modularity. The refactoring is well-executed, with most changes involving moving files and updating paths. I've identified a couple of minor issues: a small error in the documentation and a potential unhandled error in the new CLI command. Overall, this is a solid improvement to the project structure.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 11, 2025

The docs for this pull request have been published:

https://297d0f3a.fedify.pages.dev

Copy link
Member

@dahlia dahlia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CLI is broken in Node.js; try the below commands:

cd packages/cli/
pnpm run run
node:internal/modules/package_json_reader:266
  throw new ERR_MODULE_NOT_FOUND(packageName, fileURLToPath(base), null);
        ^

Error [ERR_MODULE_NOT_FOUND]: Cannot find package '@fedify/vocab-tools' imported from /.../packages/cli/dist/generate-vocab/action.js
    at Object.getPackageJSONURL (node:internal/modules/package_json_reader:266:9)
    at packageResolve (node:internal/modules/esm/resolve:767:81)
    at moduleResolve (node:internal/modules/esm/resolve:853:18)
    at defaultResolve (node:internal/modules/esm/resolve:983:11)
    at #cachedDefaultResolve (node:internal/modules/esm/loader:731:20)
    at ModuleLoader.resolve (node:internal/modules/esm/loader:708:38)
    at ModuleLoader.getModuleJobForImport (node:internal/modules/esm/loader:310:38)
    at ModuleJob._link (node:internal/modules/esm/module_job:183:49) {
  code: 'ERR_MODULE_NOT_FOUND'
}

@github-actions
Copy link
Contributor

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.458.1796+f091195d JSR npm
@fedify/cli 2.0.0-pr.458.1796+f091195d JSR npm
@fedify/amqp 2.0.0-pr.458.1796+f091195d JSR npm
@fedify/cfworkers 2.0.0-pr.458.1796+f091195d JSR npm
@fedify/denokv 2.0.0-pr.458.1796+f091195d JSR
@fedify/elysia 2.0.0-pr.458.1796+f091195d npm
@fedify/express 2.0.0-pr.458.1796+f091195d JSR npm
@fedify/h3 2.0.0-pr.458.1796+f091195d JSR npm
@fedify/hono 2.0.0-pr.458.1796+f091195d JSR npm
@fedify/koa 2.0.0-pr.458.1796+f091195d JSR npm
@fedify/nestjs 2.0.0-pr.458.1796+f091195d npm
@fedify/next 2.0.0-pr.458.1796+f091195d npm
@fedify/postgres 2.0.0-pr.458.1796+f091195d JSR npm
@fedify/redis 2.0.0-pr.458.1796+f091195d JSR npm
@fedify/sqlite 2.0.0-pr.458.1796+f091195d JSR npm
@fedify/sveltekit 2.0.0-pr.458.1796+f091195d JSR npm
@fedify/testing 2.0.0-pr.458.1796+f091195d JSR npm

Copy link
Contributor Author

@2chanhaeng 2chanhaeng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Fixed schema.yaml to be added to the build file
  • Added path-related arguments to generate-vocab

@dahlia dahlia added this to the Fedify 2.0 milestone Oct 13, 2025
@dahlia dahlia merged commit 8d28418 into fedify-dev:next Oct 13, 2025
9 of 10 checks passed
dahlia added a commit that referenced this pull request Oct 13, 2025
Documents the extraction of vocabulary code generation tools from the main
@fedify/fedify package into the new @fedify/vocab-tools package, and the
addition of the `fedify generate-vocab` CLI command.

This addresses #444 and documents changes from #458.

Co-Authored-By: Claude <noreply@anthropic.com>
dahlia added a commit that referenced this pull request Oct 13, 2025
Separated `@fedify/fedify/runtime` with `@fedify/vocab-tools`
@2chanhaeng 2chanhaeng deleted the vocab/tools branch October 13, 2025 07:13
@dahlia dahlia added the component/vocab-tools Vocabulary code generation (@fedify/vocab-tools) label Jan 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/vocab-tools Vocabulary code generation (@fedify/vocab-tools)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants