review comments
diff --git a/lib/pubcache.dart b/lib/pubcache.dart
index a11da69..e9516ce 100644
--- a/lib/pubcache.dart
+++ b/lib/pubcache.dart
@@ -97,18 +97,18 @@
String get name => path.basename(_dir.path);
Version get version {
- if (_packageRefs == null) _parsePubspec();
+ if (_packageRefs == null) _parsePubspecLock();
return _version;
}
List<PackageRef> getPackageRefs() {
- if (_packageRefs == null) _parsePubspec();
+ if (_packageRefs == null) _parsePubspecLock();
return _packageRefs;
}
String toString() => '${name} ${version}';
- void _parsePubspec() {
+ void _parsePubspecLock() {
File pubspecLock = new File(path.join(_dir.path, 'pubspec.lock'));
Map doc = yaml.loadYaml(pubspecLock.readAsStringSync());
Map packages = doc['packages'];
diff --git a/pubspec.yaml b/pubspec.yaml
index 7a8be58..6a3a6a0 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -8,9 +8,9 @@
sdk: '>=1.0.0 <2.0.0'
dependencies:
- path: any
- pub_semver: any
- yaml: any
+ path: '^1.0.0'
+ pub_semver: '^1.0.0'
+ yaml: '^2.0.0'
dev_dependencies:
unittest: any