Skip to content

Commit

Permalink
update analyzer uses to work with 5.13 and 6
Browse files Browse the repository at this point in the history
  • Loading branch information
robbecker-wf committed Sep 9, 2024
1 parent 6884cd8 commit 44f0a18
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/src/builder/codegen/typed_map_impl_generator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ class _TypedMapImplGenerator extends TypedMapImplGenerator {
for (var i = 0; i < mixins.length; i++) {
final mixin = mixins[i];
final typeArguments = mixin.typeArguments?.toSource() ?? '';
final names = TypedMapNames(mixin.name.name);
final names = TypedMapNames(mixin.name2.name);
header.write('${names.consumerName}$typeArguments');
header.write(',');
// Add a space at the beginning of the line so that dartfmt indents it
Expand Down
2 changes: 1 addition & 1 deletion lib/src/builder/parsing/ast_util.dart
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ extension TypeAnnotationNameHelper on TypeAnnotation {
/// field of [Identifier]s.
extension TypeNameHelper on NamedType {
/// The type name without any namespace prefixes.
String get nameWithoutPrefix => name.nameWithoutPrefix;
String get nameWithoutPrefix => importPrefix != null ? name2.name.replaceFirst(importPrefix.toString(), '') : name2.name;
}

/// Utilities related to simplifying access to node identifier fields.
Expand Down
4 changes: 2 additions & 2 deletions lib/src/builder/parsing/declarations.dart
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ mixin _TypedMapMixinShorthandDeclaration {
.toList();

if (badConstraints != null && badConstraints.isNotEmpty) {
final badConstraintsString = badConstraints.map((c) => c.name.name).join(', ');
final badConstraintsString = badConstraints.map((c) => c.name2.name).join(', ');

final suggestedImplName = mixin.name.name.endsWith('Mixin')
? mixin.name.name.replaceFirst(RegExp(r'Mixin$'), '')
Expand All @@ -229,7 +229,7 @@ extension on Union<BoilerplateProps, BoilerplatePropsMixin> {
/// This is the safest way to retrieve that information because it takes
/// into account the nature of the [Union] typing of `props`.
List<String> get allPropsMixins => this.switchCase(
(a) => a.nodeHelper.mixins.map((name) => name.name.name).toList(),
(a) => a.nodeHelper.mixins.map((name) => name.name2.name).toList(),
(b) => [b.name.name],
);
}
Expand Down
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ environment:

dependencies:
collection: ^1.15.0
analyzer: ^5.13.0
analyzer: '>=5.13.0 <7.0.0'
build: ^2.0.0
dart_style: ^2.0.0
js: ^0.6.1+1
Expand All @@ -30,7 +30,7 @@ dev_dependencies:
build_resolvers: ^2.0.0
build_runner: ^2.0.0
build_test: ^2.0.0
build_web_compilers: ^3.0.0
build_web_compilers: '>=3.0.0 <5.0.0'
built_value_generator: ^8.0.0
dart_dev: ^4.0.1
dependency_validator: ^3.0.0
Expand Down

0 comments on commit 44f0a18

Please sign in to comment.