feat: replace mock.shop domain with mockdotshop.myshopify.com internally#3710
Open
fredericoo wants to merge 4 commits intomainfrom
Open
feat: replace mock.shop domain with mockdotshop.myshopify.com internally#3710fredericoo wants to merge 4 commits intomainfrom
fredericoo wants to merge 4 commits intomainfrom
Conversation
Contributor
|
Oxygen deployed a preview of your
Learn more about Hydrogen's GitHub integration. |
fredericoo
commented
Apr 14, 2026
| }, | ||
| "mock-shop": { | ||
| "description": "Use mock.shop as the data source for the storefront.", | ||
| "description": "Use Mock Shop as the data source for the storefront.", |
Contributor
Author
There was a problem hiding this comment.
I opted to replace the literal domain mentioned here to the term "Mock Shop" instead.
We do not need to surface to users that it comes from mockdotshop.myshopify.com
The `mock.shop` domain is being deprecated. This migrates all default references to `mockdotshop.myshopify.com` while maintaining backwards compatibility for existing projects that still use `mock.shop` in their environment variables. Key decisions: - `isMockShop()` checks recognize both old and new domains during the transition period, so existing storefronts don't break - User-facing strings now display "Mock Shop" as a brand name rather than showing the raw domain - Magic string literals replaced with named constants (`MOCK_SHOP_DOMAIN`, `LEGACY_MOCK_SHOP_DOMAIN`) in both hydrogen-react and the CLI Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The `mock.shop` domain is an internal default, not a user-facing API contract. Both domains point to the same store, so existing projects with `mock.shop` in their `.env` still work at the API level — they just won't be detected as "mock shop" for cosmetic behaviors like the welcome page and warning suppression, which is a useful nudge to update. A clean cut is simpler than carrying a legacy constant that would need a second breaking change to remove later. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The success banner snapshot expected "Mock.shop" but we changed the storefront title to "Mock Shop" in onboarding/local.ts. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
fff1d61 to
cbe74e4
Compare
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
The
mock.shopdomain is being deprecated. Newly scaffolded Hydrogen projects need to default tomockdotshop.myshopify.comas the demo Storefront API endpoint.What
Replaces all default references to
mock.shopwithmockdotshop.myshopify.comacross the runtime libraries, CLI tooling, and test infrastructure. Existing projects usingmock.shopin their env vars continue to work —isMockShop()recognizes both domains during the transition.hydrogen-reactstorefront clientMOCK_SHOP_DOMAINconstantdev-shared,init,onboarding)hydrogenanalytics + virtual routesHow to Test
mockdotshop.myshopify.com(needs to add a log into a loader/action that calls the SFAPI)Post-Merge Steps
mock.shopdomain on timing