Skip to content

RC 2025-10-02#361

Merged
rmenner merged 7 commits into
mainfrom
rc/1
Oct 2, 2025
Merged

RC 2025-10-02#361
rmenner merged 7 commits into
mainfrom
rc/1

Conversation

@DukeFerdinand

@DukeFerdinand DukeFerdinand commented Oct 2, 2025

Copy link
Copy Markdown
Contributor

Alaska Airlines Pull Request

Resolves: AlaskaAirlines/auro-cli#157

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

Upgrade auro-button repository to 2025 standards by migrating to the auro-cli build system, simplifying package configuration, standardizing code style, refreshing documentation templates, and reusing shared GitHub workflows.

New Features:

  • Add src/index.js export entrypoint and define package exports for distributed artifacts
  • Simplify build/test/dev scripts to use auro commands via auro-cli and auro-config
  • Introduce reusable GitHub workflow configurations from AlaskaAirlines/auro-actions

Enhancements:

  • Migrate package.json to version 0.0.0 placeholder, update dependencies to latest Auro packages, and prune legacy scripts
  • Standardize code formatting across source and test files (double quotes, trailing commas, destructuring)
  • Replace custom README and documentation partials with auro-templates sources

CI:

  • Remove bespoke CodeQL and release workflows in favor of external reusable workflows for PRs, releases, checks, and demos

Documentation:

  • Refresh README and docs partials to point at updated auro-templates URLs

Tests:

  • Update test assertions and formatting to align with code style changes

Chores:

  • Refactor a11y utilities and AuroElement to use transportAllA11yAttributes for attribute forwarding

jason-capsule42 and others added 7 commits October 2, 2025 11:01
- Added @aurodesignsystem/auro-config.
- Added new configs pointing to auro-config.
- Replaced esLint and scssLint scripts with a unified lint command using biome and stylelint.

AlaskaAirlines/auro-cli#107
BREAKING CHANGE:
Package exports have changed. To access the component class add /class to the end of the import. See "exports" in the package.json for more details.

AlaskaAirlines/auro-cli#108
AlaskaAirlines/auro-cli#109
AlaskaAirlines/auro-cli#110
AlaskaAirlines/auro-cli#111
Workflows added/updated:
- add-project
- check-commits
- check-pr
- codeql
- dev-demo
- pull-request
- release
- sync-tags

AlaskaAirlines/auro-cli#106
@DukeFerdinand DukeFerdinand self-assigned this Oct 2, 2025
@sourcery-ai

sourcery-ai Bot commented Oct 2, 2025

Copy link
Copy Markdown
Contributor

Reviewer's Guide

This PR overhauls the repo for the 2025 upgrade by migrating to the new Auro CLI build system, restructuring package and workflow configurations, standardizing code style, and updating component exports, demos, accessibility utilities, and documentation templates to align with the new project conventions.

Class diagram for updated AuroButton and AuroElement structure

classDiagram
  class AuroElement {
    +layout: String
    +shape: String
    +size: String
    +onDark: Boolean
    +wrapper: HTMLElement
    +attributeWatcher
    +resetShapeClasses()
    +resetLayoutClasses()
    +updateComponentArchitecture()
    +firstUpdated()
    +disconnectedCallback()
    +getLayout(layout: String)
    +render()
  }

  class AuroButton {
    +shape: String
    +onDark: Boolean
    +fluid: Boolean
    +loadingText: String
    +variant: String
    +internals
    +loaderTag
    +runtimeUtils
    +focus()
    +surfaceSubmitEvent()
    +get currentAriaLabelledBy
    +getFontSize()
    +firstUpdated()
    +onPointerEvent(event)
    +renderLayoutDefault()
    +render()
    +static get styles()
    +static get properties()
  }

  AuroButton --|> AuroElement
Loading

Class diagram for accessibility utilities update

classDiagram
  class transportAttributes {
    +transportAttributes({host, target, match, removeOriginal})
  }
  class a11yUtilities {
    +transportAriaAttributes({host, target, removeOriginal})
    +transportRoleAttributes({host, target, removeOriginal})
    +transportAllA11yAttributes({host, target, removeOriginal})
  }
  a11yUtilities ..> transportAttributes
Loading

File-Level Changes

Change Details Files
Rework package.json for CLI-based build and consumption
  • Bump version to 0.0.0 and switch main/types entry to dist outputs
  • Replace legacy devDependencies with @aurodesignsystem/auro-cli, config, and updated libraries
  • Simplify scripts to use auro commands and define exports/files for package consumers
  • Update engines, add publishConfig, and remove obsolete fields
package.json
Consolidate and externalize GitHub workflow configurations
  • Replace in-repo CodeQL job with external action include
  • Add new PR, release, check-commits, sync-tags, dev-demo, and add-project workflows
  • Standardize workflow names and trigger filters
.github/workflows/codeql.yml
.github/workflows/*.yml
Introduce unified entrypoints and adjust demo imports
  • Add src/index.js to export AuroButton from a single entrypoint
  • Add src/registered.js for class‐based registration
  • Update demo/index.js and demo/api.js to import from new entrypoints
  • Adjust apiExamples imports to use double quotes
src/index.js
src/registered.js
demo/index.js
demo/api.js
apiExamples/roundedRightAlign.js
apiExamples/toggledText.js
Refactor accessibility utilities for transportAttributes
  • Destructure parameters with consistent formatting and trailing commas
  • Normalize matcher definitions and arrow function usage
  • Unify quotes and formatting in transportAttributes and a11yUtilities APIs
src/layoutElement/transportAttributes.js
src/layoutElement/a11yUtilities.js
Modernize component code and standardize style
  • Update AuroButton and AuroElement: refine property definitions, methods, and import paths
  • Unify quotes, trailing commas, and arrow function parentheses throughout component code
  • Update test suite formatting to match code style (double quotes, trailing commas)
src/auro-button.js
src/layoutElement/auroElement.js
test/auro-button.test.js
Refresh documentation templates and API spec
  • Update README to reference new template URLs and remove obsolete sections
  • Adjust docs partials to point at auro-templates paths
  • Add Methods section to docs/api.md for new component methods
README.md
docs/api.md
docs/partials/index.md
docs/partials/useCases.md

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

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hey there - I've reviewed your changes - here's some feedback:

  • Double-check that replacing all custom build/dev/test scripts with the auro CLI commands preserves the full developer workflow and CI builds.
  • Validate that the new exports map and updated main/types fields in package.json resolve correctly for both ESM and CJS consumers.
  • Ensure the version reset to 0.0.0 is intentional for this breaking upgrade and plan the next semantic version bump before publishing.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Double-check that replacing all custom build/dev/test scripts with the `auro` CLI commands preserves the full developer workflow and CI builds.
- Validate that the new exports map and updated `main`/`types` fields in package.json resolve correctly for both ESM and CJS consumers.
- Ensure the version reset to `0.0.0` is intentional for this breaking upgrade and plan the next semantic version bump before publishing.

## Individual Comments

### Comment 1
<location> `src/layoutElement/transportAttributes.js:34-38` </location>
<code_context>
+  match,
+  removeOriginal = true,
+}) => {
   // Guard Clause: Ensure host is valid HTMLElement instance
-  if (typeof host !== 'object' || !(host instanceof HTMLElement)) {
-    throw new TypeError('a11yUtilities.js | transportAttributes | The "host" parameter must be an instance of HTMLElement.');
+  if (typeof host !== "object" || !(host instanceof HTMLElement)) {
+    throw new TypeError(
+      'a11yUtilities.js | transportAttributes | The "host" parameter must be an instance of HTMLElement.',
+    );
   }

</code_context>

<issue_to_address>
**nitpick:** Error messages reference a11yUtilities.js instead of transportAttributes.js.

Referencing the incorrect file name in error messages may mislead developers during debugging.
</issue_to_address>

### Comment 2
<location> `src/layoutElement/a11yUtilities.js:5` </location>
<code_context>
 import { transportAttributes } from "./transportAttributes.js";

 const _matchers = {
-  'aria-': attr => attr.startsWith('aria-'),
-  'role': attr => attr.match(/^role$/)
+  "aria-": (attr) => attr.startsWith("aria-"),
+  role: (attr) => attr.match(/^role$/),
 };

</code_context>

<issue_to_address>
**suggestion:** Using attr.match for exact string comparison is less efficient than ===.

Consider replacing attr.match(/^role$/) with attr === 'role' for better performance and readability.

```suggestion
  role: (attr) => attr === "role",
```
</issue_to_address>

### Comment 3
<location> `src/layoutElement/auroElement.js:73-85` </location>
<code_context>
    if (this.shape && this.size) {
      if (this.wrapper) {
        this.wrapper.classList.forEach((className) => {
          if (className.startsWith("shape-")) {
            this.wrapper.classList.remove(className);
          }
        });

        this.wrapper.classList.add(
          `shape-${this.shape.toLowerCase()}-${this.size.toLowerCase()}`,
        );
      }
    }

</code_context>

<issue_to_address>
**suggestion (code-quality):** Merge nested if conditions ([`merge-nested-ifs`](https://docs.sourcery.ai/Reference/Rules-and-In-Line-Suggestions/JavaScript/Default-Rules/merge-nested-ifs))

```suggestion
    if (this.shape && this.size && this.wrapper) {
          this.wrapper.classList.forEach((className) => {
            if (className.startsWith("shape-")) {
              this.wrapper.classList.remove(className);
            }
          });

          this.wrapper.classList.add(
            `shape-${this.shape.toLowerCase()}-${this.size.toLowerCase()}`,
          );
    }

```

<br/><details><summary>Explanation</summary>Reading deeply nested conditional code is confusing, since you have to keep track of which
conditions relate to which levels. We therefore strive to reduce nesting where
possible, and the situation where two `if` conditions can be combined using
`and` is an easy win.
</details>
</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/layoutElement/transportAttributes.js
Comment thread src/layoutElement/a11yUtilities.js
Comment thread src/layoutElement/auroElement.js
@github-actions

github-actions Bot commented Oct 2, 2025

Copy link
Copy Markdown

🚨 Breaking Change Review Policy

This PR contains breaking changes and requires at least 2 approving reviews to be merged.

Approvals: 1 of 2

@github-actions

github-actions Bot commented Oct 2, 2025

Copy link
Copy Markdown

🎉 This PR is included in version 12.0.0-rc-1.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@rmenner rmenner changed the title BREAKING Repo upgrade 2025 RC 2025-10-02 Oct 2, 2025
@rmenner
rmenner merged commit 335a83c into main Oct 2, 2025
17 of 19 checks passed
@rmenner
rmenner deleted the rc/1 branch October 2, 2025 18:28
@github-actions

github-actions Bot commented Oct 2, 2025

Copy link
Copy Markdown

🎉 This PR is included in version 12.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions Bot added the released Completed work has been released label Oct 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Batch 2

3 participants