Skip to content

Commit 39f2b32

Browse files
fix: widen React Router peer dependency ranges (#3771)
* fix: widen React Router peer dependency ranges Allow Hydrogen packages to accept compatible React Router 7.x minor and patch releases without npm peer dependency conflicts. Keep exact devDependencies as the runtime-tested versions and add a regression test that proves peer ranges accept both the tested version and the next compatible minor. * fix: default React Router to 7.15.1 Move Hydrogen's tested React Router baseline to the latest published 7.15 patch while keeping peer ranges limited to the 7.15 line. Update the preset and affected test helpers for React Router 7.15 API stabilizations, including top-level subResourceIntegrity and the renamed Location mask field. * fix: default React Router to 7.16.0 React Router 7.16 restores Navigation.location for loading navigations, so Hydrogen can remove the temporary type narrowing without changing runtime behavior. Keep published peer ranges patch-scoped to the tested 7.16 line and update scaffold, docs preview, and lockfile defaults together. * fix(cookbook): update recipe patches for React Router 7.16 The skeleton package manifest now defaults to React Router 7.16.0, so recipe package.json patches need matching context to apply cleanly in cookbook tests and recipe fixture generation. Only the React Router context lines changed; recipe dependency substitutions remain unchanged. * chore: update comments Co-authored-by: Matt Brophy <matt@brophy.org> --------- Co-authored-by: Matt Brophy <matt@brophy.org>
1 parent 9951900 commit 39f2b32

25 files changed

Lines changed: 7552 additions & 2012 deletions

File tree

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
'@shopify/hydrogen': patch
3+
'@shopify/cli-hydrogen': patch
4+
'@shopify/remix-oxygen': patch
5+
'@shopify/create-hydrogen': patch
6+
'skeleton': patch
7+
---
8+
9+
Widen React Router peer dependency ranges so Hydrogen packages accept compatible React Router 7.16 patch versions without npm peer dependency conflicts. New Hydrogen projects now default to React Router 7.16.0.

cookbook/recipes/b2b/patches/package.json.8e0ff5.patch

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ index 0bb332639..651bbfffa 100644
1414
- "react-dom": "catalog:",
1515
+ "react": "^18.3.1",
1616
+ "react-dom": "^18.3.1",
17-
"react-router": "7.14.0",
18-
"react-router-dom": "7.14.0"
17+
"react-router": "7.16.0",
18+
"react-router-dom": "7.16.0"
1919
},
2020
@@ -31,14 +31,14 @@
21-
"@react-router/dev": "7.14.0",
22-
"@react-router/fs-routes": "7.14.0",
21+
"@react-router/dev": "7.16.0",
22+
"@react-router/fs-routes": "7.16.0",
2323
"@shopify/cli": "3.93.2",
2424
- "@shopify/hydrogen-codegen": "workspace:*",
2525
- "@shopify/mini-oxygen": "workspace:*",

cookbook/recipes/bundles/patches/package.json.8e0ff5.patch

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ index 0bb332639..651bbfffa 100644
1414
- "react-dom": "catalog:",
1515
+ "react": "^18.3.1",
1616
+ "react-dom": "^18.3.1",
17-
"react-router": "7.14.0",
18-
"react-router-dom": "7.14.0"
17+
"react-router": "7.16.0",
18+
"react-router-dom": "7.16.0"
1919
},
2020
@@ -31,14 +31,14 @@
21-
"@react-router/dev": "7.14.0",
22-
"@react-router/fs-routes": "7.14.0",
21+
"@react-router/dev": "7.16.0",
22+
"@react-router/fs-routes": "7.16.0",
2323
"@shopify/cli": "3.93.2",
2424
- "@shopify/hydrogen-codegen": "workspace:*",
2525
- "@shopify/mini-oxygen": "workspace:*",

cookbook/recipes/combined-listings/patches/package.json.8e0ff5.patch

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ index 0bb332639..651bbfffa 100644
1414
- "react-dom": "catalog:",
1515
+ "react": "^18.3.1",
1616
+ "react-dom": "^18.3.1",
17-
"react-router": "7.14.0",
18-
"react-router-dom": "7.14.0"
17+
"react-router": "7.16.0",
18+
"react-router-dom": "7.16.0"
1919
},
2020
@@ -31,14 +31,14 @@
21-
"@react-router/dev": "7.14.0",
22-
"@react-router/fs-routes": "7.14.0",
21+
"@react-router/dev": "7.16.0",
22+
"@react-router/fs-routes": "7.16.0",
2323
"@shopify/cli": "3.93.2",
2424
- "@shopify/hydrogen-codegen": "workspace:*",
2525
- "@shopify/mini-oxygen": "workspace:*",

cookbook/recipes/custom-cart-method/patches/package.json.8e0ff5.patch

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ index 0bb332639..651bbfffa 100644
1414
- "react-dom": "catalog:",
1515
+ "react": "^18.3.1",
1616
+ "react-dom": "^18.3.1",
17-
"react-router": "7.14.0",
18-
"react-router-dom": "7.14.0"
17+
"react-router": "7.16.0",
18+
"react-router-dom": "7.16.0"
1919
},
2020
@@ -31,14 +31,14 @@
21-
"@react-router/dev": "7.14.0",
22-
"@react-router/fs-routes": "7.14.0",
21+
"@react-router/dev": "7.16.0",
22+
"@react-router/fs-routes": "7.16.0",
2323
"@shopify/cli": "3.93.2",
2424
- "@shopify/hydrogen-codegen": "workspace:*",
2525
- "@shopify/mini-oxygen": "workspace:*",

cookbook/recipes/gtm/patches/package.json.8e0ff5.patch

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ index 0bb332639..651bbfffa 100644
1414
- "react-dom": "catalog:",
1515
+ "react": "^18.3.1",
1616
+ "react-dom": "^18.3.1",
17-
"react-router": "7.14.0",
18-
"react-router-dom": "7.14.0"
17+
"react-router": "7.16.0",
18+
"react-router-dom": "7.16.0"
1919
},
2020
@@ -31,14 +31,14 @@
21-
"@react-router/dev": "7.14.0",
22-
"@react-router/fs-routes": "7.14.0",
21+
"@react-router/dev": "7.16.0",
22+
"@react-router/fs-routes": "7.16.0",
2323
"@shopify/cli": "3.93.2",
2424
- "@shopify/hydrogen-codegen": "workspace:*",
2525
- "@shopify/mini-oxygen": "workspace:*",

cookbook/recipes/infinite-scroll/patches/package.json.acbf33.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ index e971ba7e..98bd2d0f 100644
66
"react": "catalog:",
77
"react-dom": "catalog:",
88
+ "react-intersection-observer": "^8.34.0",
9-
"react-router": "7.14.0",
10-
"react-router-dom": "7.14.0"
9+
"react-router": "7.16.0",
10+
"react-router-dom": "7.16.0"
1111
},

cookbook/recipes/legacy-customer-account-flow/patches/package.json.8e0ff5.patch

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ index 0bb332639..651bbfffa 100644
1414
- "react-dom": "catalog:",
1515
+ "react": "^18.3.1",
1616
+ "react-dom": "^18.3.1",
17-
"react-router": "7.14.0",
18-
"react-router-dom": "7.14.0"
17+
"react-router": "7.16.0",
18+
"react-router-dom": "7.16.0"
1919
},
2020
@@ -31,14 +31,14 @@
21-
"@react-router/dev": "7.14.0",
22-
"@react-router/fs-routes": "7.14.0",
21+
"@react-router/dev": "7.16.0",
22+
"@react-router/fs-routes": "7.16.0",
2323
"@shopify/cli": "3.93.2",
2424
- "@shopify/hydrogen-codegen": "workspace:*",
2525
- "@shopify/mini-oxygen": "workspace:*",

cookbook/recipes/markets/patches/package.json.8e0ff5.patch

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ index 0bb332639..651bbfffa 100644
1414
- "react-dom": "catalog:",
1515
+ "react": "^18.3.1",
1616
+ "react-dom": "^18.3.1",
17-
"react-router": "7.14.0",
18-
"react-router-dom": "7.14.0"
17+
"react-router": "7.16.0",
18+
"react-router-dom": "7.16.0"
1919
},
2020
@@ -31,14 +31,14 @@
21-
"@react-router/dev": "7.14.0",
22-
"@react-router/fs-routes": "7.14.0",
21+
"@react-router/dev": "7.16.0",
22+
"@react-router/fs-routes": "7.16.0",
2323
"@shopify/cli": "3.93.2",
2424
- "@shopify/hydrogen-codegen": "workspace:*",
2525
- "@shopify/mini-oxygen": "workspace:*",

cookbook/recipes/metaobjects/patches/package.json.acbf33.patch

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ index e971ba7e..f2c3af10 100644
44
@@ -21,7 +21,9 @@
55
"react": "catalog:",
66
"react-dom": "catalog:",
7-
"react-router": "7.14.0",
8-
- "react-router-dom": "7.14.0"
9-
+ "react-router-dom": "7.14.0",
7+
"react-router": "7.16.0",
8+
- "react-router-dom": "7.16.0"
9+
+ "react-router-dom": "7.16.0",
1010
+ "slate": "^0.101.4",
1111
+ "slate-react": "^0.101.3"
1212
},

0 commit comments

Comments
 (0)