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

fix: peer dependencies #2656

Merged
merged 7 commits into from
May 17, 2023
Merged

fix: peer dependencies #2656

merged 7 commits into from
May 17, 2023

Conversation

jacobsfletch
Copy link
Member

Description

Resolves all react version conflicts and eslint related peer dependency warnings.

  • I have read and understand the CONTRIBUTING.md document in this repository

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • Existing test suite passes locally with my changes

@DanRibbens
Copy link
Contributor

I'd say fixing dependencies is not a feat, should be a fix for the changelog and semantic versioning.

I didn't uncover any other issues with this PR. I linked a project to use it with npm. Came up with a lot of warnings, but I guess that is expected:

npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: react-diff-viewer@3.1.1
npm WARN Found: react@18.2.0
npm WARN node_modules/payload/node_modules/react
npm WARN   react@"^18.2.0" from payload@1.8.2
npm WARN   node_modules/payload
npm WARN     payload@"*" from the root project
npm WARN   21 more (@dnd-kit/core, react-dom, @dnd-kit/sortable, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react@"^15.3.0 || ^16.0.0" from react-diff-viewer@3.1.1
npm WARN node_modules/payload/node_modules/react-diff-viewer
npm WARN   react-diff-viewer@"^3.1.1" from payload@1.8.2
npm WARN   node_modules/payload
npm WARN
npm WARN Conflicting peer dependency: react@16.14.0
npm WARN node_modules/react
npm WARN   peer react@"^15.3.0 || ^16.0.0" from react-diff-viewer@3.1.1
npm WARN   node_modules/payload/node_modules/react-diff-viewer
npm WARN     react-diff-viewer@"^3.1.1" from payload@1.8.2
npm WARN     node_modules/payload
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: react-diff-viewer@3.1.1
npm WARN Found: react-dom@18.2.0
npm WARN node_modules/payload/node_modules/react-dom
npm WARN   react-dom@"^18.2.0" from payload@1.8.2
npm WARN   node_modules/payload
npm WARN     payload@"*" from the root project
npm WARN   13 more (@dnd-kit/core, @faceless-ui/modal, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react-dom@"^15.3.0 || ^16.0.0" from react-diff-viewer@3.1.1
npm WARN node_modules/payload/node_modules/react-diff-viewer
npm WARN   react-diff-viewer@"^3.1.1" from payload@1.8.2
npm WARN   node_modules/payload
npm WARN
npm WARN Conflicting peer dependency: react-dom@16.14.0
npm WARN node_modules/react-dom
npm WARN   peer react-dom@"^15.3.0 || ^16.0.0" from react-diff-viewer@3.1.1
npm WARN   node_modules/payload/node_modules/react-diff-viewer
npm WARN     react-diff-viewer@"^3.1.1" from payload@1.8.2
npm WARN     node_modules/payload
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: react-select@3.2.0
npm WARN Found: react@18.2.0
npm WARN node_modules/payload/node_modules/react
npm WARN   react@"^18.2.0" from payload@1.8.2
npm WARN   node_modules/payload
npm WARN     payload@"*" from the root project
npm WARN   21 more (@dnd-kit/core, react-dom, @dnd-kit/sortable, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react@"^16.8.0 || ^17.0.0" from react-select@3.2.0
npm WARN node_modules/payload/node_modules/react-select
npm WARN   react-select@"^3.2.0" from payload@1.8.2
npm WARN   node_modules/payload
npm WARN
npm WARN Conflicting peer dependency: react@17.0.2
npm WARN node_modules/react
npm WARN   peer react@"^16.8.0 || ^17.0.0" from react-select@3.2.0
npm WARN   node_modules/payload/node_modules/react-select
npm WARN     react-select@"^3.2.0" from payload@1.8.2
npm WARN     node_modules/payload
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: react-select@3.2.0
npm WARN Found: react-dom@18.2.0
npm WARN node_modules/payload/node_modules/react-dom
npm WARN   react-dom@"^18.2.0" from payload@1.8.2
npm WARN   node_modules/payload
npm WARN     payload@"*" from the root project
npm WARN   13 more (@dnd-kit/core, @faceless-ui/modal, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react-dom@"^16.8.0 || ^17.0.0" from react-select@3.2.0
npm WARN node_modules/payload/node_modules/react-select
npm WARN   react-select@"^3.2.0" from payload@1.8.2
npm WARN   node_modules/payload
npm WARN
npm WARN Conflicting peer dependency: react-dom@17.0.2
npm WARN node_modules/react-dom
npm WARN   peer react-dom@"^16.8.0 || ^17.0.0" from react-select@3.2.0
npm WARN   node_modules/payload/node_modules/react-select
npm WARN     react-select@"^3.2.0" from payload@1.8.2
npm WARN     node_modules/payload
npm WARN ERESOLVE overriding peer dependency
npm WARN deprecated stable@0.1.8: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility

added 157 packages, and audited 159 packages in 1m

14 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

@jacobsfletch
Copy link
Member Author

I think we're in good shape here, running a quick npm list react show that 18.2.0 is installed at the top-level, and all dependencies that rely on it are being deduped as expected (highlighted in my screenshot):

Screenshot 2023-05-17 at 12 53 36 PM

I am going to give this one final pass from a UI perspective since the react-select migration did effect css, but other than that this ticket is resolved.

@jacobsfletch
Copy link
Member Author

jacobsfletch commented May 17, 2023

And here's also a screenshot of a fresh install, there's a few warnings but nothing related to react, screenshots are of yarn followed by npm:

Yarn:

Screenshot 2023-05-17 at 1 01 07 PM

NPM:

Screenshot 2023-05-17 at 1 13 38 PM

@jacobsfletch
Copy link
Member Author

Screenshot 2023-05-17 at 3 39 55 PM

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.

Boiler plate app throws React error
4 participants