Skip to content

Add Liquid docs bundle command#1240

Open
charlespwd wants to merge 1 commit into
mainfrom
fix/theme-liquid-docs-bundle-cli
Open

Add Liquid docs bundle command#1240
charlespwd wants to merge 1 commit into
mainfrom
fix/theme-liquid-docs-bundle-cli

Conversation

@charlespwd

@charlespwd charlespwd commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

What are you adding in this PR?

Related issue: Shopify/developer-tools-team#783

Adds a stable Liquid docs bundle generator to @shopify/theme-check-docs-updater.

New package API:

import { buildThemeLiquidDocsBundle } from '@shopify/theme-check-docs-updater';

const bundle = await buildThemeLiquidDocsBundle();

New CLI command:

pnpm --dir packages/theme-check-docs-updater theme-docs bundle

The command writes a self-contained JSON bundle to stdout:

{
  "schemaVersion": 1,
  "revision": "40f966fc7793462726d9f8573c8d522f8ab44c54",
  "tags": [],
  "filters": [],
  "objects": [],
  "systemTranslations": {},
  "schemas": []
}

Logs from docs loading go to stderr so stdout can be redirected directly into a JSON artifact.

Why: browser-based hosts need a way to publish Liquid docs updates independently from theme-tools and extension releases. This PR only adds the generator; it does not change browser extension runtime behavior.

What's next? Any followup issues?

Follow-up PR: #1016 teaches the browser extension to fetch a published docs bundle at runtime and fall back to bundled docs if unavailable.

A separate host/CDN publisher can use this command after this package version is released, for example:

pnpm dlx @shopify/theme-check-docs-updater@<version> theme-docs bundle > liquid-docs-bundle.json

Tophatting

  • pnpm --dir packages/theme-check-docs-updater type-check
  • CI=1 pnpm vitest run packages/theme-check-docs-updater/src/themeLiquidDocsBundle.spec.ts packages/theme-check-docs-updater/src/themeLiquidDocsManager.spec.ts
  • pnpm --dir packages/theme-check-docs-updater build
  • pnpm --silent --dir packages/theme-check-docs-updater theme-docs bundle | jq '.revision, .schemaVersion'
  • pnpm format:check
  • git diff --check
  • Screenshots are not applicable; this is CLI/package API behavior.

Before you deploy

  • I included a minor bump changeset
  • My feature is backward compatible

@charlespwd charlespwd marked this pull request as ready for review June 19, 2026 14:46
@charlespwd charlespwd requested a review from a team as a code owner June 19, 2026 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant