-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat: update auro-library to 3.0.1 #36
Conversation
Reviewer's Guide by SourceryThis PR updates the auro-library dependency to version 3.0.1 and updates all documentation file paths to match the new structure. The changes primarily involve fixing file paths in various markdown files to ensure proper content generation and documentation rendering. No diagrams generated as the changes look simple and do not need a visual representation. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
Hey @DukeFerdinand - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟡 Complexity: 2 issues found
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
@@ -171,7 +171,7 @@ function initSizeOptionsExample() { | |||
|
|||
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */ | |||
|
|||
class AuroLibraryRuntimeUtils { | |||
let AuroLibraryRuntimeUtils$3 = class AuroLibraryRuntimeUtils { |
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.
issue (complexity): Consider consolidating the multiple copies of AuroLibraryRuntimeUtils into a single shared implementation
The code contains multiple duplicated copies of the AuroLibraryRuntimeUtils
class with identical functionality. This increases maintenance burden and violates DRY principles.
The build configuration should be adjusted to properly share a single instance. Example fix:
// shared/AuroLibraryRuntimeUtils.js
export class AuroLibraryRuntimeUtils {
// Single implementation of utility methods
}
// components/button.js
import { AuroLibraryRuntimeUtils } from '../shared/AuroLibraryRuntimeUtils';
// components/loader.js
import { AuroLibraryRuntimeUtils } from '../shared/AuroLibraryRuntimeUtils';
This ensures all components reference the same utility implementation rather than creating duplicate copies.
@@ -35,7 +35,7 @@ function initCustomExample() { | |||
|
|||
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */ | |||
|
|||
class AuroLibraryRuntimeUtils { | |||
let AuroLibraryRuntimeUtils$3 = class AuroLibraryRuntimeUtils { |
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.
issue (complexity): Consider extracting the duplicated AuroLibraryRuntimeUtils class into a shared module with a singleton instance.
The code duplicates the AuroLibraryRuntimeUtils
class multiple times with different suffixes ($1, $2, $3), creating unnecessary code duplication. To reduce complexity and improve maintainability:
- Extract the utility class into a shared module:
// auro-library-runtime-utils.js
export class AuroLibraryRuntimeUtils {
registerComponent(name, componentClass) {
if (!customElements.get(name)) {
customElements.define(name, class extends componentClass {});
}
}
// ... other methods
}
// Create a singleton instance
export const runtimeUtils = new AuroLibraryRuntimeUtils();
- Import and use the shared instance:
import { runtimeUtils } from './auro-library-runtime-utils.js';
class AuroLoader {
constructor() {
this.runtimeUtils = runtimeUtils;
}
}
This eliminates code duplication while maintaining all functionality. The shared module approach reduces bundle size and simplifies maintenance by having a single source of truth.
: found | ||
? found // found a selector INside this element | ||
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM |
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.
suggestion (code-quality): Avoid unneeded ternary statements (simplify-ternary
)
: found | |
? found // found a selector INside this element | |
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM | |
: found || __Closest(el.getRootNode().host) // recursion!! break out to parent DOM | |
Explanation
It is possible to simplify certain ternary statements into either use of an||
or !
.This makes the code easier to read, since there is no conditional logic.
: found | ||
? found // found a selector INside this element | ||
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM |
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.
suggestion (code-quality): Avoid unneeded ternary statements (simplify-ternary
)
: found | |
? found // found a selector INside this element | |
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM | |
: found || __Closest(el.getRootNode().host) // recursion!! break out to parent DOM | |
Explanation
It is possible to simplify certain ternary statements into either use of an||
or !
.This makes the code easier to read, since there is no conditional logic.
: found | ||
? found // found a selector INside this element | ||
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM |
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.
suggestion (code-quality): Avoid unneeded ternary statements (simplify-ternary
)
: found | |
? found // found a selector INside this element | |
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM | |
: found || __Closest(el.getRootNode().host) // recursion!! break out to parent DOM | |
Explanation
It is possible to simplify certain ternary statements into either use of an||
or !
.This makes the code easier to read, since there is no conditional logic.
: found | ||
? found // found a selector INside this element | ||
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM |
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.
suggestion (code-quality): Avoid unneeded ternary statements (simplify-ternary
)
: found | |
? found // found a selector INside this element | |
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM | |
: found || __Closest(el.getRootNode().host) // recursion!! break out to parent DOM | |
Explanation
It is possible to simplify certain ternary statements into either use of an||
or !
.This makes the code easier to read, since there is no conditional logic.
: found | ||
? found // found a selector INside this element | ||
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM |
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.
suggestion (code-quality): Avoid unneeded ternary statements (simplify-ternary
)
: found | |
? found // found a selector INside this element | |
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM | |
: found || __Closest(el.getRootNode().host) // recursion!! break out to parent DOM | |
Explanation
It is possible to simplify certain ternary statements into either use of an||
or !
.This makes the code easier to read, since there is no conditional logic.
: found | ||
? found // found a selector INside this element | ||
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM |
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.
suggestion (code-quality): Avoid unneeded ternary statements (simplify-ternary
)
: found | |
? found // found a selector INside this element | |
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM | |
: found || __Closest(el.getRootNode().host) // recursion!! break out to parent DOM | |
Explanation
It is possible to simplify certain ternary statements into either use of an||
or !
.This makes the code easier to read, since there is no conditional logic.
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.
Tested locally 🚀
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.
Tested locally 🚀
🎉 This PR is included in version 2.3.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Alaska Airlines Pull Request
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Resolves: #35
Summary:
This updates to the latest auro-library version and ensures the documentation paths are updated in
index.md
andapi.md
to match!Type of change:
Please delete options that are not relevant.
Checklist:
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
Update auro-library to version 3.0.1 and adjust documentation paths to match the new directory structure.
New Features:
Documentation: