Open ljharb opened 3 years ago
This is blocked on https://github.com/enzymejs/enzyme/pull/2430
@ljharb Thanks for adding this. I think it would be great if the peer dependency also supported ^16.0.0 instead of ^16.0.0-alpha.
@br4in3x why? That’s strictly fewer versions.
Hey @br4in3x and team, can we please get progress on this? Lack of React 17 peer dep definition has forced us to use --force / --legacy-peer-deps every npm install since last Fall. That seems like a tiny change to make. I can assure you the module works fine with React 17.
@tdd glad to hear it; we’re still waiting on https://github.com/airbnb/prop-types/pull/74#issuecomment-716833323 so that we don’t need to rely on such assurances.
While continuing to wait for an official Enzyme Adapter to support React 17, it appears https://github.com/wojtekmaj/enzyme-adapter-react-17 might be an option.
@jasco we won't ever use an unofficial adapter.
Looks like this PR has been sitting for some time. Is there any intention to add React 17 support? If so, can we get an ETA?
@marksmccann yes, the intention is eternal. There is no ETA, because enzyme’s react 17 support has no ETA. Once that lands, this can.
@ljharb Thanks for the quick reply. Looks like you've been waiting over a year and a half for enzyme to add support React 17. Looks like they also have attempted to update, but stalled out. And now that React 18 is out, you're getting further behind. Is there a point at which you throw in the towel and start searching for an alternative solution? Granted, I wouldn't want to do the migration, I'm just curious.
If an actual full alternative to enzyme were to appear (none currently exist) then I'd probably deprecate enzyme in favor of it, and switch this package to use it. However, there doesn't seem to be any interest in the community to fill that need, nor from the react team, so I remain convinced that the best path is still for enzyme to add support, and for these packages to continue to use it for testing.
If an actual full alternative to enzyme were to appear (none currently exist) then I'd probably deprecate enzyme in favor of it, and switch this package to use it. However, there doesn't seem to be any interest in the community to fill that need, nor from the react team, so I remain convinced that the best path is still for enzyme to add support, and for these packages to continue to use it for testing.
I found this library that has support for react 18: https://testing-library.com/docs/react-testing-library/migrate-from-enzyme maybe it'll help. That library also includes a migration from enzyme that could make the transition easier.
@Im-Fran no, unfortunately that package/ecosystem doesn't come remotely close to replicating enzyme's capabilities.
Is this what you're talking about?
Anyway, you know more than me about this repo :laughing: so you're the one to choose. Have you found any other alternative? because maybe it would be time to fork enzyme and update it by yourself
Mainly to support new versions, because I'm personally using the react outside click handler and it's holding me back. Even if it works in react 18 I would prefer for it to be officially supported.
I maintain enzyme, so there's no need to fork it - I just need the time, the help, or the money (such that I can create the time or hire the help) to update it, and it's been 5 years without anyone providing sufficient amounts of any of those.
I know this question shouldn't be in this issue (because it is from another repo), but why not merging https://github.com/enzymejs/enzyme/pull/2430? It's been there since 2020. I know that you need to make sure it works and everything, then post the release, but it would be a step forward merging some PRs, also it seems that one was already discussed by you and other people.
Also I wanted to thank you for your hard work <3 it's really good what you're doing with all these libraries :p
ok, just finished reading all the comments, and I saw that react had added some stuff that broke compatibility with enzyme. But that was react 17, what about 18?
I can't support 18 until I support 17 - and again, it's about available time.
Can I reach to you through twitter? Seems faster than this issue replies xD my username in twitter is ImFran I want to try and help you
yep, same username as here, my DMs are open
I guess this PR is gonna stay open till eternity. So, just to wrap up, currently there's no support for v17, and support for v18 can only be added after v17.
Fixes #73.