Add component manifest build step#3921
Draft
zamoore wants to merge 7 commits into
Draft
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
didoo
requested changes
Jun 15, 2026
didoo
left a comment
Contributor
There was a problem hiding this comment.
I think some of the proposed changes may lead to breaking changes
|
|
||
| import { HdsAccordion } from '@hashicorp/design-system-components/components'; | ||
|
|
||
| import type { HdsAccordionSignature } from '@hashicorp/design-system-components/components/hds/accordion/index'; |
Contributor
There was a problem hiding this comment.
[issue/blocker?] could it be that this change of paths will result in breaking changes for the consumers? they will have to update all their import paths as well, for the signatures, right?
Contributor
Author
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.
📌 Summary
If merged, this PR adds the generation of a components manifest file to the build process.
The manifest is being introduced as a single source of truth for the Helios MCP server, so component API metadata can be consumed consistently from one canonical artifact instead of being re-derived in multiple places. As a separate line of work, we’re also exploring using this same manifest as an input for docs generation in the future.
🛠️ Detailed description
parse-docs.jsparses docs metadata fromsrc/components.tsexports by mapping each exported component name (for example,HdsAccordion) to a matching signature interface name (HdsAccordionSignature) in the component family’stypes.tsfile. For each resolved signature, the parser extractsArgs,Blocks, andElement, plus TSDoc metadata (description,@remarks,@defaultValue,@dependsOn,@splattributes) and normalizes itinto dist/manifest/components.json. Type text is resolved through a detailed AST-based resolver that expands aliases/imported types, handles unions/intersections/tuples/arrays, supports indexed access and template-literal types, and detects enum-like string unions for values output. Yields also get special handling so contextual component yields are normalized tocomponent.Resolution is intentionally strict and deterministic: signature lookup is expected in a single nearest
types.ts. If either the familytypes.tsor the expected*Signatureinterface is missing, that component is skipped and counted (non-fatal), which keeps the build stable while making gaps visible.I'm recommending signatures live in
types.ts(instead of inline in .gts) becausets-morph/type-checkersemantics are significantly more reliable on plain TypeScript than on template-backed.gtsfiles. In practice, signatures in.gtscan degrade to partial/anytype info, which causes empty args/blocks/element output. Centralizing signatures intypes.tspreserves colocated component typing while giving consistent, maintainable doc generation.Example
Input
Output
🔗 External links
Jira ticket: HDS-6428
💬 Please consider using conventional comments when reviewing this PR.
📋 PCI review checklist
Examples of changes to controls include access controls, encryption, logging, etc.
Examples include changes to operating systems, ports, protocols, services, cryptography-related components, PII processing code, etc.