Why `cls-hooked` is peer dependency?
See original GitHub issueIMHO peer dependencies are required if you are building plugins for some library. For example lets say you are building webpack plugin then webpack
will become your peer dependency.
And some who is using webpack can use use your plugin.
But here I think we only need to use this library cls-rtracer
, and I am not using cls-hooked
.
By this logic I think we can add cls-hooked
under your dependencies
section from peerDependencies
.
Any thoughts?
I can raise a pull request if you guys agree.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Peer Dependencies | Node.js
The Solution: Peer Dependencies Some way of saying, "I only work when plugged in to version 1.2. x of my host package, so...
Read more >Understanding Peer Dependencies in JavaScript
When to use peerDependencies? Peer dependencies really come into play when you're developing code that will be used by others, such as plugins...
Read more >What are peer dependencies in a Node module? - Flavio Copes
When a dependency is listed in a package as a peerDependency, it is not automatically installed. Instead, the code that includes the package ......
Read more >cls-hooked - npm
Start using cls-hooked in your project by running `npm i cls-hooked`. There are 681 other projects in the npm registry using cls-hooked.
Read more >Why use peer dependencies in npm for plugins?
TL;DR: peerDependencies are for dependencies that are exposed to (and expected to be used by) the consuming code, as opposed to "private" ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks @puzpuzpuz for the explanation. Waiting for them to get merged.
Guys, it seems like there should be only one cls-hooked instance present. Take a look at this line. With multiple instances of cls-hooked there will be conflicts.