You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When customer-account docs are generated, targets.json is written to db/data/docs/templated_apis/targets.json (root level) instead of db/data/docs/templated_apis/customer_account_ui_extensions/{version}/targets.json. This is
because build-docs.mjs calls build-docs-targets-json.mjs without passing the API version
argument. The script falls back to searching for generated_docs_data.json (v1), which
customer-account doesn't generate, so it defaults to the generated/ root.
Solution
packages/ui-extensions/docs/surfaces/customer-account/build-docs.mjs — Pass EXTENSIONS_API_VERSION to build-docs-targets-json.mjs, matching the pattern checkout already
uses in build-docs.sh.
packages/ui-extensions/docs/surfaces/customer-account/build-docs-targets-json.mjs —
Harden findGeneratedDocsPath() to also search for generated_docs_data_v2.json, preventing
the fallback from ever triggering.
Risk
Visibility: Not user-facing — affects generated data files only.
Impact: Scoped to customer-account surface docs generation.
Type: Bug fix.
Unknowns: None — checkout already uses this exact pattern and works correctly.
Top-hatting
Run yarn docs:customer-account 2026-04-rc
Confirm targets.json appears at docs/surfaces/customer-account/generated/customer_account_ ui_extensions/2026-04-rc/targets.json
Confirm there is NO targets.json at docs/surfaces/customer-account/generated/targets.json
Note
Generated files are included in this PR so reviewers can see the output of the changes. They
will be removed after review:
We are actively migrating UI extension reference docs to MDX in the areas/platforms/shopify-dev zone of the monorepo. This impacts docs for the following surfaces:
During this migration, please be aware of the following:
.doc.ts files are being deprecated. Changes to .doc.ts files in this repo will not be reflected in the new MDX-based docs. If you need to update docs for a reference that has already been migrated, make your changes directly in the areas/platforms/shopify-dev zone of the monorepo instead.
Doc comments in .ts source files (the comment blocks above types and functions) are also affected. Generating docs from these comments currently requires a newer version of the @shopify/generate-docs library that isn't yet available. Updates to doc comments may not produce the expected output until the migration is complete.
Examples that previously lived in this repo are being moved to the areas/platforms/shopify-dev zone of the monorepo and should be authored there going forward.
What should I do?
If your PR includes changes to .doc.ts files, doc comments, or examples, please reach out to us in #devtools-proj-templated-refs so we can help ensure your updates are captured correctly.
If your PR is limited to source code changes (non-docs), you can ignore this notice.
Thanks for your patience while we complete the migration! 🙏
midhatdlg
changed the title
⏺ Fix customer-account targets.json writing to wrong path by passing …
Fix customer-account targets.json output path
Apr 13, 2026
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
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.
Problem
Closes Part 1 of : https://github.com/shop/issues-learn/issues/1521
When customer-account docs are generated,
targets.jsonis written todb/data/docs/templated_apis/targets.json(root level) instead ofdb/data/docs/templated_apis/customer_account_ui_extensions/{version}/targets.json. This isbecause
build-docs.mjscallsbuild-docs-targets-json.mjswithout passing the API versionargument. The script falls back to searching for
generated_docs_data.json(v1), whichcustomer-account doesn't generate, so it defaults to the
generated/root.Solution
packages/ui-extensions/docs/surfaces/customer-account/build-docs.mjs— PassEXTENSIONS_API_VERSIONtobuild-docs-targets-json.mjs, matching the pattern checkout alreadyuses in
build-docs.sh.packages/ui-extensions/docs/surfaces/customer-account/build-docs-targets-json.mjs—Harden
findGeneratedDocsPath()to also search forgenerated_docs_data_v2.json, preventingthe fallback from ever triggering.
Risk
Top-hatting
yarn docs:customer-account 2026-04-rctargets.jsonappears atdocs/surfaces/customer-account/generated/customer_account_ ui_extensions/2026-04-rc/targets.jsontargets.jsonatdocs/surfaces/customer-account/generated/targets.jsonNote
Generated files are included in this PR so reviewers can see the output of the changes. They
will be removed after review:
packages/ui-extensions/docs/surfaces/customer-account/generated/customer_account_ui_extension s/2026-04-rc/generated_docs_data_v2.jsonpackages/ui-extensions/docs/surfaces/customer-account/generated/targets.json