Skip to content

RC 256#257

Merged
rmenner merged 1 commit into
mainfrom
rc/256
Jan 2, 2026
Merged

RC 256#257
rmenner merged 1 commit into
mainfrom
rc/256

Conversation

@rmenner

@rmenner rmenner commented Jan 2, 2026

Copy link
Copy Markdown
Collaborator

Alaska Airlines Pull Request

Checklist:

  • My update follows the CONTRIBUTING guidelines of this project
  • I have performed a self-review of my own update

By submitting this Pull Request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Pull Requests will be evaluated by their quality of update and whether it is consistent with the goals and values of this project. Any submission is to be considered a conversation between the submitter and the maintainers of this project and may require changes to your submission.

Thank you for your submission!

-- Auro Design System Team

Summary by Sourcery

Bug Fixes:

  • Update docs generator to emit a return field instead of returnType for method return information to match the expected schema.

@rmenner
rmenner requested a review from a team as a code owner January 2, 2026 21:39
@sourcery-ai

sourcery-ai Bot commented Jan 2, 2026

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Updates the docs generator to output a return field instead of returnType for class members, aligning the generated documentation structure with an expected schema change.

Class diagram for updated docs generator member output structure

classDiagram
  class Docs {
    +generateDocs()
  }

  class ClassMember {
    <<interface>>
  }

  class ClassMemberOutput {
    +parameters Parameter[]
    +return string
  }

  class Parameter {
    +name string
    +type string
  }

  Docs --> ClassMember : reads
  Docs --> Parameter : uses
  Docs --> ClassMemberOutput : maps_to

  %% Previous structure (for comparison)
  class ClassMemberOutputOld {
    +parameters Parameter[]
    +returnType string
  }

  ClassMemberOutputOld <|-- ClassMemberOutput : replaces_returnType_with_return
Loading

File-Level Changes

Change Details Files
Adjust method metadata mapping so the generated docs include a return property instead of returnType.
  • In the class member mapping, replace the returnType property key with return while preserving the logic that derives its value from getType(m.return) when present
  • Ensure that for members without a return value, the return field is an empty string to match previous behavior
src/scripts/docs/docs-generator.ts

Assessment against linked issues

Issue Objective Addressed Explanation
#256 Correct the property name used for method return types in the docs generator's methods table rendering.

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@rmenner rmenner linked an issue Jan 2, 2026 that may be closed by this pull request

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hey - I've found 1 issue, and left some high level feedback:

  • This change renames the mapped field from returnType to return, so double-check that all downstream consumers (e.g., templates or generators) expect return and are updated accordingly to avoid runtime breakage.
  • Using return as an object key can be slightly confusing given the reserved keyword, so consider choosing a more descriptive property name (e.g., returnType or returnValueType) for clarity.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- This change renames the mapped field from `returnType` to `return`, so double-check that all downstream consumers (e.g., templates or generators) expect `return` and are updated accordingly to avoid runtime breakage.
- Using `return` as an object key can be slightly confusing given the reserved keyword, so consider choosing a more descriptive property name (e.g., `returnType` or `returnValueType`) for clarity.

## Individual Comments

### Comment 1
<location> `src/scripts/docs/docs-generator.ts:149` </location>
<code_context>
           ...m,
           parameters: renderParameters('parameters' in m ? m.parameters as Parameter[] : undefined),
-          returnType: 'return' in m && m.return ? getType(m.return) : "",
+          return: 'return' in m && m.return ? getType(m.return) : "",
         })),
     );
</code_context>

<issue_to_address>
**issue (bug_risk):** Overwriting `m.return` with a string may discard the original return metadata.

This used to add a `returnType` field while preserving `m.return`. Now it overwrites `m.return` with the string from `getType(m.return)`, which may break consumers that rely on `m.return` being the original metadata object. If you only need the type string for templates, consider keeping `returnType` or storing it under a new property and leaving `m.return` unchanged.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment thread src/scripts/docs/docs-generator.ts
@rmenner
rmenner merged commit 04254f8 into main Jan 2, 2026
15 checks passed
@rmenner
rmenner deleted the rc/256 branch January 2, 2026 21:42
@jason-capsule42

Copy link
Copy Markdown
Member

🎉 This PR is included in version 3.5.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@jason-capsule42 jason-capsule42 added the released Completed work has been released label Jan 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released Completed work has been released semantic-status: fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RC 2026-01-02

3 participants