ljharb/ls-engines

Doesn't validate the current package's stated engines criteria is met by it's dependencies.

Closed this issue · 3 comments

It was a little bit unexpected what the result would be at first. I see it validates the current node version against all the dependencies of the module.

It would be nice to see that the current module "engines" is compatible with its dependencies' engines range. That way it can be a valuable addition to a CI build for libraries since we don't always have the opportunity to test on every node version before releasing. It would also catch any version changes from downstream modules which didn't come with a major version.

That absolutely makes sense. Currently it incorporates the root's "engines" and tests the current node version - but it seems like what it should actually do is two separate things (perhaps controlled by separate options):

  1. validate that the root's "engines" is a subset of the graphs' "engines"
  2. validate that the current node matches the root's "engines"
travi commented

depending on what you want the scope of this package to be, there is already another package that covers 2.

Noted; i'll focus on 1 first, but 2 seems like a trivial addition on top of that.