Skip to content

Releases: Shopify/hydrogen

@shopify/hydrogen-react@2023.1.8

17 Apr 13:33
b098780
Compare
Choose a tag to compare

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 @blittle

    function SomeComponent() {
      const {product} = useProduct();
    
      return (
        <div>
          <h2>{product.title}</h2>
          <h3>{product.description}</h3>
        </div>
      );
    }

@shopify/create-hydrogen@4.1.0

17 Apr 13:33
b098780
Compare
Choose a tag to compare

Minor Changes

  • Updated CLI prompts. It's recommended to update your version of @shopify/cli to 3.45.0 when updating @shopify/cli-hydrogen. (#733) by @frandiox

    "dependencies": {
    -  "@shopify/cli": "3.x.x",
    +  "@shopify/cli": "3.45.0",
    }

Patch Changes

@shopify/cli-hydrogen@4.1.0

17 Apr 13:33
b098780
Compare
Choose a tag to compare

Minor Changes

  • Updated CLI prompts. It's recommended to update your version of @shopify/cli to 3.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 global h2 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 and v2_routeConvention to the generate 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

15 Mar 18:40
e6394e0
Compare
Choose a tag to compare

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 and requestGroupId props from createStorefrontClient 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),
        });

@shopify/hydrogen@2023.1.6

15 Mar 18:40
e6394e0
Compare
Choose a tag to compare

Patch Changes

  • Add new loader API for setting seo tags within route module (#591) by @cartogram

  • ShopPayButton component now can receive a storeDomain. The component now does not require ShopifyProvider. (#645) by @lordofthecactus

  • Update Remix to 1.14.0 (#599) by @blittle

  • 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 @cartogram

    Example:

    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 and requestGroupId props from createStorefrontClient 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),
        });
  • Updated dependencies [c78f441, 7fca5d5]:

    • @shopify/hydrogen-react@2023.1.7

@shopify/hydrogen-react@2023.1.7

15 Mar 18:40
e6394e0
Compare
Choose a tag to compare

Patch Changes

  • ShopPayButton component now can receive a storeDomain. The component now does not require ShopifyProvider. (#645) by @lordofthecactus

@shopify/create-hydrogen@4.0.5

15 Mar 18:40
e6394e0
Compare
Choose a tag to compare

Patch Changes

@shopify/cli-hydrogen@4.0.9

15 Mar 18:40
e6394e0
Compare
Choose a tag to compare

Patch Changes

    1. Update Remix to 1.14.0 (#599) by @blittle

    2. Add Cache-Control defaults to all the demo store routes

  • 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

@shopify/cli-hydrogen@4.0.8

22 Feb 02:08
820af38
Compare
Choose a tag to compare

Patch Changes

  • Improve rate limit error messages when creating new projects. (#553) by @frandiox

  • Show better errors when initial build fails, and recover when fixing it. (#514) by @frandiox

@shopify/hydrogen@2023.1.5

21 Feb 20:03
2d4e259
Compare
Choose a tag to compare

Patch Changes