@shopify/create-hydrogen 5.0.21 → 5.0.22

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,32 @@
1
1
  # skeleton
2
2
 
3
+ ## 2025.4.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Moved the Cursor rules into more generic LLM prompt files. If you were using the Cursor rules, you will find the prompts in the `cookbook/llms` folder and they can be put into your `.cursor/rules` folder manually. LLM prompt files will be maintained moving forward, while previous Cursor rules will not be updated anymore. ([#2936](https://github.com/Shopify/hydrogen/pull/2936)) by [@ruggishop](https://github.com/ruggishop)
8
+
9
+ - Added bundles recipe ([#2915](https://github.com/Shopify/hydrogen/pull/2915)) by [@ruggishop](https://github.com/ruggishop)
10
+
11
+ - Update copy for subscriptions, combined listings, bundles recipes ([#2924](https://github.com/Shopify/hydrogen/pull/2924)) by [@ruggishop](https://github.com/ruggishop)
12
+
13
+ - Bump skeleton @shopify/cli and @shopify/mini-oxygen ([#2883](https://github.com/Shopify/hydrogen/pull/2883)) by [@juanpprieto](https://github.com/juanpprieto)
14
+
15
+ - Remove rules from the template. ([#2931](https://github.com/Shopify/hydrogen/pull/2931)) by [@ruggishop](https://github.com/ruggishop)
16
+
17
+ - Update SFAPI and CAAPI versions to 2025.04 ([#2886](https://github.com/Shopify/hydrogen/pull/2886)) by [@juanpprieto](https://github.com/juanpprieto)
18
+
19
+ - Updated recipes: subscriptions, bundles, combined-listings. New recipe: markets. ([#2930](https://github.com/Shopify/hydrogen/pull/2930)) by [@ruggishop](https://github.com/ruggishop)
20
+
21
+ - Updated the subscriptions recipe to better display the purchase options. ([#2912](https://github.com/Shopify/hydrogen/pull/2912)) by [@ruggishop](https://github.com/ruggishop)
22
+
23
+ - Bump recipes with copy adjustments ([#2935](https://github.com/Shopify/hydrogen/pull/2935)) by [@ruggishop](https://github.com/ruggishop)
24
+
25
+ - Added a Combined Listings recipe. ([#2876](https://github.com/Shopify/hydrogen/pull/2876)) by [@ruggishop](https://github.com/ruggishop)
26
+
27
+ - Updated dependencies [[`af23e710`](https://github.com/Shopify/hydrogen/commit/af23e710dac83bb57498d9c2ef1d8bcf9df55d34), [`9d8a6644`](https://github.com/Shopify/hydrogen/commit/9d8a6644a5b67dca890c6687df390aee78fc85c3)]:
28
+ - @shopify/hydrogen@2025.4.0
29
+
3
30
  ## 2025.1.7
4
31
 
5
32
  ### Patch Changes
@@ -137,13 +164,13 @@
137
164
  1. Add a routes.ts file. This is your new Remix route configuration file.
138
165
 
139
166
  ```ts
140
- import { flatRoutes } from "@remix-run/fs-routes";
141
- import { layout, type RouteConfig } from "@remix-run/route-config";
142
- import { hydrogenRoutes } from "@shopify/hydrogen";
167
+ import {flatRoutes} from '@remix-run/fs-routes';
168
+ import {layout, type RouteConfig} from '@remix-run/route-config';
169
+ import {hydrogenRoutes} from '@shopify/hydrogen';
143
170
 
144
171
  export default hydrogenRoutes([
145
172
  // Your entire app reading from routes folder using Layout from layout.tsx
146
- layout("./layout.tsx", await flatRoutes()),
173
+ layout('./layout.tsx', await flatRoutes()),
147
174
  ]) satisfies RouteConfig;
148
175
  ```
149
176
 
@@ -734,25 +761,25 @@
734
761
  8. Update the `ProductForm` component.
735
762
 
736
763
  ```tsx
737
- import { Link, useNavigate } from "@remix-run/react";
738
- import { type MappedProductOptions } from "@shopify/hydrogen";
764
+ import {Link, useNavigate} from '@remix-run/react';
765
+ import {type MappedProductOptions} from '@shopify/hydrogen';
739
766
  import type {
740
767
  Maybe,
741
768
  ProductOptionValueSwatch,
742
- } from "@shopify/hydrogen/storefront-api-types";
743
- import { AddToCartButton } from "./AddToCartButton";
744
- import { useAside } from "./Aside";
745
- import type { ProductFragment } from "storefrontapi.generated";
769
+ } from '@shopify/hydrogen/storefront-api-types';
770
+ import {AddToCartButton} from './AddToCartButton';
771
+ import {useAside} from './Aside';
772
+ import type {ProductFragment} from 'storefrontapi.generated';
746
773
 
747
774
  export function ProductForm({
748
775
  productOptions,
749
776
  selectedVariant,
750
777
  }: {
751
778
  productOptions: MappedProductOptions[];
752
- selectedVariant: ProductFragment["selectedOrFirstAvailableVariant"];
779
+ selectedVariant: ProductFragment['selectedOrFirstAvailableVariant'];
753
780
  }) {
754
781
  const navigate = useNavigate();
755
- const { open } = useAside();
782
+ const {open} = useAside();
756
783
  return (
757
784
  <div className="product-form">
758
785
  {productOptions.map((option) => (
@@ -786,8 +813,8 @@
786
813
  to={`/products/${handle}?${variantUriQuery}`}
787
814
  style={{
788
815
  border: selected
789
- ? "1px solid black"
790
- : "1px solid transparent",
816
+ ? '1px solid black'
817
+ : '1px solid transparent',
791
818
  opacity: available ? 1 : 0.3,
792
819
  }}
793
820
  >
@@ -804,13 +831,13 @@
804
831
  <button
805
832
  type="button"
806
833
  className={`product-options-item${
807
- exists && !selected ? " link" : ""
834
+ exists && !selected ? ' link' : ''
808
835
  }`}
809
836
  key={option.name + name}
810
837
  style={{
811
838
  border: selected
812
- ? "1px solid black"
813
- : "1px solid transparent",
839
+ ? '1px solid black'
840
+ : '1px solid transparent',
814
841
  opacity: available ? 1 : 0.3,
815
842
  }}
816
843
  disabled={!exists}
@@ -834,7 +861,7 @@
834
861
  <AddToCartButton
835
862
  disabled={!selectedVariant || !selectedVariant.availableForSale}
836
863
  onClick={() => {
837
- open("cart");
864
+ open('cart');
838
865
  }}
839
866
  lines={
840
867
  selectedVariant
@@ -848,7 +875,7 @@
848
875
  : []
849
876
  }
850
877
  >
851
- {selectedVariant?.availableForSale ? "Add to cart" : "Sold out"}
878
+ {selectedVariant?.availableForSale ? 'Add to cart' : 'Sold out'}
852
879
  </AddToCartButton>
853
880
  </div>
854
881
  );
@@ -871,7 +898,7 @@
871
898
  aria-label={name}
872
899
  className="product-option-label-swatch"
873
900
  style={{
874
- backgroundColor: color || "transparent",
901
+ backgroundColor: color || 'transparent',
875
902
  }}
876
903
  >
877
904
  {!!image && <img src={image} alt={name} />}
@@ -1372,21 +1399,21 @@
1372
1399
  New `withCache.fetch` is for caching simple fetch requests. This method caches the responses if they are OK responses, and you can pass `shouldCacheResponse`, `cacheKey`, etc. to modify behavior. `data` is the consumed body of the response (we need to consume to cache it).
1373
1400
 
1374
1401
  ```ts
1375
- const withCache = createWithCache({ cache, waitUntil, request });
1402
+ const withCache = createWithCache({cache, waitUntil, request});
1376
1403
 
1377
- const { data, response } = await withCache.fetch<{ data: T; error: string }>(
1378
- "my-cms.com/api",
1404
+ const {data, response} = await withCache.fetch<{data: T; error: string}>(
1405
+ 'my-cms.com/api',
1379
1406
  {
1380
- method: "POST",
1381
- headers: { "Content-type": "application/json" },
1407
+ method: 'POST',
1408
+ headers: {'Content-type': 'application/json'},
1382
1409
  body,
1383
1410
  },
1384
1411
  {
1385
1412
  cacheStrategy: CacheLong(),
1386
1413
  // Cache if there are no data errors or a specific data that make this result not suited for caching
1387
1414
  shouldCacheResponse: (result) => !result?.error,
1388
- cacheKey: ["my-cms", body],
1389
- displayName: "My CMS query",
1415
+ cacheKey: ['my-cms', body],
1416
+ displayName: 'My CMS query',
1390
1417
  },
1391
1418
  );
1392
1419
  ```
@@ -1962,9 +1989,9 @@
1962
1989
 
1963
1990
  ```tsx
1964
1991
  // app/lib/root-data.ts
1965
- import { useMatches } from "@remix-run/react";
1966
- import type { SerializeFrom } from "@shopify/remix-oxygen";
1967
- import type { loader } from "~/root";
1992
+ import {useMatches} from '@remix-run/react';
1993
+ import type {SerializeFrom} from '@shopify/remix-oxygen';
1994
+ import type {loader} from '~/root';
1968
1995
 
1969
1996
  /**
1970
1997
  * Access the result of the root loader from a React component.
@@ -2126,10 +2153,10 @@
2126
2153
  - This is an important fix to a bug with 404 routes and path-based i18n projects where some unknown routes would not properly render a 404. This fixes all new projects, but to fix existing projects, add a `($locale).tsx` route with the following contents: ([#1732](https://github.com/Shopify/hydrogen/pull/1732)) by [@blittle](https://github.com/blittle)
2127
2154
 
2128
2155
  ```ts
2129
- import { type LoaderFunctionArgs } from "@remix-run/server-runtime";
2156
+ import {type LoaderFunctionArgs} from '@remix-run/server-runtime';
2130
2157
 
2131
- export async function loader({ params, context }: LoaderFunctionArgs) {
2132
- const { language, country } = context.storefront.i18n;
2158
+ export async function loader({params, context}: LoaderFunctionArgs) {
2159
+ const {language, country} = context.storefront.i18n;
2133
2160
 
2134
2161
  if (
2135
2162
  params.locale &&
@@ -2137,7 +2164,7 @@
2137
2164
  ) {
2138
2165
  // If the locale URL param is defined, yet we still are still at the default locale
2139
2166
  // then the the locale param must be invalid, send to the 404 page
2140
- throw new Response(null, { status: 404 });
2167
+ throw new Response(null, {status: 404});
2141
2168
  }
2142
2169
 
2143
2170
  return null;
@@ -2193,11 +2220,11 @@
2193
2220
  ```yaml
2194
2221
  projects:
2195
2222
  default:
2196
- schema: "node_modules/@shopify/hydrogen/storefront.schema.json"
2223
+ schema: 'node_modules/@shopify/hydrogen/storefront.schema.json'
2197
2224
  documents:
2198
- - "!*.d.ts"
2199
- - "*.{ts,tsx,js,jsx}"
2200
- - "app/**/*.{ts,tsx,js,jsx}"
2225
+ - '!*.d.ts'
2226
+ - '*.{ts,tsx,js,jsx}'
2227
+ - 'app/**/*.{ts,tsx,js,jsx}'
2201
2228
  ```
2202
2229
 
2203
2230
  - Improve resiliency of `HydrogenSession` ([#1583](https://github.com/Shopify/hydrogen/pull/1583)) by [@blittle](https://github.com/blittle)
@@ -2412,8 +2439,8 @@
2412
2439
  ```ts
2413
2440
  // root.tsx
2414
2441
 
2415
- import { useMatches } from "@remix-run/react";
2416
- import { type SerializeFrom } from "@shopify/remix-oxygen";
2442
+ import {useMatches} from '@remix-run/react';
2443
+ import {type SerializeFrom} from '@shopify/remix-oxygen';
2417
2444
 
2418
2445
  export const useRootLoaderData = () => {
2419
2446
  const [root] = useMatches();
@@ -2,7 +2,7 @@
2
2
  "name": "skeleton",
3
3
  "private": true,
4
4
  "sideEffects": false,
5
- "version": "2025.1.7",
5
+ "version": "2025.4.0",
6
6
  "type": "module",
7
7
  "scripts": {
8
8
  "build": "shopify hydrogen build --codegen",
@@ -17,7 +17,7 @@
17
17
  "@remix-run/react": "^2.16.1",
18
18
  "@remix-run/server-runtime": "^2.16.1",
19
19
  "graphql": "^16.10.0",
20
- "@shopify/hydrogen": "2025.1.4",
20
+ "@shopify/hydrogen": "2025.4.0",
21
21
  "@shopify/remix-oxygen": "^2.0.12",
22
22
  "graphql-tag": "^2.12.6",
23
23
  "isbot": "^5.1.22",
@@ -32,7 +32,7 @@
32
32
  "@remix-run/dev": "^2.16.1",
33
33
  "@remix-run/fs-routes": "^2.16.1",
34
34
  "@remix-run/route-config": "^2.16.1",
35
- "@shopify/cli": "~3.78.1",
35
+ "@shopify/cli": "~3.79.2",
36
36
  "@shopify/hydrogen-codegen": "^0.3.3",
37
37
  "@shopify/mini-oxygen": "^3.2.1",
38
38
  "@shopify/oxygen-workers-types": "^4.1.6",
@@ -2,7 +2,10 @@
2
2
  "browserslist": [
3
3
  "defaults"
4
4
  ],
5
+ "dependencies": {
6
+ "tailwindcss": "^4.1.6"
7
+ },
5
8
  "devDependencies": {
6
- "@tailwindcss/vite": "4.0.14"
9
+ "@tailwindcss/vite": "^4.1.6"
7
10
  }
8
11
  }