chore: add ink and react peer dependencies #5
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In some cases right now packages might be installed weirdly in
node_modules
- especially if you end up in 2 separate instances ofreact
(1 for frontend code and 1 for terminal utility usingink
). This seems to give hint to package managers (tested withyarn
andnpm
on how to structure packages innode_modules
).Some background on this - in https://github.com/gatsbyjs/gatsby we want to move our CLI to use
ink
, but because primarlygatsby
is tool for frontend where user specifyreact
version (it's not bundled withgatsby
). We might end up with 2react
instances if user is using react version lower than16.8.0
(which is specified is minimal peer dependency inink
( https://github.com/vadimdemedes/ink/blob/master/package.json#L84-L86 ). Because of thatink
component packages might end up being hoisted to top levelnode_modules
butink
andreact
itself might be innode_modules/gatsby-cli/node_modules
, which cause "Module not found" errors fromink-spinner
when it tries to import from those modules.I was testing this before with forked/scoped of
ink-spinner
( https://unpkg.com/@pieh/[email protected]/package.json ) and it seems to solve issues we saw, whenreact@<16.8.0
was used.I might not sure on exact versions of
ink
andreact
to chose for peer dependencies - so I choose lowestink
and samereact
as indevDeps
.