Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change peerDependencies to optionalDependencies
optionalDependencies dont spill a bunch of warnings on the screen. I use ioredis and it's reminding me to always install redis and redis-mock. https://yarnpkg.com/lang/en/docs/dependency-types/ optionalDependencies Optional dependencies are just that: optional. If they fail to install, Yarn will still say the install process was successful. This is useful for dependencies that wonβt necessarily work on every machine and you have a fallback plan in case they are not installed (e.g. Watchman). PR: #280
- Loading branch information
008fc43
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wavded @knoxcard isn't
redis
a peer dependency because it doesn't come bundled with the library anymore since v4.0?008fc43
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It used to be a peer dependency, but it is now optional. Keeping library lightweight while giving the end user more flexibility.
You can use either:
008fc43
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@BorntraegerMarc Ugg...
optionalDependencies
has the behavior of installing them unless they fail to build so that was incorrect as well. We now do not specifyoptional
orpeer
as neither is accurate and both lead to confusing messaging. The documentation on how to use the library wins in this case and is the clearest.package.json
does not have a good way of describing what we are trying to say here.