| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library pub_semver.src.version_constraint; | |
| 6 | |
| 7 import 'patterns.dart'; | 5 import 'patterns.dart'; |
| 8 import 'version.dart'; | 6 import 'version.dart'; |
| 9 import 'version_range.dart'; | 7 import 'version_range.dart'; |
| 10 import 'version_union.dart'; | 8 import 'version_union.dart'; |
| 11 | 9 |
| 12 /// A [VersionConstraint] is a predicate that can determine whether a given | 10 /// A [VersionConstraint] is a predicate that can determine whether a given |
| 13 /// version is valid or not. | 11 /// version is valid or not. |
| 14 /// | 12 /// |
| 15 /// For example, a ">= 2.0.0" constraint allows any version that is "2.0.0" or | 13 /// For example, a ">= 2.0.0" constraint allows any version that is "2.0.0" or |
| 16 /// greater. Version objects themselves implement this to match a specific | 14 /// greater. Version objects themselves implement this to match a specific |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 String toString() => '<empty>'; | 214 String toString() => '<empty>'; |
| 217 } | 215 } |
| 218 | 216 |
| 219 class _CompatibleWithVersionRange extends VersionRange { | 217 class _CompatibleWithVersionRange extends VersionRange { |
| 220 _CompatibleWithVersionRange(Version version) : super( | 218 _CompatibleWithVersionRange(Version version) : super( |
| 221 min: version, includeMin: true, | 219 min: version, includeMin: true, |
| 222 max: version.nextBreaking, includeMax: false); | 220 max: version.nextBreaking, includeMax: false); |
| 223 | 221 |
| 224 String toString() => '^$min'; | 222 String toString() => '^$min'; |
| 225 } | 223 } |
| OLD | NEW |