From ed73b064180f1784ed78138e02ba86cef54199d4 Mon Sep 17 00:00:00 2001 From: Kilian Schulte Date: Fri, 4 Oct 2024 11:39:16 +0200 Subject: [PATCH] fix formatting --- .github/workflows/cli.yml | 2 +- .github/workflows/test.yml | 6 +++--- .../lib/generated/imports/_web.dart | 6 ++---- .../client/lib/src/protocol/client.dart | 6 ++---- .../lib/generated/imports/_web.dart | 12 ++++-------- .../lib/src/generated/protocol.dart | 3 +-- .../lib/src/generated/quote_init.dart | 3 +-- .../lib/src/framework/inherited_model.dart | 18 ++++++------------ 8 files changed, 20 insertions(+), 36 deletions(-) diff --git a/.github/workflows/cli.yml b/.github/workflows/cli.yml index 60bdd5d4..eeed258b 100644 --- a/.github/workflows/cli.yml +++ b/.github/workflows/cli.yml @@ -47,7 +47,7 @@ jobs: jaspr --disable-analytics - name: Run cli test - run: melos coverage:cli + run: melos run coverage:cli env: VARIANT: ${{matrix.VARIANT}} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c4f5a3c8..984a581b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -33,10 +33,10 @@ jobs: jaspr --disable-analytics - name: Check formatting - run: melos format + run: melos run format - name: Check linting - run: melos analyze + run: melos run analyze test: name: Test Packages @@ -56,7 +56,7 @@ jobs: jaspr --disable-analytics - name: Run Unit tests - run: melos coverage --no-select + run: melos run coverage --no-select - name: Upload Coverage uses: codecov/codecov-action@v3 diff --git a/apps/dart_quotes/lib/generated/imports/_web.dart b/apps/dart_quotes/lib/generated/imports/_web.dart index 10589ee2..d6692f8d 100644 --- a/apps/dart_quotes/lib/generated/imports/_web.dart +++ b/apps/dart_quotes/lib/generated/imports/_web.dart @@ -5,14 +5,12 @@ import '../../../interop/confetti.dart' show JSConfetti; import 'package:firebase_core/firebase_core.dart' show Firebase, FirebaseApp; -import 'package:cloud_firestore/cloud_firestore.dart' - show FirebaseFirestore, FieldValue, DocumentSnapshot; +import 'package:cloud_firestore/cloud_firestore.dart' show FirebaseFirestore, FieldValue, DocumentSnapshot; import 'package:firebase_auth/firebase_auth.dart' show FirebaseAuth; import '../../../firebase_options.dart' show DefaultFirebaseOptions; export '../../../interop/confetti.dart' show JSConfetti; export 'package:firebase_core/firebase_core.dart' show Firebase, FirebaseApp; -export 'package:cloud_firestore/cloud_firestore.dart' - show FirebaseFirestore, FieldValue, DocumentSnapshot; +export 'package:cloud_firestore/cloud_firestore.dart' show FirebaseFirestore, FieldValue, DocumentSnapshot; export 'package:firebase_auth/firebase_auth.dart' show FirebaseAuth; export '../../../firebase_options.dart' show DefaultFirebaseOptions; diff --git a/apps/dart_quotes_server/client/lib/src/protocol/client.dart b/apps/dart_quotes_server/client/lib/src/protocol/client.dart index e0ed0c29..88b99cf8 100644 --- a/apps/dart_quotes_server/client/lib/src/protocol/client.dart +++ b/apps/dart_quotes_server/client/lib/src/protocol/client.dart @@ -75,8 +75,7 @@ class Client extends _i1.ServerpodClientShared { connectionTimeout: connectionTimeout, onFailedCall: onFailedCall, onSucceededCall: onSucceededCall, - disconnectStreamsOnLostInternetConnection: - disconnectStreamsOnLostInternetConnection, + disconnectStreamsOnLostInternetConnection: disconnectStreamsOnLostInternetConnection, ) { quotes = EndpointQuotes(this); modules = _Modules(this); @@ -90,6 +89,5 @@ class Client extends _i1.ServerpodClientShared { Map get endpointRefLookup => {'quotes': quotes}; @override - Map get moduleLookup => - {'auth': modules.auth}; + Map get moduleLookup => {'auth': modules.auth}; } diff --git a/apps/dart_quotes_server/lib/generated/imports/_web.dart b/apps/dart_quotes_server/lib/generated/imports/_web.dart index fa57f8a4..6839594d 100644 --- a/apps/dart_quotes_server/lib/generated/imports/_web.dart +++ b/apps/dart_quotes_server/lib/generated/imports/_web.dart @@ -3,23 +3,19 @@ // ignore_for_file: directives_ordering -import 'package:dart_quotes_client/dart_quotes_client.dart' - show StreamingConnectionHandler, Client, QuoteInit; +import 'package:dart_quotes_client/dart_quotes_client.dart' show StreamingConnectionHandler, Client, QuoteInit; import 'package:serverpod_auth_shared_flutter/serverpod_auth_shared_flutter.dart' show FlutterAuthenticationKeyManager, SessionManager; import '../../../web/interop/confetti.dart' show JSConfetti; -export 'package:dart_quotes_client/dart_quotes_client.dart' - show StreamingConnectionHandler, Client, QuoteInit; +export 'package:dart_quotes_client/dart_quotes_client.dart' show StreamingConnectionHandler, Client, QuoteInit; export 'package:serverpod_auth_shared_flutter/serverpod_auth_shared_flutter.dart' show FlutterAuthenticationKeyManager, SessionManager; export '../../../web/interop/confetti.dart' show JSConfetti; -export 'package:serverpod_auth_google_flutter/serverpod_auth_google_flutter.dart' - show signInWithGoogle; +export 'package:serverpod_auth_google_flutter/serverpod_auth_google_flutter.dart' show signInWithGoogle; typedef StreamingConnectionHandlerOrStubbed = StreamingConnectionHandler; typedef ClientOrStubbed = Client; typedef QuoteInitOrStubbed = QuoteInit; -typedef FlutterAuthenticationKeyManagerOrStubbed - = FlutterAuthenticationKeyManager; +typedef FlutterAuthenticationKeyManagerOrStubbed = FlutterAuthenticationKeyManager; typedef SessionManagerOrStubbed = SessionManager; typedef JSConfettiOrStubbed = JSConfetti; diff --git a/apps/dart_quotes_server/lib/src/generated/protocol.dart b/apps/dart_quotes_server/lib/src/generated/protocol.dart index e9c639c5..a82fd5b1 100644 --- a/apps/dart_quotes_server/lib/src/generated/protocol.dart +++ b/apps/dart_quotes_server/lib/src/generated/protocol.dart @@ -172,8 +172,7 @@ class Protocol extends _i1.SerializationManagerServer { } @override - List<_i2.TableDefinition> getTargetTableDefinitions() => - targetTableDefinitions; + List<_i2.TableDefinition> getTargetTableDefinitions() => targetTableDefinitions; @override String getModuleName() => 'dart_quotes'; diff --git a/apps/dart_quotes_server/lib/src/generated/quote_init.dart b/apps/dart_quotes_server/lib/src/generated/quote_init.dart index f5f81939..96edfc5b 100644 --- a/apps/dart_quotes_server/lib/src/generated/quote_init.dart +++ b/apps/dart_quotes_server/lib/src/generated/quote_init.dart @@ -11,8 +11,7 @@ // ignore_for_file: no_leading_underscores_for_library_prefixes import 'package:serverpod/serverpod.dart' as _i1; -abstract class QuoteInit - implements _i1.SerializableModel, _i1.ProtocolSerialization { +abstract class QuoteInit implements _i1.SerializableModel, _i1.ProtocolSerialization { QuoteInit._({required this.id}); factory QuoteInit({required int id}) = _QuoteInitImpl; diff --git a/packages/jaspr/lib/src/framework/inherited_model.dart b/packages/jaspr/lib/src/framework/inherited_model.dart index 527c6dad..335e8ea6 100644 --- a/packages/jaspr/lib/src/framework/inherited_model.dart +++ b/packages/jaspr/lib/src/framework/inherited_model.dart @@ -12,8 +12,7 @@ abstract class InheritedModel extends InheritedComponent { /// Return true if the changes between this model and [oldComponent] match any /// of the [dependencies]. @protected - bool updateShouldNotifyDependent( - covariant InheritedModel oldComponent, Set dependencies); + bool updateShouldNotifyDependent(covariant InheritedModel oldComponent, Set dependencies); /// Returns true if this model supports the given [aspect]. /// @@ -29,8 +28,7 @@ abstract class InheritedModel extends InheritedComponent { // with the one that supports the specified model [aspect]. static void _findModels>( BuildContext context, Object aspect, List results) { - final InheritedElement? model = - context.getElementForInheritedComponentOfExactType(); + final InheritedElement? model = context.getElementForInheritedComponentOfExactType(); if (model == null) { return; } @@ -70,8 +68,7 @@ abstract class InheritedModel extends InheritedComponent { /// `context.dependOnInheritedComponentOfExactType()`. /// /// If no ancestor of type T exists, null is returned. - static T? inheritFrom>(BuildContext context, - {Object? aspect}) { + static T? inheritFrom>(BuildContext context, {Object? aspect}) { if (aspect == null) { return context.dependOnInheritedComponentOfExactType(); } @@ -86,8 +83,7 @@ abstract class InheritedModel extends InheritedComponent { final InheritedElement lastModel = models.last; for (final InheritedElement model in models) { - final T value = - context.dependOnInheritedElement(model, aspect: aspect) as T; + final T value = context.dependOnInheritedElement(model, aspect: aspect) as T; if (model == lastModel) { return value; } @@ -113,8 +109,7 @@ class InheritedModelElement extends InheritedElement { setDependencies(dependent, HashSet()); } else { assert(aspect is T); - setDependencies( - dependent, (dependencies ?? HashSet())..add(aspect as T)); + setDependencies(dependent, (dependencies ?? HashSet())..add(aspect as T)); } } @@ -125,8 +120,7 @@ class InheritedModelElement extends InheritedElement { return; } if (dependencies.isEmpty || - (component as InheritedModel) - .updateShouldNotifyDependent(oldComponent, dependencies)) { + (component as InheritedModel).updateShouldNotifyDependent(oldComponent, dependencies)) { dependent.didChangeDependencies(); } }