Shopify / hydrogen

Hydrogen lets you build faster headless storefronts in less time, on Shopify.
https://hydrogen.shop
MIT License
1.24k stars 246 forks source link

Fix diff examples for new CLI #2075

Closed frandiox closed 1 month ago

frandiox commented 1 month ago

The new CLI 3.59.2 exits the process if @shopify/cli-hydrogen is not part of dependencies: https://github.com/Shopify/cli/blob/9f66320f3d56f69e3d77d173a0eca31cc7fc9f96/packages/cli/src/hooks/init.ts#L10

This is a workaround to make the diff examples work again, which are broken in main branch:

image

cc @isaacroldan any idea of how to make this work in --diff examples? I'm adding this workaround for now. I guess we can keep it if it's too much trouble.

shopify[bot] commented 1 month ago
Oxygen deployed a preview of your fd-diff-new-cli branch. Details: Storefront Status Preview link Deployment details Last update (UTC)
vite ✅ Successful (Logs) Preview deployment Inspect deployment May 2, 2024 4:08 AM
custom-cart-method ✅ Successful (Logs) Preview deployment Inspect deployment May 2, 2024 4:08 AM
subscriptions ✅ Successful (Logs) Preview deployment Inspect deployment May 2, 2024 4:08 AM
third-party-queries-caching ✅ Successful (Logs) Preview deployment Inspect deployment May 2, 2024 4:08 AM
optimistic-cart-ui ✅ Successful (Logs) Preview deployment Inspect deployment May 2, 2024 4:08 AM
skeleton ✅ Successful (Logs) Preview deployment Inspect deployment May 2, 2024 4:08 AM

Learn more about Hydrogen's GitHub integration.

github-actions[bot] commented 1 month ago

We detected some changes in packages/*/package.json or packages/*/src, and there are no updates in the .changeset. If the changes are user-facing and should cause a version bump, run npm run changeset add to track your changes and include them in the next release CHANGELOG. If you are making simple updates to examples or documentation, you do not need to add a changeset.

michenly commented 1 month ago

Need this for the b2b example. Merging it now.