bahmutov/deps-ok — pull request #11 by galniv (2014-03-21 20:15:43+00:00)
Title: Improve validation and comparison of version ranges

The semver module makes a distinction between a "version" as specified in the version field of package.json, and a "version range" which is used to specify dependency versions in npm/bower. The former is very restrictive, while the latter allows for version strings such as ">=1.0.1", "1.0.x", etc.

The semver.clean function only applies to a *version*, rather than a *version range*, and would thus fail for many valid dependency version range strings (such as the ones mentioned above). Additionally, the semver.**lt** function compares a version to another version, while semver.**ltr** compares a version to a version *range*.

The code in this pull request treats dependency versions as *version ranges* rather than *versions*.