question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Why `cls-hooked` is peer dependency?

See original GitHub issue

IMHO 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:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
anshulguleriacommented, Sep 25, 2019

Thanks @puzpuzpuz for the explanation. Waiting for them to get merged.

1reaction
aigoncharovcommented, Sep 25, 2019

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found