From 884f0b8f319c1d34eab611e9c4067087d466b106 Mon Sep 17 00:00:00 2001 From: Tim Shedor Date: Tue, 24 Dec 2024 10:05:49 -0800 Subject: [PATCH] doc: publish packages and finish changelog documentation --- packages/brick_build/CHANGELOG.md | 4 ++ .../lib/src/builders/adapter_builder.dart | 4 +- packages/brick_build/pubspec.yaml | 10 ++--- packages/brick_core/CHANGELOG.md | 10 +++++ .../brick_core/lib/src/query/limit_by.dart | 22 +++++------ .../brick_core/lib/src/query/order_by.dart | 29 +++++++------- packages/brick_core/pubspec.yaml | 9 ++--- .../brick_core/test/query/limit_by_test.dart | 16 +++----- .../brick_core/test/query/order_by_test.dart | 34 ++++++++++++++--- packages/brick_graphql/CHANGELOG.md | 8 ++++ packages/brick_graphql/pubspec.yaml | 6 +-- .../brick_graphql_generators/CHANGELOG.md | 5 +++ .../brick_graphql_generators/pubspec.yaml | 4 +- packages/brick_json_generators/CHANGELOG.md | 2 + packages/brick_offline_first/CHANGELOG.md | 2 + packages/brick_offline_first/pubspec.yaml | 2 +- .../brick_offline_first_build/CHANGELOG.md | 5 +++ .../brick_offline_first_build/pubspec.yaml | 4 +- .../CHANGELOG.md | 1 + .../pubspec.yaml | 4 +- .../CHANGELOG.md | 1 + .../pubspec.yaml | 2 +- .../CHANGELOG.md | 5 +++ .../pubspec.yaml | 4 +- .../CHANGELOG.md | 6 +-- .../pubspec.yaml | 1 + .../CHANGELOG.md | 5 +++ .../pubspec.yaml | 4 +- .../CHANGELOG.md | 3 ++ .../pubspec.yaml | 2 +- packages/brick_rest/CHANGELOG.md | 7 ++++ packages/brick_rest/pubspec.yaml | 2 +- packages/brick_rest_generators/CHANGELOG.md | 5 +++ packages/brick_rest_generators/pubspec.yaml | 4 +- packages/brick_sqlite/CHANGELOG.md | 15 ++++++++ .../lib/src/db/migration_manager.dart | 3 +- .../lib/src/db/schema/schema_difference.dart | 9 ++++- .../src/helpers/query_sql_transformer.dart | 18 +++++---- packages/brick_sqlite/pubspec.yaml | 2 +- .../test/query_sql_transformer_test.dart | 4 +- .../test/sqlite_provider_test.dart | 1 - packages/brick_sqlite_generators/CHANGELOG.md | 5 +++ packages/brick_sqlite_generators/pubspec.yaml | 3 +- packages/brick_supabase/CHANGELOG.md | 10 +++++ .../lib/src/query_supabase_transformer.dart | 10 ++--- packages/brick_supabase/pubspec.yaml | 6 +-- .../test/query_supabase_transformer_test.dart | 38 ++++++++++++++----- .../brick_supabase_generators/CHANGELOG.md | 5 +++ .../brick_supabase_generators/pubspec.yaml | 4 +- 49 files changed, 255 insertions(+), 110 deletions(-) diff --git a/packages/brick_build/CHANGELOG.md b/packages/brick_build/CHANGELOG.md index 1a5f11b0..abca3b23 100644 --- a/packages/brick_build/CHANGELOG.md +++ b/packages/brick_build/CHANGELOG.md @@ -1,6 +1,10 @@ ## Unreleased +## 3.3.0 + - Add documentation to increase pub.dev score +- Update minimum `brick_core` to `1.3.0` +- Update analysis to modern lints ## 3.2.1 diff --git a/packages/brick_build/lib/src/builders/adapter_builder.dart b/packages/brick_build/lib/src/builders/adapter_builder.dart index bb4c55c1..57fe7037 100644 --- a/packages/brick_build/lib/src/builders/adapter_builder.dart +++ b/packages/brick_build/lib/src/builders/adapter_builder.dart @@ -3,7 +3,7 @@ import 'package:brick_build/src/utils/string_helpers.dart'; import 'package:build/build.dart'; /// Writes adapter code (model serialization/deserialization). -/// Outputs to brick/adapters/_adapter.g.dart +/// Outputs to brick/adapters/{MODEL}_adapter.g.dart class AdapterBuilder<_ClassAnnotation> extends BaseBuilder<_ClassAnnotation> { /// final AnnotationSuperGenerator generator; @@ -12,7 +12,7 @@ class AdapterBuilder<_ClassAnnotation> extends BaseBuilder<_ClassAnnotation> { final outputExtension = '.adapter_builder.dart'; /// Writes adapter code (model serialization/deserialization). - /// Outputs to brick/adapters/_adapter.g.dart + /// Outputs to brick/adapters/{MODEL}_adapter.g.dart AdapterBuilder(this.generator); @override diff --git a/packages/brick_build/pubspec.yaml b/packages/brick_build/pubspec.yaml index e168d521..3b9c9835 100644 --- a/packages/brick_build/pubspec.yaml +++ b/packages/brick_build/pubspec.yaml @@ -4,14 +4,14 @@ homepage: https://github.com/GetDutchie/brick/tree/main/packages/brick_build issue_tracker: https://github.com/GetDutchie/brick/issues repository: https://github.com/GetDutchie/brick -version: 3.2.1 +version: 3.3.0 environment: sdk: ">=2.18.0 <4.0.0" dependencies: analyzer: ">=6.0.0 <7.0.0" - brick_core: ^1.1.1 + brick_core: ^1.3.0 build: ^2.3.0 dart_style: ">=2.0.0 <3.0.0" glob: ">=2.1.0 <3.0.0" @@ -23,6 +23,6 @@ dependencies: dev_dependencies: brick_build_test: path: ../brick_build_test - build_verify: ^2.0.0 - lints: ^2.0.1 - test: ^1.20.1 + build_verify: + lints: + test: diff --git a/packages/brick_core/CHANGELOG.md b/packages/brick_core/CHANGELOG.md index 74ac30cc..4bb1a2b4 100644 --- a/packages/brick_core/CHANGELOG.md +++ b/packages/brick_core/CHANGELOG.md @@ -1,5 +1,15 @@ ## Unreleased +## 1.3.0 + +- **DEPRECATION** `Query(providerArgs: {'limit':})` is now `Query(limit:)` +- **DEPRECATION** `Query(providerArgs: {'offset':})` is now `Query(offset:)` +- **DEPRECATION** `Query(providerArgs: {'orderBy':})` is now `Query(orderBy:)`. `orderBy` is now defined by a class that permits multiple commands. For example, `'orderBy': 'name ASC'` becomes `[OrderBy('name', ascending: true)]`. +- **DEPRECATION** `providerArgs` will be removed in the next major release +- `OrderBy` will support association ordering and multiple values +- `Query` is constructed with `const` +- `Query#offset` no longer requires companion `limit` parameter + ## 1.2.1 - Add `FieldRename` to `FieldSerializable` diff --git a/packages/brick_core/lib/src/query/limit_by.dart b/packages/brick_core/lib/src/query/limit_by.dart index bc00782b..c157a2bb 100644 --- a/packages/brick_core/lib/src/query/limit_by.dart +++ b/packages/brick_core/lib/src/query/limit_by.dart @@ -1,34 +1,33 @@ import 'dart:convert'; -import 'package:brick_core/src/model.dart'; -import 'package:brick_core/src/model_dictionary.dart'; -import 'package:brick_core/src/provider.dart'; +import 'package:brick_core/src/adapter.dart'; /// Construct directions for a provider to limit its results. class LimitBy { - /// The ceiling for how many results can be returned for a [model]. + /// The ceiling for how many results can be returned for [evaluatedField]. final int amount; /// Some providers may support limiting based on a model retrieved by the query. - /// This [Model] should be accessible to the [Provider]'s [ModelDictionary]. - final Type model; + /// This Dart field name should be accessible to the [Adapter]'s definitions + /// (e.g. a `RuntimeSqliteColumnDefinition` map). + final String evaluatedField; /// Construct directions for a provider to limit its results. const LimitBy( this.amount, { - required this.model, + required this.evaluatedField, }); /// Construct a [LimitBy] from a JSON map. factory LimitBy.fromJson(Map json) => LimitBy( json['amount'], - model: json['model'], + evaluatedField: json['evaluatedField'], ); /// Serialize to JSON Map toJson() => { 'amount': amount, - 'model': model, + 'evaluatedField': evaluatedField, }; @override @@ -36,8 +35,9 @@ class LimitBy { @override bool operator ==(Object other) => - identical(this, other) || other is LimitBy && amount == other.amount && model == other.model; + identical(this, other) || + other is LimitBy && amount == other.amount && evaluatedField == other.evaluatedField; @override - int get hashCode => amount.hashCode ^ model.hashCode; + int get hashCode => amount.hashCode ^ evaluatedField.hashCode; } diff --git a/packages/brick_core/lib/src/query/order_by.dart b/packages/brick_core/lib/src/query/order_by.dart index 14d5276c..927d685b 100644 --- a/packages/brick_core/lib/src/query/order_by.dart +++ b/packages/brick_core/lib/src/query/order_by.dart @@ -1,10 +1,6 @@ -import 'package:brick_core/src/model.dart'; -import 'package:brick_core/src/model_dictionary.dart'; import 'package:brick_core/src/provider.dart'; -import 'package:meta/meta.dart'; /// Construct directions for a provider to sort its results. -@immutable class OrderBy { /// Defaults to `true`. final bool ascending; @@ -15,36 +11,39 @@ class OrderBy { /// and the remote source's expected name. final String evaluatedField; - /// Some providers may support ordering based on a model retrieved by the query. - /// This [Model] should be accessible to the [Provider]'s [ModelDictionary]. - final Type? model; + /// The Dart name of the field of the association model + /// if the [evaluatedField] is an association. + /// + /// If [evaluatedField] is not an association, this should be `null`. + final String? associationField; /// Construct directions for a provider to sort its results. const OrderBy( this.evaluatedField, { this.ascending = true, - this.model, + this.associationField, }); /// Sort by [ascending] order (A-Z). - factory OrderBy.asc(String evaluatedField, {Type? model}) => - OrderBy(evaluatedField, model: model); + factory OrderBy.asc(String evaluatedField, {String? associationField}) => + OrderBy(evaluatedField, associationField: associationField); /// Sort by descending order (Z-A). - factory OrderBy.desc(String evaluatedField, {Type? model}) => - OrderBy(evaluatedField, ascending: false, model: model); + factory OrderBy.desc(String evaluatedField, {String? associationField}) => + OrderBy(evaluatedField, ascending: false, associationField: associationField); /// Construct an [OrderBy] from a JSON map. factory OrderBy.fromJson(Map json) => OrderBy( json['evaluatedField'], ascending: json['ascending'], + associationField: json['associationField'], ); /// Serialize to JSON Map toJson() => { 'ascending': ascending, + if (associationField != null) 'associationField': associationField, 'evaluatedField': evaluatedField, - if (model != null) 'model': model?.toString(), }; @override @@ -56,8 +55,8 @@ class OrderBy { other is OrderBy && evaluatedField == other.evaluatedField && ascending == other.ascending && - model == other.model; + associationField == other.associationField; @override - int get hashCode => evaluatedField.hashCode ^ ascending.hashCode ^ model.hashCode; + int get hashCode => evaluatedField.hashCode ^ ascending.hashCode ^ associationField.hashCode; } diff --git a/packages/brick_core/pubspec.yaml b/packages/brick_core/pubspec.yaml index 3755e959..48d1ce88 100644 --- a/packages/brick_core/pubspec.yaml +++ b/packages/brick_core/pubspec.yaml @@ -4,7 +4,7 @@ homepage: https://github.com/GetDutchie/brick/tree/main/packages/brick_core issue_tracker: https://github.com/GetDutchie/brick/issues repository: https://github.com/GetDutchie/brick -version: 2.0.0 +version: 1.3.0 environment: sdk: ">=3.0.0 <4.0.0" @@ -13,7 +13,6 @@ dependencies: collection: ">=1.15.0 <2.0.0" dev_dependencies: - dart_style: ">=2.0.0 <3.0.0" - lints: ">=4.0.0 <6.0.0" - mockito: ^5.0.0 - test: ^1.16.5 + lints: + mockito: + test: diff --git a/packages/brick_core/test/query/limit_by_test.dart b/packages/brick_core/test/query/limit_by_test.dart index 9d2afbcd..1dcc6b54 100644 --- a/packages/brick_core/test/query/limit_by_test.dart +++ b/packages/brick_core/test/query/limit_by_test.dart @@ -5,26 +5,22 @@ void main() { group('LimitBy', () { test('equality', () { expect( - const LimitBy(2, model: num), - LimitBy.fromJson(const {'amount': 2, 'model': num}), + const LimitBy(2, evaluatedField: 'name'), + LimitBy.fromJson(const {'amount': 2, 'evaluatedField': 'name'}), ); }); test('#toJson', () { expect( - const LimitBy(2, model: int).toJson(), - {'amount': 2, 'model': int}, - ); - expect( - const LimitBy(2, model: String).toJson(), - {'amount': 2, 'model': String}, + const LimitBy(2, evaluatedField: 'name').toJson(), + {'amount': 2, 'evaluatedField': 'name'}, ); }); test('.fromJson', () { expect( - LimitBy.fromJson(const {'amount': 2, 'model': String}), - const LimitBy(2, model: String), + LimitBy.fromJson(const {'amount': 2, 'evaluatedField': 'longerName'}), + const LimitBy(2, evaluatedField: 'longerName'), ); }); }); diff --git a/packages/brick_core/test/query/order_by_test.dart b/packages/brick_core/test/query/order_by_test.dart index 29672e0f..7b8695e4 100644 --- a/packages/brick_core/test/query/order_by_test.dart +++ b/packages/brick_core/test/query/order_by_test.dart @@ -5,12 +5,16 @@ void main() { group('OrderBy', () { test('equality', () { expect( - const OrderBy('name'), - OrderBy.fromJson(const {'evaluatedField': 'name', 'ascending': true}), + const OrderBy('name', associationField: 'assoc'), + OrderBy.fromJson( + const {'evaluatedField': 'name', 'ascending': true, 'associationField': 'assoc'}, + ), ); expect( - const OrderBy('name', ascending: false), - OrderBy.fromJson(const {'evaluatedField': 'name', 'ascending': false}), + const OrderBy('name', ascending: false, associationField: 'assoc'), + OrderBy.fromJson( + const {'evaluatedField': 'name', 'ascending': false, 'associationField': 'assoc'}, + ), ); }); @@ -20,8 +24,8 @@ void main() { {'evaluatedField': 'name', 'ascending': true}, ); expect( - const OrderBy('name', ascending: false).toJson(), - {'evaluatedField': 'name', 'ascending': false}, + const OrderBy('name', ascending: false, associationField: 'assoc').toJson(), + {'evaluatedField': 'name', 'ascending': false, 'associationField': 'assoc'}, ); }); @@ -34,14 +38,26 @@ void main() { const OrderBy('name', ascending: false).toString(), 'name DESC', ); + expect( + const OrderBy('name', ascending: false, associationField: 'assoc').toString(), + 'name DESC', + ); }); test('.asc', () { expect(OrderBy.asc('name'), const OrderBy('name')); + expect( + OrderBy.asc('name', associationField: 'assoc'), + const OrderBy('name', associationField: 'assoc'), + ); }); test('.desc', () { expect(OrderBy.desc('name'), const OrderBy('name', ascending: false)); + expect( + OrderBy.desc('name', associationField: 'assoc'), + const OrderBy('name', ascending: false, associationField: 'assoc'), + ); }); test('.fromJson', () { @@ -53,6 +69,12 @@ void main() { OrderBy.fromJson(const {'evaluatedField': 'name', 'ascending': false}), const OrderBy('name', ascending: false), ); + expect( + OrderBy.fromJson( + const {'evaluatedField': 'name', 'ascending': false, 'associationField': 'assoc'}, + ), + const OrderBy('name', ascending: false, associationField: 'assoc'), + ); }); }); } diff --git a/packages/brick_graphql/CHANGELOG.md b/packages/brick_graphql/CHANGELOG.md index 91d03358..5d660010 100644 --- a/packages/brick_graphql/CHANGELOG.md +++ b/packages/brick_graphql/CHANGELOG.md @@ -1,5 +1,13 @@ ## Unreleased +## 3.2.0 + +- **DEPRECATION** `Query(providerArgs: {'context':})` is now `Query(forProviders: [GraphqlProviderQuery(context:)])` +- **DEPRECATION** `Query(providerArgs: {'operation':})` is now `Query(forProviders: [GraphqlProviderQuery(operation:)])` +- New `GraphqlProviderQuery` adds GraphQL-specific support for the new `Query`. +- Upgrade `brick_core` to `1.3.0` +- Update analysis to modern lints + ## 3.1.2 - Loosen constraints for `gql`, `gql_exec`, and `gql_link` diff --git a/packages/brick_graphql/pubspec.yaml b/packages/brick_graphql/pubspec.yaml index c7a26950..b77d4eb6 100644 --- a/packages/brick_graphql/pubspec.yaml +++ b/packages/brick_graphql/pubspec.yaml @@ -19,6 +19,6 @@ dependencies: meta: ">=1.3.0 <2.0.0" dev_dependencies: - lints: ^2.0.1 - mockito: ^5.0.0 - test: ^1.16.5 + lints: + mockito: + test: diff --git a/packages/brick_graphql_generators/CHANGELOG.md b/packages/brick_graphql_generators/CHANGELOG.md index cf3c236f..069fc8d1 100644 --- a/packages/brick_graphql_generators/CHANGELOG.md +++ b/packages/brick_graphql_generators/CHANGELOG.md @@ -1,5 +1,10 @@ ## Unreleased +## 3.3.0 + +- Upgrade `brick_core` to `1.3.0` +- Update analysis to modern lints + ## 3.2.1 - Use `renameField` from `brick_build`'s `AnnotationFinderWithFieldRename` mixin diff --git a/packages/brick_graphql_generators/pubspec.yaml b/packages/brick_graphql_generators/pubspec.yaml index 72d38453..2c5ed90e 100644 --- a/packages/brick_graphql_generators/pubspec.yaml +++ b/packages/brick_graphql_generators/pubspec.yaml @@ -4,7 +4,7 @@ homepage: https://github.com/GetDutchie/brick/tree/main/packages/brick_graphql_g issue_tracker: https://github.com/GetDutchie/brick/issues repository: https://github.com/GetDutchie/brick -version: 3.2.1 +version: 3.3.0 environment: sdk: ">=2.18.0 <4.0.0" @@ -12,7 +12,7 @@ environment: dependencies: analyzer: ">=6.0.0 <7.0.0" brick_build: ">=3.2.0 <4.0.0" - brick_core: ">=1.2.1 <2.0.0" + brick_core: ">=1.3.0 <2.0.0" brick_graphql: ">=3.0.0 <4.0.0" brick_json_generators: ">=3.0.0 <4.0.0" build: ">=2.0.0 <3.0.0" diff --git a/packages/brick_json_generators/CHANGELOG.md b/packages/brick_json_generators/CHANGELOG.md index 51e5f28a..52b0c150 100644 --- a/packages/brick_json_generators/CHANGELOG.md +++ b/packages/brick_json_generators/CHANGELOG.md @@ -2,6 +2,8 @@ - (test) remove analysis options override for non-standard library prefixes - Revert `.getDisplayString()` change due to Flutter 3.22 being restricted to analyzer <6.4.1. `meta` is pinned to `1.12` in this version of Flutter, and `analyzer >=6.5.0`, where the change was made, requires `meta >= 1.15`. This change will eventually be re-reverted. +- Upgrade `brick_core` to `1.3.0` +- Update analysis to modern lints ## 3.1.1 diff --git a/packages/brick_offline_first/CHANGELOG.md b/packages/brick_offline_first/CHANGELOG.md index a71b01e2..c9fef904 100644 --- a/packages/brick_offline_first/CHANGELOG.md +++ b/packages/brick_offline_first/CHANGELOG.md @@ -2,6 +2,8 @@ ## 3.4.0 +- Upgrade `brick_core` to `1.3.0` +- Update analysis to modern lints - Change `OfflineFirstRepository#exists` behavior: the check against memory cache will only return `true` if results have been found, otherwise it will continue to the SQLite provider - Forward errors from `OfflineFirstRepository#subscribe` streams to their callers (@sonbs21 #484) diff --git a/packages/brick_offline_first/pubspec.yaml b/packages/brick_offline_first/pubspec.yaml index 69906f92..55ed7f51 100644 --- a/packages/brick_offline_first/pubspec.yaml +++ b/packages/brick_offline_first/pubspec.yaml @@ -11,7 +11,7 @@ environment: sdk: ">=2.18.0 <4.0.0" dependencies: - brick_core: ^1.1.1 + brick_core: ^1.3.0 brick_sqlite: ">=3.0.0 <4.0.0" collection: ">=1.15.0 <2.0.0" dart_style: ">=2.0.0 <3.0.0" diff --git a/packages/brick_offline_first_build/CHANGELOG.md b/packages/brick_offline_first_build/CHANGELOG.md index 39aeabaa..ee2ea182 100644 --- a/packages/brick_offline_first_build/CHANGELOG.md +++ b/packages/brick_offline_first_build/CHANGELOG.md @@ -1,5 +1,10 @@ ## Unreleased +## 3.3.0 + +- Upgrade `brick_core` to `1.3.0` +- Update analysis to modern lints + ## 3.2.1 - (test) remove analysis options override for non-standard library prefixes diff --git a/packages/brick_offline_first_build/pubspec.yaml b/packages/brick_offline_first_build/pubspec.yaml index 66a0a1ad..6ceb84df 100644 --- a/packages/brick_offline_first_build/pubspec.yaml +++ b/packages/brick_offline_first_build/pubspec.yaml @@ -4,7 +4,7 @@ homepage: https://github.com/GetDutchie/brick/tree/main/packages/brick_offline_f issue_tracker: https://github.com/GetDutchie/brick/issues repository: https://github.com/GetDutchie/brick -version: 3.2.1 +version: 3.3.0 environment: sdk: ">=2.18.0 <4.0.0" @@ -12,7 +12,7 @@ environment: dependencies: analyzer: ">=6.0.0 <7.0.0" brick_build: ">=3.0.0 <4.0.0" - brick_core: ^1.1.1 + brick_core: ^1.3.0 brick_json_generators: ">=3.0.0 <4.0.0" brick_offline_first: ">=3.0.0 <4.0.0" brick_sqlite: ">=3.0.0 <4.0.0" diff --git a/packages/brick_offline_first_with_graphql/CHANGELOG.md b/packages/brick_offline_first_with_graphql/CHANGELOG.md index 8ceb3047..11623797 100644 --- a/packages/brick_offline_first_with_graphql/CHANGELOG.md +++ b/packages/brick_offline_first_with_graphql/CHANGELOG.md @@ -1,6 +1,7 @@ ## Unreleased - Allow a generic type argument for `OfflineFirstWithGraphqlRepository` +- Update analysis to modern lints ## 3.2.0 diff --git a/packages/brick_offline_first_with_graphql/pubspec.yaml b/packages/brick_offline_first_with_graphql/pubspec.yaml index bbf5d0bb..573c017b 100644 --- a/packages/brick_offline_first_with_graphql/pubspec.yaml +++ b/packages/brick_offline_first_with_graphql/pubspec.yaml @@ -5,13 +5,13 @@ homepage: https://github.com/GetDutchie/brick/tree/main/packages/brick_offline_f issue_tracker: https://github.com/GetDutchie/brick/issues repository: https://github.com/GetDutchie/brick -version: 3.2.0 +version: 3.3.0 environment: sdk: ">=2.18.0 <4.0.0" dependencies: - brick_core: ^1.1.1 + brick_core: ^1.3.0 brick_graphql: ">=3.0.0 <4.0.0" brick_offline_first: ">=3.0.0 <4.0.0" brick_sqlite: ">=3.0.0 <4.0.0" diff --git a/packages/brick_offline_first_with_graphql_build/CHANGELOG.md b/packages/brick_offline_first_with_graphql_build/CHANGELOG.md index 4b50212c..da0ae94e 100644 --- a/packages/brick_offline_first_with_graphql_build/CHANGELOG.md +++ b/packages/brick_offline_first_with_graphql_build/CHANGELOG.md @@ -2,6 +2,7 @@ - (test) remove analysis options override for non-standard library prefixes - Apply minimum constraint on `brick_offline_first_build` to `3.2.0` +- Update analysis to modern lints ## 3.3.0 diff --git a/packages/brick_offline_first_with_graphql_build/pubspec.yaml b/packages/brick_offline_first_with_graphql_build/pubspec.yaml index dd17d867..27956e43 100644 --- a/packages/brick_offline_first_with_graphql_build/pubspec.yaml +++ b/packages/brick_offline_first_with_graphql_build/pubspec.yaml @@ -29,7 +29,7 @@ dependencies: dev_dependencies: brick_build_test: path: ../brick_build_test - brick_core: ^1.1.1 + brick_core: build_verify: lints: source_gen_test: diff --git a/packages/brick_offline_first_with_rest/CHANGELOG.md b/packages/brick_offline_first_with_rest/CHANGELOG.md index 9a51f39e..b0084486 100644 --- a/packages/brick_offline_first_with_rest/CHANGELOG.md +++ b/packages/brick_offline_first_with_rest/CHANGELOG.md @@ -1,6 +1,11 @@ ## Unreleased +## 3.3.0 + - Allow a generic type argument for `OfflineFirstWithRestRepository` +- Upgrade `brick_core` to `1.3.0` +- Update analysis to modern lints +- `OfflineFirstException` has been moved to the `brick_offline_first` package ## 3.2.0 diff --git a/packages/brick_offline_first_with_rest/pubspec.yaml b/packages/brick_offline_first_with_rest/pubspec.yaml index 8b022c40..59f592c1 100644 --- a/packages/brick_offline_first_with_rest/pubspec.yaml +++ b/packages/brick_offline_first_with_rest/pubspec.yaml @@ -5,13 +5,13 @@ homepage: https://github.com/GetDutchie/brick/tree/main/packages/brick_offline_f issue_tracker: https://github.com/GetDutchie/brick/issues repository: https://github.com/GetDutchie/brick -version: 3.2.0 +version: 3.3.0 environment: sdk: ">=2.18.0 <4.0.0" dependencies: - brick_core: ^1.1.1 + brick_core: ^1.3.0 brick_offline_first: ">=3.0.0 <4.0.0" brick_rest: ">=3.0.3 <4.0.0" brick_sqlite: ">=3.0.0 <4.0.0" diff --git a/packages/brick_offline_first_with_rest_build/CHANGELOG.md b/packages/brick_offline_first_with_rest_build/CHANGELOG.md index 1adbf887..15d87df8 100644 --- a/packages/brick_offline_first_with_rest_build/CHANGELOG.md +++ b/packages/brick_offline_first_with_rest_build/CHANGELOG.md @@ -1,10 +1,10 @@ ## Unreleased -- (test) remove analysis options override for non-standard library prefixes -- Apply minimum constraint on `brick_offline_first_build` to `3.2.0` - ## 3.2.0 +- (test) remove analysis options override for non-standard library prefixes +- Apply minimum constraint on `brick_offline_first_build` to `3.2.0` +- Upgrade `brick_core` to `1.3.0` - Apply standardized lints - Update `analyzer` constraints to `>=6.0.0 <7.0.0` - Format CHANGELOG.md diff --git a/packages/brick_offline_first_with_rest_build/pubspec.yaml b/packages/brick_offline_first_with_rest_build/pubspec.yaml index 5abab96e..2109a14c 100644 --- a/packages/brick_offline_first_with_rest_build/pubspec.yaml +++ b/packages/brick_offline_first_with_rest_build/pubspec.yaml @@ -29,6 +29,7 @@ dependencies: dev_dependencies: brick_build_test: path: ../brick_build_test + brick_core: build_verify: lints: source_gen_test: diff --git a/packages/brick_offline_first_with_supabase/CHANGELOG.md b/packages/brick_offline_first_with_supabase/CHANGELOG.md index 936ea7e1..d0bf080f 100644 --- a/packages/brick_offline_first_with_supabase/CHANGELOG.md +++ b/packages/brick_offline_first_with_supabase/CHANGELOG.md @@ -1,5 +1,10 @@ ## Unreleased +## 1.2.0 + +- Upgrade `brick_core` to `1.3.0` +- Update analysis to modern lints + ## 1.1.2 - Support a custom database path when creating the cache manager (#490) diff --git a/packages/brick_offline_first_with_supabase/pubspec.yaml b/packages/brick_offline_first_with_supabase/pubspec.yaml index cc4cb577..08248487 100644 --- a/packages/brick_offline_first_with_supabase/pubspec.yaml +++ b/packages/brick_offline_first_with_supabase/pubspec.yaml @@ -5,13 +5,13 @@ homepage: https://github.com/GetDutchie/brick/tree/main/packages/brick_offline_f issue_tracker: https://github.com/GetDutchie/brick/issues repository: https://github.com/GetDutchie/brick -version: 1.1.2 +version: 1.2.0 environment: sdk: ">=3.0.0 <4.0.0" dependencies: - brick_core: ">=1.2.0 <2.0.0" + brick_core: ">=1.3.0 <2.0.0" brick_offline_first: ">=3.0.0 <4.0.0" brick_offline_first_with_rest: ">=3.1.0 <4.0.0" brick_sqlite: ">=3.0.0 <4.0.0" diff --git a/packages/brick_offline_first_with_supabase_build/CHANGELOG.md b/packages/brick_offline_first_with_supabase_build/CHANGELOG.md index 80618179..b1d7e058 100644 --- a/packages/brick_offline_first_with_supabase_build/CHANGELOG.md +++ b/packages/brick_offline_first_with_supabase_build/CHANGELOG.md @@ -1,6 +1,9 @@ ## Unreleased +## 1.1.0 + - Add documentation to increase pub.dev score +- Update analysis to modern lints ## 1.0.0 diff --git a/packages/brick_offline_first_with_supabase_build/pubspec.yaml b/packages/brick_offline_first_with_supabase_build/pubspec.yaml index 36973292..6543bc26 100644 --- a/packages/brick_offline_first_with_supabase_build/pubspec.yaml +++ b/packages/brick_offline_first_with_supabase_build/pubspec.yaml @@ -4,7 +4,7 @@ homepage: https://github.com/GetDutchie/brick/tree/main/packages/brick_offline_f issue_tracker: https://github.com/GetDutchie/brick/issues repository: https://github.com/GetDutchie/brick -version: 1.0.0 +version: 1.1.0 environment: sdk: ">=3.0.0 <4.0.0" diff --git a/packages/brick_rest/CHANGELOG.md b/packages/brick_rest/CHANGELOG.md index 39396c91..17784390 100644 --- a/packages/brick_rest/CHANGELOG.md +++ b/packages/brick_rest/CHANGELOG.md @@ -1,5 +1,12 @@ ## Unreleased +## 3.1.0 + +- **DEPRECATION** `Query(providerArgs: {'request':})` is now `Query(forProviders: [RestProviderQuery(request:)])`. +- Upgrade `brick_core` to `1.3.0` +- Update analysis to modern lints +- New `RestProviderQuery` adds REST-specific support for the new `Query`. + ## 3.0.4 - Access `FieldRename` from `brick_core` instead of declaring within this package diff --git a/packages/brick_rest/pubspec.yaml b/packages/brick_rest/pubspec.yaml index 83c341d8..e5e14cf0 100644 --- a/packages/brick_rest/pubspec.yaml +++ b/packages/brick_rest/pubspec.yaml @@ -4,7 +4,7 @@ homepage: https://github.com/GetDutchie/brick/tree/main/packages/brick_rest issue_tracker: https://github.com/GetDutchie/brick/issues repository: https://github.com/GetDutchie/brick -version: 3.0.4 +version: 3.1.0 environment: sdk: ">=2.18.0 <4.0.0" diff --git a/packages/brick_rest_generators/CHANGELOG.md b/packages/brick_rest_generators/CHANGELOG.md index 6fbee7b0..8b8beefb 100644 --- a/packages/brick_rest_generators/CHANGELOG.md +++ b/packages/brick_rest_generators/CHANGELOG.md @@ -1,5 +1,10 @@ ## Unreleased +## 3.3.0 + +- Upgrade `brick_core` to `1.3.0` +- Update analysis to modern lints + ## 3.2.1 - Use `renameField` from `brick_build`'s `AnnotationFinderWithFieldRename` mixin diff --git a/packages/brick_rest_generators/pubspec.yaml b/packages/brick_rest_generators/pubspec.yaml index 1379cf74..bdd43532 100644 --- a/packages/brick_rest_generators/pubspec.yaml +++ b/packages/brick_rest_generators/pubspec.yaml @@ -4,7 +4,7 @@ homepage: https://github.com/GetDutchie/brick/tree/main/packages/brick_rest_gene issue_tracker: https://github.com/GetDutchie/brick/issues repository: https://github.com/GetDutchie/brick -version: 3.2.1 +version: 3.3.0 environment: sdk: ">=2.18.0 <4.0.0" @@ -12,7 +12,7 @@ environment: dependencies: analyzer: ">=6.0.0 <7.0.0" brick_build: ">=3.2.0 <4.0.0" - brick_core: ">=1.2.1 <2.0.0" + brick_core: ">=1.3.0 <2.0.0" brick_json_generators: ">=3.0.0 <4.0.0" brick_rest: ">=3.0.4 <4.0.0" build: ">=2.0.0 <3.0.0" diff --git a/packages/brick_sqlite/CHANGELOG.md b/packages/brick_sqlite/CHANGELOG.md index 98c45907..3e058345 100644 --- a/packages/brick_sqlite/CHANGELOG.md +++ b/packages/brick_sqlite/CHANGELOG.md @@ -1,5 +1,20 @@ ## Unreleased +## 3.2.0 + +- **DEPRECATION** `Query(providerArgs: {'collate':})` is now `Query(forProviders: [SqliteProviderQuery(collate:)])` +- **DEPRECATION** `Query(providerArgs: {'having':})` is now `Query(forProviders: [SqliteProviderQuery(having:)])` +- **DEPRECATION** `Query(providerArgs: {'groupBy':})` is now `Query(forProviders: [SqliteProviderQuery(groupBy:)])` +- Association ordering is supported. For example, `Query(orderBy: [OrderBy.desc('assoc', associationField: 'name')])` on `DemoModel` will produce the following SQL statement: + ```sql + 'SELECT DISTINCT `DemoModel`.* FROM `DemoModel` ORDER BY `DemoModelAssoc`.name DESC' + ``` +- New `SqliteProviderQuery` adds Sqlite-specific support for the new `Query`. +- `Column` enum is enhanced, performing the conversion between Dart and SQLite column types on the enum instead of in `Migration`. +- Barrel files are no longer imported to `src/` implementations +- Upgrade `brick_core` to `1.3.0` +- Update analysis to modern lints + ## 3.1.1 - Expose a generic type for `MemoryCacheProvider` models diff --git a/packages/brick_sqlite/lib/src/db/migration_manager.dart b/packages/brick_sqlite/lib/src/db/migration_manager.dart index 21e7408f..d2835cdd 100644 --- a/packages/brick_sqlite/lib/src/db/migration_manager.dart +++ b/packages/brick_sqlite/lib/src/db/migration_manager.dart @@ -1,4 +1,5 @@ -import 'package:brick_sqlite/db.dart'; +import 'package:brick_sqlite/src/db/migration.dart'; +import 'package:brick_sqlite/src/db/schema/schema.dart'; import 'package:meta/meta.dart'; /// Holds all migrations and outputs statements for SQLite to consume diff --git a/packages/brick_sqlite/lib/src/db/schema/schema_difference.dart b/packages/brick_sqlite/lib/src/db/schema/schema_difference.dart index 3df080b8..0c2e4472 100644 --- a/packages/brick_sqlite/lib/src/db/schema/schema_difference.dart +++ b/packages/brick_sqlite/lib/src/db/schema/schema_difference.dart @@ -1,4 +1,11 @@ -import 'package:brick_sqlite/db.dart'; +import 'package:brick_sqlite/src/db/migration.dart'; +import 'package:brick_sqlite/src/db/migration_commands/drop_column.dart'; +import 'package:brick_sqlite/src/db/migration_commands/drop_table.dart'; +import 'package:brick_sqlite/src/db/migration_commands/migration_command.dart'; +import 'package:brick_sqlite/src/db/schema/schema.dart'; +import 'package:brick_sqlite/src/db/schema/schema_column.dart'; +import 'package:brick_sqlite/src/db/schema/schema_index.dart'; +import 'package:brick_sqlite/src/db/schema/schema_table.dart'; import 'package:collection/collection.dart'; /// Compares two schemas to produce migrations that conver the difference diff --git a/packages/brick_sqlite/lib/src/helpers/query_sql_transformer.dart b/packages/brick_sqlite/lib/src/helpers/query_sql_transformer.dart index d40a75b0..3a1a24eb 100644 --- a/packages/brick_sqlite/lib/src/helpers/query_sql_transformer.dart +++ b/packages/brick_sqlite/lib/src/helpers/query_sql_transformer.dart @@ -382,13 +382,17 @@ class AllOtherClausesFragment { if (query?.limit != null) 'limit': query?.limit, if (query?.offset != null) 'offset': query?.offset, if (query?.orderBy.isNotEmpty ?? false) - 'orderBy': query?.orderBy - .map( - (p) => p.model != null - ? '`${modelDictionary.adapterFor[p.model]?.tableName}`.${modelDictionary.adapterFor[p.model]?.fieldsToSqliteColumns[p.evaluatedField]?.columnName} ${p.ascending ? 'ASC' : 'DESC'}' - : p.toString(), - ) - .join(', '), + 'orderBy': query?.orderBy.map((p) { + final isAssociation = fieldsToColumns[p.evaluatedField]?.association ?? false; + if (!isAssociation) return p.toString(); + + if (p.associationField == null) return p.toString(); + + final associationAdapter = + modelDictionary.adapterFor[fieldsToColumns[p.evaluatedField]?.type]; + + return '`${associationAdapter?.tableName}`.${associationAdapter?.fieldsToSqliteColumns[p.associationField]?.columnName} ${p.ascending ? 'ASC' : 'DESC'}'; + }).join(', '), if (providerQuery?.groupBy != null) 'groupBy': providerQuery?.groupBy, if (providerQuery?.having != null) 'having': providerQuery?.having, }; diff --git a/packages/brick_sqlite/pubspec.yaml b/packages/brick_sqlite/pubspec.yaml index aa9c204f..f38dd34a 100644 --- a/packages/brick_sqlite/pubspec.yaml +++ b/packages/brick_sqlite/pubspec.yaml @@ -4,7 +4,7 @@ homepage: https://github.com/GetDutchie/brick/tree/main/packages/brick_sqlite issue_tracker: https://github.com/GetDutchie/brick/issues repository: https://github.com/GetDutchie/brick -version: 3.1.1+1 +version: 3.2.0 environment: sdk: ">=2.18.0 <4.0.0" diff --git a/packages/brick_sqlite/test/query_sql_transformer_test.dart b/packages/brick_sqlite/test/query_sql_transformer_test.dart index 6e93df34..ea1dc9ea 100644 --- a/packages/brick_sqlite/test/query_sql_transformer_test.dart +++ b/packages/brick_sqlite/test/query_sql_transformer_test.dart @@ -588,7 +588,7 @@ void main() { const statement = 'SELECT DISTINCT `DemoModel`.* FROM `DemoModel`'; final sqliteQuery = QuerySqlTransformer( modelDictionary: dictionary, - query: const Query(limitBy: [LimitBy(1, model: DemoModelAssoc)]), + query: const Query(limitBy: [LimitBy(1, evaluatedField: 'name')]), ); await db.rawQuery(sqliteQuery.statement, sqliteQuery.values); @@ -720,7 +720,7 @@ void main() { 'SELECT DISTINCT `DemoModel`.* FROM `DemoModel` ORDER BY `DemoModelAssoc`.full_name DESC'; final sqliteQuery = QuerySqlTransformer( modelDictionary: dictionary, - query: Query(orderBy: [OrderBy.desc('name', model: DemoModelAssoc)]), + query: Query(orderBy: [OrderBy.desc('assoc', associationField: 'name')]), ); await db.rawQuery(sqliteQuery.statement, sqliteQuery.values); diff --git a/packages/brick_sqlite/test/sqlite_provider_test.dart b/packages/brick_sqlite/test/sqlite_provider_test.dart index d60070b8..1c1e0dc7 100644 --- a/packages/brick_sqlite/test/sqlite_provider_test.dart +++ b/packages/brick_sqlite/test/sqlite_provider_test.dart @@ -1,6 +1,5 @@ import 'package:brick_core/core.dart'; import 'package:brick_sqlite/brick_sqlite.dart'; -import 'package:brick_sqlite/db.dart'; import 'package:brick_sqlite/src/db/migration_commands/insert_table.dart'; import 'package:sqflite_common_ffi/sqflite_ffi.dart'; import 'package:test/test.dart'; diff --git a/packages/brick_sqlite_generators/CHANGELOG.md b/packages/brick_sqlite_generators/CHANGELOG.md index cfc91ccc..68770898 100644 --- a/packages/brick_sqlite_generators/CHANGELOG.md +++ b/packages/brick_sqlite_generators/CHANGELOG.md @@ -1,5 +1,10 @@ ## Unreleased +## 3.3.0 + +- Upgrade `brick_core` to `1.3.0` +- Update analysis to modern lints + ## 3.2.2 - Revert `.getDisplayString()` change due to Flutter 3.22 being restricted to analyzer <6.4.1. `meta` is pinned to `1.12` in this version of Flutter, and `analyzer >=6.5.0`, where the change was made, requires `meta >= 1.15`. This change will eventually be re-reverted. diff --git a/packages/brick_sqlite_generators/pubspec.yaml b/packages/brick_sqlite_generators/pubspec.yaml index bb9142d0..7a932b61 100644 --- a/packages/brick_sqlite_generators/pubspec.yaml +++ b/packages/brick_sqlite_generators/pubspec.yaml @@ -4,7 +4,7 @@ homepage: https://github.com/GetDutchie/brick/tree/main/packages/brick_sqlite_ge issue_tracker: https://github.com/GetDutchie/brick/issues repository: https://github.com/GetDutchie/brick -version: 3.2.2 +version: 3.3.0 environment: sdk: ">=2.18.0 <4.0.0" @@ -12,6 +12,7 @@ environment: dependencies: analyzer: ">=6.0.0 <7.0.0" brick_build: ">=3.2.0 <4.0.0" + brick_core: ">=1.3.0 <2.0.0" brick_sqlite: ">=3.0.0 <4.0.0" build: ">=2.0.0 <3.0.0" dart_style: ">=2.0.0 <3.0.0" diff --git a/packages/brick_supabase/CHANGELOG.md b/packages/brick_supabase/CHANGELOG.md index f0426783..24a1b50a 100644 --- a/packages/brick_supabase/CHANGELOG.md +++ b/packages/brick_supabase/CHANGELOG.md @@ -2,6 +2,16 @@ ## 1.2.0 +- **DEPRECATION** `Query(providerArgs: {'limitReferencedTable':})` has been removed in favor of `Query(limitBy:)` +- **DEPRECATION** `Query(providerArgs: {'orderByReferencedTable':})` has been removed in favor of `Query(orderBy:)` +- Association, plural ordering is supported. For example, `Query(orderBy: [OrderBy.desc('assoc', associationField: 'name')])` on `DemoModel` would produce the PostgREST filter: + ```javascript + orderBy('name', referencedTable: 'association_table') + ``` +- New `SupabaseProviderQuery` adds Supabase-specific support for the new `Query`. +- Advanced, plural limiting is supported. For example, `Query(limitBy: [LimitBy(1, evaluatedField: 'assoc'))` is the equivalent of `.limit(1, referencedTable: 'demo_model')`. `Query#limit` can be used in conjunction on the parent model request. +- Upgrade `brick_core` to `1.3.0` +- Update analysis to modern lints - Add `SupabaseProvider#update` and `SupabaseProvider#insert` to conform to Supabase policy restrictions - Use `columnName` instead of `evaluatedField` in `QuerySupabaseTransformer` when searching for non null associations diff --git a/packages/brick_supabase/lib/src/query_supabase_transformer.dart b/packages/brick_supabase/lib/src/query_supabase_transformer.dart index 0c39d348..e8a48e24 100644 --- a/packages/brick_supabase/lib/src/query_supabase_transformer.dart +++ b/packages/brick_supabase/lib/src/query_supabase_transformer.dart @@ -217,7 +217,8 @@ class QuerySupabaseTransformer<_Model extends SupabaseModel> { : withTopLevelLimit; return query!.limitBy.fold(withProviderArgs, (acc, limitBy) { - final tableName = modelDictionary.adapterFor[limitBy.model]?.supabaseTableName; + final definition = adapter.fieldsToSupabaseColumns[limitBy.evaluatedField]; + final tableName = modelDictionary.adapterFor[definition?.associationType]?.supabaseTableName; if (tableName == null) return acc; final url = acc.appendSearchParams('$tableName.limit', limitBy.amount.toString()); @@ -244,13 +245,12 @@ class QuerySupabaseTransformer<_Model extends SupabaseModel> { final withProviderArgs = orderBy == null ? builder : builder.copyWithUrl(url); return query!.orderBy.fold(withProviderArgs, (acc, orderBy) { - final tableName = orderBy.model == null - ? null - : modelDictionary.adapterFor[orderBy.model]?.supabaseTableName; + final definition = adapter.fieldsToSupabaseColumns[orderBy.evaluatedField]; + final tableName = modelDictionary.adapterFor[definition?.associationType]?.supabaseTableName; final url = acc.appendSearchParams( tableName == null ? 'order' : '$tableName.order', - '${orderBy.evaluatedField}.${orderBy.ascending ? 'asc' : 'desc'}.nullslast', + '${orderBy.associationField ?? orderBy.evaluatedField}.${orderBy.ascending ? 'asc' : 'desc'}.nullslast', ); return acc.copyWithUrl(url); }); diff --git a/packages/brick_supabase/pubspec.yaml b/packages/brick_supabase/pubspec.yaml index 0cf40b58..82f06483 100644 --- a/packages/brick_supabase/pubspec.yaml +++ b/packages/brick_supabase/pubspec.yaml @@ -10,12 +10,12 @@ environment: sdk: ">=3.0.0 <4.0.0" dependencies: - brick_core: ">=1.2.1 <2.0.0" + brick_core: ">=1.3.0 <2.0.0" collection: ">=1.15.0 <2.0.0" logging: ">=1.0.0 <2.0.0" meta: ">=1.3.0 <2.0.0" supabase: ">=2.3.0 <3.0.0" dev_dependencies: - lints: ^2.0.1 - test: ^1.16.5 + lints: + test: diff --git a/packages/brick_supabase/test/query_supabase_transformer_test.dart b/packages/brick_supabase/test/query_supabase_transformer_test.dart index 45d129bd..37bc0d39 100644 --- a/packages/brick_supabase/test/query_supabase_transformer_test.dart +++ b/packages/brick_supabase/test/query_supabase_transformer_test.dart @@ -257,16 +257,31 @@ void main() { test('orderBy with referenced table', () { final query = Query( - orderBy: [OrderBy.desc('name', model: DemoAssociationModel)], + orderBy: [OrderBy.desc('nested')], ); - final queryTransformer = _buildTransformer(query); - final filterBuilder = - queryTransformer.select(_supabaseClient.from(DemoAdapter().supabaseTableName)); + final queryTransformer = _buildTransformer(query); + final filterBuilder = queryTransformer + .select(_supabaseClient.from(DemoNestedAssociationModelAdapter().supabaseTableName)); + final transformBuilder = queryTransformer.applyQuery(filterBuilder); + + expect( + transformBuilder.query, + 'select=id,nested_column:demo_associations(id,name,assoc_id:demos!assoc_id(id,name,custom_age),assocs:demos(id,name,custom_age))&demo_associations.order=nested.desc.nullslast', + ); + }); + + test('orderBy with referenced table and column', () { + final query = Query( + orderBy: [OrderBy.desc('nested', associationField: 'name')], + ); + final queryTransformer = _buildTransformer(query); + final filterBuilder = queryTransformer + .select(_supabaseClient.from(DemoNestedAssociationModelAdapter().supabaseTableName)); final transformBuilder = queryTransformer.applyQuery(filterBuilder); expect( transformBuilder.query, - 'select=id,name,custom_age&demo_associations.order=name.desc.nullslast', + 'select=id,nested_column:demo_associations(id,name,assoc_id:demos!assoc_id(id,name,custom_age),assocs:demos(id,name,custom_age))&demo_associations.order=name.desc.nullslast', ); }); @@ -281,13 +296,16 @@ void main() { }); test('limit with referenced table', () { - const query = Query(limitBy: [LimitBy(10, model: DemoAssociationModel)]); - final queryTransformer = _buildTransformer(query); - final filterBuilder = - queryTransformer.select(_supabaseClient.from(DemoAdapter().supabaseTableName)); + const query = Query(limitBy: [LimitBy(10, evaluatedField: 'nested')]); + final queryTransformer = _buildTransformer(query); + final filterBuilder = queryTransformer + .select(_supabaseClient.from(DemoNestedAssociationModelAdapter().supabaseTableName)); final transformBuilder = queryTransformer.applyQuery(filterBuilder); - expect(transformBuilder.query, 'select=id,name,custom_age&demo_associations.limit=10'); + expect( + transformBuilder.query, + 'select=id,nested_column:demo_associations(id,name,assoc_id:demos!assoc_id(id,name,custom_age),assocs:demos(id,name,custom_age))&demo_associations.limit=10', + ); }); test('combined orderBy and limit', () { diff --git a/packages/brick_supabase_generators/CHANGELOG.md b/packages/brick_supabase_generators/CHANGELOG.md index a8152242..702bb0ad 100644 --- a/packages/brick_supabase_generators/CHANGELOG.md +++ b/packages/brick_supabase_generators/CHANGELOG.md @@ -1,5 +1,10 @@ ## Unreleased +## 1.1.0 + +- Upgrade `brick_core` to `1.3.0` +- Update analysis to modern lints + ## 1.0.2 - Interpret `@Supabase(query:)` in `SupabaseFields` diff --git a/packages/brick_supabase_generators/pubspec.yaml b/packages/brick_supabase_generators/pubspec.yaml index 45c40d79..9a899d51 100644 --- a/packages/brick_supabase_generators/pubspec.yaml +++ b/packages/brick_supabase_generators/pubspec.yaml @@ -4,7 +4,7 @@ homepage: https://github.com/GetDutchie/brick/tree/main/packages/brick_supabase_ issue_tracker: https://github.com/GetDutchie/brick/issues repository: https://github.com/GetDutchie/brick -version: 1.0.2 +version: 1.1.0 environment: sdk: ">=3.0.0 <4.0.0" @@ -12,7 +12,7 @@ environment: dependencies: analyzer: ">=6.0.0 <7.0.0" brick_build: ">=3.2.0 <4.0.0" - brick_core: ">=1.2.1 <2.0.0" + brick_core: ">=1.3.0 <2.0.0" brick_json_generators: ">=3.1.0 <4.0.0" brick_supabase: ">=1.1.3 <2.0.0" build: ">=2.0.0 <3.0.0"