Conversation
…from inherited classes #250
- bump @aurodesignsystem/auro-library from 5.5.3 to 5.5.4 - bump @custom-elements-manifest/analyzer from 0.10.10 to 0.11.0
Reviewer's GuideRefactors the custom-elements manifest configuration to use reusable TypeScript plugins for declaration exports and forced private members/attributes, and updates related documentation tooling dependencies. Class diagram for new custom-elements manifest pluginsclassDiagram
class ForcePrivateContext {
Map~string,string[]~ forcePrivateProperties
}
class ForcePrivatePluginFactory {
+forcePrivatePlugin() ForcePrivatePluginInstance
}
class ForcePrivatePluginInstance {
+name
+packageLinkPhase(customElementsManifest, context) void
+analyzePhase(ts, node, context) void
}
class AddDtsExportsPluginFactory {
+addDtsExportsPlugin() AddDtsExportsPluginInstance
}
class AddDtsExportsPluginInstance {
+name
+packageLinkPhase(customElementsManifest) void
}
class Package {
+modules Module[]
}
class Module {
+path string
+declarations Declaration[]
+exports Export[]
}
class Declaration {
+name string
+members ClassMember[]
+attributes Attribute[]
+customElement boolean
}
class CustomElementDeclaration {
+attributes Attribute[]
+customElement boolean
}
class Attribute {
+name string
}
class ClassMember {
+name string
+privacy string
}
class Export {
+name string
}
ForcePrivatePluginFactory --> ForcePrivatePluginInstance
AddDtsExportsPluginFactory --> AddDtsExportsPluginInstance
ForcePrivatePluginInstance --> ForcePrivateContext : uses
ForcePrivatePluginInstance --> Package : reads
Package --> Module : contains
Module --> Declaration : contains
Declaration <|-- CustomElementDeclaration
Declaration --> ClassMember : has
Declaration --> Attribute : has
CustomElementDeclaration --> Attribute : filters
AddDtsExportsPluginInstance --> Package : reads
Module --> Export : has
Flow diagram for updated custom-elements manifest build pipelineflowchart TD
A[custom-elements-manifest.analyzer
generate manifest] --> B[cemSorterPlugin
sort modules and declarations]
B --> C[jsxTypesPlugin
emit JSX d.ts to dist/index.d.ts]
C --> D[forcePrivatePlugin
apply @forcePrivate rules
update members and attributes]
D --> E[addDtsExportsPlugin
append Svelte global and exports
into dist/index.d.ts]
E --> F[Final dist/index.d.ts
with filtered, exported types]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey there - I've reviewed your changes - here's some feedback:
- In
forcePrivatePlugin, theprocessJSDocTagshelper takes asourceargument that is never used; consider removing it to simplify the function signature. - The
forcePrivatePluginandaddDtsExportsPlugincurrently log to the console during manifest generation; consider using a debug flag or logger to avoid noisy output in normal runs.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- In `forcePrivatePlugin`, the `processJSDocTags` helper takes a `source` argument that is never used; consider removing it to simplify the function signature.
- The `forcePrivatePlugin` and `addDtsExportsPlugin` currently log to the console during manifest generation; consider using a debug flag or logger to avoid noisy output in normal runs.
## Individual Comments
### Comment 1
<location> `src/scripts/docs/plugins/addDtsExportsPlugin.ts:14-15` </location>
<code_context>
+ customElementsManifest: Package;
+ }) {
+ // find modules where path matches 'src/index.js'
+ const exportedModules: Module[] = customElementsManifest.modules.filter(
+ (mod: Module) => mod.path.endsWith("src/index.js"),
+ );
+
</code_context>
<issue_to_address>
**issue:** Guard against `customElementsManifest.modules` being undefined before calling `.filter`.
Because the CEM `Package` type makes `modules` optional, this `.filter` will throw if `customElementsManifest.modules` is `undefined`. Use a default empty array to avoid runtime errors:
```ts
const modules = customElementsManifest.modules ?? [];
const exportedModules = modules.filter((mod: Module) => mod.path.endsWith("src/index.js"));
```
</issue_to_address>
### Comment 2
<location> `src/scripts/docs/plugins/forcePrivatePlugin.ts:40-41` </location>
<code_context>
+ if (propertiesToMarkPrivate && propertiesToMarkPrivate.length > 0) {
+
+ // Mark members/properties as private only in the class where @forcePrivate was defined
+ if ("members" in declaration && declaration.members) {
+ declaration.members.forEach((member: ClassMember) => {
+ if (propertiesToMarkPrivate.includes(member.name)) {
+ console.log(
</code_context>
<issue_to_address>
**issue:** Handle class members without a `name` to avoid potential runtime issues.
In the CEM schema, `ClassMember.name` can be absent for some member types (e.g., constructors, some accessors). The current logic assumes it’s always defined:
```ts
if (propertiesToMarkPrivate.includes(member.name)) {
...
}
```
To avoid issues when `name` is missing and to be resilient to new member shapes, add a guard:
```ts
if (!member.name) return;
if (propertiesToMarkPrivate.includes(member.name)) {
...
}
```
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
jason-capsule42
approved these changes
Dec 16, 2025
Member
|
🎉 This PR is included in version 3.5.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Alaska Airlines Pull Request
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 custom elements manifest generation to use dedicated plugins for declaration exports and forced-private members, while refreshing related documentation tooling dependencies.
New Features:
Enhancements:
Build: