Skip to content

Commit

Permalink
kie-issues#1365: Revisit all React-dependent packages on kie-tools
Browse files Browse the repository at this point in the history
…declaring `react` as a `dependency` instead of a `peerDependency` (#2559)
  • Loading branch information
fantonangeli committed Sep 9, 2024
1 parent 30505c3 commit 1e6b21e
Show file tree
Hide file tree
Showing 53 changed files with 320 additions and 217 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci_check_dependencies_consistency.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ jobs:
shell: bash
run: |
pnpm bootstrap:root
npx --yes syncpack@6.2.0 list-mismatches
npx --yes syncpack@13.0.0 list-mismatches
10 changes: 10 additions & 0 deletions .syncpackrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@
"@kie-tools/uniforms-patternfly-codegen",
"@kie-tools/yaml-language-server"
]
},
{
"dependencies": ["react", "react-dom"],
"policy": "sameRange"
},
{
"label": "Use workspace protocol when developing local packages",
"dependencies": ["$LOCAL"],
"dependencyTypes": ["prod", "dev"],
"pinVersion": "workspace:*"
}
]
}
8 changes: 5 additions & 3 deletions examples/base64png-editor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@
"@kie-tools-core/patternfly-base": "workspace:*",
"@kie-tools-core/workspace": "workspace:*",
"@patternfly/react-core": "^4.276.6",
"@patternfly/react-icons": "^4.93.6",
"react": "^17.0.2",
"react-dom": "^17.0.2"
"@patternfly/react-icons": "^4.93.6"
},
"devDependencies": {
"@kie-tools/root-env": "workspace:*",
Expand All @@ -40,5 +38,9 @@
"copyfiles": "^2.4.1",
"rimraf": "^3.0.2",
"typescript": "^5.5.3"
},
"peerDependencies": {
"react": ">=17.0.2 <19.0.0",
"react-dom": ">=17.0.2 <19.0.0"
}
}
8 changes: 5 additions & 3 deletions examples/ping-pong-view-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@
"dependencies": {
"@kie-tools-core/envelope": "workspace:*",
"@kie-tools-core/envelope-bus": "workspace:*",
"@kie-tools-examples/ping-pong-view": "workspace:*",
"react": "^17.0.2",
"react-dom": "^17.0.2"
"@kie-tools-examples/ping-pong-view": "workspace:*"
},
"devDependencies": {
"@kie-tools/root-env": "workspace:*",
Expand All @@ -37,5 +35,9 @@
"copyfiles": "^2.4.1",
"rimraf": "^3.0.2",
"typescript": "^5.5.3"
},
"peerDependencies": {
"react": ">=17.0.2 <19.0.0",
"react-dom": ">=17.0.2 <19.0.0"
}
}
8 changes: 5 additions & 3 deletions examples/ping-pong-view/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@
},
"dependencies": {
"@kie-tools-core/envelope": "workspace:*",
"@kie-tools-core/envelope-bus": "workspace:*",
"react": "^17.0.2",
"react-dom": "^17.0.2"
"@kie-tools-core/envelope-bus": "workspace:*"
},
"devDependencies": {
"@kie-tools/root-env": "workspace:*",
Expand All @@ -32,5 +30,9 @@
"@types/react-dom": "^17.0.5",
"rimraf": "^3.0.2",
"typescript": "^5.5.3"
},
"peerDependencies": {
"react": ">=17.0.2 <19.0.0",
"react-dom": ">=17.0.2 <19.0.0"
}
}
8 changes: 5 additions & 3 deletions examples/todo-list-view/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@
},
"dependencies": {
"@kie-tools-core/envelope": "workspace:*",
"@kie-tools-core/envelope-bus": "workspace:*",
"react": "^17.0.2",
"react-dom": "^17.0.2"
"@kie-tools-core/envelope-bus": "workspace:*"
},
"devDependencies": {
"@kie-tools/root-env": "workspace:*",
Expand All @@ -35,5 +33,9 @@
"copyfiles": "^2.4.1",
"rimraf": "^3.0.2",
"typescript": "^5.5.3"
},
"peerDependencies": {
"react": ">=17.0.2 <19.0.0",
"react-dom": ">=17.0.2 <19.0.0"
}
}
6 changes: 4 additions & 2 deletions packages/boxed-expression-component/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@
"@patternfly/react-styles": "^4.92.6",
"@patternfly/react-table": "^4.112.39",
"lodash": "^4.17.21",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-resizable": "^1.11.0",
"react-table": "^7.6.2",
"uuid": "^8.3.2"
Expand Down Expand Up @@ -84,5 +82,9 @@
"webpack-cli": "^4.10.0",
"webpack-dev-server": "^4.15.1",
"webpack-merge": "^5.9.0"
},
"peerDependencies": {
"react": ">=17.0.2 <19.0.0",
"react-dom": ">=17.0.2 <19.0.0"
}
}
8 changes: 5 additions & 3 deletions packages/chrome-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@
"@kie-tools-core/patternfly-base": "workspace:*",
"@kie-tools-core/workspace": "workspace:*",
"@octokit/rest": "^18.5.3",
"minimatch": "^3.0.5",
"react": "^17.0.2",
"react-dom": "^17.0.2"
"minimatch": "^3.0.5"
},
"devDependencies": {
"@babel/core": "^7.16.0",
Expand All @@ -58,5 +56,9 @@
"rimraf": "^3.0.2",
"ts-jest": "^29.1.5",
"typescript": "^5.5.3"
},
"peerDependencies": {
"react": ">=17.0.2 <19.0.0",
"react-dom": ">=17.0.2 <19.0.0"
}
}
8 changes: 4 additions & 4 deletions packages/dashbuilder-component-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@
"lint": "run-script-if --bool \"$(build-env linters.run)\" --then \"kie-tools--eslint ./src\"",
"test": "run-script-if --ignore-errors \"$(build-env tests.ignoreFailures)\" --bool \"$(build-env tests.run)\" --then \"jest --silent --verbose --passWithNoTests\""
},
"dependencies": {
"react": "^17.0.2",
"react-dom": "^17.0.2"
},
"devDependencies": {
"@babel/core": "^7.16.0",
"@babel/preset-env": "^7.16.0",
Expand All @@ -48,5 +44,9 @@
"rimraf": "^3.0.2",
"ts-jest": "^29.1.5",
"typescript": "^5.5.3"
},
"peerDependencies": {
"react": ">=17.0.2 <19.0.0",
"react-dom": ">=17.0.2 <19.0.0"
}
}
8 changes: 5 additions & 3 deletions packages/dashbuilder-component-echarts-base/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@
"lint": "run-script-if --bool \"$(build-env linters.run)\" --then \"kie-tools--eslint ./src\""
},
"dependencies": {
"echarts": "^5.3.2",
"react": "^17.0.2",
"react-dom": "^17.0.2"
"echarts": "^5.3.2"
},
"devDependencies": {
"@babel/core": "^7.16.0",
Expand All @@ -41,5 +39,9 @@
"copyfiles": "^2.4.1",
"rimraf": "^3.0.2",
"typescript": "^5.5.3"
},
"peerDependencies": {
"react": ">=17.0.2 <19.0.0",
"react-dom": ">=17.0.2 <19.0.0"
}
}
8 changes: 5 additions & 3 deletions packages/dashbuilder-component-echarts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@
},
"dependencies": {
"@kie-tools/dashbuilder-component-api": "workspace:*",
"@kie-tools/dashbuilder-component-echarts-base": "workspace:*",
"react": "^17.0.2",
"react-dom": "^17.0.2"
"@kie-tools/dashbuilder-component-echarts-base": "workspace:*"
},
"devDependencies": {
"@babel/core": "^7.16.0",
Expand All @@ -46,5 +44,9 @@
"webpack-cli": "^4.10.0",
"webpack-dev-server": "^4.15.1",
"webpack-merge": "^5.9.0"
},
"peerDependencies": {
"react": ">=17.0.2 <19.0.0",
"react-dom": ">=17.0.2 <19.0.0"
}
}
6 changes: 4 additions & 2 deletions packages/dashbuilder-component-map/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
"@kie-tools-core/patternfly-base": "workspace:*",
"@kie-tools/dashbuilder-component-api": "workspace:*",
"d3-scale": "^4.0.2",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-simple-maps": "^3.0.0"
},
"devDependencies": {
Expand All @@ -50,5 +48,9 @@
"webpack-cli": "^4.10.0",
"webpack-dev-server": "^4.15.1",
"webpack-merge": "^5.9.0"
},
"peerDependencies": {
"react": ">=17.0.2 <19.0.0",
"react-dom": ">=17.0.2 <19.0.0"
}
}
8 changes: 5 additions & 3 deletions packages/dashbuilder-component-svg-heatmap/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@
"dependencies": {
"@kie-tools-core/patternfly-base": "workspace:*",
"@kie-tools/dashbuilder-component-api": "workspace:*",
"heatmap.js": "^2.0.5",
"react": "^17.0.2",
"react-dom": "^17.0.2"
"heatmap.js": "^2.0.5"
},
"devDependencies": {
"@babel/core": "^7.16.0",
Expand All @@ -47,5 +45,9 @@
"webpack-cli": "^4.10.0",
"webpack-dev-server": "^4.15.1",
"webpack-merge": "^5.9.0"
},
"peerDependencies": {
"react": ">=17.0.2 <19.0.0",
"react-dom": ">=17.0.2 <19.0.0"
}
}
8 changes: 5 additions & 3 deletions packages/dashbuilder-component-table/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@
"@kie-tools-core/patternfly-base": "workspace:*",
"@kie-tools/dashbuilder-component-api": "workspace:*",
"@patternfly/react-core": "^4.276.6",
"@patternfly/react-table": "^4.112.39",
"react": "^17.0.2",
"react-dom": "^17.0.2"
"@patternfly/react-table": "^4.112.39"
},
"devDependencies": {
"@babel/core": "^7.16.0",
Expand All @@ -49,5 +47,9 @@
"webpack-cli": "^4.10.0",
"webpack-dev-server": "^4.15.1",
"webpack-merge": "^5.9.0"
},
"peerDependencies": {
"react": ">=17.0.2 <19.0.0",
"react-dom": ">=17.0.2 <19.0.0"
}
}
8 changes: 5 additions & 3 deletions packages/dashbuilder-component-timeseries/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@
},
"dependencies": {
"@kie-tools/dashbuilder-component-api": "workspace:*",
"@kie-tools/dashbuilder-component-echarts-base": "workspace:*",
"react": "^17.0.2",
"react-dom": "^17.0.2"
"@kie-tools/dashbuilder-component-echarts-base": "workspace:*"
},
"devDependencies": {
"@babel/core": "^7.16.0",
Expand All @@ -46,5 +44,9 @@
"webpack-cli": "^4.10.0",
"webpack-dev-server": "^4.15.1",
"webpack-merge": "^5.9.0"
},
"peerDependencies": {
"react": ">=17.0.2 <19.0.0",
"react-dom": ">=17.0.2 <19.0.0"
}
}
6 changes: 4 additions & 2 deletions packages/dashbuilder-component-uniforms/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@
"@patternfly/react-table": "^4.112.39",
"ajv": "^6.12.6",
"lodash": "^4.17.21",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"uniforms": "^3.10.2",
"uniforms-bridge-json-schema": "^3.10.2"
},
Expand All @@ -52,5 +50,9 @@
"webpack-cli": "^4.10.0",
"webpack-dev-server": "^4.15.1",
"webpack-merge": "^5.9.0"
},
"peerDependencies": {
"react": ">=17.0.2 <19.0.0",
"react-dom": ">=17.0.2 <19.0.0"
}
}
6 changes: 4 additions & 2 deletions packages/dashbuilder-component-victory-charts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@
"@patternfly/react-core": "^4.276.6",
"@patternfly/react-table": "^4.112.39",
"numeral": "^2.0.6",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"victory-zoom-container": "^35.11.4"
},
"devDependencies": {
Expand All @@ -53,5 +51,9 @@
"webpack-cli": "^4.10.0",
"webpack-dev-server": "^4.15.1",
"webpack-merge": "^5.9.0"
},
"peerDependencies": {
"react": ">=17.0.2 <19.0.0",
"react-dom": ">=17.0.2 <19.0.0"
}
}
6 changes: 4 additions & 2 deletions packages/dashbuilder-editor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@
"json-schema": "^0.4.0",
"monaco-editor": "^0.39.0",
"monaco-yaml": "^4.0.4",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"vscode-languageserver-types": "^3.16.0"
},
"devDependencies": {
Expand All @@ -69,5 +67,9 @@
"webpack-cli": "^4.10.0",
"webpack-dev-server": "^4.15.1",
"webpack-merge": "^5.9.0"
},
"peerDependencies": {
"react": ">=17.0.2 <19.0.0",
"react-dom": ">=17.0.2 <19.0.0"
}
}
8 changes: 5 additions & 3 deletions packages/dashbuilder-viewer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@
"@kie-tools-core/patternfly-base": "workspace:*",
"@kie-tools-core/workspace": "workspace:*",
"@patternfly/react-core": "^4.276.6",
"@patternfly/react-icons": "^4.93.6",
"react": "^17.0.2",
"react-dom": "^17.0.2"
"@patternfly/react-icons": "^4.93.6"
},
"devDependencies": {
"@babel/core": "^7.16.0",
Expand All @@ -59,5 +57,9 @@
"webpack-cli": "^4.10.0",
"webpack-dev-server": "^4.15.1",
"webpack-merge": "^5.9.0"
},
"peerDependencies": {
"react": ">=17.0.2 <19.0.0",
"react-dom": ">=17.0.2 <19.0.0"
}
}
6 changes: 4 additions & 2 deletions packages/dev-deployment-dmn-form-webapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@
"@readme/openapi-parser": "^2.5.0",
"json-refs": "^3.0.15",
"lodash": "^4.17.21",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-router": "^5.3.4",
"react-router-dom": "^5.3.4"
},
Expand Down Expand Up @@ -76,5 +74,9 @@
"webpack-cli": "^4.10.0",
"webpack-dev-server": "^4.15.1",
"webpack-merge": "^5.9.0"
},
"peerDependencies": {
"react": ">=17.0.2 <19.0.0",
"react-dom": ">=17.0.2 <19.0.0"
}
}
Loading

0 comments on commit 1e6b21e

Please sign in to comment.