Skip to content

Commit

Permalink
⬆️ update dependencies (#647)
Browse files Browse the repository at this point in the history
  • Loading branch information
techouse authored Jan 18, 2025
1 parent c4e29ed commit cf8e7c7
Show file tree
Hide file tree
Showing 13 changed files with 23 additions and 11 deletions.
1 change: 1 addition & 0 deletions chopper/example/definition.chopper.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// dart format width=80
// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'definition.dart';
Expand Down
1 change: 1 addition & 0 deletions chopper/example/tag.chopper.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// dart format width=80
// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'tag.dart';
Expand Down
1 change: 1 addition & 0 deletions chopper/lib/src/request.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import 'package:qs_dart/qs_dart.dart' show ListFormat;
/// {@template request}
/// This class represents an HTTP request that can be made with Chopper.
/// {@endtemplate}
// ignore: must_be_immutable
base class Request extends http.BaseRequest with EquatableMixin {
final Uri uri;
final Uri baseUri;
Expand Down
2 changes: 1 addition & 1 deletion chopper/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ dependencies:
http: ^1.1.0
logging: ^1.2.0
meta: ^1.9.1
qs_dart: ^1.2.3
qs_dart: ^1.3.0

dev_dependencies:
build_runner: ^2.4.9
Expand Down
1 change: 1 addition & 0 deletions chopper/test/test_service.chopper.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// dart format width=80
// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'test_service.dart';
Expand Down
1 change: 1 addition & 0 deletions chopper/test/test_service_base_url.chopper.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// dart format width=80
// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'test_service_base_url.dart';
Expand Down
1 change: 1 addition & 0 deletions chopper/test/test_service_variable.chopper.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// dart format width=80
// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'test_service_variable.dart';
Expand Down
1 change: 1 addition & 0 deletions chopper/test/test_without_response_service.chopper.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// dart format width=80
// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'test_without_response_service.dart';
Expand Down
17 changes: 10 additions & 7 deletions chopper_generator/lib/src/generator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import 'package:chopper_generator/src/extensions.dart';
import 'package:chopper_generator/src/utils.dart';
import 'package:chopper_generator/src/vars.dart';
import 'package:code_builder/code_builder.dart';
import 'package:dart_style/dart_style.dart';
import 'package:logging/logging.dart';
import 'package:source_gen/source_gen.dart';

Expand Down Expand Up @@ -101,7 +100,7 @@ final class ChopperGenerator
'// ignore_for_file: type=lint';
final DartEmitter emitter = DartEmitter(useNullSafetySyntax: true);

return DartFormatter().format('$ignore\n${classBuilder.accept(emitter)}');
return '$ignore\n${classBuilder.accept(emitter)}';
}

static Constructor _generateConstructor() => Constructor(
Expand Down Expand Up @@ -518,8 +517,8 @@ final class ChopperGenerator
}

static String _factoryForFunction(FunctionTypedElement function) =>
function.enclosingElement is ClassElement
? '${function.enclosingElement!.name}.${function.name}'
function.enclosingElement3 is ClassElement
? '${function.enclosingElement3!.name}.${function.name}'
: function.name!;

static Map<String, ConstantReader> _getAnnotation(
Expand Down Expand Up @@ -636,12 +635,16 @@ final class ChopperGenerator

if (generic == null ||
_typeChecker(Map).isExactlyType(type) ||
_typeChecker(BuiltMap).isExactlyType(type)) return type;
_typeChecker(BuiltMap).isExactlyType(type)) {
return type;
}

if (generic.isDynamic) return null;
if (generic is DynamicType) return null;

if (_typeChecker(List).isExactlyType(type) ||
_typeChecker(BuiltList).isExactlyType(type)) return generic;
_typeChecker(BuiltList).isExactlyType(type)) {
return generic;
}

return _getResponseInnerType(generic);
}
Expand Down
5 changes: 2 additions & 3 deletions chopper_generator/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,14 @@ environment:
sdk: ^3.0.0

dependencies:
analyzer: ^6.4.1
analyzer: ">=6.9.0 <8.0.0"
build: ^2.4.1
built_collection: ^5.1.1
chopper: ^8.0.1
code_builder: ^4.10.0
dart_style: ^2.3.6
logging: ^1.2.0
meta: ^1.9.1
source_gen: ^1.5.0
source_gen: ">=1.5.0 <3.0.0"
yaml: ^3.1.2
collection: ^1.18.0

Expand Down
1 change: 1 addition & 0 deletions chopper_generator/test/test_service.chopper.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// dart format width=80
// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'test_service.dart';
Expand Down
1 change: 1 addition & 0 deletions chopper_generator/test/test_service_variable.chopper.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// dart format width=80
// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'test_service_variable.dart';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// dart format width=80
// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'test_without_response_service.dart';
Expand Down

0 comments on commit cf8e7c7

Please sign in to comment.