From bc1d7d54b805cbd71b595cd4ef05a5743d0278eb Mon Sep 17 00:00:00 2001 From: Michalina Majewska Date: Mon, 29 Jul 2024 10:53:34 +0200 Subject: [PATCH 1/6] Use leancode_cubit_utils from pub in leancode_cubit_utils_cqrs --- packages/leancode_cubit_utils_cqrs/example/pubspec.lock | 9 +++++---- packages/leancode_cubit_utils_cqrs/example/pubspec.yaml | 6 ++---- packages/leancode_cubit_utils_cqrs/pubspec.yaml | 7 ++----- 3 files changed, 9 insertions(+), 13 deletions(-) diff --git a/packages/leancode_cubit_utils_cqrs/example/pubspec.lock b/packages/leancode_cubit_utils_cqrs/example/pubspec.lock index 894835e..c27fe24 100644 --- a/packages/leancode_cubit_utils_cqrs/example/pubspec.lock +++ b/packages/leancode_cubit_utils_cqrs/example/pubspec.lock @@ -252,11 +252,12 @@ packages: source: hosted version: "3.0.1" leancode_cubit_utils: - dependency: "direct main" + dependency: transitive description: - path: "../../leancode_cubit_utils" - relative: true - source: path + name: leancode_cubit_utils + sha256: a437577a8f0f854c67b5f76d849721d2d0f468a2d9c9801a1646fb23a0559d16 + url: "https://pub.dev" + source: hosted version: "0.1.0" leancode_cubit_utils_cqrs: dependency: "direct main" diff --git a/packages/leancode_cubit_utils_cqrs/example/pubspec.yaml b/packages/leancode_cubit_utils_cqrs/example/pubspec.yaml index a2bdedd..ba6cdb8 100644 --- a/packages/leancode_cubit_utils_cqrs/example/pubspec.yaml +++ b/packages/leancode_cubit_utils_cqrs/example/pubspec.yaml @@ -1,10 +1,10 @@ name: example description: A new Flutter project. -publish_to: 'none' +publish_to: "none" version: 0.1.0 environment: - sdk: '>=3.1.2 <4.0.0' + sdk: ">=3.1.2 <4.0.0" dependencies: cqrs: ^10.0.1 @@ -16,8 +16,6 @@ dependencies: mocktail: ^1.0.0 leancode_cubit_utils_cqrs: path: .. - leancode_cubit_utils: - path: ../../leancode_cubit_utils provider: ^6.0.5 logging: ^1.2.0 leancode_hooks: ^0.0.6 diff --git a/packages/leancode_cubit_utils_cqrs/pubspec.yaml b/packages/leancode_cubit_utils_cqrs/pubspec.yaml index 2a98d81..1f7feab 100644 --- a/packages/leancode_cubit_utils_cqrs/pubspec.yaml +++ b/packages/leancode_cubit_utils_cqrs/pubspec.yaml @@ -5,7 +5,7 @@ repository: https://github.com/leancodepl/leancode_cubit_utils publish_to: none environment: - sdk: '>=3.1.0 <4.0.0' + sdk: ">=3.1.0 <4.0.0" dependencies: cqrs: ^10.0.1 @@ -13,10 +13,7 @@ dependencies: flutter: sdk: flutter flutter_bloc: ^8.0.0 - leancode_cubit_utils: - # TODO: Change after leancode_cubit_utils' new version is published, - # also remove publish_to: none - path: ../leancode_cubit_utils + leancode_cubit_utils: ^0.1.0 leancode_hooks: ^0.0.6 dev_dependencies: From 6a62a708446a81db9dee38c2cff58ee5f5196861 Mon Sep 17 00:00:00 2001 From: Michalina Majewska Date: Mon, 29 Jul 2024 10:54:47 +0200 Subject: [PATCH 2/6] Remove publish_to none from leancode_cubit_utils_cqrs --- packages/leancode_cubit_utils_cqrs/pubspec.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/leancode_cubit_utils_cqrs/pubspec.yaml b/packages/leancode_cubit_utils_cqrs/pubspec.yaml index 1f7feab..d06fa21 100644 --- a/packages/leancode_cubit_utils_cqrs/pubspec.yaml +++ b/packages/leancode_cubit_utils_cqrs/pubspec.yaml @@ -2,7 +2,6 @@ name: leancode_cubit_utils_cqrs description: An extension of leancode_cubit_utils that provides cqrs support. version: 0.0.1 repository: https://github.com/leancodepl/leancode_cubit_utils -publish_to: none environment: sdk: ">=3.1.0 <4.0.0" From 249708291719fefdf84b878d58e853c1aba482f6 Mon Sep 17 00:00:00 2001 From: Michalina Majewska Date: Mon, 29 Jul 2024 10:59:32 +0200 Subject: [PATCH 3/6] Bump version to 0.1.0 --- packages/leancode_cubit_utils_cqrs/CHANGELOG.md | 2 +- packages/leancode_cubit_utils_cqrs/example/pubspec.lock | 2 +- packages/leancode_cubit_utils_cqrs/pubspec.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/leancode_cubit_utils_cqrs/CHANGELOG.md b/packages/leancode_cubit_utils_cqrs/CHANGELOG.md index 8efb4a6..bc33cf7 100644 --- a/packages/leancode_cubit_utils_cqrs/CHANGELOG.md +++ b/packages/leancode_cubit_utils_cqrs/CHANGELOG.md @@ -1,3 +1,3 @@ -## 0.0.1 +## 0.1.0 * Extract cqrs support from the `leancode_cubit_utils` package. diff --git a/packages/leancode_cubit_utils_cqrs/example/pubspec.lock b/packages/leancode_cubit_utils_cqrs/example/pubspec.lock index c27fe24..a2c3bbd 100644 --- a/packages/leancode_cubit_utils_cqrs/example/pubspec.lock +++ b/packages/leancode_cubit_utils_cqrs/example/pubspec.lock @@ -265,7 +265,7 @@ packages: path: ".." relative: true source: path - version: "0.0.1" + version: "0.1.0" leancode_hooks: dependency: "direct main" description: diff --git a/packages/leancode_cubit_utils_cqrs/pubspec.yaml b/packages/leancode_cubit_utils_cqrs/pubspec.yaml index d06fa21..fd5496f 100644 --- a/packages/leancode_cubit_utils_cqrs/pubspec.yaml +++ b/packages/leancode_cubit_utils_cqrs/pubspec.yaml @@ -1,6 +1,6 @@ name: leancode_cubit_utils_cqrs description: An extension of leancode_cubit_utils that provides cqrs support. -version: 0.0.1 +version: 0.1.0 repository: https://github.com/leancodepl/leancode_cubit_utils environment: From 4bfdc4c389e9a88c36e9374b236b34f5af8c82db Mon Sep 17 00:00:00 2001 From: Michalina Majewska Date: Mon, 29 Jul 2024 11:02:58 +0200 Subject: [PATCH 4/6] Undo double quotes in formatting yaml --- packages/leancode_cubit_utils_cqrs/example/pubspec.yaml | 4 ++-- packages/leancode_cubit_utils_cqrs/pubspec.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/leancode_cubit_utils_cqrs/example/pubspec.yaml b/packages/leancode_cubit_utils_cqrs/example/pubspec.yaml index ba6cdb8..dfb411c 100644 --- a/packages/leancode_cubit_utils_cqrs/example/pubspec.yaml +++ b/packages/leancode_cubit_utils_cqrs/example/pubspec.yaml @@ -1,10 +1,10 @@ name: example description: A new Flutter project. -publish_to: "none" +publish_to: 'none' version: 0.1.0 environment: - sdk: ">=3.1.2 <4.0.0" + sdk: '>=3.1.2 <4.0.0' dependencies: cqrs: ^10.0.1 diff --git a/packages/leancode_cubit_utils_cqrs/pubspec.yaml b/packages/leancode_cubit_utils_cqrs/pubspec.yaml index fd5496f..0206906 100644 --- a/packages/leancode_cubit_utils_cqrs/pubspec.yaml +++ b/packages/leancode_cubit_utils_cqrs/pubspec.yaml @@ -4,7 +4,7 @@ version: 0.1.0 repository: https://github.com/leancodepl/leancode_cubit_utils environment: - sdk: ">=3.1.0 <4.0.0" + sdk: '>=3.1.0 <4.0.0' dependencies: cqrs: ^10.0.1 From dbf3fb3a7e18786bde9864dd5b0c333be6744851 Mon Sep 17 00:00:00 2001 From: Michalina Majewska Date: Mon, 29 Jul 2024 11:31:30 +0200 Subject: [PATCH 5/6] Export leancode_cubit_utils in leancode_cubit_utils_cqrs --- .../leancode_cubit_utils_cqrs/lib/leancode_cubit_utils_cqrs.dart | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/leancode_cubit_utils_cqrs/lib/leancode_cubit_utils_cqrs.dart b/packages/leancode_cubit_utils_cqrs/lib/leancode_cubit_utils_cqrs.dart index 6e79c0d..3b0a79b 100644 --- a/packages/leancode_cubit_utils_cqrs/lib/leancode_cubit_utils_cqrs.dart +++ b/packages/leancode_cubit_utils_cqrs/lib/leancode_cubit_utils_cqrs.dart @@ -1,6 +1,7 @@ /// A library for building cubits for handling CQRS with less boilerplate code. library leancode_cubit_utils_cqrs; +export 'package:leancode_cubit_utils/leancode_cubit_utils.dart'; export 'src/paginated/paginated_query_cubit.dart'; export 'src/paginated/pre_request/query_pre_request.dart'; export 'src/request/query_cubit.dart'; From 7e1740be4bb951e16e926db824a4766d06946f03 Mon Sep 17 00:00:00 2001 From: Michalina Majewska Date: Mon, 29 Jul 2024 11:31:55 +0200 Subject: [PATCH 6/6] Remove unnecessary imports --- packages/leancode_cubit_utils_cqrs/example/lib/main.dart | 2 +- .../example/lib/pages/paginated/paginated_cubit_page.dart | 2 +- .../example/lib/pages/paginated/simple_paginated_cubit.dart | 1 - .../example/lib/pages/query/query_page.dart | 1 - .../test/paginated/query_pre_request_test.dart | 1 - .../test/paginated/test_paginated_cubit.dart | 1 - .../leancode_cubit_utils_cqrs/test/utils/test_query_cubit.dart | 1 - 7 files changed, 2 insertions(+), 7 deletions(-) diff --git a/packages/leancode_cubit_utils_cqrs/example/lib/main.dart b/packages/leancode_cubit_utils_cqrs/example/lib/main.dart index 0d4d05b..15551f3 100644 --- a/packages/leancode_cubit_utils_cqrs/example/lib/main.dart +++ b/packages/leancode_cubit_utils_cqrs/example/lib/main.dart @@ -6,7 +6,7 @@ import 'package:example/pages/home_page.dart'; import 'package:example/pages/paginated/paginated_cubit_page.dart'; import 'package:example/pages/query/query_page.dart'; import 'package:flutter/material.dart'; -import 'package:leancode_cubit_utils/leancode_cubit_utils.dart'; +import 'package:leancode_cubit_utils_cqrs/leancode_cubit_utils_cqrs.dart'; import 'package:logging/logging.dart'; import 'package:provider/provider.dart'; diff --git a/packages/leancode_cubit_utils_cqrs/example/lib/pages/paginated/paginated_cubit_page.dart b/packages/leancode_cubit_utils_cqrs/example/lib/pages/paginated/paginated_cubit_page.dart index d9019d5..63a39b6 100644 --- a/packages/leancode_cubit_utils_cqrs/example/lib/pages/paginated/paginated_cubit_page.dart +++ b/packages/leancode_cubit_utils_cqrs/example/lib/pages/paginated/paginated_cubit_page.dart @@ -2,7 +2,7 @@ import 'package:example/pages/paginated/api.dart'; import 'package:example/pages/paginated/simple_paginated_cubit.dart'; import 'package:flutter/material.dart' hide Page; import 'package:flutter_bloc/flutter_bloc.dart'; -import 'package:leancode_cubit_utils/leancode_cubit_utils.dart'; +import 'package:leancode_cubit_utils_cqrs/leancode_cubit_utils_cqrs.dart'; class PaginatedCubitScreen extends StatelessWidget { const PaginatedCubitScreen({super.key}); diff --git a/packages/leancode_cubit_utils_cqrs/example/lib/pages/paginated/simple_paginated_cubit.dart b/packages/leancode_cubit_utils_cqrs/example/lib/pages/paginated/simple_paginated_cubit.dart index 56ed5ab..3c7b02a 100644 --- a/packages/leancode_cubit_utils_cqrs/example/lib/pages/paginated/simple_paginated_cubit.dart +++ b/packages/leancode_cubit_utils_cqrs/example/lib/pages/paginated/simple_paginated_cubit.dart @@ -1,7 +1,6 @@ import 'package:cqrs/cqrs.dart'; import 'package:equatable/equatable.dart'; import 'package:example/pages/paginated/api.dart'; -import 'package:leancode_cubit_utils/leancode_cubit_utils.dart'; import 'package:leancode_cubit_utils_cqrs/leancode_cubit_utils_cqrs.dart'; class AdditionalData with EquatableMixin { diff --git a/packages/leancode_cubit_utils_cqrs/example/lib/pages/query/query_page.dart b/packages/leancode_cubit_utils_cqrs/example/lib/pages/query/query_page.dart index 0c49dd4..3a4e12b 100644 --- a/packages/leancode_cubit_utils_cqrs/example/lib/pages/query/query_page.dart +++ b/packages/leancode_cubit_utils_cqrs/example/lib/pages/query/query_page.dart @@ -2,7 +2,6 @@ import 'package:cqrs/cqrs.dart'; import 'package:example/cqrs/cqrs.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; -import 'package:leancode_cubit_utils/leancode_cubit_utils.dart'; import 'package:leancode_cubit_utils_cqrs/leancode_cubit_utils_cqrs.dart'; import 'package:leancode_hooks/leancode_hooks.dart'; diff --git a/packages/leancode_cubit_utils_cqrs/test/paginated/query_pre_request_test.dart b/packages/leancode_cubit_utils_cqrs/test/paginated/query_pre_request_test.dart index 0dedf08..5d46257 100644 --- a/packages/leancode_cubit_utils_cqrs/test/paginated/query_pre_request_test.dart +++ b/packages/leancode_cubit_utils_cqrs/test/paginated/query_pre_request_test.dart @@ -1,6 +1,5 @@ import 'package:cqrs/cqrs.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:leancode_cubit_utils/leancode_cubit_utils.dart'; import 'package:leancode_cubit_utils_cqrs/leancode_cubit_utils_cqrs.dart'; class TestQueryPreRequest extends QueryPreRequest { diff --git a/packages/leancode_cubit_utils_cqrs/test/paginated/test_paginated_cubit.dart b/packages/leancode_cubit_utils_cqrs/test/paginated/test_paginated_cubit.dart index fd0c61d..9927b95 100644 --- a/packages/leancode_cubit_utils_cqrs/test/paginated/test_paginated_cubit.dart +++ b/packages/leancode_cubit_utils_cqrs/test/paginated/test_paginated_cubit.dart @@ -1,5 +1,4 @@ import 'package:cqrs/cqrs.dart'; -import 'package:leancode_cubit_utils/leancode_cubit_utils.dart'; import 'package:leancode_cubit_utils_cqrs/leancode_cubit_utils_cqrs.dart'; import '../utils/mocked_api.dart'; diff --git a/packages/leancode_cubit_utils_cqrs/test/utils/test_query_cubit.dart b/packages/leancode_cubit_utils_cqrs/test/utils/test_query_cubit.dart index 6e6b7b1..72d80bd 100644 --- a/packages/leancode_cubit_utils_cqrs/test/utils/test_query_cubit.dart +++ b/packages/leancode_cubit_utils_cqrs/test/utils/test_query_cubit.dart @@ -1,5 +1,4 @@ import 'package:cqrs/cqrs.dart'; -import 'package:leancode_cubit_utils/leancode_cubit_utils.dart'; import 'package:leancode_cubit_utils_cqrs/leancode_cubit_utils_cqrs.dart'; import 'test_query.dart';