Releases: Shopify/hydrogen
@shopify/hydrogen-react@2023.1.8
Patch Changes
-
Fix
parseGid()
to return a query string if it was a part of the original GID. (#723) by @wizardlyhel -
Add the raw product returned from the Storefront API to also return from
useProduct()
: (#735) by @blittlefunction SomeComponent() { const {product} = useProduct(); return ( <div> <h2>{product.title}</h2> <h3>{product.description}</h3> </div> ); }
@shopify/create-hydrogen@4.1.0
@shopify/cli-hydrogen@4.1.0
Minor Changes
-
Updated CLI prompts. It's recommended to update your version of
@shopify/cli
to3.45.0
when updating@shopify/cli-hydrogen
. (#733) by @frandiox"dependencies": { - "@shopify/cli": "3.x.x", + "@shopify/cli": "3.45.0", }
-
Added a new
shortcut
command that creates a globalh2
alias for the Hydrogen CLI: (#679) by @frandiox$> npx shopify hydrogen shortcut
After that, you can run commands using the new alias:
$> h2 generate route home $> h2 g r home # Same as the above $> h2 check routes
Patch Changes
-
Add support for the Remix future flags
v2_meta
,v2_errorBoundary
andv2_routeConvention
to thegenerate
command. If these flags are enabled in your project, the new generated files will follow the v2 conventions. (#756) by @frandiox -
Update virtual route to use Remix V2 route name conventions (#792) by @DavidWittness
-
Bump internal Remix dependencies to 1.15.0. (#728) by @wizardlyhel
Recommendations to follow:
- Upgrade all the Remix packages in your app to 1.15.0.
- Enable Remix v2 future flags at your earliest convenience following the official guide.
-
Improve type safety in SEO data generators. (#763) by @davidhousedev
-
Updated dependencies [
85ae63a
,5e26503
,1f8526c
]:- @shopify/hydrogen-react@2023.1.8
- @shopify/remix-oxygen@1.0.5
@shopify/remix-oxygen@1.0.4
Patch Changes
-
Fix active cart session event in Live View (#614) by @wizardlyhel
Introducing
getStorefrontHeaders
that collects the required Shopify headers for making a
Storefront API call.- Make cart constants available as exports from
@shopify/hydrogen-react
- Deprecating
buyerIp
andrequestGroupId
props fromcreateStorefrontClient
from@shopify/hydrogen
- Deprecating
getBuyerIp
function from@shopify/remix-oxygen
+ import {getStorefrontHeaders} from '@shopify/remix-oxygen'; import {createStorefrontClient, storefrontRedirect} from '@shopify/hydrogen'; export default { async fetch( request: Request, env: Env, executionContext: ExecutionContext, ): Promise<Response> { const {storefront} = createStorefrontClient({ cache, waitUntil, - buyerIp: getBuyerIp(request), i18n: {language: 'EN', country: 'US'}, publicStorefrontToken: env.PUBLIC_STOREFRONT_API_TOKEN, privateStorefrontToken: env.PRIVATE_STOREFRONT_API_TOKEN, storeDomain: `https://${env.PUBLIC_STORE_DOMAIN}`, storefrontApiVersion: env.PUBLIC_STOREFRONT_API_VERSION || '2023-01', storefrontId: env.PUBLIC_STOREFRONT_ID, - requestGroupId: request.headers.get('request-id'), + storefrontHeaders: getStorefrontHeaders(request), });
- Make cart constants available as exports from
@shopify/hydrogen@2023.1.6
Patch Changes
-
Add new
loader
API for setting seo tags within route module (#591) by @cartogram -
ShopPayButton
component now can receive astoreDomain
. The component now does not requireShopifyProvider
. (#645) by @lordofthecactus -
Add
Cache-Control
defaults to all the demo store routes -
Added
robots
option to SEO config that allows users granular control over the robots meta tag. This can be set on both a global and per-page basis using the handle.seo property. (#572) by @cartogramExample:
export handle = { seo: { robots: { noIndex: false, noFollow: false, } } }
-
Fix active cart session event in Live View (#614) by @wizardlyhel
Introducing
getStorefrontHeaders
that collects the required Shopify headers for making a
Storefront API call.- Make cart constants available as exports from
@shopify/hydrogen-react
- Deprecating
buyerIp
andrequestGroupId
props fromcreateStorefrontClient
from@shopify/hydrogen
- Deprecating
getBuyerIp
function from@shopify/remix-oxygen
+ import {getStorefrontHeaders} from '@shopify/remix-oxygen'; import {createStorefrontClient, storefrontRedirect} from '@shopify/hydrogen'; export default { async fetch( request: Request, env: Env, executionContext: ExecutionContext, ): Promise<Response> { const {storefront} = createStorefrontClient({ cache, waitUntil, - buyerIp: getBuyerIp(request), i18n: {language: 'EN', country: 'US'}, publicStorefrontToken: env.PUBLIC_STOREFRONT_API_TOKEN, privateStorefrontToken: env.PRIVATE_STOREFRONT_API_TOKEN, storeDomain: `https://${env.PUBLIC_STORE_DOMAIN}`, storefrontApiVersion: env.PUBLIC_STOREFRONT_API_VERSION || '2023-01', storefrontId: env.PUBLIC_STOREFRONT_ID, - requestGroupId: request.headers.get('request-id'), + storefrontHeaders: getStorefrontHeaders(request), });
- Make cart constants available as exports from
-
Updated dependencies [
c78f441
,7fca5d5
]:- @shopify/hydrogen-react@2023.1.7
@shopify/hydrogen-react@2023.1.7
Patch Changes
ShopPayButton
component now can receive astoreDomain
. The component now does not requireShopifyProvider
. (#645) by @lordofthecactus
@shopify/create-hydrogen@4.0.5
Patch Changes
-
Fix register and login issues in the demostore (#659) by @blittle
-
Adding decoding prop to the SpreadMedia component (#642) by @rafaelstz
-
- Added a route to the Demo store that demonstrates redirecting an order status url back to the online store primary domain. (#540) by @johncraigcole
-
Stop hydrating with
requestIdleCallback
(#667) by @juanpprieto -
Updated dependencies [
bceddb4
,09259cf
,4443a2b
,3344b79
,d8821f8
,a841303
]:- @shopify/cli-hydrogen@4.0.9
@shopify/cli-hydrogen@4.0.9
Patch Changes
-
Fixed a typo in the install deps flag. The flag is now SHOPIFY_HYDROGEN_FLAG_INSTALL_DEPS. (#672) by @cartogram
-
Display warning for deprecated flags. (#609) by @cartogram
-
Fix bug in CLI not recognising the --install-deps flag when creating projects (#644) by @cartogram
-
Fix
check routes
command to correctly check the standard route/discount/<code>
instead of/discounts/<code>
. (#601) by @frandiox -
Stop hydrating with
requestIdleCallback
(#667) by @juanpprieto -
Updated dependencies [
c78f441
,7fca5d5
]:- @shopify/hydrogen-react@2023.1.7
- @shopify/remix-oxygen@1.0.4