Conversation
laurelthorburn
approved these changes
Feb 3, 2026
… handling to targets.json scripts - Customer-account: Add generic recursive component parsing for AllComponents - Correctly resolves to 63 customer-account components (not checkout's 60) - Excludes Chat (not in shared-checkout-components.ts) - Includes local components (Card, Avatar, etc.) - Excludes @internal components (PolicyModal) - Admin: Add RunnableExtension support for should-render targets (27 new targets) - Admin: Add parseInlineComponentTypes for Pick/Omit handling - CustomerSegmentTemplateComponent correctly has 2 components - AllComponents correctly excludes 3 omitted components - Checkout: Add RunnableExtension support for address-autocomplete targets - Checkout: Add @Private target exclusion - POS: Add parseInlineComponentTypes for Pick handling - ActionComponents correctly has 1 component (Button) - SmartGridComponents correctly has 1 component (Tile) - All scripts: Add @Private JSDoc exclusion for targets
3d0d9cd to
8e9865c
Compare
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.
Background
Part of: https://github.com/Shopify/shopify-dev/issues/66648
We want to parse target information for the dev docs for each surface.
Solution
Added scripts for each surface to pull target information from
extension-targets.tsortargets.tsinto a format that shopify-dev needs to display that information.The scripts handle:
@privateJSDoc tags: Targets marked with@privateare excluded from the generated outputRunnableExtensiontargets: Included withcomponents: []since they don't render UIPick<>andOmit<>types: Correctly resolved to their component listsAllComponents | OrderRoutingComponentsare correctly mergedAlso updated the build-docs.sh script to run the above script to create the targets output in the same place as other docs information for the reference.
🎩
Run the docs generation script for the different surfaces and verify that targets.json gets created correctly:
Verify that:
@privateJSDoc tags are NOT included in the output (e.g.,Playgroundin admin,purchase.checkout.gift-card.renderin checkout)RunnableExtensiontargets (e.g.,purchase.address-autocomplete.suggest) havecomponents: []Pick<>resolve to only the picked components (e.g.,pos.home.tile.rendershould have only['Tile'])Omit<>resolve to all components except the omitted onesChecklist