-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Packages: Issues with peer dependencies with npm7+ after React 18 upgrade #48009
Comments
React autosize text area has been causing issues since the React 17 upgrade as well -- the maintainer hasn't been active in the repo, so no one can update its peer dependencies: https://github.com/buildo/react-autosize-textarea When I was working on the React 17 upgrade a year ago, there were a handful of other packages in a similar situation. I think there are two solutions to these types of issues:
|
Seems like there was a release 3 months ago, meaning it's not unmaintained. That adds a third option: work with the maintainers to provide support for React 18. |
We might be talking about different packages -- I definitely agree with you for packages that are still maintained, though. I think the big challenge is that it's easy to make a PR that changes the peer dependency line in package.json, and maybe also easy to test that it does actually work. But harder to get a response and then a new release. :( When packages are actively maintained, they're much less likely to get in this scenario since so many people will ask the maintainer to support the new React version. |
Yes, I must have been looking at this one: https://www.npmjs.com/package/react-textarea-autosize Which seems to support React 18 at a first glance. Perhaps it makes sense to try using this one? |
@wordpress/components is also using reakit "^1.3.8" which still depends on react 17.0.0. They rebranded their repo to ariakit, basically v2 which is using react and react-dom 18. I currently cannot tell how stable it is but I also get upgrade warnings of peerDependencies when installing react latest.
|
We are exploring using ariakit for "new implementation" of components, but we haven't looked into replacing existing usages of Hopefully the APIs didn't change much, which would allow for a smooth refactor. Maybe that's something that @diegohaz can help with, or at least advise on? |
It's still an issue. |
Remaining Reakit usages tracked here: #53278 |
Regarding the This attribute is already used in the This is a sample of Codepen, which simulates a code editor: https://codepen.io/Tetsuaki-Hamno/pen/abPGzgX There may be issues to be resolved in terms of HTML symbol sanitization, line breaks, and accessibility, but I would like to find time to try it out. |
Update: with #58631 merged, |
Update: react-autosize-textarea repository has been archived by the owner on Mar 1, 2024. |
I've experimented with removing It's a bummer that it's blocked by |
Description
Part of Upgrade node and npm to latest LTS versions.
See related PR in WordPress core: WordPress/wordpress-develop#4028. CI jobs fail because of the peer dependencies related to React 18 upgrade:
Step-by-step reproduction instructions
2.1. Try installing dependencies with Upgrade NodeJS to 16.x wordpress-develop#4028 branch.
or
2.2 Try installing one of the npm packages like
@wordpress/edit-post
:Screenshots, screen recording, code snippet
Environment info
latest
orwp-6.2
dist-tagPlease confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: