Open Methuselah96 opened 4 years ago
It could still not have been upgraded right away - peerdeps are strict requirements, and if npm ls does not exit zero, your dep graph is invalid and you can’t rely on anything working. npm 7 will fail installs if your peer deps are invalid.
That said, it should indeed be a peer dep.
@ljharb jest
was not in the devDependencies
of jest-enzyme
, so I was following the precedent set there. I'm fine with adding test dependencies to devDependencies
for individual packages, but it looks like we've relied on them being installed as a dev dependency on the monorepo up to this point, so I think that should be a more comprehensive change.
What's the status of this?
This increases flexibility for developers using this package. For example, I've been waiting for a couple months to upgrade to Jest 25 (see https://github.com/FormidableLabs/enzyme-matchers/issues/334). If this were a peer dependency, then I could have upgraded right away and it would have just automatically used the new version of
jest-environment-jsdom
.