Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Side by Side Diff: sdk/lib/_internal/pub_generated/lib/src/package.dart

Issue 602253002: Use pub_semver package in pub. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 library pub.package; 1 library pub.package;
2 import 'dart:io'; 2 import 'dart:io';
3 import 'package:barback/barback.dart';
3 import 'package:path/path.dart' as p; 4 import 'package:path/path.dart' as p;
4 import 'package:barback/barback.dart'; 5 import 'package:pub_semver/pub_semver.dart';
5 import 'barback/transformer_id.dart'; 6 import 'barback/transformer_id.dart';
6 import 'io.dart'; 7 import 'io.dart';
7 import 'git.dart' as git; 8 import 'git.dart' as git;
8 import 'pubspec.dart'; 9 import 'pubspec.dart';
9 import 'source_registry.dart'; 10 import 'source_registry.dart';
10 import 'utils.dart'; 11 import 'utils.dart';
11 import 'version.dart';
12 final _README_REGEXP = new RegExp(r"^README($|\.)", caseSensitive: false); 12 final _README_REGEXP = new RegExp(r"^README($|\.)", caseSensitive: false);
13 class Package { 13 class Package {
14 static int orderByNameAndVersion(Package a, Package b) { 14 static int orderByNameAndVersion(Package a, Package b) {
15 var name = a.name.compareTo(b.name); 15 var name = a.name.compareTo(b.name);
16 if (name != 0) return name; 16 if (name != 0) return name;
17 return a.version.compareTo(b.version); 17 return a.version.compareTo(b.version);
18 } 18 }
19 final String dir; 19 final String dir;
20 String get name { 20 String get name {
21 if (pubspec.name != null) return pubspec.name; 21 if (pubspec.name != null) return pubspec.name;
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 return "$name $constraint from $source ($description)"; 186 return "$name $constraint from $source ($description)";
187 } 187 }
188 int get hashCode => name.hashCode ^ source.hashCode; 188 int get hashCode => name.hashCode ^ source.hashCode;
189 bool operator ==(other) { 189 bool operator ==(other) {
190 return other is PackageDep && 190 return other is PackageDep &&
191 other.name == name && 191 other.name == name &&
192 other.source == source && 192 other.source == source &&
193 other.constraint == constraint; 193 other.constraint == constraint;
194 } 194 }
195 } 195 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/pub_generated/lib/src/lock_file.dart ('k') | sdk/lib/_internal/pub_generated/lib/src/preprocess.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698