All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and adheres to Semantic Versioning.
<Model3D>
has been renamed to<ModelViewer>
- Fix index routes. See #562
- Feature -
<ShopifyProvider>
can again be used in server components - dx: Correct Typescript issue where
as
was a default prop for all components when it should not be - New React hook
useScriptLoader
is available to more easily load external scripts - DX: Update types and docs for
useCart()
hook and<CartProvider>
- feat: Add
totalQuantity
to the returned object fromuseCart()
- Track page load performance
- dx: Export
ProductPrice
andProductMetafield
standalone components - Fix missing server state on SSR pass
- Fix mobile navigation in example that scrolls the body underneath when shown by @Francismori7 in #582
- Use hashes as client component ids instead of absolute paths
- Remove the following hooks. (All the same functionality can be retrieved through the
useCart()
hook)useCartAttributesUpdateCallback
useCartBuyerIdentityUpdateCallback
useCartCheckoutUrl
useCartCreateCallback
useCartDiscountCodesUpdateCallback
useCartLinesAddCallback
useCartLinesRemoveCallback
useCartLinesTotalQuantity
useCartLinesUpdateCallback
useCartNoteUpdateCallback
- Feat: Transition away from deprecated currency selector in favor of country selector
- dx: The following money components no longer allow the function-as-a-child (also known as "render props") pattern; see #589. For customization, use the
useMoney()
hook.<Money>
<CartLinePrice>
<ProductPrice>
<SelectedVariantPrice>
- refactor:
<Metafield>
now rendersratings
as a<span>
with text instead of stars;multi_line_text_field
inside of a<span>
instead of a<div>
- Fix: add charset to content type in HTML responses
- Fix header shift when cart is opened by @Francismori7 in #600
- Feat: Simplify Helmet usage and make it compatible with RSC
- The
Seo.client
component has been moved fromsrc/components
to@shopify/hydrogen
. The props of theSeo.client
component also changed to always take intype
anddata
. Refer to the [Seo
component reference] (../src/components/Seo/README.md) for more details. #539
- Fix: hot reload for newly added page files
- Warn instead of error when a page server component is missing valid exports
- Adopt upstream version of React Server Components. See #498 for breaking changes.
- The 'locale' option in shopify.config.js had been renamed to 'defaultLocale'
- dx: rename
graphqlApiVersion
tostorefrontApiVersion
inshopify.config.js
- Bump to latest version of React experimental to include upstream context bugfix
- feature: improve API routes by allowing strings and JS objects to be returned.
- fix: make sure that API routes hot reload properly
- No updates. Transitive dependency bump.
- feature: API routes 🎉
- feature: move to undici instead of node-fetch
- fix: replace log abbreviations with full text.
- feature: add optional
locale
param touseShopQuery
to be used asAccept-Language
in the store Storefront API query - feature: Optional purge query cache per build
- fix: load logger only once.
- fix: warn when requests take longer than 3000ms instead of erroring
- feat:
useQuery
returns an error if the query's fetch was unsuccessful - feat:
useShopQuery
will give error hints to look atshopify.config.js
when the Storefront API responds with a 403 - fix: do not attempt to decode product IDs, as they are no longer base64-encoded in
unstable
- feat: Detect bot user agents and give bots a non-streamed response.
- feat: Add global
Oxygen.env
for server-only environment variables. - fix: cart decrease button removes at zero quantity
- feat: upgrade to latest React 18 experimental version
- docs: product provider tweaks
- docs: Document naming conventions
- feat: logging abstraction with default timing information
- fix: export
CartLineSelectedOptions
properly - fix: fix suspense utility function
- fix: avoid repeating the same identifier for default and named exports
- fix: remove sourcemap warnings
- feat: allow
useShopQuery
to be skippable if no query is passed. - fix: Remove usage of
react-query
(Not a breaking change)
- feat: add file reference metafield support
- fix: binding of waitUntil in playground/server-components-worker
- fix: default to
retry: false
inuseQuery
- fix: warn and ignore reserved properties in server state
- fix: run graphiql middleware before vite, fixing graphiql
- feat: allow custom Model3D poster
- feat: support synchronous server redirects
- fix: let Vite handle public assets in development
- fix: new lines in hydration request break JSON.parse
- fix(#201): normalize POSIX separators to support windows
- fix: scroll to top on app first load
- fix(#78): update variantID to variantId
- fix: add trailing slash to user components glob
- fix: remove CartProvider from BuyNowButton
- fix: reading property of null for component props
- fix: transform deeply-imported client components
- fix: duplicated files and contexts in browser
-
No updates. Transitive dependency bump.
-
fix: do not set headers after they are sent to client
- feat: disable the quantity adjust button when the cart is not idle
- feat: use country server state in cart for the inContext directive
- fix: update interaction prompt and interaction promp style attributes for Model3d
- fix: make sure all errors show an error dialog when hydrogen is in dev mode
- feat: use Image url field instead of deprecated originalSrc field
- feat: switch to unstable API
- fix: MediaFile component warning on non-Model3D types
- fix: remove console logs for caching
- fix: lowercased SVG tags in RSC
- fix: make the URL search property available via hooks
- Ensure delayed callback is fired for cache purposes in Workers runtimes.
- No updates. Transitive dependency bump.
- No updates. Transitive dependency bump.
- No updates. Transitive dependency bump.
- fix: update the ServerStateProvider context
- fix: add tabIndex to ShopPayButton
- fix: update LocalizationProvider query, context, and exports
- feat: introduct full-page and sub-request caching API.
- fix: add
passthoughProps.disabled
toAddToCartButton
- feat: update Model3D props and add binding to model-viewer events
- fix: do not show undefined currency symbol in production
- fix: lock model-viewer.js version to 1.8
- Make
CartProvider
a client-only concern. #631 - fix: use the Intl.NumberFormat parts for determining the amount value returned by the useMoney hook
- fix: optimize React related dependencies at server start to avoid page reloads
- feat: add external image support to Image component
- feat: Use
Accept: application/hydrogen
as a header when makingfetch
calls against a Hydrogen page. Useful for Custom Responses. - fix: do not throw when
storeDomain
contains protocol.
- feat: export utilities in client bundle
- fix: parseCookies will split only on first =
- fix: make BuyNowButton a client component since it uses useEffect
- fix: preserve original aspect ratio for product images
- fix: invoke CartProvider callbacks before performing the GraphQL mutations
- fix: fix the accessible label in the AddToCartButton component when an item is added to cart
- fix: cart fetch to return stringified error
- fix: remove sourcemap warnings
- fix: starter template GalleryPreview unique key warning
- fix: Mitigation for upcoming breaking minor Vite update
- fix: handle products with selling plans
- Added support for images and collections in the ProductProvider component
- Added more GraphQL fragments for building block components (Metafield, UnitPrice) and updated exports of these fragments.
- BREAKING CHANGE:
useQuery
now behaves exactly like react-query's hook of the same name.
- fix: SSR issue when running Vite 2.6
- fix: occasional
ProductProviderFragment
error when booting Hydrogen dev server #571
- New GraphQL fragments for Variants, SellingPlans, and SellingPlanGroups
- Updated types for the
useProductOptions
hook - fix:
Dynamic require of "stream" is not supported
error in browser logs
- No updates. Transitive dependency bump.
- No updates. Transitive dependency bump.