From facb666ec98a5ab367be2133a2c5ee2be4e2e590 Mon Sep 17 00:00:00 2001 From: thorn0 Date: Fri, 14 Nov 2014 03:13:31 +0200 Subject: [PATCH] chore(docs): stop reflecting the discontinued stable/unstable distinction in the API version selector --- docs/app/src/versions.js | 13 +------------ lib/versions/version-info.js | 11 ----------- 2 files changed, 1 insertion(+), 23 deletions(-) diff --git a/docs/app/src/versions.js b/docs/app/src/versions.js index 6899bb6fb89d..3fe42cbd652f 100644 --- a/docs/app/src/versions.js +++ b/docs/app/src/versions.js @@ -2,20 +2,9 @@ angular.module('versions', []) .controller('DocsVersionsCtrl', ['$scope', '$location', '$window', 'NG_VERSIONS', function($scope, $location, $window, NG_VERSIONS) { $scope.docs_version = NG_VERSIONS[0]; - - for(var i=0, minor = NaN; i < NG_VERSIONS.length; i++) { - var version = NG_VERSIONS[i]; - // NaN will give false here - if (minor <= version.minor) { - continue; - } - version.isLatest = true; - minor = version.minor; - } - $scope.docs_versions = NG_VERSIONS; $scope.getGroupName = function(v) { - return v.isLatest ? 'Latest' : (v.isStable ? 'Stable' : 'Unstable'); + return 'v' + v.major + '.' + v.minor + '.x'; }; $scope.jumpToDocsVersion = function(version) { diff --git a/lib/versions/version-info.js b/lib/versions/version-info.js index 0b6fa48220f2..b46738c9fe16 100644 --- a/lib/versions/version-info.js +++ b/lib/versions/version-info.js @@ -91,15 +91,6 @@ var getTaggedVersion = function() { return null; }; -/** - * Stable versions have an even minor version and have no prerelease - * @param {SemVer} version The version to test - * @return {Boolean} True if the version is stable - */ -var isStable = function(version) { - return semver.satisfies(version, '1.0 || 1.2') && version.prerelease.length === 0; -}; - /** * Get a collection of all the previous versions sorted by semantic version * @return {Array.} The collection of previous versions @@ -119,8 +110,6 @@ var getPreviousVersions = function() { }) .filter() .map(function(version) { - version.isStable = isStable(version); - version.docsUrl = 'http://code.angularjs.org/' + version.version + '/docs'; // Versions before 1.0.2 had a different docs folder name if ( version.major < 1 || (version.major === 1 && version.minor === 0 && version.dot < 2 ) ) {