@shopify/create-hydrogen 5.0.1 → 5.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,12 @@
1
1
  # skeleton
2
2
 
3
+ ## 2024.7.3
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`150854ed`](https://github.com/Shopify/hydrogen/commit/150854ed1352245eef180cc6b2bceb41dd8cc898)]:
8
+ - @shopify/hydrogen@2024.7.2
9
+
3
10
  ## 2024.7.2
4
11
 
5
12
  ### Patch Changes
@@ -2,7 +2,7 @@
2
2
  "name": "skeleton",
3
3
  "private": true,
4
4
  "sideEffects": false,
5
- "version": "2024.7.2",
5
+ "version": "2024.7.3",
6
6
  "type": "module",
7
7
  "scripts": {
8
8
  "build": "shopify hydrogen build --codegen",
@@ -16,7 +16,7 @@
16
16
  "dependencies": {
17
17
  "@remix-run/react": "^2.10.1",
18
18
  "@remix-run/server-runtime": "^2.10.1",
19
- "@shopify/hydrogen": "2024.7.1",
19
+ "@shopify/hydrogen": "2024.7.2",
20
20
  "@shopify/remix-oxygen": "^2.0.5",
21
21
  "graphql": "^16.6.0",
22
22
  "graphql-tag": "^2.12.6",
@@ -1,7 +1,7 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
- function PageLayout(props) {
2
+ function Layout(props) {
3
3
  return /* @__PURE__ */ jsx("div", { className: "hydrogen-virtual-route", children: props.children });
4
4
  }
5
5
  export {
6
- PageLayout
6
+ Layout
7
7
  };
@@ -2,13 +2,14 @@ import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import {
3
3
  Links,
4
4
  Meta,
5
+ Outlet,
5
6
  Scripts,
6
7
  ScrollRestoration,
7
8
  isRouteErrorResponse,
8
9
  useRouteError
9
10
  } from "@remix-run/react";
10
11
  import favicon from "./assets/favicon.svg";
11
- import { PageLayout } from "./components/PageLayout.jsx";
12
+ import { Layout } from "./components/Layout.jsx";
12
13
  import { useNonce } from "@shopify/hydrogen";
13
14
  import styles from "./assets/styles.css?url";
14
15
  const links = () => {
@@ -17,7 +18,7 @@ const links = () => {
17
18
  { rel: "icon", type: "image/svg+xml", href: favicon }
18
19
  ];
19
20
  };
20
- function Layout({ children }) {
21
+ function App() {
21
22
  const nonce = useNonce();
22
23
  return /* @__PURE__ */ jsxs("html", { lang: "en", children: [
23
24
  /* @__PURE__ */ jsxs("head", { children: [
@@ -35,7 +36,7 @@ function Layout({ children }) {
35
36
  /* @__PURE__ */ jsx(Links, {})
36
37
  ] }),
37
38
  /* @__PURE__ */ jsxs("body", { children: [
38
- /* @__PURE__ */ jsx(PageLayout, { children }),
39
+ /* @__PURE__ */ jsx(Layout, { children: /* @__PURE__ */ jsx(Outlet, {}) }),
39
40
  /* @__PURE__ */ jsx(ScrollRestoration, { nonce }),
40
41
  /* @__PURE__ */ jsx(Scripts, { nonce })
41
42
  ] })
@@ -51,14 +52,14 @@ function ErrorBoundary() {
51
52
  } else if (error instanceof Error) {
52
53
  errorMessage = error.message;
53
54
  }
54
- return /* @__PURE__ */ jsxs("div", { className: "route-error", children: [
55
+ return /* @__PURE__ */ jsx(Layout, { children: /* @__PURE__ */ jsxs("div", { className: "route-error", children: [
55
56
  /* @__PURE__ */ jsx("h1", { children: "Please report this error" }),
56
57
  /* @__PURE__ */ jsx("h2", { children: errorStatus }),
57
58
  errorMessage && /* @__PURE__ */ jsx("fieldset", { children: /* @__PURE__ */ jsx("pre", { children: errorMessage }) })
58
- ] });
59
+ ] }) });
59
60
  }
60
61
  export {
61
62
  ErrorBoundary,
62
- Layout,
63
+ App as default,
63
64
  links
64
65
  };
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "@shopify:registry": "https://registry.npmjs.org"
6
6
  },
7
7
  "license": "MIT",
8
- "version": "5.0.1",
8
+ "version": "5.0.2",
9
9
  "type": "module",
10
10
  "scripts": {
11
11
  "build": "tsup --clean",