Add --standard-events-inspector flag to theme preview.#7822
Open
frandiox wants to merge 9 commits into
Open
Conversation
Add the --standard-events flow to theme dev and wire the option through the dev server context. Prepare assets/standard-events.d.ts in the background, refresh it when possible, create assets/global.d.ts when missing, and create or update assets/jsconfig.json so the new type files are wired in without clobbering unrelated config. Rewrite standard-events runtime URLs to use the dev bundle in HTML and JS content, inject the events inspector at the start of the head element with defer, and cover proxy, local asset, startup, and error-page paths with tests. Also make jsconfig wiring robust when existing configs exclude *.d.ts files by forcing the new definitions through the files list. Co-authored-by: Codex <codex@openai.com>
Use the standard events dev bundle by default in theme dev, while making inspector injection and local type setup explicit opt-in features. Keep the type setup asynchronous so server startup is not blocked. Co-authored-by: OpenAI Codex <codex@openai.com>
Only treat the inspector as already injected when an actual inspector script tag is present, and add a regression test for plain URL strings in inline scripts. Co-authored-by: OpenAI Codex <codex@openai.com>
Remove the --standard-events-types flag and all associated logic (d.ts download, global.d.ts creation, jsconfig.json wiring) from theme dev. This feature was too intrusive for the dev command. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
# Conflicts: # packages/theme/src/cli/commands/theme/dev.ts # packages/theme/src/cli/services/dev.test.ts # packages/theme/src/cli/utilities/theme-environment/proxy.test.ts # packages/theme/src/cli/utilities/theme-environment/theme-environment.test.ts
Remove merge-era mock setup from the theme dev service test now that the Standard Events assertions use the existing dev command test harness. This keeps the test focused on the new option plumbing without duplicating unrelated setup. Co-authored-by: OpenAI Codex <codex@openai.com>
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.
WHY are these changes introduced?
We are releasing standard storefront events and actions.
WHAT is this pull request doing?
Add a new flag to inject UI during development that helps debug events and actions.
How to test your changes?
Run
shopify theme dev --standard-events-inspectorin Horizon v4. You should see a floating window like the following:Post-release steps
Checklist
patchfor bug fixes ·minorfor new features ·majorfor breaking changes) and added a changeset withpnpm changeset add