Skip to content

Commit

Permalink
fix(ci): Publish automation fix (#217)
Browse files Browse the repository at this point in the history
  • Loading branch information
j4qfrost committed Feb 28, 2024
1 parent 4eb26d6 commit 2da2db0
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 13 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ jobs:
|| startsWith(github.event.head_commit.message, 'perf')
|| startsWith(github.event.head_commit.message, 'refactor')
|| startsWith(github.event.head_commit.message, 'revert')
|| startsWith(github.event.head_commit.message, 'trigger')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -34,9 +33,9 @@ jobs:
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
- name: Install melos
run: dart pub global activate melos
- name: Format
run: dart fix --apply && dart format --fix .
run: |
cat pubspec.yaml
dart pub global activate melos
- name: Uptick versions
run: melos sync-version
- name: Changelog
Expand Down
2 changes: 1 addition & 1 deletion melos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ scripts:
fix:
run: melos exec --fail-fast --ignore "*common*" --ignore "*application*" --ignore "*dependency*" -- "dart fix --apply ."
sync-version:
run: melos exec --fail-fast --ignore "*common*" --ignore "*application*" --ignore "*dependency*" --ignore "*test_package*" -- melos version --yes -V MELOS_PACKAGE_NAME:`dart pub deps -s list | grep conduit_workspace | awk '{print $2}' | grep -oE '[0-9]+\.[0-9]+\.[0-9]+'`
run: melos exec -c1 --fail-fast --ignore "*common*" --ignore "*application*" --ignore "*dependency*" --ignore "*test_package*" -- melos version -V MELOS_PACKAGE_NAME:`dart pub deps -s list | grep conduit_workspace | awk '{print $2}' | grep -oE '[0-9]+\.[0-9]+\.[0-9]+'` --yes
environment:
sdk: ">=3.3.0 <4.0.0"

18 changes: 13 additions & 5 deletions packages/core/lib/src/db/query/mixin.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import 'package:conduit_core/src/db/query/page.dart';
import 'package:conduit_core/src/db/query/query.dart';
import 'package:conduit_core/src/db/query/sort_descriptor.dart';

mixin QueryMixin<InstanceType extends ManagedObject> implements Query<InstanceType> {
mixin QueryMixin<InstanceType extends ManagedObject>
implements Query<InstanceType> {
@override
int offset = 0;

Expand Down Expand Up @@ -38,7 +39,10 @@ mixin QueryMixin<InstanceType extends ManagedObject> implements Query<InstanceTy
List<KeyPath>? _propertiesToFetch;

List<KeyPath> get propertiesToFetch =>
_propertiesToFetch ?? entity.defaultProperties!.map((k) => KeyPath(entity.properties[k])).toList();
_propertiesToFetch ??
entity.defaultProperties!
.map((k) => KeyPath(entity.properties[k]))
.toList();

@override
InstanceType get values {
Expand Down Expand Up @@ -98,7 +102,8 @@ mixin QueryMixin<InstanceType extends ManagedObject> implements Query<InstanceTy
T? boundingValue,
}) {
final attribute = entity.identifyAttribute(propertyIdentifier);
pageDescriptor = QueryPage(order, attribute.name, boundingValue: boundingValue);
pageDescriptor =
QueryPage(order, attribute.name, boundingValue: boundingValue);
}

@override
Expand All @@ -120,7 +125,9 @@ mixin QueryMixin<InstanceType extends ManagedObject> implements Query<InstanceTy

if (properties.any(
(kp) => kp.path.any(
(p) => p is ManagedRelationshipDescription && p.relationshipType != ManagedRelationshipType.belongsTo,
(p) =>
p is ManagedRelationshipDescription &&
p.relationshipType != ManagedRelationshipType.belongsTo,
),
)) {
throw ArgumentError(
Expand Down Expand Up @@ -164,7 +171,8 @@ mixin QueryMixin<InstanceType extends ManagedObject> implements Query<InstanceTy
.map((r) => "'${r!.name}'")
.join(", ");

throw StateError("Invalid query construction. This query joins '${fromRelationship.entity.tableName}' "
throw StateError(
"Invalid query construction. This query joins '${fromRelationship.entity.tableName}' "
"with '${fromRelationship.inverse!.entity.tableName}' on property '${fromRelationship.name}'. "
"However, '${fromRelationship.inverse!.entity.tableName}' "
"has also joined '${fromRelationship.entity.tableName}' on this property's inverse "
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ class FilterController extends ResourceController {
require: ["required"],
reject: ["error"],
)
TestSerializable tm,
TestSerializable tm,
) async {
return Response.ok(tm);
}
Expand All @@ -351,7 +351,7 @@ class FilterListController extends ResourceController {
require: ["required"],
reject: ["error"],
)
List<TestSerializable> tm,
List<TestSerializable> tm,
) async {
return Response.ok(tm);
}
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: conduit_workspace
version: 4.5.0
version: 5.0.0

environment:
sdk: '>=3.3.0 <4.0.0'
Expand Down

0 comments on commit 2da2db0

Please sign in to comment.