{"action":"closed","issue":{"url":"https://api.github.com/repos/npm/node-semver/issues/178","repository_url":"https://api.github.com/repos/npm/node-semver","labels_url":"https://api.github.com/repos/npm/node-semver/issues/178/labels{/name}","comments_url":"https://api.github.com/repos/npm/node-semver/issues/178/comments","events_url":"https://api.github.com/repos/npm/node-semver/issues/178/events","html_url":"https://github.com/npm/node-semver/issues/178","id":190273170,"number":178,"title":"Feature request: compare two ranges","user":{"login":"ljharb","id":45469,"avatar_url":"https://avatars1.githubusercontent.com/u/45469?v=4","gravatar_id":"","url":"https://api.github.com/users/ljharb","html_url":"https://github.com/ljharb","followers_url":"https://api.github.com/users/ljharb/followers","following_url":"https://api.github.com/users/ljharb/following{/other_user}","gists_url":"https://api.github.com/users/ljharb/gists{/gist_id}","starred_url":"https://api.github.com/users/ljharb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ljharb/subscriptions","organizations_url":"https://api.github.com/users/ljharb/orgs","repos_url":"https://api.github.com/users/ljharb/repos","events_url":"https://api.github.com/users/ljharb/events{/privacy}","received_events_url":"https://api.github.com/users/ljharb/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-11-18T09:30:53Z","updated_at":"2017-07-24T18:49:25Z","closed_at":"2017-07-24T18:49:25Z","body":"I'm trying to compare an existing semver range in a package.json, with a peerDependency range in another package.json - in other words, I want to see if the two ranges are compatible (ie, if there exists a version that satisfies both).\r\n\r\nI tried playing with `Range` but couldn't come up with anything.\r\n\r\nA simple example would be, `^1.2.3` and `<= 1.3.0` should return either a semver range that satisfies both, or the highest version number that satisfies both (either is sufficient).\r\n\r\nIs this possible?"}}
{"actor":{"display_login":"isaacs"}}