2026 01 v1 cleanup#4479
Conversation
🚨🚨🚨 Docs migration in progress 🚨🚨🚨We are actively migrating UI extension reference docs to MDX in the
During this migration, please be aware of the following:
Doc comments in Examples that previously lived in this repo are being moved to the What should I do?
Thanks for your patience while we complete the migration! 🙏 |
- src/docs/ (entire tree — component-definitions.ts, docs-type.ts, components/*.ts) — v1 shared component schemas, all consumers were the .doc.ts files I deleted earlier - src/surfaces/admin/docs-types.ts — same - src/surfaces/checkout/helper.docs.ts — same - docs/surfaces/checkout/reference/helper.docs.ts — same
src/surfaces/checkout/components/Abbreviation/Abbreviation.doc.ts), which incidentally created build/ts/surfaces/checkout/components/ as a side effect. copyComponentDefinitions in buildTargetDts.ts assumed that directory existed. With the .doc.ts files gone, tsc no longer creates the parent dir, so copyFileSync fails with ENOENT on the destination.
fbe5887 to
4dccd1c
Compare
|
We detected some changes in |
Part of https://github.com/shop/issues-learn/issues/1601
Background
Same v1 cleanup as #4470 (2026-07-rc) and #4478 (2026-04-rc), but targeting
2026-01so the oldest active release branch also drops the v1 artifacts.The v1 generator consumes hand-authored
.doc.tsfiles and emitsgenerated_docs_data.json,generated_static_pages.json, andgenerated_category_pages.json. We've fully moved to v2, which reads@publicDocsJSDoc tags off the source.tsfiles and emitsgenerated_docs_data_v2.json. Keeping the v1 files around invites accidental regressions and confuses contributors.Solution
Scoped to
2026-01-rc(mirror of the cleanups landed on2026-07-rcin #4470 and2026-04-rcin #4478):Bump
@shopify/generate-docsto1.2.2— the latest stable release; v2-only CLI surface. 2026-01-rc was pinned at0.19.8.Delete all
.doc.tsfiles (~358 files across admin, checkout, customer-account, point-of-sale).Delete v1 generated JSONs for
2026-01-rcand surface-level paths:generated_docs_data.json,generated_static_pages.json,generated_category_pages.json.Delete v1 type-helper sidecars in
src/that consumed removed exports from generate-docs (ReferenceEntityTemplateSchema,CodeTabType,ExampleType, etc.):src/docs/(whole tree —component-definitions.ts,docs-type.ts,components/*.tsmetadata sidecars)src/surfaces/admin/docs-types.tssrc/surfaces/checkout/helper.docs.tsdocs/surfaces/checkout/reference/helper.docs.tsdocs/surfaces/customer-account/reference/helper.docs.tsdocs/surfaces/point-of-sale/reference/helpers/helper.docs.tsThese were metadata-only files (name/description/category records) consumed exclusively by the deleted
.doc.tsfiles. None of the real component source was touched.Slim the four build scripts (
admin,checkout,customer-account,point-of-sale) to v2-only:--isLandingPage,--isCategoryPage,--typesInput), thetransformJsonstep,.doc.ts→.doc.jstsc compile, and dead template helpers (htmlWrapper, jsxWrapper, etc.).build-docs-fast.sh/build-docs-watch.shcheckout scripts (v1-only).Stop copying screenshots to shopify-dev in every surface's build script.
Fix
build-docs-targets-json.mjs(admin + POS) to locate output dirs viagenerated_docs_data_v2.jsonnow thatgenerated_docs_data.jsonis gone.Fix
buildTargetDts.ts—copyComponentDefinitionsnowmkdirSync's the components build destination. Previously the dir existed only as a side effect of tsc emitting the now-deleted.doc.tsfiles; on a clean CI build with no.doc.tsfiles compiled,copyFileSyncfailed with ENOENT.Fix
yarn.lock— the@shopify/generate-docs@1.2.2resolvedURL had been pinned tonpm.shopify.io(Shopify's internal registry) because of local.npmrcscope routing. Rewrote it toregistry.npmjs.orgso CI (which can't auth to the internal mirror) can install. Integrity sha512 is identical between registries.Leave scaffolding alone —
create-doc-files.js, thegen-docs:adminworkspace script, andtsconfig.docs.jsonare kept since they're authoring tools, not v1 build artifacts.🎩
Each should produce only `generated_docs_data_v2.json` + `targets.json` under the surface's versioned output dir, with no v1 files anywhere.
CI parity locally (clean `build/` removed first): `yarn lint`, `yarn type-check`, `yarn build`, `yarn test --no-watch` all pass.
Checklist