Add Liquid docs bundle command#1240
Open
charlespwd wants to merge 1 commit into
Open
Conversation
8 tasks
FKauwe
approved these changes
Jun 30, 2026
FKauwe
left a comment
Contributor
There was a problem hiding this comment.
I tophatted and the commands compile, build, run on my machine and the unit tests test both happy and sad path. This seems like a helpful addition to have "fresh" docs available in between extension releases
|
|
||
| Usage: | ||
| download <dir> \t\tDownloads all docsets and JSON Schemas to the specified directory. | ||
| bundle \t\t\tPrints a self-contained Liquid docs JSON bundle. |
Contributor
There was a problem hiding this comment.
this is the first time I've seen the \t\t\t and asked Claude about it. Apparently it's a way to align the descriptions into columns. C mentioned that there are some libraries that exist that that handle alignment automatically. Just curious what the tradeoffs are between this syntax and a library-- maybe a whole library is just overkill and the current syntax is more lightweight for the purposes you need?
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