lordrip commented on code in PR #2559:
URL:
https://github.com/apache/incubator-kie-tools/pull/2559#discussion_r1751639392
##########
examples/base64png-editor/package.json:
##########
@@ -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"
Review Comment:
@fantonangeli , yes, the final package (consumer) should definitively
provide react. I was referring to another case though.
Let's ignore for a moment that `@kie-tools-examples/base64png-editor`
belongs to this repository, so the package json for it would look like the
following:
```json
{
"name": "@kie-tools-examples/base64png-editor",
...
"dependencies": {},
"devDependencies": {
"typescript": "5.0.0"
},
"peerDependencies": {
"react": ">=17.0.2 <19.0.0",
"react-dom": ">=17.0.2 <19.0.0"
}
}
```
Now, performing a `yarn install` won't bring `react` to the project, so the
project will fail when trying to run it in standalone mode as there's no react
dependency in the `node_modules`.
Now, this repository is slightly different as it's very likely that some
other package is bringing `react` to the `node_modules`, hence making it work,
but if by any chance I bootstrap just the
`@kie-tools-examples/base64png-editor` maybe it will fail, as some dependencies
of other packages won't be brought?
I'm not familiar with how `pnpm` works in terms of bootstraping packages and
whether if it will download dependencies for unresolved packages, but if it
does, then I think we're good, otherwise, :boom:
_Maybe :boom: is a bit too dramatic_
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]