Only alert about new prereleases for prereleases (#2556)

diff --git a/lib/src/solver/report.dart b/lib/src/solver/report.dart
index b175d17..649a109 100644
--- a/lib/src/solver/report.dart
+++ b/lib/src/solver/report.dart
@@ -250,7 +250,10 @@
       String message;
       if (newerStable) {
         message = '(${maxAll(versions, Version.prioritize)} available)';
-      } else if (newerUnstable) {
+      } else if (
+          // Only show newer prereleases for versions where a prerelease is
+          // already chosen.
+          newId.version.isPreRelease && newerUnstable) {
         message = '(${maxAll(versions)} available)';
       }
 
diff --git a/test/upgrade/report/does_not_show_newer_versions_for_locked_packages_test.dart b/test/upgrade/report/does_not_show_newer_versions_for_locked_packages_test.dart
index 6883ab9..ccafebc 100644
--- a/test/upgrade/report/does_not_show_newer_versions_for_locked_packages_test.dart
+++ b/test/upgrade/report/does_not_show_newer_versions_for_locked_packages_test.dart
@@ -32,7 +32,7 @@
     await pubUpgrade(args: ['upgraded'], output: RegExp(r'''
 Resolving dependencies\.\.\..*
   not_upgraded 1\.0\.0
-. upgraded 2\.0\.0 \(was 1\.0\.0\) \(3\.0\.0-dev available\)
+. upgraded 2\.0\.0 \(was 1\.0\.0\)
 ''', multiLine: true), environment: {'PUB_ALLOW_PRERELEASE_SDK': 'false'});
   });
 }
diff --git a/test/upgrade/report/shows_newer_available_versions_test.dart b/test/upgrade/report/shows_newer_available_versions_test.dart
index d713f44..4c1ca56 100644
--- a/test/upgrade/report/shows_newer_available_versions_test.dart
+++ b/test/upgrade/report/shows_newer_available_versions_test.dart
@@ -20,9 +20,14 @@
       builder.serve('multiple_newer_unstable', '1.0.0');
       builder.serve('multiple_newer_unstable', '1.0.1-unstable.1');
       builder.serve('multiple_newer_unstable', '1.0.1-unstable.2');
+      builder.serve('multiple_newer_unstable2', '1.0.1-unstable.1');
+      builder.serve('multiple_newer_unstable2', '1.0.1-unstable.2');
+      builder.serve('multiple_newer_unstable2', '1.0.1-unstable.2');
       builder.serve('no_newer', '1.0.0');
       builder.serve('one_newer_unstable', '1.0.0');
       builder.serve('one_newer_unstable', '1.0.1-unstable.1');
+      builder.serve('one_newer_unstable2', '1.0.1-unstable.1');
+      builder.serve('one_newer_unstable2', '1.0.1-unstable.2');
       builder.serve('one_newer_stable', '1.0.0');
       builder.serve('one_newer_stable', '1.0.1');
     });
@@ -32,8 +37,10 @@
       'multiple_newer': '1.0.0',
       'multiple_newer_stable': '1.0.0',
       'multiple_newer_unstable': '1.0.0',
+      'multiple_newer_unstable2': '1.0.1-unstable.1',
       'no_newer': '1.0.0',
       'one_newer_unstable': '1.0.0',
+      'one_newer_unstable2': '1.0.1-unstable.1',
       'one_newer_stable': '1.0.0'
     }).create();
 
@@ -42,10 +49,12 @@
 Resolving dependencies\.\.\..*
 . multiple_newer 1\.0\.0 \(1\.0\.1 available\)
 . multiple_newer_stable 1\.0\.0 \(1\.0\.2\ available\)
-. multiple_newer_unstable 1\.0\.0 \(1\.0\.1-unstable\.2 available\)
+. multiple_newer_unstable 1\.0\.0
+. multiple_newer_unstable2 1\.0\.1-unstable\.1 \(1\.0\.1-unstable\.2 available\)
 . no_newer 1\.0\.0
 . one_newer_stable 1\.0\.0 \(1\.0\.1 available\)
-. one_newer_unstable 1\.0\.0 \(1\.0\.1-unstable\.1 available\)
+. one_newer_unstable 1\.0\.0
+. one_newer_unstable2 1\.0\.1-unstable\.1 \(1\.0\.1-unstable\.2 available\)
 ''', multiLine: true), environment: {'PUB_ALLOW_PRERELEASE_SDK': 'false'});
   });
 }