Project: titanium
Issue TIMOB-19470: CLI: ti setup doesn't properly select last available versions from npm
When I run {{ti setup}} and select *check* I get: {code} Node.js ✓ node up-to-date (v0.10.33) ★ npm new version v2.1.6 available! (currently v2.1.5) {code} However, on https://www.npmjs.org/package/npm and via {{npm info npm}} it has *2.1.5* as the last version. The {{versions}} array does have 2.1.6 but the CLI should look at {{version}} not {{versions}}. h2. Related code https://github.com/appcelerator/titanium/blob/master/lib/commands/setup.js#L516-L522 {code} if (info && info.versions) { for (var i = 0, vers = info.versions, l = vers.length; i < l; i++) { if (appc.version.gt(vers[i], r.npm.latest)) { r.npm.latest = vers[i]; } } } {code} h2. Proposed chage The above lines with: {code} if (info && info.version) { r.npm.latest = info.version; } {code}
Story points: 2