Skip to content

Commit d6f927c

Browse files
committed
Bump to Angular v8 pre-release
Signed-off-by: Gavin Zhao <git@gzgz.dev>
1 parent a8ea3b8 commit d6f927c

File tree

112 files changed

+144
-155
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

112 files changed

+144
-155
lines changed

angular_gallery/lib/builder/template/gallery_route_library.dart.mustache

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ final List<RouteDefinition> galleryRoutes = [
1818
path: '{{ name }}',
1919
loader: () async {
2020
await {{ name }}.loadLibrary();
21-
{{ name }}.initReflector();
2221
return {{ name }}.{{ component }}NgFactory;
2322
}
2423
),

angular_gallery/pubspec.yaml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,12 @@ environment:
44
sdk: '>=2.17.0 <3.0.0'
55

66
dependencies:
7-
ngdart: ^7.1.0
7+
ngdart: ^8.0.0-dev.1
88
ngcomponents:
99
path: ../ngcomponents
10-
ngforms: ^4.1.0
11-
ngrouter: ^3.1.0
10+
ngforms: ^5.0.0-dev.1
11+
ngrouter: ^4.0.0-dev.1
1212
build: ^2.1.1
1313
build_config: ^1.0.0
1414
#mustache: ^1.0.0
1515
mustache_template: ^2.0.0
16-
ngsecurity:
17-
git:
18-
url: https://github.com/angulardart-community/ngsecurity
19-
ref: main
20-

angular_gallery_section/lib/builder/gallery_info_builder.dart

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ class GalleryInfoBuilder extends Builder {
188188
if (docs == null) {
189189
// The super class must be defined in the library as a part file.
190190
for (var part in classElement.library.parts) {
191-
if (part.getClass(classElement.name) != null) {
191+
if (part.children.contains((c) => c.name == classElement.name)) {
192192
libraryId = AssetId.resolve(part.source.uri);
193193
docs = await extractDocumentation(
194194
classElement.name, libraryId, assetReader);
@@ -237,10 +237,9 @@ class GalleryInfoBuilder extends Builder {
237237

238238
/// Returns a class hierarchy that ends at [leafClass] omitting [Object].
239239
Iterable<InterfaceElement> _classHierarchy(ClassElement leafClass) {
240-
final interfaces = leafClass.allSupertypes;
241-
242240
// Object contains no interesting documentation and complicates searching.
243-
interfaces.removeWhere((interface) => interface.isDartCoreObject);
241+
final interfaces = leafClass.allSupertypes
242+
.where((interface) => !interface.isDartCoreObject);
244243

245244
final classes = <InterfaceElement>[];
246245
for (var i in interfaces) {

angular_gallery_section/lib/components/content/delayed_content.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import 'package:ngcomponents/material_progress/material_progress.dart';
2525
styleUrls: ['delayed_content.scss.css'],
2626
directives: [MaterialProgressComponent, NgIf],
2727
// TODO(google): Change preserveWhitespace to false to improve codesize.
28-
changeDetection: ChangeDetectionStrategy.OnPush,
28+
changeDetection: ChangeDetectionStrategy.onPush,
2929
preserveWhitespace: true,
3030
)
3131
class DelayedContentComponent implements OnInit {

angular_gallery_section/lib/components/gallery_component/documentation_component.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// BSD-style license that can be found in the LICENSE file.
44

55
import 'package:ngdart/angular.dart';
6-
import 'package:ngsecurity/security.dart';
6+
import 'package:ngdart/security.dart';
77
import 'package:angular_gallery_section/components/gallery_component/gallery_info.dart';
88
import 'package:sanitize_html/sanitize_html.dart' show sanitizeHtml;
99

angular_gallery_section/lib/gallery_docs_extraction.dart

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,14 @@ class GalleryDocumentationExtraction extends SimpleAstVisitor<DartDocInfo> {
5454
DartDocInfo? visitMixinDeclaration(MixinDeclaration node) =>
5555
_visitClassOrMixinDeclaration(node);
5656

57-
DartDocInfo? _visitClassOrMixinDeclaration(ClassOrMixinDeclaration node) {
57+
DartDocInfo? _visitClassOrMixinDeclaration(NamedCompilationUnitMember node) {
5858
if (_extractDocumentation(node) == null) return null;
5959

6060
var allProperties = <DartPropertyInfo?>[];
6161
var propertyVisitor = _AllMemberDocsExtraction(_filePath);
62-
for (Declaration member in node.members) {
62+
// We know that [node] is definitely either a ClassDeclaration or
63+
// MixinDeclaration.
64+
for (Declaration member in (node as dynamic).members) {
6365
// Must collect the annotations early because class fields don't have
6466
// annotations attached to their actual node. The comments are attached to
6567
// the field nodes so we have to continue visiting.
@@ -119,11 +121,11 @@ class GalleryDocumentationExtraction extends SimpleAstVisitor<DartDocInfo> {
119121

120122
/// Collect information needed for documentation from [node].
121123
DartDocInfo? _extractDocumentation(NamedCompilationUnitMember node) {
122-
if (node.name.name != _name) return null;
124+
if (node.name.toString() != _name) return null;
123125

124126
final deprecatedAnnotationNode = _deprecatedAnnotation(node);
125127
_info = DartDocInfo()
126-
..name = node.name.name
128+
..name = node.name.toString()
127129
..deprecated = deprecatedAnnotationNode != null
128130
..deprecatedMessage = deprecatedAnnotationNode?.arguments?.arguments
129131
// Visit the first arg or null if no args.
@@ -210,7 +212,7 @@ class _MemberDocExtraction extends SimpleAstVisitor<DartPropertyInfo> {
210212
return DartPropertyInfo()
211213
..name = (node as dynamic /* MethodDeclaration | VariableDeclaration */)
212214
.name
213-
.name
215+
.toString()
214216
..comment = g3docMarkdownToHtml(parseComment(node.documentationComment))
215217
..classPath = _filePath;
216218
}

angular_gallery_section/pubspec.yaml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,17 @@ environment:
55
sdk: '>=2.17.0 <3.0.0'
66

77
dependencies:
8-
analyzer: ^4.0.0
9-
ngdart: ^7.1.0
8+
analyzer: ^5.10.0
9+
ngdart: ^8.0.0-dev.1
1010
ngcomponents:
1111
path: ../ngcomponents
1212
angular_gallery:
1313
path: ../angular_gallery
1414
build: ^2.1.1
1515
build_config: ^1.0.0
1616
glob: ^2.0.2
17-
markdown: ^5.0.0
17+
markdown: ^7.0.2
1818
mustache_template: ^2.0.0
1919
path: ^1.6.1
2020
sass: '>=1.15.3 <2.0.0'
21-
sanitize_html: ^2.0.0
22-
23-
ngsecurity:
24-
git:
25-
url: https://github.com/angulardart-community/ngsecurity
26-
ref: main
27-
21+
sanitize_html: ^2.0.0

examples/angular_components_example/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ environment:
55
sdk: '>=2.17.0 <3.0.0'
66

77
dependencies:
8-
ngdart: ^7.1.0
8+
ngdart: ^8.0.0-dev.1
99
ngcomponents:
1010
path: ../../ngcomponents
1111
angular_gallery:

examples/app_layout_example/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ environment:
55
sdk: '>=2.17.0 <3.0.0'
66

77
dependencies:
8-
ngdart: ^7.1.0
8+
ngdart: ^8.0.0-dev.1
99
ngcomponents:
1010
path: ../../ngcomponents
1111
angular_gallery:

examples/material_button_example/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ environment:
55
sdk: '>=2.17.0 <3.0.0'
66

77
dependencies:
8-
ngdart: ^7.1.0
8+
ngdart: ^8.0.0-dev.1
99
ngcomponents:
1010
path: ../../ngcomponents
1111
angular_gallery:

0 commit comments

Comments
 (0)