Skip to content

Conversation

@moreal
Copy link
Contributor

@moreal moreal commented Jan 26, 2026

Summary

This pull request lets generateCloner (in @fedify/vocab-tools) generate clone(...) function with valid JSDoc. The @options may be for representing @param options because there is a parameter named options.

Related issue

I couldn't find related issue when searching with:

  • label:component/vocab label:component/vocab-tools
  • "@options"
  • "JSDoc"

Changes

  • Let generateCloner function in @fedify/vocab-tools generate clone(...) function with @param options instead @options.
    • Update related snapshots.
  • Let @fedify/vocab-tools run tests in Node.js with --experimental-transform-types flag instead entering in dist directory.
  • Let @fedify/vocab-tools have new scripts test:update_snapshots, test:bun, test:bun:update_snapshots.
  • Introduce mise task test:update_snapshots, mise task test:deno:update_snapshots, mise task test:node:update_snapshots, mise task test:bun:update_snapshots to update snapshots easily.

Benefits

It will let @fedify/vocab-tools generate codes with clone(...) function having valid JSDoc. It might be trivial but it is a good thing to serve codes with valid JSDoc.

Checklist

  • Did you add a changelog entry to the CHANGES.md?
    • Note I didn't update CHANGES.md because @fedify/vocab-tools will be newly introduced in Fedify 2.0. (not released yet)
  • 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 mise test on your machine?

Additional notes

I added test:bun and test:bun:update_snapshots because the class.test.ts.snap looks for testing Bun. In class.test.ts file, there is also a logic to run tests in Bun.

Let @fedify/vocab-tools run tests in Node.js with --experimental-transform-types flag instead entering in dist directory.

It is an experimental flag but other packages already used it (e.g., @fedify/amqp,@fedify/cli, etc).

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @moreal, 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 resolves a JSDoc formatting error within the @fedify/vocab-tools package, ensuring that generated code includes valid parameter documentation for the clone function. Concurrently, it significantly improves the development workflow by providing a unified and streamlined approach to managing and updating snapshot tests across various JavaScript environments.

Highlights

  • JSDoc Correction for generateCloner: The generateCloner function in @fedify/vocab-tools now correctly generates JSDoc for the clone(...) method, changing the invalid @options tag to the proper @param options.
  • Enhanced Snapshot Testing Workflow: New mise task commands and package.json scripts have been introduced to simplify and standardize the process of updating test snapshots across different JavaScript runtimes, including Deno, Node.js, and Bun.
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.

@issues-auto-labeler issues-auto-labeler bot added component/build Build system and packaging component/cli CLI tools related component/testing Testing utilities (@fedify/testing) labels Jan 26, 2026
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 successfully addresses the JSDoc bug in the generateCloner function, ensuring that the generated clone(...) function has valid JSDoc for the options parameter. Additionally, the introduction of new mise tasks for updating snapshots across different environments (Deno, Node.js, Bun) is a valuable improvement to the development workflow, making snapshot management more streamlined.

@codecov
Copy link

codecov bot commented Jan 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

Files with missing lines Coverage Δ
packages/vocab-tools/src/constructor.ts 100.00% <ø> (ø)
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@moreal moreal force-pushed the vocab-tools-fix branch 4 times, most recently from ca73d56 to 2a570ae Compare January 27, 2026 03:29
@moreal moreal marked this pull request as ready for review January 27, 2026 05:00
moreal and others added 2 commits January 27, 2026 18:30
The generateCloner() generated codes used `@options` which is not a valid
JSDoc tag. Changed to `@param options` which is the correct syntax for
documenting function parameters.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
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.

Thanks!

@dahlia dahlia merged commit 6aedee4 into fedify-dev:main Jan 27, 2026
30 of 31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/build Build system and packaging component/cli CLI tools related component/testing Testing utilities (@fedify/testing)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants