function processAllVersionsResponse(versions) {

        var latestMap = {};

        // When the docs are built on a tagged commit, yarn info won't include the latest release,
        // so we add it manually based on the local version.json file.
        var missesCurrentVersion = !currentVersion.isSnapshot && !versions.find(function(version) {
          return version === currentVersion.version;
        });

        if (missesCurrentVersion) versions.push(currentVersion.version);

        versions = versions
            .filter(function(versionStr) {
              return ignoredBuilds.indexOf(versionStr) === -1;
            })
            .map(function(versionStr) {
              return semver.parse(versionStr);
            })
            .filter(function(version) {
              return version && version.major > 0;
            })
            .map(function(version) {
              var key = version.major + '.' + version.minor;
              var latest = latestMap[key];
              if (!latest || version.compare(latest) > 0) {
                latestMap[key] = version;
              }
              return version;
            })
            .map(function(version) {
              return makeOption(version);
            })
            .reverse();

        // List the latest version for each branch
        var latest = sortObject(latestMap, reverse(semver.compare))
            .map(function(version) { return makeOption(version, 'Latest'); });

        // Get the stable release with the highest version
        var highestStableRelease = versions.find(semverIsStable);

        // Generate master and stable snapshots
        var snapshots = [
          makeOption(
            {version: 'snapshot'},
            'Latest',
            'master-snapshot'
          ),
          makeOption(
            {version: 'snapshot-stable'},
            'Latest',
            createSnapshotStableLabel(highestStableRelease)
          )
        ];

        return snapshots
            .concat(latest)
            .concat(versions);
      }
@dgProcessor generateVersionDocProcessor
@description
This processor will create a new doc that will be rendered as a JavaScript file
containing meta information about the current versions of AngularJS