Skip to content
13 changes: 4 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,6 @@
"not dead",
"not ie 11"
],
"resolutions": {
"@types/react": "^18.0.38",
"@types/react-dom": "^18.0.11",
"@types/responselike": "^1.0.0"
},
"dependencies": {
"@ant-design/cssinjs": "^2.0.1",
"@ant-design/icons": "^6.1.0",
Expand Down Expand Up @@ -121,8 +116,8 @@
"@types/lodash-es": "^4.17.12",
"@types/mockjs": "^1.0.10",
"@types/node": "^14.18.63",
"@types/react": "^18.3.27",
"@types/react-dom": "^18.3.7",
"@types/react": "^19.2.7",
"@types/react-dom": "^19.2.3",
"@types/react-helmet": "^6.1.11",
"@types/react-responsive": "^8.0.8",
"@types/shallowequal": "^1.1.5",
Expand Down Expand Up @@ -175,8 +170,8 @@
"prettier-plugin-packagejson": "^2.5.20",
"pretty-quick": "^3.3.1",
"query-string": "^6.14.1",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react": "^19.2.3",
"react-dom": "^19.2.3",
Comment on lines +167 to +168
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

升级到 React 19 后,建议同步更新 peerDependencies,以明确此库所支持的 React 版本。这对于库的使用者来说非常重要,可以避免版本兼容性问题。

如果库同时支持 React 18 和 19,peerDependencies 可以设置为:

"react": "^18.0.0 || ^19.0.0",
"react-dom": "^18.0.0 || ^19.0.0"

如果仅支持 React 19,则应设置为:

"react": "^19.0.0",
"react-dom": "^19.0.0"

"react-markdown": "^8.0.7",
"react-syntax-highlighter": "^15.6.6",
"remark": "^15.0.1",
Expand Down
Loading
Loading