Add Liquid docs bundle command#1240
Open
charlespwd wants to merge 1 commit into
Open
Conversation
8 tasks
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.
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:
New CLI command:
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:
Tophatting
pnpm --dir packages/theme-check-docs-updater type-checkCI=1 pnpm vitest run packages/theme-check-docs-updater/src/themeLiquidDocsBundle.spec.ts packages/theme-check-docs-updater/src/themeLiquidDocsManager.spec.tspnpm --dir packages/theme-check-docs-updater buildpnpm --silent --dir packages/theme-check-docs-updater theme-docs bundle | jq '.revision, .schemaVersion'pnpm format:checkgit diff --checkBefore you deploy
changeset