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

Side by Side Diff: sdk/lib/_internal/pub_generated/lib/src/lock_file.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.lock_file; 1 library pub.lock_file;
2 import 'package:path/path.dart' as p; 2 import 'package:path/path.dart' as p;
3 import 'package:pub_semver/pub_semver.dart';
3 import 'package:source_span/source_span.dart'; 4 import 'package:source_span/source_span.dart';
4 import 'package:yaml/yaml.dart'; 5 import 'package:yaml/yaml.dart';
5 import 'io.dart'; 6 import 'io.dart';
6 import 'package.dart'; 7 import 'package.dart';
7 import 'source_registry.dart'; 8 import 'source_registry.dart';
8 import 'utils.dart'; 9 import 'utils.dart';
9 import 'version.dart';
10 class LockFile { 10 class LockFile {
11 Map<String, PackageId> packages; 11 Map<String, PackageId> packages;
12 factory LockFile(List<PackageId> ids) { 12 factory LockFile(List<PackageId> ids) {
13 var lockFile = new LockFile.empty(); 13 var lockFile = new LockFile.empty();
14 for (var id in ids) { 14 for (var id in ids) {
15 if (!id.isRoot) lockFile.packages[id.name] = id; 15 if (!id.isRoot) lockFile.packages[id.name] = id;
16 } 16 }
17 return lockFile; 17 return lockFile;
18 } 18 }
19 LockFile._(this.packages); 19 LockFile._(this.packages);
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 'description': description 88 'description': description
89 }; 89 };
90 }); 90 });
91 return """ 91 return """
92 # Generated by pub 92 # Generated by pub
93 # See http://pub.dartlang.org/doc/glossary.html#lockfile 93 # See http://pub.dartlang.org/doc/glossary.html#lockfile
94 ${yamlToString({'packages' : data})} 94 ${yamlToString({'packages' : data})}
95 """; 95 """;
96 } 96 }
97 } 97 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/pub_generated/lib/src/global_packages.dart ('k') | sdk/lib/_internal/pub_generated/lib/src/package.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698