Is there a way to set the version of a dependency to be the same as the one of another dependency #3694
Unanswered
vinassefranche
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi everybody!
We are declaring
superagent
in our dev dependencies to mock it in our test as one of our library is making calls to an api and we don't want this to happen.We are using jest.mock to do that, something like:
With pnp, it can only work if the version of
superagent
declared in our package.json is the exact same as the version declared in the dependency's package.json. As it's the only reason why we have declared thissuperagent
dependency, we would like to enforce that it's always the same version as in the other dependency.Would there be a way of doing so? Should I open a feature request for this, if it's not the case?
Thanks in advance for your answer!
Beta Was this translation helpful? Give feedback.
All reactions