monocle-ts
monocle-ts copied to clipboard
missing dependencies?
🐛 Bug report
Current Behavior
Maybe I'm missing something but monocle-ts is a standalone library (not a plugin) that needs fp-ts to run yet fp-ts is only declared as dev and peer dependency.
Expected behavior
Things work as documented. There is no specific installation instructions so I assume simple npm install should work.
Reproducible example
npm install monocle-ts
then import {Lens} from "monocle-ts";
.
Suggested solution(s)
Move ts-fp to normal dependecies or explain installation in readme.
Additional context
Your environment
Which versions of monocle-ts are affected by this issue? Did this work in previous versions of monocle-ts?
Software | Version(s) |
---|---|
monocle-ts | 2.3.13 |
fp-ts | X |
TypeScript |
Hi @mwisnicki, from my perspective this behaviour makes sense. In the final application there should only be one single instance of fp-ts
otherwise this could lead to conflicts across components.
The way to ensure this with npm
is via peerDependencies
because then the application decides about the single copy of fp-ts
and not the components themselves.