Skip to content

Releases: Shopify/hydrogen-v1

@shopify/[email protected]

23 Jun 14:09
d1bb316
Compare
Choose a tag to compare

Patch Changes

[email protected]

21 Jun 21:59
a3deede
Compare
Choose a tag to compare

[email protected]

21 Jun 20:35
a33294b
Compare
Choose a tag to compare

[email protected]

21 Jun 17:08
93bf157
Compare
Choose a tag to compare

Patch Changes

@shopify/[email protected]

21 Jun 21:59
a3deede
Compare
Choose a tag to compare

Major Changes

  • #1700 9b6c564e Hydrogen is now out of developer preview. Thank you for all of your feedback and contributions the past eight months!

@shopify/[email protected]

21 Jun 20:35
a33294b
Compare
Choose a tag to compare

Minor Changes

  • #1697 85aab092 Thanks @blittle! - Remove defaultLocale from the Hydrogen Config and instead add defaultCountryCode and defaultLanguageCode. Both of which are also now available by the useShop() hook:

    export default defineConfig({
      shopify: {
    -    defaultLocale: 'EN-US',
    +    defaultCountryCode: 'US',
    +    defaultLanguageCode: 'EN',
        storeDomain: 'hydrogen-preview.myshopify.com',
        storefrontToken: '3b580e70970c4528da70c98e097c2fa0',
        storefrontApiVersion: '2022-07',
      },
    }
  • #1662 4262b319 Thanks @wizardlyhel! - Fix server analytics route

    • Fix ServerAnalyticsRoute so that it does complete all async work
    • Move Performance and Shopify analytic reporting to client side
    • Make sure ShopifyAnalytics make its own query for shop id and currency
    • Remove query for shop id and currency from DefaultSeo component
    • Make Performance and Shopify server analytics connector do nothing

    Deprecated components

    Remove the following components from hydrogen.config.js

    • PerformanceMetricsServerAnalyticsConnector
    • ShopifyServerAnalyticsConnector

@shopify/[email protected]

21 Jun 17:08
93bf157
Compare
Choose a tag to compare

Patch Changes

  • #1663 66200d6b Thanks @jplhomer! - Default to 'US' CountryCode if locale cannot be parsed correctly

  • #1690 afde8989 Thanks @frehner! - Add scale to the filename part of the url in shopifyImageLoader()

  • #1676 0149cbf6 Thanks @frandiox! - Avoid writing to Node response if it has been closed early.

  • #1674 8068d3ce Thanks @frandiox! - Throw error when <Link> component is used outside of <Router> component.

  • #1680 acf5223f Thanks @blittle! - Fix basepath to not apply to external URLs in the <Link component. Also default the attribute rel="noreferrer noopener for external URLs.

  • #1670 8b26f7a6 Thanks @frandiox! - Optimize client boundaries only during build by default.

[email protected]

20 Jun 20:38
320823a
Compare
Choose a tag to compare

@shopify/[email protected]

20 Jun 20:38
320823a
Compare
Choose a tag to compare

Minor Changes

  • #1615 20bfc438 Thanks @frehner! - <CartEstimatedCost/> has been renamed to <CartCost/> to match a recent update to the Storefront API, in which cart.estimatedCost is being deprecated in favor of cart.cost.

    Additionally, cart.cost.compareAtAmount was renamed to cart.cost.compareAtAmountPerQuantity.

  • #1619 b0c13696 Thanks @blittle! - We have reworked how localization works in Hydrogen. By default the useLocalization() hook returns the default locale defined within your Hydrogen configuration file. The <LocalizationProvider> component now takes countryCode and languageCode as optional props. Any props given to <LocalizationProvider> will also be used by the useLocalization hook.

    Breaking Change

    The useCountry hook has been removed. Instead use the useLocalization hook.

    - import {useCountry, gql} from '@shopify/hydrogen';
    + import {useLocalization, gql} from '@shopify/hydrogen';
    
    export function MyComponent() {
    
    -  const [country] = useCountry();
    +  const {country} = useLocalization();
    
      return ( /* Your JSX */ );
    }

    The Link component now respects the basePath property defined within it's parent FileRoutes component. For example, given <FileRoutes basePath="/cn">, a route within that renders <Link to="/products"> will actually produce an anchor tag prefixed with /cn: <a href="/cn/products">. You can override the basePath with a basePath prop on the Link component.

  • #1646 1103fb57 Thanks @benjaminsehl! - Updates default SEO titleTemplate for the Homepage

Patch Changes

  • #1569 e5896a3e Thanks @wizardlyhel! - Clean up full page cache work with waitUntil

  • #1643 3b849606 Thanks @frandiox! - Do not cache client components in browser when using TypeScript.

  • #1605 2eb2c461 Thanks @frandiox! - Fix hydration issues with useId.

  • #1613 c45ebd3c Thanks @frehner! - The <ShopPayButton/> and <CartShopPayButton/> now take in a width prop to help customize how wide the <shop-pay-button> custom element is, by using the newly added CSS custom property (variable) --shop-pay-button-width.

  • #1651 a19be2b2 Thanks @blittle! - Fixes to the cart:

    1. Fix bug when providing a lower-case country code to the LocalizationProvider
    2. Make sure that the Cart always logs API errors
  • #1649 df0e01ff Thanks @blittle! - Add a x-powered-by: Shopify-Hydrogen header which can be disabled with the Hydrogen config property: poweredByHeader: false

  • #1566 cfe7385e Thanks @wizardlyhel! - Add storefont id to cart provider query

  • #1551 3d20e92d Thanks @jplhomer! - In-Memory caching is now enabled by default in production for Node.js runtimes.

  • #1604 f3827d31 Thanks @cartogram! - Adds new load-config entry point that exposes a loadConfig() function that will return the configuration object and the path to the found configuration file for a given Hydrogen project root.

    Example:

    import {loadConfig} from '@shopify/hydrogen/load-config';
    
    const {configuration, configurationPath} = await loadConfig({
      root: 'path/to/hydrogen-app',
    });
  • #1626 29218452 Thanks @frandiox! - Fix import aliases.

  • #1622 d339239d Thanks @frandiox! - Fix module resolution after HMR in some scenarios.

  • #1608 b834dfdc Thanks @jplhomer! - Add type exports for HydrogenRouteProps, HydrogenApiRoute, and HydrogenApiRouteOptions.

  • #1603 e1bb5810 Thanks @frandiox! - Do not trigger prefetch when to prop is missing in the Link component.

[email protected]

16 Jun 12:47
b23a6cf
Compare
Choose a tag to compare

Patch Changes

  • #1607 97dfa170 Thanks @cartogram! - Store copy of demostore files before publishing for use in hydrogen project creation in admin.