FormidableLabs / envy

Node.js Telemetry & Network Viewer
https://envy-webui.vercel.app
MIT License
109 stars 0 forks source link

Move react-json-view to peer dependency #171

Closed carbonrobot closed 1 year ago

carbonrobot commented 1 year ago

Move @microlink/react-json-view to peer dependency. Reported by @yankovalera

Bug

Installing with npm>7.x causes an infinite loop due to conflicting React peer deps in client projects ref: https://github.com/npm/cli/issues/6611

Background

npm > 7 now installs peer dependencies by default

When running npm i @envyjs/webui in an demo repo, npm will automatically install peer dependencies and fail with an infinite loop. This is because @microlink/react-json-view has a dependency on flux, and flux has a peer dependency on React@17, while envy has a peer dependency on React@18. The current npm bug then prevents the install and crashes.

image

Locally, within the envy repo everything works as expected because we have a peer dependency resolution in our main package.json file.

Change

This moves @microlink/react-json-view to a peer dependency which has the following effect

Future

Many dependencies under @microlink/react-json-view are either deprecated or outdated. We should look into alternatives for json display. One possible replacement is the component we use in the groqd's arcade... monaco-editor

changeset-bot[bot] commented 1 year ago

🦋 Changeset detected

Latest commit: 60ee801a6a80e450739e589a28acc2f5aa5d0418

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 6 packages | Name | Type | | -------------- | ----- | | @envyjs/webui | Patch | | @envyjs/apollo | Patch | | @envyjs/core | Patch | | @envyjs/nextjs | Patch | | @envyjs/node | Patch | | @envyjs/web | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR