Skip to content
This repository was archived by the owner on Feb 22, 2018. It is now read-only.

Commit 485fa7c

Browse files
Tim Blasirkirov
authored andcommitted
chore(pubspec): Widen the analyzer & observe constraints
Allow use of package:analyzer <0.25.0 and package:observe <0.14.0. Analyzer earlier than 0.24.0 has issues with parsing `async` and `await`, this allows the use of Angular.dart with code that needs process such code with analyzer. The analyzer update tightens down uri resolution leading to failures, therefore we also update `scripts/analyze.sh`. Observe earlier than 0.13.0+1 constrains analyzer to <0.23.0.
1 parent 7a6d2a1 commit 485fa7c

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ homepage: https://angulardart.org
1414
environment:
1515
sdk: '>=1.4.0'
1616
dependencies:
17-
analyzer: '>=0.22.0 <0.23.0'
17+
analyzer: '>=0.22.0 <0.25.0'
1818
args: '>=0.12.0 <0.13.0'
1919
barback: '>=0.13.0 <0.17.0'
2020
browser: '>=0.10.0 <0.11.0'
@@ -23,7 +23,7 @@ dependencies:
2323
di: '>=3.3.3 <4.0.0'
2424
html5lib: '>=0.12.0 <0.13.0'
2525
intl: '>=0.8.7 <0.12.0'
26-
observe: '>=0.12.0 <0.13.0'
26+
observe: '>=0.12.0 <0.14.0'
2727
perf_api: '>=0.0.9 <0.1.0'
2828
route_hierarchical: '>=0.6.1 <0.7.0'
2929
dev_dependencies:

scripts/analyze.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,13 @@ for FILE in $(ls lib/angular.dart \
2424
lib/change_detection/watch_group.dart \
2525
)
2626
do
27-
echo export \'../$FILE\' hide main, NestedRouteInitializer\; >> $OUT
27+
# Use `package:` imports where possible to avoid ambiguous resolution.
28+
if [[ $FILE == lib* ]]; then
29+
FILE=$(echo $FILE | sed -e 's!lib\(.*\)!package:angular\1!')
30+
else
31+
FILE=../$FILE
32+
fi
33+
echo export \'$FILE\' hide main, NestedRouteInitializer\; >> $OUT
2834
done
2935

3036
$NGDART_SCRIPT_DIR/generate-expressions.sh

0 commit comments

Comments
 (0)