Closed carbonrobot closed 1 year ago
Latest commit: 60ee801a6a80e450739e589a28acc2f5aa5d0418
The changes in this PR will be included in the next version bump.
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
Move
@microlink/react-json-view
to peer dependency. Reported by @yankovaleraBug
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/6611Background
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 onflux
, andflux
has a peer dependency on React@17, whileenvy
has a peer dependency on React@18. The current npm bug then prevents the install and crashes.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 effectnpm>7
and used in the default way,@envyjs/webui
will work as expectednpm>7
and used as a custom viewer component,@envyjs/webui
will work as expectedyarn/pnpm
and used in the default way,@envyjs/webui
will work as expectedyarn/pnpm
and used as a custom viewer component, users will also need to install@microlink/react-json-view
as a dependency, sinceyarn/pnpm
do not install peer deps automaticallyFuture
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 thegroqd
's arcade...monaco-editor