-
-
Notifications
You must be signed in to change notification settings - Fork 89
Fix several JSDoc typos and incorrect references #539
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
a89bdeb to
9a44eae
Compare
Summary of ChangesHello @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 focuses on enhancing the accuracy and consistency of JSDoc comments and internal documentation across various packages. The changes primarily involve correcting typos, updating references to types and parameters, and refining descriptions to ensure that the generated API documentation precisely reflects the codebase. This improves developer understanding and reduces potential confusion when interacting with the library's interfaces. Highlights
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this 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 addresses several JSDoc typos and incorrect references across various packages. The changes improve the accuracy and clarity of the API documentation, which is crucial for developer understanding and consistency with the actual code behavior. All identified issues are minor documentation fixes, and the changes appear correct.
| /** | ||
| * Converts a handle in the format `@username@domain` to a URL. | ||
| * The resulting URL will be in the format `https://domain/@username`. | ||
| * The resulting URL will be in the format `acct:username@domain`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| * ```ts | ||
| * const url = convertHandleToUrl("@[email protected]"); | ||
| * console.log(url.toString()); // "https://domain.com/@username" | ||
| * console.log(url.toString()); // "acct:username@domain.com" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The example in the JSDoc for convertHandleToUrl was updated to show the correct acct:[email protected] URI format. This ensures the example is consistent with the function's behavior.
|
|
||
| /** | ||
| * {@inheritDoc KvStore.set} | ||
| * {@inheritDoc KvStore.get} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| * @param values The values to pass to the object dispatcher. | ||
| * @returns The object's URI. | ||
| * @throws {RouteError} If no object dispatcher is available for the class. | ||
| * @throws {RouterError} If no object dispatcher is available for the class. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
|
||
| /** | ||
| * Sends an activity to the outboxes of the sender's followers. | ||
| * Sends an activity to the inboxes of the sender's followers. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| * | ||
| * The created loader preloads the below frequently used contexts by default | ||
| * (unless `options.ignorePreloadedContexts` is set to `true`): | ||
| * (unless `options.skipPreloadedContexts` is set to `true`): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| * @param value A string value written in the given language. | ||
| * @param locale The language of the string. If a string is given, it will | ||
| * be parsed as a `Intl.Locale` object. | ||
| * @param language The language of the string. If a string is given, it will |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| * Loads all schema files in the directory. | ||
| * @param dir The path of the directory to load schema files from. | ||
| * @returns A map from the qualified URI of a type to its {@link SchemaFile}. | ||
| * @returns A map from the qualified URI of a type to its {@link TypeSchema}. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| * AbortSignal for cancelling the request. | ||
| * @since 1.8.0 | ||
| * @ | ||
| */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codecov Report❌ Patch coverage is
... and 1 file with indirect coverage changes 🚀 New features to boost your workflow:
|
|
I'll mark as ready-for-review when passing CI. Now, it fails. |
9a44eae to
b262895
Compare
9788bf9 to
1a6a543
Compare
The JSDoc for the sendActivity overload that sends to followers incorrectly stated it sends activities to "outboxes" of followers. In ActivityPub, activities are always delivered to recipients' inboxes, not outboxes. Outboxes are where an actor's own activities are published for others to read, while inboxes receive activities from other actors. This typo was introduced in commit fabad8f ("Followers collection synchronization") on April 25, 2024. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
The JSDoc comment for getDocumentLoader() incorrectly mentioned `options.ignorePreloadedContexts` when the actual option name has always been `skipPreloadedContexts`. This typo was introduced in commit cfe509f (2024-11-04) when the getDocumentLoader function and GetDocumentLoaderOptions interface were added. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
The JSDoc for the LanguageString constructor documented the second parameter as `@param locale`, but the actual parameter is named `language`. This mismatch was introduced when migrating from LanguageTag to Intl.Locale, where the property was renamed but the constructor parameter name remained `language`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
The JSDoc `@returns` tag incorrectly referenced ``{@link SchemaFile}``, which
is a non-existent type. The actual return type is `Record<string, TypeSchema>`,
so the correct reference should be ``{@link TypeSchema}``.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <[email protected]>
The get() method's JSDoc incorrectly referenced KvStore.set instead of KvStore.get. This was a copy-paste error that has been present since the denokv adapter was created. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
The JSDoc incorrectly stated that the resulting URL would be in the format `https://domain/@username`, but the implementation uses `toAcctUrl()` which produces `acct:username@domain` format per RFC 7565. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
The signal property's JSDoc comment contained an orphan '@' symbol on its own line without a valid tag name. This is invalid JSDoc syntax. This malformed tag was introduced in commit 2597d81 (2025-08-03) when adding `@since` 1.8.0 annotation for AbortSignal. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
- JSDoc comments incorrectly referenced RouteError but the actual error class is RouterError - Renamed throwRouteError() helper functions to throwRouterError() to match the error class they throw 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
1a6a543 to
ee594f3
Compare
dahlia
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Summary
Fix various JSDoc typos and incorrect references across multiple packages.
Related issue
Changes
RouteErrorreferences toRouterErrorin JSDoc comments and internal function names in packages/fedify/src/federation/context.ts, packages/fedify/src/federation/federation.ts, packages/fedify/src/testing/context.ts, and packages/testing/src/context.ts@paramname mismatch fromlocaletolanguagein packages/vocab-runtime/src/langstr.ts#LanguageString.constructorContext.sendActivityfrom "outboxes" to "inboxes" in packages/fedify/src/federation/context.ts#Context.sendActivitySchemaFiletoTypeSchemain packages/vocab-tools/src/schema.ts#loadSchemaFilesoptions.ignorePreloadedContextstooptions.skipPreloadedContextsin packages/vocab-runtime/src/docloader.ts#getDocumentLoader{@inheritDoc}reference fromKvStore.settoKvStore.getin packages/denokv/src/mod.ts#DenoKvStore.getconvertHandleToUrl()to show correctacct:URI format in packages/cli/src/webfinger/lib.ts#convertHandleToUrl@symbol from JSDoc in packages/webfinger/src/lookup.ts#LookupWebFingerOptions.signalBenefits
Checklist
(N/A - documentation and internal testing functions-only changes)
(N/A - documentation and internal testing functions-only changes)
(N/A - documentation and internal testing functions-only changes)
(N/A - documentation and internal testing functions-only changes)
mise teston your machine?Additional notes
This PR contains documentation and testing internal-only changes (JSDoc comments) with no runtime behavior changes.