Skip to content

Commit

Permalink
chore: update peerDependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
xiejay97 committed May 25, 2023
1 parent a19695b commit ac3424b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 11 deletions.
4 changes: 2 additions & 2 deletions packages/hooks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
},
"peerDependencies": {
"immer": ">=2.0.0",
"react": "^18.2.0",
"react-dom": "^18.2.0"
"react": "^18.0.0",
"react-dom": "^18.0.0"
},
"publishConfig": {
"access": "public",
Expand Down
4 changes: 2 additions & 2 deletions packages/icons/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
"lodash": "^4.17.21"
},
"peerDependencies": {
"react": "^18.2.0",
"react-dom": "^18.2.0"
"react": "^18.0.0",
"react-dom": "^18.0.0"
},
"publishConfig": {
"access": "public",
Expand Down
6 changes: 3 additions & 3 deletions packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@
"rxjs": "^7.6.0"
},
"peerDependencies": {
"dayjs": "^1.11.7",
"dayjs": "^1.11.0",
"immer": ">=2.0.0",
"react": "^18.2.0",
"react-dom": "^18.2.0"
"react": "^18.0.0",
"react-dom": "^18.0.0"
},
"publishConfig": {
"access": "public",
Expand Down
5 changes: 1 addition & 4 deletions tools/update-dependencies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,7 @@ Object.entries(workspace.projects).forEach(([projectName, projectPath]) => {
const version = dependence.startsWith('@react-devui')
? 'file:../' + dependence.split('/')[1]
: packageJson.devDependencies[dependence];
if (projectPackageJson['peerDependencies'] && dependence in projectPackageJson['peerDependencies']) {
delete projectPackageJson['dependencies'][dependence];
projectPackageJson['peerDependencies'][dependence] = version;
} else {
if (!(projectPackageJson['peerDependencies'] && dependence in projectPackageJson['peerDependencies'])) {
projectPackageJson['dependencies'][dependence] = version;
}
}
Expand Down

0 comments on commit ac3424b

Please sign in to comment.