diff --git a/injectable/example/pubspec.yaml b/injectable/example/pubspec.yaml index e063176..f0bf982 100644 --- a/injectable/example/pubspec.yaml +++ b/injectable/example/pubspec.yaml @@ -12,8 +12,8 @@ dependencies: dev_dependencies: pedantic: ^1.11.1 - build_runner: ^2.4.0 + build_runner: ^2.4.14 effective_dart: ^1.3.2 - lints: ^2.1.0 + lints: ^5.1.1 injectable_generator: path: ../../injectable_generator diff --git a/injectable/lib/src/injectable_annotations.dart b/injectable/lib/src/injectable_annotations.dart index 433dfaf..5161f93 100644 --- a/injectable/lib/src/injectable_annotations.dart +++ b/injectable/lib/src/injectable_annotations.dart @@ -72,7 +72,7 @@ class InjectableInit { /// feature flag to activate a 'constructor callback'. /// Setting this to 'true' will generate an additional parameter /// to '$initGetIt' - named "constructorCallback" - a function of signature - /// "T constructorCallback(T)". + /// "T constructorCallback%lt;T%gt;(T)". /// Injectable will pass all injectable objects to this delegate at the /// time of their constructor/module-method invocation. /// defaults to false diff --git a/injectable/pubspec.lock b/injectable/pubspec.lock index 9bba1fe..5d7ad48 100644 --- a/injectable/pubspec.lock +++ b/injectable/pubspec.lock @@ -29,10 +29,10 @@ packages: dependency: "direct dev" description: name: lints - sha256: "3315600f3fb3b135be672bf4a178c55f274bebe368325ae18462c89ac1e3b413" + sha256: c35bb79562d980e9a453fc715854e1ed39e24e7d0297a880ef54e17f9874a9d7 url: "https://pub.dev" source: hosted - version: "5.0.0" + version: "5.1.1" meta: dependency: "direct main" description: @@ -42,4 +42,4 @@ packages: source: hosted version: "1.15.0" sdks: - dart: ">=3.5.0 <4.0.0" + dart: ">=3.6.0 <4.0.0" diff --git a/injectable_generator/CHANGELOG.md b/injectable_generator/CHANGELOG.md index 3fbfbbb..920738f 100644 --- a/injectable_generator/CHANGELOG.md +++ b/injectable_generator/CHANGELOG.md @@ -1,5 +1,6 @@ # ChangeLog - +## [2.7.0] +- Chore: Update dependencies, source_gen (v2), analyzer (<8.0.0), dart_style (v3) ## [2.6.2] - Feat: Improve Code Generation consistency using hash in alias imports - Fix: Fix @preResolve only works for methods warning diff --git a/injectable_generator/lib/builder.dart b/injectable_generator/lib/builder.dart index 4b7255a..e6a908e 100644 --- a/injectable_generator/lib/builder.dart +++ b/injectable_generator/lib/builder.dart @@ -7,11 +7,14 @@ import 'generators/injectable_generator.dart'; Builder injectableBuilder(BuilderOptions options) { return LibraryBuilder( InjectableGenerator(options.config), - formatOutput: (generated, _) => generated.replaceAll(RegExp(r'//.*|\s'), ''), + formatOutput: (generated, _) => + generated.replaceAll(RegExp(r'//.*|\s'), ''), generatedExtension: '.injectable.json', ); } Builder injectableConfigBuilder(BuilderOptions options) { - return LibraryBuilder(InjectableConfigGenerator(), generatedExtension: '.config.dart', additionalOutputExtensions: ['.module.dart']); + return LibraryBuilder(InjectableConfigGenerator(), + generatedExtension: '.config.dart', + additionalOutputExtensions: ['.module.dart']); } diff --git a/injectable_generator/lib/generators/injectable_config_generator.dart b/injectable_generator/lib/generators/injectable_config_generator.dart index a20883b..c950944 100644 --- a/injectable_generator/lib/generators/injectable_config_generator.dart +++ b/injectable_generator/lib/generators/injectable_config_generator.dart @@ -22,21 +22,31 @@ import 'package:injectable_generator/utils.dart'; class InjectableConfigGenerator extends GeneratorForAnnotation { @override - dynamic generateForAnnotatedElement(Element element, ConstantReader annotation, BuildStep buildStep) async { - final generateForDir = annotation.read('generateForDir').listValue.map((e) => e.toStringValue()); + dynamic generateForAnnotatedElement( + Element element, ConstantReader annotation, BuildStep buildStep) async { + final generateForDir = annotation + .read('generateForDir') + .listValue + .map((e) => e.toStringValue()); final usesNullSafety = annotation.read('usesNullSafety').boolValue; final isMicroPackage = annotation.read('_isMicroPackage').boolValue; - final usesConstructorCallback = annotation.read('usesConstructorCallback').boolValue; - final throwOnMissingDependencies = annotation.read('throwOnMissingDependencies').boolValue; + final usesConstructorCallback = + annotation.read('usesConstructorCallback').boolValue; + final throwOnMissingDependencies = + annotation.read('throwOnMissingDependencies').boolValue; final targetFile = element.source?.uri; - final preferRelativeImports = annotation.read("preferRelativeImports").boolValue; + final preferRelativeImports = + annotation.read("preferRelativeImports").boolValue; - final includeMicroPackages = annotation.read("includeMicroPackages").boolValue; + final includeMicroPackages = + annotation.read("includeMicroPackages").boolValue; final rootDir = annotation.peek('rootDir')?.stringValue; - final dirPattern = generateForDir.length > 1 ? '{${generateForDir.join(',')}}' : '${generateForDir.first}'; + final dirPattern = generateForDir.length > 1 + ? '{${generateForDir.join(',')}}' + : '${generateForDir.first}'; final injectableConfigFiles = Glob("$dirPattern/**.injectable.json"); @@ -54,11 +64,13 @@ class InjectableConfigGenerator extends GeneratorForAnnotation { final initializerName = annotation.read('initializerName').stringValue; final asExtension = annotation.read('asExtension').boolValue; - final typeResolver = ImportableTypeResolverImpl(await buildStep.resolver.libraries.toList()); + final typeResolver = + ImportableTypeResolverImpl(await buildStep.resolver.libraries.toList()); - final ignoredTypes = annotation.read('ignoreUnregisteredTypes').listValue.map( - (e) => typeResolver.resolveType(e.toTypeValue()!), - ); + final ignoredTypes = + annotation.read('ignoreUnregisteredTypes').listValue.map( + (e) => typeResolver.resolveType(e.toTypeValue()!), + ); final microPackageModulesBefore = _getMicroPackageModules( annotation.peek('externalPackageModulesBefore'), @@ -80,7 +92,8 @@ class InjectableConfigGenerator extends GeneratorForAnnotation { typeResolver, ); - final microPackagesModules = microPackageModulesBefore.union(microPackageModulesAfter); + final microPackagesModules = + microPackageModulesBefore.union(microPackageModulesAfter); if (!isMicroPackage && includeMicroPackages) { final glob = Glob('**.module.dart', recursive: true); final filesStream = glob.list(root: rootDir); @@ -96,7 +109,8 @@ class InjectableConfigGenerator extends GeneratorForAnnotation { import: segments[2], ), ); - if (!microPackagesModules.any((e) => externalModule.module == e.module)) { + if (!microPackagesModules + .any((e) => externalModule.module == e.module)) { microPackageModulesBefore.add(externalModule); } } @@ -115,7 +129,8 @@ class InjectableConfigGenerator extends GeneratorForAnnotation { // we want to ignore unregistered types in microPackages // because the micro module should handle them for (final pckModule in microPackagesModules) { - final packageName = Uri.parse(pckModule.module.import!).pathSegments.first; + final packageName = + Uri.parse(pckModule.module.import!).pathSegments.first; ignoreTypesInPackages.add(packageName); } @@ -144,7 +159,8 @@ class InjectableConfigGenerator extends GeneratorForAnnotation { targetFile: preferRelativeImports ? targetFile : null, initializerName: initializerName, asExtension: asExtension, - microPackageName: isMicroPackage ? buildStep.inputId.package.pascalCase : null, + microPackageName: + isMicroPackage ? buildStep.inputId.package.pascalCase : null, microPackagesModulesBefore: microPackageModulesBefore, microPackagesModulesAfter: microPackageModulesAfter, usesConstructorCallback: usesConstructorCallback, @@ -185,10 +201,13 @@ class InjectableConfigGenerator extends GeneratorForAnnotation { final typeValue = reader.read('module').typeValue; final scope = reader.peek('scope')?.stringValue; throwIf( - typeValue.element is! ClassElement || !TypeChecker.fromRuntime(MicroPackageModule).isSuperOf(typeValue.element!), + typeValue.element is! ClassElement || + !TypeChecker.fromRuntime(MicroPackageModule) + .isSuperOf(typeValue.element!), 'ExternalPackageModule must be a class that extends MicroPackageModule', ); - return ExternalModuleConfig(typeResolver.resolveType(typeValue), scope); + return ExternalModuleConfig( + typeResolver.resolveType(typeValue), scope); }, ).toSet() ?? {}; @@ -202,7 +221,9 @@ class InjectableConfigGenerator extends GeneratorForAnnotation { (e) { final typeValue = e.toTypeValue()!; throwIf( - typeValue.element is! ClassElement || !TypeChecker.fromRuntime(MicroPackageModule).isSuperOf(typeValue.element!), + typeValue.element is! ClassElement || + !TypeChecker.fromRuntime(MicroPackageModule) + .isSuperOf(typeValue.element!), 'ExternalPackageModule must be a class that extends MicroPackageModule', ); return ExternalModuleConfig(typeResolver.resolveType(typeValue)); @@ -220,7 +241,8 @@ class InjectableConfigGenerator extends GeneratorForAnnotation { ) { final messages = []; for (final dep in deps) { - for (var iDep in dep.dependencies.where((d) => !d.isFactoryParam && d.instanceName != kEnvironmentsName)) { + for (var iDep in dep.dependencies.where( + (d) => !d.isFactoryParam && d.instanceName != kEnvironmentsName)) { if ((ignoredTypes.contains(iDep.type) || (iDep.type.import == null || ignoredTypesInPackages.any( @@ -235,9 +257,13 @@ class InjectableConfigGenerator extends GeneratorForAnnotation { messages.add( "[${dep.typeImpl}] depends on unregistered type [${iDep.type}] ${iDep.type.import == null ? '' : 'from ${iDep.type.import}'}"); } else { - final availableEnvs = possibleDeps.map((e) => e.environments).reduce((a, b) => a + b).toSet(); + final availableEnvs = possibleDeps + .map((e) => e.environments) + .reduce((a, b) => a + b) + .toSet(); if (availableEnvs.isNotEmpty) { - final missingEnvs = dep.environments.toSet().difference(availableEnvs); + final missingEnvs = + dep.environments.toSet().difference(availableEnvs); if (missingEnvs.isNotEmpty) { messages.add( '[${dep.typeImpl}] ${dep.environments.toSet()} depends on Type [${iDep.type}] ${iDep.type.import == null ? '' : 'from ${iDep.type.import}'} \n which is not available under environment keys $missingEnvs', @@ -252,7 +278,8 @@ class InjectableConfigGenerator extends GeneratorForAnnotation { messages.add( '\nDid you forget to annotate the above class(s) or their implementation with @injectable? \nor add the right environment keys?'); throwIf(throwOnMissingDependencies, messages.join('\n')); - printBoxed(messages.join('\n'), header: "Missing dependencies in ${targetFile?.path}\n"); + printBoxed(messages.join('\n'), + header: "Missing dependencies in ${targetFile?.path}\n"); } } @@ -260,15 +287,21 @@ class InjectableConfigGenerator extends GeneratorForAnnotation { final validatedDeps = []; for (var dep in deps) { var registered = validatedDeps.where( - (elm) => elm.type == dep.type && elm.instanceName == dep.instanceName && elm.scope == dep.scope, + (elm) => + elm.type == dep.type && + elm.instanceName == dep.instanceName && + elm.scope == dep.scope, ); if (registered.isEmpty) { validatedDeps.add(dep); } else { - Set registeredEnvironments = registered.fold({}, (prev, elm) => prev..addAll(elm.environments)); + Set registeredEnvironments = registered + .fold({}, (prev, elm) => prev..addAll(elm.environments)); - if (registeredEnvironments.isEmpty || dep.environments.any((env) => registeredEnvironments.contains(env))) { + if (registeredEnvironments.isEmpty || + dep.environments + .any((env) => registeredEnvironments.contains(env))) { throwBoxed( '${dep.typeImpl} [${dep.type}] envs: ${dep.environments} scope: ${dep.scope} \nis registered more than once under the same environment or in the same scope', ); diff --git a/injectable_generator/lib/resolvers/dependency_resolver.dart b/injectable_generator/lib/resolvers/dependency_resolver.dart index 255a6b4..a002f75 100644 --- a/injectable_generator/lib/resolvers/dependency_resolver.dart +++ b/injectable_generator/lib/resolvers/dependency_resolver.dart @@ -66,7 +66,7 @@ class DependencyResolver { final returnType = executableElement.returnType; throwIf( returnType.element is! ClassElement, - '${returnType.getDisplayString(withNullability: false)} is not a class element', + '${returnType.nameWithoutSuffix} is not a class element', element: returnType.element, ); @@ -148,11 +148,11 @@ class DependencyResolver { if (abstractType != null) { final abstractChecker = TypeChecker.fromStatic(abstractType); var abstractSubtype = clazz.allSupertypes - .firstOrNull((type) => abstractChecker.isExactly(type.element)); + .firstWhereOrNull((type) => abstractChecker.isExactly(type.element)); throwIf( abstractSubtype == null, - '[${clazz.name}] is not a subtype of [${abstractType.getDisplayString(withNullability: false)}]', + '[${clazz.name}] is not a subtype of [${abstractType.nameWithoutSuffix}]', element: clazz, ); @@ -190,7 +190,7 @@ class DependencyResolver { } var disposeMethod = clazz.methods - .firstOrNull((m) => _disposeMethodChecker.hasAnnotationOfExact(m)); + .firstWhereOrNull((m) => _disposeMethodChecker.hasAnnotationOfExact(m)); if (disposeMethod != null) { throwIf( _injectableType == InjectableType.factory, @@ -266,11 +266,9 @@ class DependencyResolver { continue; } final namedAnnotation = _namedChecker.firstAnnotationOf(param); - final instanceName = namedAnnotation - ?.getField('type') - ?.toTypeValue() - ?.getDisplayString(withNullability: false) ?? - namedAnnotation?.getField('name')?.toStringValue(); + final instanceName = + namedAnnotation?.getField('type')?.toTypeValue()?.nameWithoutSuffix ?? + namedAnnotation?.getField('name')?.toStringValue(); final resolvedType = param.type is FunctionType ? _typeResolver.resolveFunctionType(param.type as FunctionType) diff --git a/injectable_generator/lib/resolvers/importable_type_resolver.dart b/injectable_generator/lib/resolvers/importable_type_resolver.dart index 017a46e..0367095 100644 --- a/injectable_generator/lib/resolvers/importable_type_resolver.dart +++ b/injectable_generator/lib/resolvers/importable_type_resolver.dart @@ -3,6 +3,7 @@ import 'package:analyzer/dart/element/nullability_suffix.dart'; import 'package:analyzer/dart/element/type.dart'; import 'package:collection/collection.dart'; import 'package:injectable_generator/models/importable_type.dart'; +import 'package:injectable_generator/utils.dart'; import 'package:path/path.dart' as p; abstract class ImportableTypeResolver { @@ -79,13 +80,13 @@ class ImportableTypeResolverImpl extends ImportableTypeResolver { final functionElement = executableElement ?? function.element ?? function.alias?.element; if (functionElement == null) { - throw 'Can not resolve function type \nTry using an alias e.g typedef MyFunction = ${function.getDisplayString(withNullability: false)};'; + throw 'Can not resolve function type \nTry using an alias e.g typedef MyFunction = ${function.nameWithoutSuffix};'; } final displayName = functionElement.displayName; var functionName = displayName; Element elementToImport = functionElement; - var enclosingElement = functionElement.enclosingElement; + var enclosingElement = functionElement.enclosingElement3; if (enclosingElement != null && enclosingElement is ClassElement) { functionName = '${enclosingElement.displayName}.$displayName'; @@ -140,8 +141,7 @@ class ImportableTypeResolverImpl extends ImportableTypeResolver { importableTypes.add(ImportableType(name: 'dynamic')); } else { importableTypes.add(ImportableType( - name: type.element?.name ?? - type.getDisplayString(withNullability: false), + name: type.element?.name ?? type.nameWithoutSuffix, import: imports.firstOrNull, otherImports: imports.skip(1).toSet(), isNullable: type.nullabilitySuffix == NullabilitySuffix.question, @@ -167,8 +167,7 @@ class ImportableTypeResolverImpl extends ImportableTypeResolver { ); } return ImportableType( - name: effectiveElement?.displayName ?? - type.getDisplayString(withNullability: false), + name: effectiveElement?.displayName ?? type.nameWithoutSuffix, isNullable: type.nullabilitySuffix == NullabilitySuffix.question, import: imports.firstOrNull, otherImports: imports.skip(1).toSet(), diff --git a/injectable_generator/lib/utils.dart b/injectable_generator/lib/utils.dart index f78ad43..0503416 100644 --- a/injectable_generator/lib/utils.dart +++ b/injectable_generator/lib/utils.dart @@ -1,5 +1,6 @@ // general utils import 'package:analyzer/dart/element/element.dart'; +import 'package:analyzer/dart/element/type.dart'; import 'package:source_gen/source_gen.dart'; String capitalize(String s) { @@ -49,7 +50,7 @@ void printBoxed(String message, } extension IterableExtenstion on Iterable { - E? firstOrNull(bool Function(E element) test) { + E? firstWhereOrNull(bool Function(E element) test) { for (var e in this) { if (test(e)) { return e; @@ -58,3 +59,13 @@ extension IterableExtenstion on Iterable { return null; } } + +/// Extension helpers for [DartType] +extension DartTypeX on DartType { + /// Returns the display string of this type + /// without nullability suffix + String get nameWithoutSuffix { + final name = getDisplayString(); + return name.endsWith('?') ? name.substring(0, name.length - 1) : name; + } +} diff --git a/injectable_generator/pubspec.lock b/injectable_generator/pubspec.lock index da4a19d..cac00a3 100644 --- a/injectable_generator/pubspec.lock +++ b/injectable_generator/pubspec.lock @@ -5,98 +5,103 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - sha256: "0b2f2bd91ba804e53a61d757b986f89f1f9eaed5b11e4b2f5a2468d86d6c9fc7" + sha256: "88399e291da5f7e889359681a8f64b18c5123e03576b01f32a6a276611e511c3" url: "https://pub.dev" source: hosted - version: "67.0.0" + version: "78.0.0" + _macros: + dependency: transitive + description: dart + source: sdk + version: "0.3.3" analyzer: dependency: "direct main" description: name: analyzer - sha256: "37577842a27e4338429a1cbc32679d508836510b056f1eedf0c8d20e39c1383d" + sha256: "62899ef43d0b962b056ed2ebac6b47ec76ffd003d5f7c4e4dc870afe63188e33" url: "https://pub.dev" source: hosted - version: "6.4.1" + version: "7.1.0" args: dependency: transitive description: name: args - sha256: c372bb384f273f0c2a8aaaa226dad84dc27c8519a691b888725dec59518ad53a + sha256: bf9f5caeea8d8fe6721a9c358dd8a5c1947b27f1cfaa18b39c301273594919e6 url: "https://pub.dev" source: hosted - version: "2.4.1" + version: "2.6.0" async: dependency: transitive description: name: async - sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" + sha256: d2872f9c19731c2e5f10444b14686eb7cc85c76274bd6c16e1816bff9a3bab63 url: "https://pub.dev" source: hosted - version: "2.11.0" + version: "2.12.0" boolean_selector: dependency: transitive description: name: boolean_selector - sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea" url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.2" build: dependency: "direct main" description: name: build - sha256: "80184af8b6cb3e5c1c4ec6d8544d27711700bc3e6d2efad04238c7b5290889f0" + sha256: cef23f1eda9b57566c81e2133d196f8e3df48f244b317368d65c5943d91148f0 url: "https://pub.dev" source: hosted - version: "2.4.1" + version: "2.4.2" build_config: dependency: transitive description: name: build_config - sha256: bf80fcfb46a29945b423bd9aad884590fb1dc69b330a4d4700cac476af1708d1 + sha256: "4ae2de3e1e67ea270081eaee972e1bd8f027d459f249e0f1186730784c2e7e33" url: "https://pub.dev" source: hosted - version: "1.1.1" + version: "1.1.2" build_daemon: dependency: transitive description: name: build_daemon - sha256: "5f02d73eb2ba16483e693f80bee4f088563a820e47d1027d4cdfe62b5bb43e65" + sha256: "294a2edaf4814a378725bfe6358210196f5ea37af89ecd81bfa32960113d4948" url: "https://pub.dev" source: hosted - version: "4.0.0" + version: "4.0.3" build_resolvers: dependency: transitive description: name: build_resolvers - sha256: "339086358431fa15d7eca8b6a36e5d783728cf025e559b834f4609a1fcfb7b0a" + sha256: "99d3980049739a985cf9b21f30881f46db3ebc62c5b8d5e60e27440876b1ba1e" url: "https://pub.dev" source: hosted - version: "2.4.2" + version: "2.4.3" build_runner: dependency: "direct dev" description: name: build_runner - sha256: "644dc98a0f179b872f612d3eb627924b578897c629788e858157fa5e704ca0c7" + sha256: "74691599a5bc750dc96a6b4bfd48f7d9d66453eab04c7f4063134800d6a5c573" url: "https://pub.dev" source: hosted - version: "2.4.11" + version: "2.4.14" build_runner_core: dependency: transitive description: name: build_runner_core - sha256: "88a57f2ac99849362e73878334caa9f06ee25f31d2adced882b8337838c84e1e" + sha256: "22e3aa1c80e0ada3722fe5b63fd43d9c8990759d0a2cf489c8c5d7b2bdebc021" url: "https://pub.dev" source: hosted - version: "7.2.9" + version: "8.0.0" build_test: dependency: "direct dev" description: name: build_test - sha256: "260dbba934f41b0a42935e9cae1f5731b94f0c3e489dc97bcf8e281265aaa5ae" + sha256: a580c76c28440d0006b75c6746bbbb3c1648959ba9e1afae2c2b0f2c26acdf3d url: "https://pub.dev" source: hosted - version: "2.2.2" + version: "2.2.3" built_collection: dependency: transitive description: @@ -109,10 +114,10 @@ packages: dependency: transitive description: name: built_value - sha256: "7dd62d9faf105c434f3d829bbe9c4be02ec67f5ed94832222116122df67c5452" + sha256: "28a712df2576b63c6c005c465989a348604960c0958d28be5303ba9baa841ac2" url: "https://pub.dev" source: hosted - version: "8.6.0" + version: "8.9.3" checked_yaml: dependency: transitive description: @@ -125,90 +130,90 @@ packages: dependency: "direct main" description: name: code_builder - sha256: f692079e25e7869c14132d39f223f8eec9830eb76131925143b2129c4bb01b37 + sha256: "0ec10bf4a89e4c613960bf1e8b42c64127021740fb21640c29c909826a5eea3e" url: "https://pub.dev" source: hosted - version: "4.10.0" + version: "4.10.1" collection: dependency: "direct main" description: name: collection - sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a + sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76" url: "https://pub.dev" source: hosted - version: "1.18.0" + version: "1.19.1" convert: dependency: transitive description: name: convert - sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" + sha256: b30acd5944035672bc15c6b7a8b47d773e41e2f17de064350988c5d02adb1c68 url: "https://pub.dev" source: hosted - version: "3.1.1" + version: "3.1.2" coverage: dependency: transitive description: name: coverage - sha256: "2fb815080e44a09b85e0f2ca8a820b15053982b2e714b59267719e8a9ff17097" + sha256: e3493833ea012784c740e341952298f1cc77f1f01b1bbc3eb4eecf6984fb7f43 url: "https://pub.dev" source: hosted - version: "1.6.3" + version: "1.11.1" crypto: dependency: transitive description: name: crypto - sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab + sha256: "1e445881f28f22d6140f181e07737b22f1e099a5e1ff94b0af2f9e4a463f4855" url: "https://pub.dev" source: hosted - version: "3.0.3" + version: "3.0.6" csslib: dependency: transitive description: name: csslib - sha256: "831883fb353c8bdc1d71979e5b342c7d88acfbc643113c14ae51e2442ea0f20f" + sha256: "09bad715f418841f976c77db72d5398dc1253c21fb9c0c7f0b0b985860b2d58e" url: "https://pub.dev" source: hosted - version: "0.17.3" + version: "1.0.2" dart_style: dependency: "direct main" description: name: dart_style - sha256: "99e066ce75c89d6b29903d788a7bb9369cf754f7b24bf70bf4b6d6d6b26853b9" + sha256: "27eb0ae77836989a3bc541ce55595e8ceee0992807f14511552a898ddd0d88ac" url: "https://pub.dev" source: hosted - version: "2.3.6" + version: "3.0.1" file: dependency: transitive description: name: file - sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" + sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4 url: "https://pub.dev" source: hosted - version: "7.0.0" + version: "7.0.1" fixnum: dependency: transitive description: name: fixnum - sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" + sha256: b6dc7065e46c974bc7c5f143080a6764ec7a4be6da1285ececdc37be96de53be url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.1.1" frontend_server_client: dependency: transitive description: name: frontend_server_client - sha256: "408e3ca148b31c20282ad6f37ebfa6f4bdc8fede5b74bc2f08d9d92b55db3612" + sha256: f64a0333a82f30b0cca061bc3d143813a486dc086b574bfb233b7c1372427694 url: "https://pub.dev" source: hosted - version: "3.2.0" + version: "4.0.0" get_it: dependency: transitive description: name: get_it - sha256: ff97e5e7b2e82e63c82f5658c6ba2605ea831f0f7489b0d2fb255d817ec4eb5e + sha256: f126a3e286b7f5b578bf436d5592968706c4c1de28a228b870ce375d9f743103 url: "https://pub.dev" source: hosted - version: "8.0.0" + version: "8.0.3" glob: dependency: "direct main" description: @@ -221,105 +226,114 @@ packages: dependency: transitive description: name: graphs - sha256: aedc5a15e78fc65a6e23bcd927f24c64dd995062bcd1ca6eda65a3cff92a4d19 + sha256: "741bbf84165310a68ff28fe9e727332eef1407342fca52759cb21ad8177bb8d0" url: "https://pub.dev" source: hosted - version: "2.3.1" + version: "2.3.2" html: dependency: transitive description: name: html - sha256: "58e3491f7bf0b6a4ea5110c0c688877460d1a6366731155c4a4580e7ded773e8" + sha256: "1fc58edeaec4307368c60d59b7e15b9d658b57d7f3125098b6294153c75337ec" url: "https://pub.dev" source: hosted - version: "0.15.3" + version: "0.15.5" http_multi_server: dependency: transitive description: name: http_multi_server - sha256: "97486f20f9c2f7be8f514851703d0119c3596d14ea63227af6f7a481ef2b2f8b" + sha256: aa6199f908078bb1c5efb8d8638d4ae191aac11b311132c3ef48ce352fb52ef8 url: "https://pub.dev" source: hosted - version: "3.2.1" + version: "3.2.2" http_parser: dependency: transitive description: name: http_parser - sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" + sha256: "178d74305e7866013777bab2c3d8726205dc5a4dd935297175b19a23a2e66571" url: "https://pub.dev" source: hosted - version: "4.0.2" + version: "4.1.2" injectable: dependency: "direct main" description: - path: "../injectable" - relative: true - source: path - version: "2.4.4" + name: injectable + sha256: "5e1556ea1d374fe44cbe846414d9bab346285d3d8a1da5877c01ad0774006068" + url: "https://pub.dev" + source: hosted + version: "2.5.0" io: dependency: transitive description: name: io - sha256: "2ec25704aba361659e10e3e5f5d672068d332fc8ac516421d483a11e5cbd061e" + sha256: dfd5a80599cf0165756e3181807ed3e77daf6dd4137caaad72d0b7931597650b url: "https://pub.dev" source: hosted - version: "1.0.4" + version: "1.0.5" js: dependency: transitive description: name: js - sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 + sha256: c1b2e9b5ea78c45e1a0788d29606ba27dc5f71f019f32ca5140f61ef071838cf url: "https://pub.dev" source: hosted - version: "0.6.7" + version: "0.7.1" json_annotation: dependency: transitive description: name: json_annotation - sha256: b10a7b2ff83d83c777edba3c6a0f97045ddadd56c944e1a23a3fdf43a1bf4467 + sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1" url: "https://pub.dev" source: hosted - version: "4.8.1" + version: "4.9.0" lints: dependency: "direct dev" description: name: lints - sha256: "976c774dd944a42e83e2467f4cc670daef7eed6295b10b36ae8c85bcbf828235" + sha256: c35bb79562d980e9a453fc715854e1ed39e24e7d0297a880ef54e17f9874a9d7 url: "https://pub.dev" source: hosted - version: "4.0.0" + version: "5.1.1" logging: dependency: transitive description: name: logging - sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340" + sha256: c8245ada5f1717ed44271ed1c26b8ce85ca3228fd2ffdb75468ab01979309d61 url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.3.0" + macros: + dependency: transitive + description: + name: macros + sha256: "1d9e801cd66f7ea3663c45fc708450db1fa57f988142c64289142c9b7ee80656" + url: "https://pub.dev" + source: hosted + version: "0.1.3-main.0" matcher: dependency: transitive description: name: matcher - sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb + sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2 url: "https://pub.dev" source: hosted - version: "0.12.16+1" + version: "0.12.17" meta: dependency: "direct main" description: name: meta - sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 + sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c url: "https://pub.dev" source: hosted - version: "1.15.0" + version: "1.16.0" mime: dependency: transitive description: name: mime - sha256: e4ff8e8564c03f255408decd16e7899da1733852a9110a58fe6d1b817684a63e + sha256: "41a20518f0cb1256669420fdba0cd90d21561e560ac240f26ef8322e45bb7ed6" url: "https://pub.dev" source: hosted - version: "1.0.4" + version: "2.0.0" node_preamble: dependency: transitive description: @@ -332,18 +346,18 @@ packages: dependency: transitive description: name: package_config - sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd" + sha256: "92d4488434b520a62570293fbd33bb556c7d49230791c1b4bbd973baf6d2dc67" url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.1" path: dependency: "direct main" description: name: path - sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" + sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5" url: "https://pub.dev" source: hosted - version: "1.9.0" + version: "1.9.1" pool: dependency: transitive description: @@ -356,18 +370,18 @@ packages: dependency: transitive description: name: pub_semver - sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c" + sha256: "7b3cfbf654f3edd0c6298ecd5be782ce997ddf0e00531b9464b55245185bbbbd" url: "https://pub.dev" source: hosted - version: "2.1.4" + version: "2.1.5" pubspec_parse: dependency: transitive description: name: pubspec_parse - sha256: c63b2876e58e194e4b0828fcb080ad0e06d051cb607a6be51a9e084f47cb9367 + sha256: "0560ba233314abbed0a48a2956f7f022cce7c3e1e73df540277da7544cad4082" url: "https://pub.dev" source: hosted - version: "1.2.3" + version: "1.5.0" recase: dependency: "direct main" description: @@ -380,10 +394,10 @@ packages: dependency: transitive description: name: shelf - sha256: ad29c505aee705f41a4d8963641f91ac4cee3c8fad5947e033390a7bd8180fa4 + sha256: e7dd780a7ffb623c57850b33f43309312fc863fb6aa3d276a754bb299839ef12 url: "https://pub.dev" source: hosted - version: "1.4.1" + version: "1.4.2" shelf_packages_handler: dependency: transitive description: @@ -396,169 +410,185 @@ packages: dependency: transitive description: name: shelf_static - sha256: a41d3f53c4adf0f57480578c1d61d90342cd617de7fc8077b1304643c2d85c1e + sha256: c87c3875f91262785dade62d135760c2c69cb217ac759485334c5857ad89f6e3 url: "https://pub.dev" source: hosted - version: "1.1.2" + version: "1.1.3" shelf_web_socket: dependency: transitive description: name: shelf_web_socket - sha256: "9ca081be41c60190ebcb4766b2486a7d50261db7bd0f5d9615f2d653637a84c1" + sha256: cc36c297b52866d203dbf9332263c94becc2fe0ceaa9681d07b6ef9807023b67 url: "https://pub.dev" source: hosted - version: "1.0.4" + version: "2.0.1" source_gen: dependency: "direct main" description: name: source_gen - sha256: "14658ba5f669685cd3d63701d01b31ea748310f7ab854e471962670abcf57832" + sha256: "35c8150ece9e8c8d263337a265153c3329667640850b9304861faea59fc98f6b" url: "https://pub.dev" source: hosted - version: "1.5.0" + version: "2.0.0" source_map_stack_trace: dependency: transitive description: name: source_map_stack_trace - sha256: "84cf769ad83aa6bb61e0aa5a18e53aea683395f196a6f39c4c881fb90ed4f7ae" + sha256: c0713a43e323c3302c2abe2a1cc89aa057a387101ebd280371d6a6c9fa68516b url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.2" source_maps: dependency: transitive description: name: source_maps - sha256: "708b3f6b97248e5781f493b765c3337db11c5d2c81c3094f10904bfa8004c703" + sha256: "190222579a448b03896e0ca6eca5998fa810fda630c1d65e2f78b3f638f54812" url: "https://pub.dev" source: hosted - version: "0.10.12" + version: "0.10.13" source_span: dependency: transitive description: name: source_span - sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" + sha256: "254ee5351d6cb365c859e20ee823c3bb479bf4a293c22d17a9f1bf144ce86f7c" url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.10.1" stack_trace: dependency: transitive description: name: stack_trace - sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5 + sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1" url: "https://pub.dev" source: hosted - version: "1.11.0" + version: "1.12.1" stream_channel: dependency: transitive description: name: stream_channel - sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8" + sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d" url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.4" stream_transform: dependency: transitive description: name: stream_transform - sha256: "14a00e794c7c11aa145a170587321aedce29769c08d7f58b1d141da75e3b1c6f" + sha256: ad47125e588cfd37a9a7f86c7d6356dde8dfe89d071d293f80ca9e9273a33871 url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.1" string_scanner: dependency: transitive description: name: string_scanner - sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43" url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.4.1" term_glyph: dependency: transitive description: name: term_glyph - sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e" url: "https://pub.dev" source: hosted - version: "1.2.1" + version: "1.2.2" test: dependency: "direct dev" description: name: test - sha256: "713a8789d62f3233c46b4a90b174737b2c04cb6ae4500f2aa8b1be8f03f5e67f" + sha256: "8391fbe68d520daf2314121764d38e37f934c02fd7301ad18307bd93bd6b725d" url: "https://pub.dev" source: hosted - version: "1.25.8" + version: "1.25.14" test_api: dependency: transitive description: name: test_api - sha256: "664d3a9a64782fcdeb83ce9c6b39e78fd2971d4e37827b9b06c3aa1edc5e760c" + sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd url: "https://pub.dev" source: hosted - version: "0.7.3" + version: "0.7.4" test_core: dependency: transitive description: name: test_core - sha256: "12391302411737c176b0b5d6491f466b0dd56d4763e347b6714efbaa74d7953d" + sha256: "84d17c3486c8dfdbe5e12a50c8ae176d15e2a771b96909a9442b40173649ccaa" url: "https://pub.dev" source: hosted - version: "0.6.5" + version: "0.6.8" timing: dependency: transitive description: name: timing - sha256: "70a3b636575d4163c477e6de42f247a23b315ae20e86442bebe32d3cabf61c32" + sha256: "62ee18aca144e4a9f29d212f5a4c6a053be252b895ab14b5821996cff4ed90fe" url: "https://pub.dev" source: hosted - version: "1.0.1" + version: "1.0.2" typed_data: dependency: transitive description: name: typed_data - sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c + sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006 url: "https://pub.dev" source: hosted - version: "1.3.2" + version: "1.4.0" vm_service: dependency: transitive description: name: vm_service - sha256: f3743ca475e0c9ef71df4ba15eb2d7684eecd5c8ba20a462462e4e8b561b2e11 + sha256: ddfa8d30d89985b96407efce8acbdd124701f96741f2d981ca860662f1c0dc02 url: "https://pub.dev" source: hosted - version: "11.6.0" + version: "15.0.0" watcher: dependency: transitive description: name: watcher - sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8" + sha256: "69da27e49efa56a15f8afe8f4438c4ec02eff0a117df1b22ea4aad194fe1c104" + url: "https://pub.dev" + source: hosted + version: "1.1.1" + web: + dependency: transitive + description: + name: web + sha256: cd3543bd5798f6ad290ea73d210f423502e71900302dde696f8bff84bf89a1cb url: "https://pub.dev" source: hosted version: "1.1.0" + web_socket: + dependency: transitive + description: + name: web_socket + sha256: "3c12d96c0c9a4eec095246debcea7b86c0324f22df69893d538fcc6f1b8cce83" + url: "https://pub.dev" + source: hosted + version: "0.1.6" web_socket_channel: dependency: transitive description: name: web_socket_channel - sha256: d88238e5eac9a42bb43ca4e721edba3c08c6354d4a53063afaa568516217621b + sha256: "9f187088ed104edd8662ca07af4b124465893caf063ba29758f97af57e61da8f" url: "https://pub.dev" source: hosted - version: "2.4.0" + version: "3.0.1" webkit_inspection_protocol: dependency: transitive description: name: webkit_inspection_protocol - sha256: "67d3a8b6c79e1987d19d848b0892e582dbb0c66c57cc1fef58a177dd2aa2823d" + sha256: "87d3f2333bb240704cd3f1c6b5b7acd8a10e7f0bc28c28dcf14e782014f4a572" url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.2.1" yaml: dependency: transitive description: name: yaml - sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5" + sha256: b9da305ac7c39faa3f030eccd175340f968459dae4af175130b3fc47e40d76ce url: "https://pub.dev" source: hosted - version: "3.1.2" + version: "3.1.3" sdks: - dart: ">=3.4.0 <4.0.0" + dart: ">=3.6.0 <4.0.0" diff --git a/injectable_generator/pubspec.yaml b/injectable_generator/pubspec.yaml index 9200e21..a94192f 100644 --- a/injectable_generator/pubspec.yaml +++ b/injectable_generator/pubspec.yaml @@ -1,26 +1,26 @@ name: injectable_generator description: Injectable is a convenient code generator for get_it. Inspired by Angular DI, Guice DI and inject.dart. -version: 2.6.2 +version: 2.7.0 homepage: https://github.com/Milad-Akarie/injectable environment: sdk: ">=3.0.0<4.0.0" dependencies: - build: ^2.4.1 + build: ^2.4.2 source_gen: ^2.0.0 path: ^1.9.0 glob: ^2.1.2 - analyzer: ">=6.4.1 <7.0.0" - code_builder: ^4.10.0 - dart_style: ^3.0.0 - injectable: ^2.4.3 - # path: ../injectable + analyzer: ">=6.4.1 <8.0.0" + code_builder: ^4.10.1 + dart_style: ^3.0.1 + injectable: ^2.5.0 +# path: ../injectable collection: ^1.17.1 recase: ^4.1.0 meta: ^1.12.0 dev_dependencies: build_runner: ^2.4.11 - build_test: ^2.2.2 - test: ^1.25.8 - lints: ^4.0.0 + build_test: ^2.2.3 + test: ^1.25.14 + lints: ^5.1.1