Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-19470

CLI: ti setup doesn't properly select last available versions from npm

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Release 5.0.0
    • Component/s: Tooling
    • Labels:
    • Environment:

      3.4.0.GA

    • Story Points:
      2
    • Sprint:
      2015 Sprint 18 Tooling

      Description

      When I run ti setup and select check I get:

      Node.js
        ✓  node               up-to-date (v0.10.33)
        ★  npm                new version v2.1.6 available! (currently v2.1.5)
      

      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.

      Related code

      https://github.com/appcelerator/titanium/blob/master/lib/commands/setup.js#L516-L522

      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];
          }
        }
      }
      

      Proposed chage

      The above lines with:

      if (info && info.version) {
        r.npm.latest = info.version;
      }
      

        Attachments

          Activity

            People

            • Assignee:
              cbarber Chris Barber
              Reporter:
              fokkezb Fokke Zandbergen
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Titanium SDK/CLI <> Titanium Mobile
                  Synced with:
                  TIMOB-20328
                  Sync status:
                  ERROR
                  Last received:
                  Last sent:

                  Git Source Code