{"action":"opened","issue":{"url":"https://api.github.com/repos/meteor/meteor/issues/4165","labels_url":"https://api.github.com/repos/meteor/meteor/issues/4165/labels{/name}","comments_url":"https://api.github.com/repos/meteor/meteor/issues/4165/comments","events_url":"https://api.github.com/repos/meteor/meteor/issues/4165/events","html_url":"https://github.com/meteor/meteor/issues/4165","id":67452462,"number":4165,"title":"Subpackage version dependencies not being resolved correctly in `api.use()`","user":{"login":"cmnjcs","id":4852816,"avatar_url":"https://avatars.githubusercontent.com/u/4852816?v=3","gravatar_id":"","url":"https://api.github.com/users/cmnjcs","html_url":"https://github.com/cmnjcs","followers_url":"https://api.github.com/users/cmnjcs/followers","following_url":"https://api.github.com/users/cmnjcs/following{/other_user}","gists_url":"https://api.github.com/users/cmnjcs/gists{/gist_id}","starred_url":"https://api.github.com/users/cmnjcs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmnjcs/subscriptions","organizations_url":"https://api.github.com/users/cmnjcs/orgs","repos_url":"https://api.github.com/users/cmnjcs/repos","events_url":"https://api.github.com/users/cmnjcs/events{/privacy}","received_events_url":"https://api.github.com/users/cmnjcs/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-04-09T21:14:50Z","updated_at":"2015-04-09T21:14:50Z","closed_at":null,"body":"It appears that the version selector used in `api.use()` does not always follow the specification outlined in [the docs](http://docs.meteor.com/#/full/pack_use). Based on my experimenting, this problem happens more often with packages at `v0` than those at `v1` or greater. Process to replicate:\r\n\r\n* Clone https://github.com/grovelabs/versioning-sample-app\r\n* Run the application\r\n* In `packages/meteor-collection2-master/package.js`, uncomment lines 21-24. Note that the four packages listed (as well as a fifth, `twbs:bootstrap`, which is a dependency of `fezvrasta:bootstrap-material-design`) are added to the project. Only `faisalman:ua-parser-js` is at the correct version (`0.7.5`); the others (excluding `twbs:bootstrap`) are old versions of their packages. The command line output is:\r\n```\r\nedgee:slingshot                      added, version 0.0.3    // should be 0.6.1\r\nfaisalman:ua-parser-js               added, version 0.7.5    // correct\r\nfezvrasta:bootstrap-material-design  added, version 0.2.1    // should be 0.3.0\r\nmomentjs:moment                      added, version 2.8.4    // should be 2.10.2\r\ntwbs:bootstrap                       added, version 3.3.4    // correct\r\n```\r\n* Then, in the same `package.js` file, comment out lines 21-24 and uncomment lines 26-29. After saving, note that no packages are updated. According to the docs, specifying `x.0.0` should cause the package version with the highest version number still starting with `x` to be selected, but this does not match the observed behavior.\r\n* Then, in the same `package.js` file, comment out lines 26-29 and uncomment lines 31-34. Note that the three packages with old versions are correctly updated to the specified versions. Command line output is:\r\n```\r\nedgee:slingshot                      upgraded from 0.0.3 to 0.6.1\r\nfezvrasta:bootstrap-material-design  upgraded from 0.2.1 to 0.3.0\r\nmomentjs:moment                      upgraded from 2.8.4 to 2.10.2\r\n```\r\n\r\nNote: all of the packages selected for this project were effectively arbitrary; I was simply going for a spread of packages in `v0` and beyond."}}