{"action":"created","issue":{"url":"https://api.github.com/repos/dpa99c/cordova-check-plugins/issues/8","repository_url":"https://api.github.com/repos/dpa99c/cordova-check-plugins","labels_url":"https://api.github.com/repos/dpa99c/cordova-check-plugins/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/dpa99c/cordova-check-plugins/issues/8/comments","events_url":"https://api.github.com/repos/dpa99c/cordova-check-plugins/issues/8/events","html_url":"https://github.com/dpa99c/cordova-check-plugins/issues/8","id":141130773,"number":8,"title":"Not detecting new version available when using @1.0.1","user":{"login":"alejandromagnorsky","id":3474637,"avatar_url":"https://avatars.githubusercontent.com/u/3474637?v=3","gravatar_id":"","url":"https://api.github.com/users/alejandromagnorsky","html_url":"https://github.com/alejandromagnorsky","followers_url":"https://api.github.com/users/alejandromagnorsky/followers","following_url":"https://api.github.com/users/alejandromagnorsky/following{/other_user}","gists_url":"https://api.github.com/users/alejandromagnorsky/gists{/gist_id}","starred_url":"https://api.github.com/users/alejandromagnorsky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alejandromagnorsky/subscriptions","organizations_url":"https://api.github.com/users/alejandromagnorsky/orgs","repos_url":"https://api.github.com/users/alejandromagnorsky/repos","events_url":"https://api.github.com/users/alejandromagnorsky/events{/privacy}","received_events_url":"https://api.github.com/users/alejandromagnorsky/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-15T23:53:31Z","updated_at":"2016-03-16T07:48:17Z","closed_at":null,"body":"Hello. Very nice and useful plugin!\r\nUnluckily, is not working for me though:\r\nHere is the output of cordova-check-plugins --verbose:\r\n```\r\nChecking latest npm registry version for 'cordova-plugin-geolocation' using 'cordova-plugin-geolocation@1.0.1'\r\nplugin: cordova-plugin-geolocation\r\nsource: npm://cordova-plugin-geolocation@1.0.1\r\ninstalled version: 1.0.1\r\nremote version: 1.0.1\r\n```\r\nFor adding that plugin I used the command:\r\n`cordova add plugin cordova-plugin-geolocation@1.0.1`\r\nBecause I want to have full control over the versions I'm using. The idea of using this plugin is to detect if there is a new version of the plugin I use or not (similar to how npm-check-updates works)."},"comment":{"url":"https://api.github.com/repos/dpa99c/cordova-check-plugins/issues/comments/197199814","html_url":"https://github.com/dpa99c/cordova-check-plugins/issues/8#issuecomment-197199814","issue_url":"https://api.github.com/repos/dpa99c/cordova-check-plugins/issues/8","id":197199814,"user":{"login":"dpa99c","id":2345062,"avatar_url":"https://avatars.githubusercontent.com/u/2345062?v=3","gravatar_id":"","url":"https://api.github.com/users/dpa99c","html_url":"https://github.com/dpa99c","followers_url":"https://api.github.com/users/dpa99c/followers","following_url":"https://api.github.com/users/dpa99c/following{/other_user}","gists_url":"https://api.github.com/users/dpa99c/gists{/gist_id}","starred_url":"https://api.github.com/users/dpa99c/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dpa99c/subscriptions","organizations_url":"https://api.github.com/users/dpa99c/orgs","repos_url":"https://api.github.com/users/dpa99c/repos","events_url":"https://api.github.com/users/dpa99c/events{/privacy}","received_events_url":"https://api.github.com/users/dpa99c/received_events","type":"User","site_admin":false},"created_at":"2016-03-16T07:48:17Z","updated_at":"2016-03-16T07:48:17Z","body":"I understand what you're saying, but this needs a bit of consideration.\r\n\r\nI myself often constrain plugins to the major version, e.g `cordova-plugin-geolocation@1`. In this case, I only want to know about new minor versions/builds, so if the remote versions available were 1.0.1, 1.0.2, 1.1.0, 2.0.0, I'd want to see 1.1.0 being returned as the available remote version, not 2.0.0.\r\n\r\nSo if I completely unconstrain the remote version in this tool (i.e. ignore everything after @) then I think this will also be a problem.\r\n\r\nI see two possibilities:\r\n\r\n1. If the specified version number specifies an exact version (i.e. `@X.Y.Z`), ignore the specified version number and return the highest available remote version. In the above example, `cordova-plugin-geolocation@1.0.1` would return 2.0.0. But `@X' or `@X.Y` (e.g `cordova-plugin-geolocation@1`) would still return 1.1.0.\r\n\r\n2. Add a command-line flag to unconstrain the version number (e.g. `--unconstrainVersion`). This would effectively ignore the specified version number following the @ and return the highest available remote version. So, using the example above, both `cordova-plugin-geolocation@1.0.1` and `cordova-plugin-geolocation@1.0` would return a remote version of 2.0.0. \r\n\r\nWhat do you think?"}}