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

Support react 18 peer dependency #387

Merged
merged 1 commit into from
May 4, 2023
Merged

Conversation

marcod1419
Copy link
Contributor

@marcod1419 marcod1419 commented Apr 11, 2023

Adds support for React 18 in the project's peer dependencies, preventing an error that requires users on React 18 to use the --legacy-peer-deps command. I appended React 18 instead of replacing 16 and 17 to prevent a breaking change. All tests appear to pass as well with no code changes. Thanks for your time!

@krishnasaga
Copy link
Contributor

@marcod1419 Your code change will help to prevent the warning/error during install

But this will not resolve #369

@marcod1419
Copy link
Contributor Author

@krishnasaga Ah, ok I'll remove the resolution. Would it be ok to get this merged anyway to prevent the error?

@krishnasaga
Copy link
Contributor

@alex-cory could you let us know your thoughts this ?

@deniszatishnyi
Copy link

deniszatishnyi commented Apr 24, 2023

Are you sure changing peerDependencies is enough? In some cases, loading did not work properly, when I used the use-http along in the react 18 (in strict mode)

@krishnasaga
Copy link
Contributor

@marcod1419 want to prevent the warning/error during npm install So somebody can use it without strict mode

@alex-cory
Copy link
Collaborator

Hey guys, apologies for the delay. Been crazy busy.

@alex-cory alex-cory merged commit 6225d32 into ava:master May 4, 2023
@alex-cory
Copy link
Collaborator

Okay guys, should be available in v1.0.28. Published to npm

@sjdemartini
Copy link

Thanks for merging and releasing!

Unfortunately, yarn still complains about React 18 compatibility when installing the latest version, due to the underlying urs package (https://github.com/alex-cory/urs) also not allowing React 18 in its peer deps:

❯ yarn
➤ YN0000: ┌ Resolution step
➤ YN0060: │ frontend@workspace:. provides react (p93e41) with version 18.2.0, which doesn't satisfy what use-http and some of its descendants request
➤ YN0060: │ frontend@workspace:. provides react-dom (p56f5e) with version 18.2.0, which doesn't satisfy what use-http and some of its descendants request
➤ YN0000: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code
❯ yarn explain peer-requirements p93e41
➤ YN0000: frontend@workspace:. provides react@npm:18.2.0 with version 18.2.0, which doesn't satisfy the following requirements:

➤ YN0000: urs@npm:0.0.8 [13987]       → ^16.13.1 || ^17.0.0            ✘
➤ YN0000: use-http@npm:1.0.28 [d9650] → ^16.13.1 || ^17.0.0 || ^18.0.0 ✓
➤ YN0000: use-ssr@npm:1.0.25 [13987]  → ^16.13.1 || ^17.0.0 || ^18.0.0 ✓

➤ YN0000: Note: these requirements start with use-http@npm:1.0.28 [d9650]

(And sadly as noted before, there are other react 18 issues #369 besides the peer-dependency install warnings.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants