Skip to content

Latest commit

 

History

History
462 lines (292 loc) · 26.3 KB

CHANGELOG.md

File metadata and controls

462 lines (292 loc) · 26.3 KB

@shopify/create-hydrogen

5.0.9

Patch Changes

5.0.8

Patch Changes

5.0.7

Patch Changes

5.0.6

Patch Changes

5.0.5

Patch Changes

  • Update Shopify CLI and cli-kit dependencies to 3.66.1 (#2512) by @frandiox

  • createCartHandler supplies updateGiftCardCodes method (#2298) by @wizardlyhel

  • Fix menu links in side panel not working on mobile devices (#2450) by @wizardlyhel

    // /app/components/Header.tsx
    
    export function HeaderMenu({
      menu,
      primaryDomainUrl,
      viewport,
      publicStoreDomain,
    }: {
      menu: HeaderProps['header']['menu'];
      primaryDomainUrl: HeaderProps['header']['shop']['primaryDomain']['url'];
      viewport: Viewport;
      publicStoreDomain: HeaderProps['publicStoreDomain'];
    }) {
      const className = `header-menu-${viewport}`;
    +  const {close} = useAside();
    
    -  function closeAside(event: React.MouseEvent<HTMLAnchorElement>) {
    -    if (viewport === 'mobile') {
    -      event.preventDefault();
    -      window.location.href = event.currentTarget.href;
    -    }
    -  }
    
      return (
        <nav className={className} role="navigation">
          {viewport === 'mobile' && (
            <NavLink
              end
    -          onClick={closeAside}
    +          onClick={close}
              prefetch="intent"
              style={activeLinkStyle}
              to="/"
            >
              Home
            </NavLink>
          )}
          {(menu || FALLBACK_HEADER_MENU).items.map((item) => {
            if (!item.url) return null;
    
            // if the url is internal, we strip the domain
            const url =
              item.url.includes('myshopify.com') ||
              item.url.includes(publicStoreDomain) ||
              item.url.includes(primaryDomainUrl)
                ? new URL(item.url).pathname
                : item.url;
            return (
              <NavLink
                className="header-menu-item"
                end
                key={item.id}
    -            onClick={closeAside}
    +            onClick={close}
                prefetch="intent"
                style={activeLinkStyle}
                to={url}
              >
                {item.title}
              </NavLink>
            );
          })}
        </nav>
      );
    }

5.0.4

Patch Changes

  • Update starter template with latest Hydrogen version. (#2432) by @frandiox

5.0.3

Patch Changes

  • starter template updated (#2333) by @michenly

  • Add a hydration check for google web cache. This prevents an infinite redirect when viewing the cached version of a hydrogen site on Google. (#2334) by @blittle

    Update your entry.server.jsx file to include this check:

    + if (!window.location.origin.includes("webcache.googleusercontent.com")) {
       startTransition(() => {
         hydrateRoot(
           document,
           <StrictMode>
             <RemixBrowser />
           </StrictMode>
         );
       });
    + }

5.0.2

Patch Changes

  • Force create-hydrogen update due to skeleton changes (#2346) by @michenly

5.0.1

Patch Changes

5.0.0

Major Changes

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

4.3.10

Patch Changes

4.3.9

Patch Changes

4.3.8

Patch Changes

4.3.7

Patch Changes

4.3.6

Patch Changes

4.3.5

Patch Changes

4.3.4

Patch Changes

4.3.3

Patch Changes

4.3.2

Patch Changes

4.3.1

Patch Changes

4.3.0

Minor Changes

  • Generated JavaScript projects now use Codegen and JSDoc to enhance editor autocompletion. (#1334) by @frandiox

Patch Changes

4.2.6

Patch Changes

4.2.5

Patch Changes

4.2.4

Patch Changes

  • (Unstable) server-side network request debug virtual route (#1284) by @wizardlyhel

    1. Update your server.ts so that it also passes in the waitUntil and env.

        const handleRequest = createRequestHandler({
          build: remixBuild,
          mode: process.env.NODE_ENV,
      +    getLoadContext: () => ({session, storefront, env, waitUntil}),
        });

      If you are using typescript, make sure to update remix.env.d.ts

        declare module '@shopify/remix-oxygen' {
          export interface AppLoadContext {
      +     env: Env;
            cart: HydrogenCart;
            storefront: Storefront;
            session: HydrogenSession;
      +      waitUntil: ExecutionContext['waitUntil'];
          }
        }
    2. Run npm run dev and you should see terminal log information about a new virtual route that you can view server-side network requests at http://localhost:3000/debug-network

    3. Open http://localhost:3000/debug-network in a tab and your app another tab. When you navigate around your app, you should see server network requests being logged in the debug-network tab

  • Updated dependencies [291115da, 71a07374]:

4.2.3

Patch Changes

4.2.2

Patch Changes

4.2.1

Patch Changes

4.2.0

What’s new

⭐️ Check out our blog post with all the latest updates on Hydrogen, and what’s coming on the roadmap.

Shopify CLI now gives you more options when creating a new Hydrogen app on the command line:

  • Create a new Shopify storefront and connect it to the local project, or use Mock.shop.
  • Pick your styling method: Tailwind, CSS Modules, Vanilla Extract, PostCSS.
  • URL strategies to support language and currency options with Shopify Markets.
  • Automatically scaffold standard Shopify routes.

Minor Changes

  • The onboarding process when creating new Hydrogen apps has been updated. (#913) by @frandiox

Patch Changes

4.1.3

Patch Changes

4.1.2

Patch Changes

4.1.1

Patch Changes

4.1.0

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

4.0.5

Patch Changes

4.0.4

Patch Changes

4.0.3

Patch Changes

4.0.2

Patch Changes

4.0.1

Patch Changes

  • Initial release