Index: pkg/smoke/lib/src/default_transformer.dart |
diff --git a/pkg/smoke/lib/src/default_transformer.dart b/pkg/smoke/lib/src/default_transformer.dart |
index 49962a9146ac5b623a12cf29b2414d7ca75a02e2..2a7d9ec084c7bbb59f39083824505e4b5fa395c7 100644 |
--- a/pkg/smoke/lib/src/default_transformer.dart |
+++ b/pkg/smoke/lib/src/default_transformer.dart |
@@ -17,9 +17,13 @@ class DefaultTransformer extends Transformer { |
DefaultTransformer.asPlugin(); |
/// Only apply to `lib/src/implementation.dart`. |
- Future<bool> isPrimary(Asset input) => new Future.value( |
- input.id.package == 'smoke' && |
- input.id.path == 'lib/src/implementation.dart'); |
+ // TODO(nweiz): This should just take an AssetId when barback <0.13.0 support |
+ // is dropped. |
+ Future<bool> isPrimary(idOrAsset) { |
+ var id = idOrAsset is AssetId ? idOrAsset : idOrAsset.id; |
+ return new Future.value( |
+ id.package == 'smoke' && id.path == 'lib/src/implementation.dart'); |
+ } |
Future apply(Transform transform) { |
var id = transform.primaryInput.id; |