diff --git a/functions_framework/lib/src/run.dart b/functions_framework/lib/src/run.dart index 7ecfced6..ca02eb22 100644 --- a/functions_framework/lib/src/run.dart +++ b/functions_framework/lib/src/run.dart @@ -28,7 +28,7 @@ Future run( loggingMiddleware .addMiddleware(_forbiddenAssetMiddleware) .addHandler(handler), - InternetAddress.anyIPv4, + InternetAddress.anyIPv6, port, ); print('Listening on :${server.port}'); diff --git a/functions_framework_builder/lib/builder.dart b/functions_framework_builder/lib/builder.dart index e7aaaf1d..c0044030 100644 --- a/functions_framework_builder/lib/builder.dart +++ b/functions_framework_builder/lib/builder.dart @@ -33,8 +33,7 @@ import 'src/constants.dart'; import 'src/function_type_validator.dart'; import 'src/supported_function_type.dart'; -Builder functionsFrameworkBuilder([BuilderOptions? options]) => - const _FunctionsFrameworkBuilder(); +Builder functionsFrameworkBuilder([BuilderOptions? options]) => const _FunctionsFrameworkBuilder(); class _FunctionsFrameworkBuilder implements Builder { const _FunctionsFrameworkBuilder(); @@ -64,8 +63,7 @@ class _FunctionsFrameworkBuilder implements Builder { final targetReader = annotatedElement.annotation.read('target'); - final targetName = - targetReader.isNull ? element.name : targetReader.stringValue; + final targetName = targetReader.isNull ? element.name : targetReader.stringValue; if (entries.containsKey(targetName)) { throw InvalidGenerationSourceError( @@ -122,7 +120,9 @@ ${cases.join('\n')} '''; try { - output = DartFormatter().format(output); + output = DartFormatter( + languageVersion: DartFormatter.latestLanguageVersion, + ).format(output); } on FormatterException catch (e, stack) { log.warning('Could not format output.', e, stack); } diff --git a/functions_framework_builder/pubspec.yaml b/functions_framework_builder/pubspec.yaml index 37c46dd6..729cfbc8 100644 --- a/functions_framework_builder/pubspec.yaml +++ b/functions_framework_builder/pubspec.yaml @@ -11,7 +11,7 @@ dependencies: build: ^2.0.0 build_config: '>=0.4.3 <2.0.0' collection: ^1.15.0 - dart_style: ^2.0.0 + dart_style: ^3.0.1 # There is a tight version constraint because the builder has a strict # dependency on all features exposed. functions_framework: '>=0.4.0 <0.4.4' @@ -19,7 +19,7 @@ dependencies: meta: ^1.2.4 path: ^1.7.0 shelf: ^1.0.0 - source_gen: ^1.0.0 + source_gen: ^2.0.0 source_helper: ^1.0.0 dev_dependencies: