Skip to content

Commit fc1e0bb

Browse files
committed
fix(ui-components): move react to peer and dev deps
- Move react from dependencies to peerDependencies (^19.0.0) and devDependencies (catalog:) in packages/ui-components. - Add react-dom to the workspace catalog and use it in apps/site. - Remove peerDependencies from platforms/vercel and platforms/cloudflare. - Add pnpm-lock.yaml to .prettierignore.
1 parent 7c40136 commit fc1e0bb

8 files changed

Lines changed: 25 additions & 36 deletions

File tree

‎.changeset/cozy-teeth-speak.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@node-core/ui-components': patch
3+
---
4+
5+
Move react to peerDependencies and devDependencies to fix runtime duplicate hooks error in consumer applications

‎.prettierignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ node_modules
66
npm-debug.log
77
.npm
88
package-lock.json
9+
pnpm-lock.yaml
910

1011
# Next.js Build Output
1112
.next

‎apps/site/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
"next-themes": "~0.4.6",
5252
"postcss-calc": "~11.2.1",
5353
"react": "catalog:",
54-
"react-dom": "^19.3.0",
54+
"react-dom": "catalog:",
5555
"reading-time": "~1.5.0",
5656
"rehype-autolink-headings": "~7.1.0",
5757
"rehype-slug": "~6.0.0",

‎packages/ui-components/package.json‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,7 @@
6161
"@radix-ui/react-tabs": "^1.1.18",
6262
"@radix-ui/react-tooltip": "^1.2.13",
6363
"@vcarl/remark-headings": "~0.1.0",
64-
"classnames": "catalog:",
65-
"react": "catalog:"
64+
"classnames": "catalog:"
6665
},
6766
"devDependencies": {
6867
"@eslint-react/eslint-plugin": "~5.8.6",
@@ -86,6 +85,7 @@
8685
"postcss-calc": "~11.2.1",
8786
"postcss-cli": "^11.0.1",
8887
"postcss-loader": "8.2.1",
88+
"react": "catalog:",
8989
"storybook": "~10.6.0",
9090
"style-loader": "4.0.0",
9191
"stylelint": "17.14.1",
@@ -96,6 +96,9 @@
9696
"tsx": "4.23.1",
9797
"typescript": "catalog:"
9898
},
99+
"peerDependencies": {
100+
"react": "^19.0.0"
101+
},
99102
"imports": {
100103
"#ui/*": {
101104
"types": [

‎platforms/cloudflare/package.json‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@
2525
"typescript": "catalog:",
2626
"wrangler": "^4.114.0"
2727
},
28-
"peerDependencies": {
29-
"next": "catalog:"
30-
},
3128
"devDependencies": {
3229
"@cloudflare/workers-types": "^4.20260418.1",
3330
"@playwright/test": "^1.61.1",

‎platforms/vercel/package.json‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@
1616
"@vercel/otel": "~2.1.3",
1717
"@vercel/speed-insights": "~2.0.0"
1818
},
19-
"peerDependencies": {
20-
"next": "catalog:",
21-
"react": "catalog:"
22-
},
2319
"devDependencies": {
2420
"@playwright/test": "^1.61.1",
2521
"@types/react": "catalog:",

‎pnpm-lock.yaml‎

Lines changed: 12 additions & 26 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎pnpm-workspace.yaml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,6 @@ catalog:
1919
# Running on the preview to incorporate https://github.com/vercel/next.js/pull/93308
2020
next: 16.3.6
2121
react: ^19.3.0
22+
react-dom: ^19.3.0
2223
tailwindcss: ~4.1.17
2324
typescript: 5.9.3

0 commit comments

Comments
 (0)