Skip to content

Releases: Shopify/hydrogen

@shopify/mini-oxygen@3.0.4

11 Jul 14:03
5aa0c18
Compare
Choose a tag to compare

Patch Changes

@shopify/hydrogen@2024.7.1

11 Jul 14:03
5aa0c18
Compare
Choose a tag to compare

Patch Changes

  • Breaking change by @michenly

    customerAccount no longer commit session automatically.

  • Breaking change by @blittle

    Previously the VariantSelector component would filter out options that only had one value. This is undesireable for some apps. We've removed that filter, if you'd like to retain the existing functionality, simply filter the options prop before it is passed to the VariantSelector component:

     <VariantSelector
       handle={product.handle}
    +  options={product.options.filter((option) => option.values.length > 1)}
    -  options={product.options}
       variants={variants}>
     </VariantSelector>

    Fixes #1198

  • Fix the types for optimistic cart (#2132) by @blittle

  • Improve the types for useOptimisticCart() (#2269) by @blittle

  • Fix a small rounding issue when checking stale-while-revalidate timing. (#2220) by @frandiox

  • Update virtual route to use Layout component in the root file. (#2292) by @michenly

  • Add sellingPlanId support to BuyNowButton. (#2254) by @dvisockas

  • Fix customData from Analytics.Provider not being passed to page view events (#2224) by @wizardlyhel

  • Auto cookie domain detection for customer privacy api and better error message for missing analytics fields (#2256) by @wizardlyhel

  • New Features by @blittle

    Add a useOptimisticVariant hook for optimistically rendering product variant changes. This makes switching product variants instantaneous. Example usage:

    function Product() {
      const {product, variants} = useLoaderData<typeof loader>();
    
      // The selectedVariant optimistically changes during page
      // transitions with one of the preloaded product variants
      const selectedVariant = useOptimisticVariant(
        product.selectedVariant,
        variants,
      );
    
      return <ProductMain selectedVariant={selectedVariant} />;
    }

    This also introduces a small breaking change to the VariantSelector component, which now immediately updates which variant is active. If you'd like to retain the current functionality, and have the VariantSelector wait for the page navigation to complete before updating, use the waitForNavigation prop:

    <VariantSelector
      handle={product.handle}
      options={product.options}
      waitForNavigation
    >
      ...
    </VariantSelector>
  • Return null instead of empty object from cart.get() when the cart id is invalid. (#2258) by @frandiox

  • Updated dependencies [54c2f7ad]:

    • @shopify/hydrogen-react@2024.7.1

@shopify/hydrogen-react@2024.7.1

11 Jul 14:03
5aa0c18
Compare
Choose a tag to compare

Patch Changes

@shopify/create-hydrogen@5.0.0

11 Jul 14:03
5aa0c18
Compare
Choose a tag to compare

Major Changes

  • The code is now bundled to enhance installation speed. (#2184) by @frandiox

@shopify/cli-hydrogen@8.2.0

11 Jul 14:03
5aa0c18
Compare
Choose a tag to compare

Minor Changes

  • Support Vite projects in h2 setup css command to setup Tailwind and vanilla-extract. Drop CSS setup support for classic Remix projects. (#2245) by @frandiox

  • The build process in Vite projects now generates a bundle analysis tool for the server files. (#2138) by @frandiox

Patch Changes

  • Fix Codegen config resolution when project directory contains dots. (#2293) by @frandiox

  • [Bug fix] Allow env-branch to be passed when running h2 deploy in CI (#2281) by @aswamy

  • Fix CLI upgrade notification when running from a global process. (#2184) by @frandiox

  • skeleton template was updated to do session commit in server call instead of routes (#2137) by @michenly

  • Remove PUBLIC_STORE_DOMAIN environment variable from .env when creating new projects with mock.shop. (#2221) by @frandiox

  • Added an --auth-bypass-token-duration flag to the deploy command to allow for specified token duration between 1 to 12 hours. (#2182) by @NelsonLee-Code

  • Updated dependencies [0924410f]:

    • @shopify/mini-oxygen@3.0.4

skeleton@2024.4.9

18 Jun 18:18
156e869
Compare
Choose a tag to compare

Patch Changes

@shopify/hydrogen@2024.4.7

18 Jun 18:18
156e869
Compare
Choose a tag to compare

Patch Changes

  • Auto cookie domain detection for customer privacy api and better error message for missing analytics fields (#2262) by @wizardlyhel

@shopify/create-hydrogen@4.3.14

18 Jun 18:18
156e869
Compare
Choose a tag to compare

Patch Changes

  • Auto cookie domain detection for customer privacy api and better error message for missing analytics fields (#2262) by @wizardlyhel

skeleton@2024.4.8

14 Jun 18:26
af573bc
Compare
Choose a tag to compare

Patch Changes

@shopify/hydrogen@2024.4.6

14 Jun 18:26
af573bc
Compare
Choose a tag to compare

Patch Changes

  • Fix shopify cookie creation and add auto top-level domain detection (#2249) by @wizardlyhel

  • Updated dependencies [593dd30e]:

    • @shopify/hydrogen-react@2024.4.4