Skip to content

Commit f00d044

Browse files
authored
Housekeeping: language version 3.0, analyzer deprecations, pubspec update (#3412)
* Update language version to 3.0 and fix for latest analyzer * Update pubspec dependencies to latest versions * Update grind to 21 libraries... again?
1 parent 370477d commit f00d044

File tree

10 files changed

+2155
-2154
lines changed

10 files changed

+2155
-2154
lines changed

lib/resources/docs.dart.js

Lines changed: 2110 additions & 2109 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/resources/docs.dart.js.map

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/src/element_type.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ class UndefinedElementType extends ElementType {
103103
@override
104104
String get name {
105105
if (type is VoidType) return 'void';
106-
if (type.isDynamic) return 'dynamic';
106+
if (type is DynamicType) return 'dynamic';
107107
assert(const {'Never'}.contains(typeElement!.name),
108108
'Unrecognized type for UndefinedElementType: ${type.toString()}');
109109
return typeElement!.name!;

lib/src/model/canonicalization.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import 'package:dartdoc/src/model/model.dart';
66

77
/// Classes extending this class have canonicalization support in Dartdoc.
8-
abstract /*mixin*/ class Canonicalization implements Locatable, Documentable {
8+
abstract mixin class Canonicalization implements Locatable, Documentable {
99
bool get isCanonical;
1010

1111
Library? get canonicalLibrary;

lib/src/model/extension.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class Extension extends Container implements EnclosedElement {
2323

2424
/// Detect if this extension applies to every object.
2525
bool get alwaysApplies =>
26-
extendedType.instantiatedType.isDynamic ||
26+
extendedType.instantiatedType is DynamicType ||
2727
extendedType.instantiatedType is VoidType ||
2828
extendedType.instantiatedType.isDartCoreObject;
2929

@@ -32,7 +32,7 @@ class Extension extends Container implements EnclosedElement {
3232

3333
/// Whether this extension could apply to [type].
3434
bool _couldApplyTo(DefinedElementType type) {
35-
if (extendedType.instantiatedType.isDynamic ||
35+
if (extendedType.instantiatedType is DynamicType ||
3636
extendedType.instantiatedType is VoidType) {
3737
return true;
3838
}

lib/src/model/library_container.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import 'package:dartdoc/src/model_utils.dart' as model_utils;
1010
///
1111
/// Do not cache return values of any methods or members excepting [libraries]
1212
/// and [name] before finishing initialization of a [LibraryContainer].
13-
abstract /*mixin*/ class LibraryContainer
13+
abstract mixin class LibraryContainer
1414
implements Nameable, Comparable<LibraryContainer> {
1515
final List<Library> libraries = [];
1616

lib/src/model/nameable.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import 'package:collection/collection.dart';
77
import 'locatable.dart';
88

99
/// Something that has a name.
10-
abstract /*mixin*/ class Nameable {
10+
abstract mixin class Nameable {
1111
String get name;
1212

1313
String get fullyQualifiedName => name;

pubspec.yaml

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -5,43 +5,43 @@ description: A non-interactive HTML documentation generator for Dart source code
55
repository: https://github.com/dart-lang/dartdoc
66

77
environment:
8-
sdk: '>=2.18.0 <4.0.0'
8+
sdk: '>=3.0.0 <4.0.0'
99

1010
dependencies:
11-
analyzer: ^5.7.1
12-
args: ^2.3.0
13-
cli_util: ">=0.3.5 <0.5.0"
11+
analyzer: ^5.12.0
12+
args: ^2.4.1
13+
cli_util: ^0.4.0
1414
collection: ^1.17.0
15-
crypto: ^3.0.1
15+
crypto: ^3.0.3
1616
glob: ^2.1.1
17-
html: ^0.15.0
18-
logging: ^1.0.2
19-
markdown: ^7.0.0
20-
meta: ^1.7.0
21-
package_config: ^2.0.2
22-
path: ^1.8.0
23-
pub_semver: ^2.1.3
24-
source_span: ^1.8.1
25-
yaml: ^3.1.0
17+
html: ^0.15.3
18+
logging: ^1.1.1
19+
markdown: ^7.1.0
20+
meta: ^1.9.1
21+
package_config: ^2.1.0
22+
path: ^1.8.3
23+
pub_semver: ^2.1.4
24+
source_span: ^1.10.0
25+
yaml: ^3.1.2
2626

2727
dev_dependencies:
28-
async: ^2.8.2
29-
build: ^2.3.1
30-
build_runner: ^2.3.0
31-
build_test: ^2.1.6
28+
async: ^2.11.0
29+
build: ^2.4.0
30+
build_runner: ^2.4.2
31+
build_test: ^2.1.7
3232
build_version: ^2.1.1
3333
code_builder: ^4.4.0
34-
coverage: ^1.0.3
35-
dart_style: ^2.2.0
36-
grinder: ^0.9.3
37-
http: ^0.13.3
38-
js: ^0.6.5
39-
lints: ^2.0.0
40-
matcher: ^0.12.14
41-
test: ^1.23.1
42-
test_descriptor: ^2.0.0
43-
test_process: ^2.0.2
44-
test_reflective_loader: ^0.2.0
34+
coverage: ^1.6.3
35+
dart_style: ^2.3.1
36+
grinder: ^0.9.4
37+
http: ^0.13.6
38+
js: ^0.6.7
39+
lints: ^2.1.0
40+
matcher: ^0.12.15
41+
test: ^1.24.2
42+
test_descriptor: ^2.0.1
43+
test_process: ^2.0.3
44+
test_reflective_loader: ^0.2.2
4545

4646
executables:
4747
dartdoc: null

tool/grind.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1285,8 +1285,8 @@ Future<void> testDartdocFlutterPlugin() async {
12851285
@Depends(buildSdkDocs)
12861286
void validateSdkDocs() {
12871287
const expectedLibCounts = 0;
1288-
const expectedSubLibCount = {18, 19, 20};
1289-
const expectedTotalCount = {18, 19, 20};
1288+
const expectedSubLibCount = {19, 20, 21};
1289+
const expectedTotalCount = {19, 20, 21};
12901290
var indexHtml = joinFile(_sdkDocsDir, ['index.html']);
12911291
if (!indexHtml.existsSync()) {
12921292
fail("No 'index.html' found for the SDK docs");

tool/mustachio/codegen_runtime_renderer.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ import '${p.basename(_sourceUri.path)}';
209209
}
210210
} else if (type is TypeParameterType) {
211211
var bound = type.bound;
212-
if (bound.isDynamic) {
212+
if (bound is DynamicType) {
213213
// Don't add functions for a generic type, for example
214214
// `List<E>.first` has type `E`, which we don't have a specific
215215
// renderer for.
@@ -461,7 +461,7 @@ class ${renderer._rendererClassName}${renderer._typeParametersString}
461461
if (returnType is InterfaceType) {
462462
_writeProperty(renderer, property, returnType);
463463
} else if (returnType is TypeParameterType &&
464-
!returnType.bound.isDynamic) {
464+
returnType.bound is! DynamicType) {
465465
_writeProperty(renderer, property, returnType.bound as InterfaceType);
466466
}
467467
}

0 commit comments

Comments
 (0)