Skip to content
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

add React 17 to peerDep range -- needs to update devDeps and tests #64

Closed
wants to merge 1 commit into from

Conversation

atomicpages
Copy link

Fixes npm 7 install errors (really warnings)

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: example@1.0.0
npm ERR! Found: react@17.0.2
npm ERR! node_modules/react
npm ERR!   react@"^17.0.0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer react@"0.14 - 16" from react-signature-canvas@1.0.3
npm ERR! node_modules/react-signature-canvas
npm ERR!   react-signature-canvas@"*" from the root project

@luke9216

This comment has been minimized.

@Shahaed

This comment has been minimized.

@agilgur5
Copy link
Owner

agilgur5 commented Feb 6, 2022

have to re-set-up Travis CI

Normally I could merge in something like this pretty quickly, but apparently CI has been down for like 6+ months as Travis decommissioned their .org domain.

Will have to re-set-up that and make sure all tests pass before merging

thanks for the detail in the PR!

npm 7 install errors (really warnings)

Thanks for logging the error here and noting they are just warnings @atomicpages ! I haven't done much front-end dev in the past year (my day job tends to be SRE-focused past few years) so I haven't actually tried NPM 7 myself yet.

maintainers are human too, and also volunteers

To the other commenters, friendly reminder that one-word comments are spammy and you can use reactions instead. Also if a person has set on their status "Taking a break from toxicity and abuse 😞", probably not appropriate to spam their handle repeatedly, especially when GitHub tells you their status when doing so. 😐

@agilgur5 agilgur5 changed the title React 17 Peer Dep add React 17 to peerDep range Feb 6, 2022
@agilgur5 agilgur5 added the scope: dependencies Pull requests that update a dependency file label Feb 7, 2022
@agilgur5 agilgur5 linked an issue Feb 7, 2022 that may be closed by this pull request
Copy link
Owner

@agilgur5 agilgur5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately there are some issues with this PR.

Per #58 (comment), the devDeps need updating as well so that the tests use React 17.

This is actually a good bit easier said than done because the Enzyme Adapter has to be updated. Per enzymejs/enzyme#2429, no official adapter is available yet for React 17.
React 17 has been a complicated change for Enzyme, and as it only has 1 active contributor, such complex roadblocks have caused it to stall.

There is an unofficial adapter with partial support for React 17 though. It is likely enough for the use-case within this repo, so I'll try to get in an upgrade with that.

That being said, the author of the unofficial adapter has stated that React 18 support requires even more complicated changes. They suggest using RTL, but it actually doesn't support instance methods, which, per my first testing issue, is a blocker as react-signature-canvas actually has a ref-based API and so needs tests for it.

So while we may be able to get by unofficially with the unofficial React 17 adapter, there's not much of a path for testing React 18 as of now.

@agilgur5
Copy link
Owner

agilgur5 commented Feb 9, 2022

Per this blog post, looks like react-dom-instance + RTL could be an alternative to Enzyme for React 18. Though that library also hasn't been updated in 2 years and is also tested with React 16 😕

@agilgur5
Copy link
Owner

agilgur5 commented Feb 9, 2022

Replaced by #69

Repository owner locked as resolved and limited conversation to collaborators Feb 9, 2022
Repository owner unlocked this conversation Feb 9, 2022
Repository owner locked as resolved and limited conversation to collaborators Feb 27, 2022
@agilgur5 agilgur5 changed the title add React 17 to peerDep range add React 17 to peerDep range -- needs to update devDeps and tests May 4, 2022
@agilgur5 agilgur5 added the kind: feature New feature or request label Jun 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind: feature New feature or request scope: dependencies Pull requests that update a dependency file solution: invalid
Projects
None yet
Development

Successfully merging this pull request may close these issues.

React 17 support in peerDeps range
4 participants