Skip to content

Commit 31e05d3

Browse files
ochafikclaude
andauthored
fix: make react a peer dependency to support multiple versions (#163) (#164)
Move react and react-dom from dependencies to peerDependencies with support for React 17, 18, and 19. This allows consumers to use their preferred React version instead of forcing v19. - Added peerDependencies for react/react-dom (^17 || ^18 || ^19) - Marked react dependencies as optional in peerDependenciesMeta - Moved react/react-dom to devDependencies for local development - React is already externalized in the build (build.bun.ts) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude <[email protected]>
1 parent 9748622 commit 31e05d3

File tree

2 files changed

+26
-6
lines changed

2 files changed

+26
-6
lines changed

package-lock.json

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

package.json

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@
5959
"@types/bun": "^1.3.2",
6060
"@types/react": "^19.2.2",
6161
"@types/react-dom": "^19.2.2",
62+
"react": "^19.2.0",
63+
"react-dom": "^19.2.0",
6264
"concurrently": "^9.2.1",
6365
"cors": "^2.8.5",
6466
"cross-env": "^10.1.0",
@@ -73,13 +75,21 @@
7375
"zod": "^4.1.13"
7476
},
7577
"peerDependencies": {
78+
"react": "^17.0.0 || ^18.0.0 || ^19.0.0",
79+
"react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0",
7680
"zod": "^3.25.0 || ^4.0.0"
7781
},
82+
"peerDependenciesMeta": {
83+
"react": {
84+
"optional": true
85+
},
86+
"react-dom": {
87+
"optional": true
88+
}
89+
},
7890
"dependencies": {
7991
"@modelcontextprotocol/sdk": "^1.24.3",
80-
"prettier": "^3.6.2",
81-
"react": "^19.2.0",
82-
"react-dom": "^19.2.0"
92+
"prettier": "^3.6.2"
8393
},
8494
"optionalDependencies": {
8595
"@oven/bun-darwin-aarch64": "^1.3.4",

0 commit comments

Comments
 (0)