-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Update react-virtual with patch to support React 18 #1765
Conversation
react-virtual with support for React 18 is released under @tanstack/react-virtual |
react-virtual is now available as v3 and published under @tanstack/react-virtual. The old version will not receive updates anymore, see cloudscape-design/components#1765 (comment). Fixes timc1#330
react-virtual is now available as v3 and published under @tanstack/react-virtual. The old version will not receive updates anymore, see cloudscape-design/components#1765 (comment). Fixes timc1#330
Hello, just to close up on this thread, the proposed change does not fix anything. It updates our own PR build process, but changes nothing in the output artifacts, because your build pulls the original To fix installation issues you can use |
commit 51879c7 Author: Felix Uhl <github@mail.felix-uhl.de> Date: Sun Dec 10 17:15:24 2023 +0100 Fix type error commit a19a064 Author: Felix Uhl <github@mail.felix-uhl.de> Date: Sun Dec 10 15:29:40 2023 +0100 Upgrade to react-virtual 3.0.1 react-virtual is now available as v3 and published under @tanstack/react-virtual. The old version will not receive updates anymore, see cloudscape-design/components#1765 (comment). Fixes timc1#330
react-virtual is now available as v3 and published under @tanstack/react-virtual. The old version will not receive updates anymore, see cloudscape-design/components#1765 (comment). Fixes timc1#330
react-virtual is now available as v3 and published under @tanstack/react-virtual. The old version will not receive updates anymore, see cloudscape-design/components#1765 (comment). Fixes timc1#330
react-virtual is now available as v3 and published under @tanstack/react-virtual. The old version will not receive updates anymore, see cloudscape-design/components#1765 (comment). Fixes timc1#330
react-virtual is now available as v3 and published under @tanstack/react-virtual. The old version will not receive updates anymore, see cloudscape-design/components#1765 (comment). Fixes timc1#330
Description
This PR introduces a temporary workaround to address the compatibility issue with React 18 in the react-virtual package, a dependency of @cloudscape-design/components. The core of the issue is that react-virtual specifies peer dependencies that do not include React 18, leading to an unmet peer dependency error in environments using the latest version of React:
Given that the library maintainer has yet to release a version of react-virtual with official support for React 18 (TanStack/virtual#278, TanStack/virtual#568), this PR implements a patch as a temporary measure.
Changes:
Patch File Creation (react-virtual.patch): A new patch file has been created that modifies the package.json of react-virtual to include || ^18.0.0 in the peerDependencies section for React. This allows the library to recognize React 18 as a valid peer dependency.
Patch Diff:
Modification to package.json: The project's package.json has been updated to include
"postinstall": "patch-package"
. This addition ensures the patch is applied automatically post-installation.New Dependency (patch-package): The patch-package package has been added to the project. This package allows us to apply patches to node modules easily, facilitating this temporary workaround.
Rationale:
Implementing this patch allows us to continue using @cloudscape-design/components with React 18 without waiting for an official update from react-virtual. It's a straightforward, low-risk solution to maintain compatibility and ensure smooth project progress.
Next Steps:
We will monitor the upstream react-virtual repository for an official release that includes React 18 support. Once available, we can revert this patch and update the dependency accordingly.
Related links, issue #, if available: n/a
How has this been tested?
Review checklist
The following items are to be evaluated by the author(s) and the reviewer(s).
Correctness
CONTRIBUTING.md
.CONTRIBUTING.md
.Security
checkSafeUrl
function.Testing
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.