Skip to content

Commit

Permalink
fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Kilian Schulte committed Oct 4, 2024
1 parent 3f1a33b commit ed73b06
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 36 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}}

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
6 changes: 2 additions & 4 deletions apps/dart_quotes/lib/generated/imports/_web.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
6 changes: 2 additions & 4 deletions apps/dart_quotes_server/client/lib/src/protocol/client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -90,6 +89,5 @@ class Client extends _i1.ServerpodClientShared {
Map<String, _i1.EndpointRef> get endpointRefLookup => {'quotes': quotes};

@override
Map<String, _i1.ModuleEndpointCaller> get moduleLookup =>
{'auth': modules.auth};
Map<String, _i1.ModuleEndpointCaller> get moduleLookup => {'auth': modules.auth};
}
12 changes: 4 additions & 8 deletions apps/dart_quotes_server/lib/generated/imports/_web.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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;
3 changes: 1 addition & 2 deletions apps/dart_quotes_server/lib/src/generated/protocol.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
3 changes: 1 addition & 2 deletions apps/dart_quotes_server/lib/src/generated/quote_init.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
18 changes: 6 additions & 12 deletions packages/jaspr/lib/src/framework/inherited_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ abstract class InheritedModel<T> extends InheritedComponent {
/// Return true if the changes between this model and [oldComponent] match any
/// of the [dependencies].
@protected
bool updateShouldNotifyDependent(
covariant InheritedModel<T> oldComponent, Set<T> dependencies);
bool updateShouldNotifyDependent(covariant InheritedModel<T> oldComponent, Set<T> dependencies);

/// Returns true if this model supports the given [aspect].
///
Expand All @@ -29,8 +28,7 @@ abstract class InheritedModel<T> extends InheritedComponent {
// with the one that supports the specified model [aspect].
static void _findModels<T extends InheritedModel<Object>>(
BuildContext context, Object aspect, List<InheritedElement> results) {
final InheritedElement? model =
context.getElementForInheritedComponentOfExactType<T>();
final InheritedElement? model = context.getElementForInheritedComponentOfExactType<T>();
if (model == null) {
return;
}
Expand Down Expand Up @@ -70,8 +68,7 @@ abstract class InheritedModel<T> extends InheritedComponent {
/// `context.dependOnInheritedComponentOfExactType<T>()`.
///
/// If no ancestor of type T exists, null is returned.
static T? inheritFrom<T extends InheritedModel<Object>>(BuildContext context,
{Object? aspect}) {
static T? inheritFrom<T extends InheritedModel<Object>>(BuildContext context, {Object? aspect}) {
if (aspect == null) {
return context.dependOnInheritedComponentOfExactType<T>();
}
Expand All @@ -86,8 +83,7 @@ abstract class InheritedModel<T> 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;
}
Expand All @@ -113,8 +109,7 @@ class InheritedModelElement<T> extends InheritedElement {
setDependencies(dependent, HashSet<T>());
} else {
assert(aspect is T);
setDependencies(
dependent, (dependencies ?? HashSet<T>())..add(aspect as T));
setDependencies(dependent, (dependencies ?? HashSet<T>())..add(aspect as T));
}
}

Expand All @@ -125,8 +120,7 @@ class InheritedModelElement<T> extends InheritedElement {
return;
}
if (dependencies.isEmpty ||
(component as InheritedModel<T>)
.updateShouldNotifyDependent(oldComponent, dependencies)) {
(component as InheritedModel<T>).updateShouldNotifyDependent(oldComponent, dependencies)) {
dependent.didChangeDependencies();
}
}
Expand Down

0 comments on commit ed73b06

Please sign in to comment.