From f0747c3ebff07e7df3dd9bb84b2585d32542d131 Mon Sep 17 00:00:00 2001 From: Amirreza Madani Date: Tue, 26 Mar 2024 12:50:50 +0330 Subject: [PATCH 01/21] ci(all): update github workflow --- .github/workflows/dart.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index e21b401a..eac0b8bf 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: dart-lang/setup-dart@v1 with: sdk: stable From de0e56dea3dec0351679d3866890076c70c423e6 Mon Sep 17 00:00:00 2001 From: Amirreza Madani Date: Tue, 26 Mar 2024 12:51:22 +0330 Subject: [PATCH 02/21] doc(all): fix readme build badge --- README.md | 2 +- example/README.md | 2 +- sealed_annotations/README.md | 2 +- sealed_annotations/example/README.md | 2 +- sealed_generators/README.md | 2 +- sealed_generators/example/README.md | 2 +- sealed_writer/README.md | 2 +- sealed_writer/example/README.md | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 1f3ca4ee..ead2d749 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Dart Sealed Class Generator -[![build](https://img.shields.io/github/workflow/status/6thsolution/dart_sealed/Dart?label=build)](https://github.com/6thsolution/dart_sealed/actions/workflows/dart.yml) +[![build](https://img.shields.io/github/actions/workflow/status/6thsolution/dart_sealed/.github/workflows/dart.yml?branch=master&label=build)](https://github.com/6thsolution/dart_sealed/actions/workflows/dart.yml) [![build](https://img.shields.io/codecov/c/gh/6thsolution/dart_sealed?label=coverage)](https://codecov.io/gh/6thsolution/dart_sealed) [![pub](https://img.shields.io/pub/v/sealed_annotations.svg?color=blue&label=sealed_annotations)](https://pub.dev/packages/sealed_annotations) [![pub](https://img.shields.io/pub/v/sealed_generators.svg?color=blue&label=sealed_generators)](https://pub.dev/packages/sealed_generators) diff --git a/example/README.md b/example/README.md index 1f3ca4ee..ead2d749 100644 --- a/example/README.md +++ b/example/README.md @@ -1,6 +1,6 @@ # Dart Sealed Class Generator -[![build](https://img.shields.io/github/workflow/status/6thsolution/dart_sealed/Dart?label=build)](https://github.com/6thsolution/dart_sealed/actions/workflows/dart.yml) +[![build](https://img.shields.io/github/actions/workflow/status/6thsolution/dart_sealed/.github/workflows/dart.yml?branch=master&label=build)](https://github.com/6thsolution/dart_sealed/actions/workflows/dart.yml) [![build](https://img.shields.io/codecov/c/gh/6thsolution/dart_sealed?label=coverage)](https://codecov.io/gh/6thsolution/dart_sealed) [![pub](https://img.shields.io/pub/v/sealed_annotations.svg?color=blue&label=sealed_annotations)](https://pub.dev/packages/sealed_annotations) [![pub](https://img.shields.io/pub/v/sealed_generators.svg?color=blue&label=sealed_generators)](https://pub.dev/packages/sealed_generators) diff --git a/sealed_annotations/README.md b/sealed_annotations/README.md index 1f3ca4ee..ead2d749 100644 --- a/sealed_annotations/README.md +++ b/sealed_annotations/README.md @@ -1,6 +1,6 @@ # Dart Sealed Class Generator -[![build](https://img.shields.io/github/workflow/status/6thsolution/dart_sealed/Dart?label=build)](https://github.com/6thsolution/dart_sealed/actions/workflows/dart.yml) +[![build](https://img.shields.io/github/actions/workflow/status/6thsolution/dart_sealed/.github/workflows/dart.yml?branch=master&label=build)](https://github.com/6thsolution/dart_sealed/actions/workflows/dart.yml) [![build](https://img.shields.io/codecov/c/gh/6thsolution/dart_sealed?label=coverage)](https://codecov.io/gh/6thsolution/dart_sealed) [![pub](https://img.shields.io/pub/v/sealed_annotations.svg?color=blue&label=sealed_annotations)](https://pub.dev/packages/sealed_annotations) [![pub](https://img.shields.io/pub/v/sealed_generators.svg?color=blue&label=sealed_generators)](https://pub.dev/packages/sealed_generators) diff --git a/sealed_annotations/example/README.md b/sealed_annotations/example/README.md index 1f3ca4ee..ead2d749 100644 --- a/sealed_annotations/example/README.md +++ b/sealed_annotations/example/README.md @@ -1,6 +1,6 @@ # Dart Sealed Class Generator -[![build](https://img.shields.io/github/workflow/status/6thsolution/dart_sealed/Dart?label=build)](https://github.com/6thsolution/dart_sealed/actions/workflows/dart.yml) +[![build](https://img.shields.io/github/actions/workflow/status/6thsolution/dart_sealed/.github/workflows/dart.yml?branch=master&label=build)](https://github.com/6thsolution/dart_sealed/actions/workflows/dart.yml) [![build](https://img.shields.io/codecov/c/gh/6thsolution/dart_sealed?label=coverage)](https://codecov.io/gh/6thsolution/dart_sealed) [![pub](https://img.shields.io/pub/v/sealed_annotations.svg?color=blue&label=sealed_annotations)](https://pub.dev/packages/sealed_annotations) [![pub](https://img.shields.io/pub/v/sealed_generators.svg?color=blue&label=sealed_generators)](https://pub.dev/packages/sealed_generators) diff --git a/sealed_generators/README.md b/sealed_generators/README.md index 1f3ca4ee..ead2d749 100644 --- a/sealed_generators/README.md +++ b/sealed_generators/README.md @@ -1,6 +1,6 @@ # Dart Sealed Class Generator -[![build](https://img.shields.io/github/workflow/status/6thsolution/dart_sealed/Dart?label=build)](https://github.com/6thsolution/dart_sealed/actions/workflows/dart.yml) +[![build](https://img.shields.io/github/actions/workflow/status/6thsolution/dart_sealed/.github/workflows/dart.yml?branch=master&label=build)](https://github.com/6thsolution/dart_sealed/actions/workflows/dart.yml) [![build](https://img.shields.io/codecov/c/gh/6thsolution/dart_sealed?label=coverage)](https://codecov.io/gh/6thsolution/dart_sealed) [![pub](https://img.shields.io/pub/v/sealed_annotations.svg?color=blue&label=sealed_annotations)](https://pub.dev/packages/sealed_annotations) [![pub](https://img.shields.io/pub/v/sealed_generators.svg?color=blue&label=sealed_generators)](https://pub.dev/packages/sealed_generators) diff --git a/sealed_generators/example/README.md b/sealed_generators/example/README.md index 1f3ca4ee..ead2d749 100644 --- a/sealed_generators/example/README.md +++ b/sealed_generators/example/README.md @@ -1,6 +1,6 @@ # Dart Sealed Class Generator -[![build](https://img.shields.io/github/workflow/status/6thsolution/dart_sealed/Dart?label=build)](https://github.com/6thsolution/dart_sealed/actions/workflows/dart.yml) +[![build](https://img.shields.io/github/actions/workflow/status/6thsolution/dart_sealed/.github/workflows/dart.yml?branch=master&label=build)](https://github.com/6thsolution/dart_sealed/actions/workflows/dart.yml) [![build](https://img.shields.io/codecov/c/gh/6thsolution/dart_sealed?label=coverage)](https://codecov.io/gh/6thsolution/dart_sealed) [![pub](https://img.shields.io/pub/v/sealed_annotations.svg?color=blue&label=sealed_annotations)](https://pub.dev/packages/sealed_annotations) [![pub](https://img.shields.io/pub/v/sealed_generators.svg?color=blue&label=sealed_generators)](https://pub.dev/packages/sealed_generators) diff --git a/sealed_writer/README.md b/sealed_writer/README.md index 1f3ca4ee..ead2d749 100644 --- a/sealed_writer/README.md +++ b/sealed_writer/README.md @@ -1,6 +1,6 @@ # Dart Sealed Class Generator -[![build](https://img.shields.io/github/workflow/status/6thsolution/dart_sealed/Dart?label=build)](https://github.com/6thsolution/dart_sealed/actions/workflows/dart.yml) +[![build](https://img.shields.io/github/actions/workflow/status/6thsolution/dart_sealed/.github/workflows/dart.yml?branch=master&label=build)](https://github.com/6thsolution/dart_sealed/actions/workflows/dart.yml) [![build](https://img.shields.io/codecov/c/gh/6thsolution/dart_sealed?label=coverage)](https://codecov.io/gh/6thsolution/dart_sealed) [![pub](https://img.shields.io/pub/v/sealed_annotations.svg?color=blue&label=sealed_annotations)](https://pub.dev/packages/sealed_annotations) [![pub](https://img.shields.io/pub/v/sealed_generators.svg?color=blue&label=sealed_generators)](https://pub.dev/packages/sealed_generators) diff --git a/sealed_writer/example/README.md b/sealed_writer/example/README.md index 1f3ca4ee..ead2d749 100644 --- a/sealed_writer/example/README.md +++ b/sealed_writer/example/README.md @@ -1,6 +1,6 @@ # Dart Sealed Class Generator -[![build](https://img.shields.io/github/workflow/status/6thsolution/dart_sealed/Dart?label=build)](https://github.com/6thsolution/dart_sealed/actions/workflows/dart.yml) +[![build](https://img.shields.io/github/actions/workflow/status/6thsolution/dart_sealed/.github/workflows/dart.yml?branch=master&label=build)](https://github.com/6thsolution/dart_sealed/actions/workflows/dart.yml) [![build](https://img.shields.io/codecov/c/gh/6thsolution/dart_sealed?label=coverage)](https://codecov.io/gh/6thsolution/dart_sealed) [![pub](https://img.shields.io/pub/v/sealed_annotations.svg?color=blue&label=sealed_annotations)](https://pub.dev/packages/sealed_annotations) [![pub](https://img.shields.io/pub/v/sealed_generators.svg?color=blue&label=sealed_generators)](https://pub.dev/packages/sealed_generators) From bcc223f367f99600eb0bdfa1ca7b317bdfa90f7b Mon Sep 17 00:00:00 2001 From: Amirreza Madani Date: Tue, 26 Mar 2024 12:51:35 +0330 Subject: [PATCH 03/21] doc(all): update changelog --- CHANGELOG.md | 4 ++++ example/CHANGELOG.md | 4 ++++ sealed_annotations/CHANGELOG.md | 4 ++++ sealed_generators/CHANGELOG.md | 4 ++++ sealed_writer/CHANGELOG.md | 4 ++++ 5 files changed, 20 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d51605c6..28d6f5a8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.14.0 + +- Fixed some issues + ## 1.13.0 - Added referToManifest to source writer diff --git a/example/CHANGELOG.md b/example/CHANGELOG.md index d51605c6..28d6f5a8 100644 --- a/example/CHANGELOG.md +++ b/example/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.14.0 + +- Fixed some issues + ## 1.13.0 - Added referToManifest to source writer diff --git a/sealed_annotations/CHANGELOG.md b/sealed_annotations/CHANGELOG.md index d51605c6..28d6f5a8 100644 --- a/sealed_annotations/CHANGELOG.md +++ b/sealed_annotations/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.14.0 + +- Fixed some issues + ## 1.13.0 - Added referToManifest to source writer diff --git a/sealed_generators/CHANGELOG.md b/sealed_generators/CHANGELOG.md index d51605c6..28d6f5a8 100644 --- a/sealed_generators/CHANGELOG.md +++ b/sealed_generators/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.14.0 + +- Fixed some issues + ## 1.13.0 - Added referToManifest to source writer diff --git a/sealed_writer/CHANGELOG.md b/sealed_writer/CHANGELOG.md index d51605c6..28d6f5a8 100644 --- a/sealed_writer/CHANGELOG.md +++ b/sealed_writer/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.14.0 + +- Fixed some issues + ## 1.13.0 - Added referToManifest to source writer From 9fe2e0300fb1118548b67a8aca6bdcfaf653c098 Mon Sep 17 00:00:00 2001 From: Amirreza Madani Date: Tue, 26 Mar 2024 12:51:53 +0330 Subject: [PATCH 04/21] ci(all): fix analysis options --- example/analysis_options.yaml | 8 +++++--- sealed_annotations/analysis_options.yaml | 8 +++++--- sealed_generators/analysis_options.yaml | 8 +++++--- sealed_writer/analysis_options.yaml | 8 +++++--- 4 files changed, 20 insertions(+), 12 deletions(-) diff --git a/example/analysis_options.yaml b/example/analysis_options.yaml index 7d7c0831..939066c4 100644 --- a/example/analysis_options.yaml +++ b/example/analysis_options.yaml @@ -1,6 +1,8 @@ include: package:lints/recommended.yaml analyzer: - strong-mode: - implicit-dynamic: false - implicit-casts: false + language: + strict-casts: true + strict-inference: true + strict-raw-types: true + diff --git a/sealed_annotations/analysis_options.yaml b/sealed_annotations/analysis_options.yaml index 7d7c0831..939066c4 100644 --- a/sealed_annotations/analysis_options.yaml +++ b/sealed_annotations/analysis_options.yaml @@ -1,6 +1,8 @@ include: package:lints/recommended.yaml analyzer: - strong-mode: - implicit-dynamic: false - implicit-casts: false + language: + strict-casts: true + strict-inference: true + strict-raw-types: true + diff --git a/sealed_generators/analysis_options.yaml b/sealed_generators/analysis_options.yaml index 7d7c0831..939066c4 100644 --- a/sealed_generators/analysis_options.yaml +++ b/sealed_generators/analysis_options.yaml @@ -1,6 +1,8 @@ include: package:lints/recommended.yaml analyzer: - strong-mode: - implicit-dynamic: false - implicit-casts: false + language: + strict-casts: true + strict-inference: true + strict-raw-types: true + diff --git a/sealed_writer/analysis_options.yaml b/sealed_writer/analysis_options.yaml index 7d7c0831..939066c4 100644 --- a/sealed_writer/analysis_options.yaml +++ b/sealed_writer/analysis_options.yaml @@ -1,6 +1,8 @@ include: package:lints/recommended.yaml analyzer: - strong-mode: - implicit-dynamic: false - implicit-casts: false + language: + strict-casts: true + strict-inference: true + strict-raw-types: true + From d22bea9dd86fcfcfcb7cf3548a6e3d0157e34544 Mon Sep 17 00:00:00 2001 From: Amirreza Madani Date: Tue, 26 Mar 2024 12:52:34 +0330 Subject: [PATCH 05/21] ci(all): update pubspec versions --- example/pubspec.yaml | 8 ++++---- sealed_annotations/pubspec.yaml | 4 ++-- sealed_generators/pubspec.yaml | 8 ++++---- sealed_writer/pubspec.yaml | 4 ++-- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/example/pubspec.yaml b/example/pubspec.yaml index cce4031e..b8369811 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -3,21 +3,21 @@ description: Dart and Flutter sealed or union class generator and annotations, w repository: https://github.com/6thsolution/dart_sealed/tree/master/example homepage: https://github.com/6thsolution/dart_sealed -version: 1.13.0 +version: 1.14.0 # example package should not be published publish_to: 'none' environment: - sdk: '>=2.12.0 <3.0.0' + sdk: '>=2.12.0 <4.0.0' dependencies: # use fixed version dependency - sealed_annotations: '1.13.0' + sealed_annotations: '1.14.0' dev_dependencies: # use fixed version dependency - sealed_generators: '1.13.0' + sealed_generators: '1.14.0' lints: any test: any build_runner: any diff --git a/sealed_annotations/pubspec.yaml b/sealed_annotations/pubspec.yaml index 29984876..fb303298 100644 --- a/sealed_annotations/pubspec.yaml +++ b/sealed_annotations/pubspec.yaml @@ -3,10 +3,10 @@ description: Dart and Flutter sealed or union class generator and annotations, w repository: https://github.com/6thsolution/dart_sealed/tree/master/sealed_annotations homepage: https://github.com/6thsolution/dart_sealed -version: 1.13.0 +version: 1.14.0 environment: - sdk: '>=2.12.0 <3.0.0' + sdk: '>=2.12.0 <4.0.0' dependencies: meta: any diff --git a/sealed_generators/pubspec.yaml b/sealed_generators/pubspec.yaml index 3ed3abea..9f038e78 100644 --- a/sealed_generators/pubspec.yaml +++ b/sealed_generators/pubspec.yaml @@ -3,16 +3,16 @@ description: Dart and Flutter sealed or union class generator and annotations, w repository: https://github.com/6thsolution/dart_sealed/tree/master/sealed_generators homepage: https://github.com/6thsolution/dart_sealed -version: 1.13.0 +version: 1.14.0 environment: - sdk: '>=2.12.0 <3.0.0' + sdk: '>=2.12.0 <4.0.0' dependencies: # use fixed version dependency - sealed_annotations: '1.13.0' + sealed_annotations: '1.14.0' # use fixed version dependency - sealed_writer: '1.13.0' + sealed_writer: '1.14.0' build: any source_gen: any analyzer: any diff --git a/sealed_writer/pubspec.yaml b/sealed_writer/pubspec.yaml index b0689d6c..c7288da0 100644 --- a/sealed_writer/pubspec.yaml +++ b/sealed_writer/pubspec.yaml @@ -3,10 +3,10 @@ description: Dart and Flutter sealed or union class generator and annotations, w repository: https://github.com/6thsolution/dart_sealed/tree/master/sealed_writer homepage: https://github.com/6thsolution/dart_sealed -version: 1.13.0 +version: 1.14.0 environment: - sdk: '>=2.12.0 <3.0.0' + sdk: '>=2.12.0 <4.0.0' dev_dependencies: lints: any From 2771c5df86c5e5070f918df1a96f917e8281faea Mon Sep 17 00:00:00 2001 From: Amirreza Madani Date: Tue, 26 Mar 2024 13:04:39 +0330 Subject: [PATCH 06/21] refactor(all): fix analysis issues --- .../lib/src/manifest/manifest_reader_builder.dart | 2 +- sealed_writer/lib/src/manifest/manifest_integrity.dart | 2 +- sealed_writer/lib/src/utils/string_utils.dart | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sealed_generators/lib/src/manifest/manifest_reader_builder.dart b/sealed_generators/lib/src/manifest/manifest_reader_builder.dart index 949fb203..45ebb387 100644 --- a/sealed_generators/lib/src/manifest/manifest_reader_builder.dart +++ b/sealed_generators/lib/src/manifest/manifest_reader_builder.dart @@ -37,7 +37,7 @@ class ManifestReaderBuilder { ); final cls = e as ClassElement; require( - !(e is EnumElement) && !(e is MixinElement) && !cls.isMixinApplication, + (e is! EnumElement) && (e is! MixinElement) && !cls.isMixinApplication, 'element should be a Class', ); require( diff --git a/sealed_writer/lib/src/manifest/manifest_integrity.dart b/sealed_writer/lib/src/manifest/manifest_integrity.dart index a49b1e23..fba0a8e7 100644 --- a/sealed_writer/lib/src/manifest/manifest_integrity.dart +++ b/sealed_writer/lib/src/manifest/manifest_integrity.dart @@ -102,7 +102,7 @@ void _checkMatchNames(Manifest manifest) { for (final item in manifest.items) { [ ..._matchNames, - ...item.fields.map(_fieldName).toList(), + ...item.fields.map(_fieldName), ].checkNoEquals(); } } diff --git a/sealed_writer/lib/src/utils/string_utils.dart b/sealed_writer/lib/src/utils/string_utils.dart index a5f540e9..2aedd693 100644 --- a/sealed_writer/lib/src/utils/string_utils.dart +++ b/sealed_writer/lib/src/utils/string_utils.dart @@ -7,7 +7,7 @@ extension StringIterableUtils on Iterable { } else if (length == 1) { return first; } else { - return join(', ') + ','; + return '${join(', ')},'; } } @@ -19,7 +19,7 @@ extension StringIterableUtils on Iterable { if (isEmpty) { return ''; } else { - return join(', ') + ','; + return '${join(', ')},'; } } From 8a95e79e56624558dfe9e4b13f18e84a26de7b1e Mon Sep 17 00:00:00 2001 From: Amirreza Madani Date: Tue, 26 Mar 2024 13:14:20 +0330 Subject: [PATCH 07/21] doc(all): fix text issues in readme --- README.md | 30 ++++++++++++++-------------- example/README.md | 30 ++++++++++++++-------------- sealed_annotations/README.md | 30 ++++++++++++++-------------- sealed_annotations/example/README.md | 30 ++++++++++++++-------------- sealed_generators/README.md | 30 ++++++++++++++-------------- sealed_generators/example/README.md | 30 ++++++++++++++-------------- sealed_writer/README.md | 30 ++++++++++++++-------------- sealed_writer/example/README.md | 30 ++++++++++++++-------------- 8 files changed, 120 insertions(+), 120 deletions(-) diff --git a/README.md b/README.md index ead2d749..f055f48e 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Generate sealed class hierarchy for Dart and Flutter. ## Features -* Generate sealed class with abstract super type and data sub-classes. +* Generate sealed class with abstract super type and data subclasses. * Static factory methods. for example `Result.success(data: 0)`. * Cast methods. for example `a.asSuccess`, `a.isSuccess` or `a.asSuccessOrNull`. * Three types of equality and hashCode generation : data (like kotlin data classes), identity and distinct. @@ -163,14 +163,14 @@ class WeatherWindy extends Weather { Notes: -- Prefer using factories in super class instead of sub-class constructors. like `Whether.rainy()` instead +- Prefer using factories in super class instead of subclass constructors. like `Whether.rainy()` instead of `WhetherRainy()` - Minimize usage of cast methods, most of the time they can be replaced with a match method. ## Equality and generated class names You can choose between three types of equality using `@WithEquality(...)` annotation. Default equality is `data` if not -specified. This will become default equality for all sub-classes. You can change equality of each sub-class by using +specified. This will become default equality for all subclasses. You can change equality of each subclass by using this annotation on individual methods. Equality types: @@ -209,14 +209,14 @@ abstract class _Weather { ``` An abstract super class is generated with name equal to name of manifest class without the underline (here `Weather`). -Each method will become a sub-class. There should be at least one method. sub-class names are based on method name +Each method will become a subclass. There should be at least one method. subclass names are based on method name prefixed with super class name (for example `WeatherSunny`). Naming process can be tailored with use of `@WithPrefix` -and `@WithName` annotations. Each method argument will become a field in corresponding sub-class. Field names are equal +and `@WithName` annotations. Each method argument will become a field in corresponding subclass. Field names are equal to argument names and field types are equal to argument types or dynamic if not specified. Argument types can be overridden using `@WithType` annotation for example when type information is not available at build time. Note that you can have nullable and non-nullable fields. -To change prefix of sub-class names which by default is top class name, you can use `@WithPrefix` annotation. for +To change prefix of subclass names which by default is top class name, you can use `@WithPrefix` annotation. for example: ```dart @@ -228,9 +228,9 @@ abstract class _Weather { ``` Now `sunny` will be named `HelloSunny` instead of the default `WeatherSunny`. You can use `@WithPrefix('')` to remove -all prefix from sub-class names. +all prefix from subclass names. -To change sub-class names directly you can use `@WithName` annotation. It will override `WithPrefix` if specified. for +To change subclass names directly you can use `@WithName` annotation. It will override `WithPrefix` if specified. for example: ```dart @@ -244,8 +244,8 @@ abstract class _Weather { Now `sunny` will be named `Hello` instead of the default `WeatherSunny`. This is useful if you want not to use prefix for some items. -Almost all methods on sealed classes use short names extracted from manifest method names. Full sub-class names are not -used. It is recommended not to use sub-classes directly. There are factory methods for each item on super class. +Almost all methods on sealed classes use short names extracted from manifest method names. Full subclass names are not +used. It is recommended not to use subclasses directly. There are factory methods for each item on super class. ## Generic Usage @@ -371,8 +371,8 @@ abstract class _Basket { Sometimes you need some fields to be present in all of your sealed classes. For example consider making a sealed class for different types of errors, and all of them are required to have `code` and `message`. It is very annoying to add -code and message to all of sealeds manually. Also if you have an error object you are unable to get its code or message -without using cast or match methods. Here you can use common fields. +code and message to all of sealed classes manually. Also, if you have an error object you are unable to get its code or +message without using cast or match methods. Here you can use common fields. To declare a common field you can add a getter or a final field to a manifest class, and it will automatically be added to all of your sealed classes. for example: @@ -397,9 +397,9 @@ abstract class _ApiError { You can also use a constructor in pair with final fields equivalently. -common fields are available on `ApiError` objects as well as it's sub-classes. +common fields are available on `ApiError` objects as well as its subclasses. -If you specify common fields in your seaeld classes it has no effect. for example: +If you specify common fields in your sealed classes it has no effect. for example: ```dart @Sealed() @@ -413,7 +413,7 @@ abstract class _Common { } ``` -You can use sub-class of common field type in sealed classes. For example: +You can use subclass of common field type in sealed classes. For example: ```dart @Sealed() diff --git a/example/README.md b/example/README.md index ead2d749..f055f48e 100644 --- a/example/README.md +++ b/example/README.md @@ -10,7 +10,7 @@ Generate sealed class hierarchy for Dart and Flutter. ## Features -* Generate sealed class with abstract super type and data sub-classes. +* Generate sealed class with abstract super type and data subclasses. * Static factory methods. for example `Result.success(data: 0)`. * Cast methods. for example `a.asSuccess`, `a.isSuccess` or `a.asSuccessOrNull`. * Three types of equality and hashCode generation : data (like kotlin data classes), identity and distinct. @@ -163,14 +163,14 @@ class WeatherWindy extends Weather { Notes: -- Prefer using factories in super class instead of sub-class constructors. like `Whether.rainy()` instead +- Prefer using factories in super class instead of subclass constructors. like `Whether.rainy()` instead of `WhetherRainy()` - Minimize usage of cast methods, most of the time they can be replaced with a match method. ## Equality and generated class names You can choose between three types of equality using `@WithEquality(...)` annotation. Default equality is `data` if not -specified. This will become default equality for all sub-classes. You can change equality of each sub-class by using +specified. This will become default equality for all subclasses. You can change equality of each subclass by using this annotation on individual methods. Equality types: @@ -209,14 +209,14 @@ abstract class _Weather { ``` An abstract super class is generated with name equal to name of manifest class without the underline (here `Weather`). -Each method will become a sub-class. There should be at least one method. sub-class names are based on method name +Each method will become a subclass. There should be at least one method. subclass names are based on method name prefixed with super class name (for example `WeatherSunny`). Naming process can be tailored with use of `@WithPrefix` -and `@WithName` annotations. Each method argument will become a field in corresponding sub-class. Field names are equal +and `@WithName` annotations. Each method argument will become a field in corresponding subclass. Field names are equal to argument names and field types are equal to argument types or dynamic if not specified. Argument types can be overridden using `@WithType` annotation for example when type information is not available at build time. Note that you can have nullable and non-nullable fields. -To change prefix of sub-class names which by default is top class name, you can use `@WithPrefix` annotation. for +To change prefix of subclass names which by default is top class name, you can use `@WithPrefix` annotation. for example: ```dart @@ -228,9 +228,9 @@ abstract class _Weather { ``` Now `sunny` will be named `HelloSunny` instead of the default `WeatherSunny`. You can use `@WithPrefix('')` to remove -all prefix from sub-class names. +all prefix from subclass names. -To change sub-class names directly you can use `@WithName` annotation. It will override `WithPrefix` if specified. for +To change subclass names directly you can use `@WithName` annotation. It will override `WithPrefix` if specified. for example: ```dart @@ -244,8 +244,8 @@ abstract class _Weather { Now `sunny` will be named `Hello` instead of the default `WeatherSunny`. This is useful if you want not to use prefix for some items. -Almost all methods on sealed classes use short names extracted from manifest method names. Full sub-class names are not -used. It is recommended not to use sub-classes directly. There are factory methods for each item on super class. +Almost all methods on sealed classes use short names extracted from manifest method names. Full subclass names are not +used. It is recommended not to use subclasses directly. There are factory methods for each item on super class. ## Generic Usage @@ -371,8 +371,8 @@ abstract class _Basket { Sometimes you need some fields to be present in all of your sealed classes. For example consider making a sealed class for different types of errors, and all of them are required to have `code` and `message`. It is very annoying to add -code and message to all of sealeds manually. Also if you have an error object you are unable to get its code or message -without using cast or match methods. Here you can use common fields. +code and message to all of sealed classes manually. Also, if you have an error object you are unable to get its code or +message without using cast or match methods. Here you can use common fields. To declare a common field you can add a getter or a final field to a manifest class, and it will automatically be added to all of your sealed classes. for example: @@ -397,9 +397,9 @@ abstract class _ApiError { You can also use a constructor in pair with final fields equivalently. -common fields are available on `ApiError` objects as well as it's sub-classes. +common fields are available on `ApiError` objects as well as its subclasses. -If you specify common fields in your seaeld classes it has no effect. for example: +If you specify common fields in your sealed classes it has no effect. for example: ```dart @Sealed() @@ -413,7 +413,7 @@ abstract class _Common { } ``` -You can use sub-class of common field type in sealed classes. For example: +You can use subclass of common field type in sealed classes. For example: ```dart @Sealed() diff --git a/sealed_annotations/README.md b/sealed_annotations/README.md index ead2d749..f055f48e 100644 --- a/sealed_annotations/README.md +++ b/sealed_annotations/README.md @@ -10,7 +10,7 @@ Generate sealed class hierarchy for Dart and Flutter. ## Features -* Generate sealed class with abstract super type and data sub-classes. +* Generate sealed class with abstract super type and data subclasses. * Static factory methods. for example `Result.success(data: 0)`. * Cast methods. for example `a.asSuccess`, `a.isSuccess` or `a.asSuccessOrNull`. * Three types of equality and hashCode generation : data (like kotlin data classes), identity and distinct. @@ -163,14 +163,14 @@ class WeatherWindy extends Weather { Notes: -- Prefer using factories in super class instead of sub-class constructors. like `Whether.rainy()` instead +- Prefer using factories in super class instead of subclass constructors. like `Whether.rainy()` instead of `WhetherRainy()` - Minimize usage of cast methods, most of the time they can be replaced with a match method. ## Equality and generated class names You can choose between three types of equality using `@WithEquality(...)` annotation. Default equality is `data` if not -specified. This will become default equality for all sub-classes. You can change equality of each sub-class by using +specified. This will become default equality for all subclasses. You can change equality of each subclass by using this annotation on individual methods. Equality types: @@ -209,14 +209,14 @@ abstract class _Weather { ``` An abstract super class is generated with name equal to name of manifest class without the underline (here `Weather`). -Each method will become a sub-class. There should be at least one method. sub-class names are based on method name +Each method will become a subclass. There should be at least one method. subclass names are based on method name prefixed with super class name (for example `WeatherSunny`). Naming process can be tailored with use of `@WithPrefix` -and `@WithName` annotations. Each method argument will become a field in corresponding sub-class. Field names are equal +and `@WithName` annotations. Each method argument will become a field in corresponding subclass. Field names are equal to argument names and field types are equal to argument types or dynamic if not specified. Argument types can be overridden using `@WithType` annotation for example when type information is not available at build time. Note that you can have nullable and non-nullable fields. -To change prefix of sub-class names which by default is top class name, you can use `@WithPrefix` annotation. for +To change prefix of subclass names which by default is top class name, you can use `@WithPrefix` annotation. for example: ```dart @@ -228,9 +228,9 @@ abstract class _Weather { ``` Now `sunny` will be named `HelloSunny` instead of the default `WeatherSunny`. You can use `@WithPrefix('')` to remove -all prefix from sub-class names. +all prefix from subclass names. -To change sub-class names directly you can use `@WithName` annotation. It will override `WithPrefix` if specified. for +To change subclass names directly you can use `@WithName` annotation. It will override `WithPrefix` if specified. for example: ```dart @@ -244,8 +244,8 @@ abstract class _Weather { Now `sunny` will be named `Hello` instead of the default `WeatherSunny`. This is useful if you want not to use prefix for some items. -Almost all methods on sealed classes use short names extracted from manifest method names. Full sub-class names are not -used. It is recommended not to use sub-classes directly. There are factory methods for each item on super class. +Almost all methods on sealed classes use short names extracted from manifest method names. Full subclass names are not +used. It is recommended not to use subclasses directly. There are factory methods for each item on super class. ## Generic Usage @@ -371,8 +371,8 @@ abstract class _Basket { Sometimes you need some fields to be present in all of your sealed classes. For example consider making a sealed class for different types of errors, and all of them are required to have `code` and `message`. It is very annoying to add -code and message to all of sealeds manually. Also if you have an error object you are unable to get its code or message -without using cast or match methods. Here you can use common fields. +code and message to all of sealed classes manually. Also, if you have an error object you are unable to get its code or +message without using cast or match methods. Here you can use common fields. To declare a common field you can add a getter or a final field to a manifest class, and it will automatically be added to all of your sealed classes. for example: @@ -397,9 +397,9 @@ abstract class _ApiError { You can also use a constructor in pair with final fields equivalently. -common fields are available on `ApiError` objects as well as it's sub-classes. +common fields are available on `ApiError` objects as well as its subclasses. -If you specify common fields in your seaeld classes it has no effect. for example: +If you specify common fields in your sealed classes it has no effect. for example: ```dart @Sealed() @@ -413,7 +413,7 @@ abstract class _Common { } ``` -You can use sub-class of common field type in sealed classes. For example: +You can use subclass of common field type in sealed classes. For example: ```dart @Sealed() diff --git a/sealed_annotations/example/README.md b/sealed_annotations/example/README.md index ead2d749..f055f48e 100644 --- a/sealed_annotations/example/README.md +++ b/sealed_annotations/example/README.md @@ -10,7 +10,7 @@ Generate sealed class hierarchy for Dart and Flutter. ## Features -* Generate sealed class with abstract super type and data sub-classes. +* Generate sealed class with abstract super type and data subclasses. * Static factory methods. for example `Result.success(data: 0)`. * Cast methods. for example `a.asSuccess`, `a.isSuccess` or `a.asSuccessOrNull`. * Three types of equality and hashCode generation : data (like kotlin data classes), identity and distinct. @@ -163,14 +163,14 @@ class WeatherWindy extends Weather { Notes: -- Prefer using factories in super class instead of sub-class constructors. like `Whether.rainy()` instead +- Prefer using factories in super class instead of subclass constructors. like `Whether.rainy()` instead of `WhetherRainy()` - Minimize usage of cast methods, most of the time they can be replaced with a match method. ## Equality and generated class names You can choose between three types of equality using `@WithEquality(...)` annotation. Default equality is `data` if not -specified. This will become default equality for all sub-classes. You can change equality of each sub-class by using +specified. This will become default equality for all subclasses. You can change equality of each subclass by using this annotation on individual methods. Equality types: @@ -209,14 +209,14 @@ abstract class _Weather { ``` An abstract super class is generated with name equal to name of manifest class without the underline (here `Weather`). -Each method will become a sub-class. There should be at least one method. sub-class names are based on method name +Each method will become a subclass. There should be at least one method. subclass names are based on method name prefixed with super class name (for example `WeatherSunny`). Naming process can be tailored with use of `@WithPrefix` -and `@WithName` annotations. Each method argument will become a field in corresponding sub-class. Field names are equal +and `@WithName` annotations. Each method argument will become a field in corresponding subclass. Field names are equal to argument names and field types are equal to argument types or dynamic if not specified. Argument types can be overridden using `@WithType` annotation for example when type information is not available at build time. Note that you can have nullable and non-nullable fields. -To change prefix of sub-class names which by default is top class name, you can use `@WithPrefix` annotation. for +To change prefix of subclass names which by default is top class name, you can use `@WithPrefix` annotation. for example: ```dart @@ -228,9 +228,9 @@ abstract class _Weather { ``` Now `sunny` will be named `HelloSunny` instead of the default `WeatherSunny`. You can use `@WithPrefix('')` to remove -all prefix from sub-class names. +all prefix from subclass names. -To change sub-class names directly you can use `@WithName` annotation. It will override `WithPrefix` if specified. for +To change subclass names directly you can use `@WithName` annotation. It will override `WithPrefix` if specified. for example: ```dart @@ -244,8 +244,8 @@ abstract class _Weather { Now `sunny` will be named `Hello` instead of the default `WeatherSunny`. This is useful if you want not to use prefix for some items. -Almost all methods on sealed classes use short names extracted from manifest method names. Full sub-class names are not -used. It is recommended not to use sub-classes directly. There are factory methods for each item on super class. +Almost all methods on sealed classes use short names extracted from manifest method names. Full subclass names are not +used. It is recommended not to use subclasses directly. There are factory methods for each item on super class. ## Generic Usage @@ -371,8 +371,8 @@ abstract class _Basket { Sometimes you need some fields to be present in all of your sealed classes. For example consider making a sealed class for different types of errors, and all of them are required to have `code` and `message`. It is very annoying to add -code and message to all of sealeds manually. Also if you have an error object you are unable to get its code or message -without using cast or match methods. Here you can use common fields. +code and message to all of sealed classes manually. Also, if you have an error object you are unable to get its code or +message without using cast or match methods. Here you can use common fields. To declare a common field you can add a getter or a final field to a manifest class, and it will automatically be added to all of your sealed classes. for example: @@ -397,9 +397,9 @@ abstract class _ApiError { You can also use a constructor in pair with final fields equivalently. -common fields are available on `ApiError` objects as well as it's sub-classes. +common fields are available on `ApiError` objects as well as its subclasses. -If you specify common fields in your seaeld classes it has no effect. for example: +If you specify common fields in your sealed classes it has no effect. for example: ```dart @Sealed() @@ -413,7 +413,7 @@ abstract class _Common { } ``` -You can use sub-class of common field type in sealed classes. For example: +You can use subclass of common field type in sealed classes. For example: ```dart @Sealed() diff --git a/sealed_generators/README.md b/sealed_generators/README.md index ead2d749..f055f48e 100644 --- a/sealed_generators/README.md +++ b/sealed_generators/README.md @@ -10,7 +10,7 @@ Generate sealed class hierarchy for Dart and Flutter. ## Features -* Generate sealed class with abstract super type and data sub-classes. +* Generate sealed class with abstract super type and data subclasses. * Static factory methods. for example `Result.success(data: 0)`. * Cast methods. for example `a.asSuccess`, `a.isSuccess` or `a.asSuccessOrNull`. * Three types of equality and hashCode generation : data (like kotlin data classes), identity and distinct. @@ -163,14 +163,14 @@ class WeatherWindy extends Weather { Notes: -- Prefer using factories in super class instead of sub-class constructors. like `Whether.rainy()` instead +- Prefer using factories in super class instead of subclass constructors. like `Whether.rainy()` instead of `WhetherRainy()` - Minimize usage of cast methods, most of the time they can be replaced with a match method. ## Equality and generated class names You can choose between three types of equality using `@WithEquality(...)` annotation. Default equality is `data` if not -specified. This will become default equality for all sub-classes. You can change equality of each sub-class by using +specified. This will become default equality for all subclasses. You can change equality of each subclass by using this annotation on individual methods. Equality types: @@ -209,14 +209,14 @@ abstract class _Weather { ``` An abstract super class is generated with name equal to name of manifest class without the underline (here `Weather`). -Each method will become a sub-class. There should be at least one method. sub-class names are based on method name +Each method will become a subclass. There should be at least one method. subclass names are based on method name prefixed with super class name (for example `WeatherSunny`). Naming process can be tailored with use of `@WithPrefix` -and `@WithName` annotations. Each method argument will become a field in corresponding sub-class. Field names are equal +and `@WithName` annotations. Each method argument will become a field in corresponding subclass. Field names are equal to argument names and field types are equal to argument types or dynamic if not specified. Argument types can be overridden using `@WithType` annotation for example when type information is not available at build time. Note that you can have nullable and non-nullable fields. -To change prefix of sub-class names which by default is top class name, you can use `@WithPrefix` annotation. for +To change prefix of subclass names which by default is top class name, you can use `@WithPrefix` annotation. for example: ```dart @@ -228,9 +228,9 @@ abstract class _Weather { ``` Now `sunny` will be named `HelloSunny` instead of the default `WeatherSunny`. You can use `@WithPrefix('')` to remove -all prefix from sub-class names. +all prefix from subclass names. -To change sub-class names directly you can use `@WithName` annotation. It will override `WithPrefix` if specified. for +To change subclass names directly you can use `@WithName` annotation. It will override `WithPrefix` if specified. for example: ```dart @@ -244,8 +244,8 @@ abstract class _Weather { Now `sunny` will be named `Hello` instead of the default `WeatherSunny`. This is useful if you want not to use prefix for some items. -Almost all methods on sealed classes use short names extracted from manifest method names. Full sub-class names are not -used. It is recommended not to use sub-classes directly. There are factory methods for each item on super class. +Almost all methods on sealed classes use short names extracted from manifest method names. Full subclass names are not +used. It is recommended not to use subclasses directly. There are factory methods for each item on super class. ## Generic Usage @@ -371,8 +371,8 @@ abstract class _Basket { Sometimes you need some fields to be present in all of your sealed classes. For example consider making a sealed class for different types of errors, and all of them are required to have `code` and `message`. It is very annoying to add -code and message to all of sealeds manually. Also if you have an error object you are unable to get its code or message -without using cast or match methods. Here you can use common fields. +code and message to all of sealed classes manually. Also, if you have an error object you are unable to get its code or +message without using cast or match methods. Here you can use common fields. To declare a common field you can add a getter or a final field to a manifest class, and it will automatically be added to all of your sealed classes. for example: @@ -397,9 +397,9 @@ abstract class _ApiError { You can also use a constructor in pair with final fields equivalently. -common fields are available on `ApiError` objects as well as it's sub-classes. +common fields are available on `ApiError` objects as well as its subclasses. -If you specify common fields in your seaeld classes it has no effect. for example: +If you specify common fields in your sealed classes it has no effect. for example: ```dart @Sealed() @@ -413,7 +413,7 @@ abstract class _Common { } ``` -You can use sub-class of common field type in sealed classes. For example: +You can use subclass of common field type in sealed classes. For example: ```dart @Sealed() diff --git a/sealed_generators/example/README.md b/sealed_generators/example/README.md index ead2d749..f055f48e 100644 --- a/sealed_generators/example/README.md +++ b/sealed_generators/example/README.md @@ -10,7 +10,7 @@ Generate sealed class hierarchy for Dart and Flutter. ## Features -* Generate sealed class with abstract super type and data sub-classes. +* Generate sealed class with abstract super type and data subclasses. * Static factory methods. for example `Result.success(data: 0)`. * Cast methods. for example `a.asSuccess`, `a.isSuccess` or `a.asSuccessOrNull`. * Three types of equality and hashCode generation : data (like kotlin data classes), identity and distinct. @@ -163,14 +163,14 @@ class WeatherWindy extends Weather { Notes: -- Prefer using factories in super class instead of sub-class constructors. like `Whether.rainy()` instead +- Prefer using factories in super class instead of subclass constructors. like `Whether.rainy()` instead of `WhetherRainy()` - Minimize usage of cast methods, most of the time they can be replaced with a match method. ## Equality and generated class names You can choose between three types of equality using `@WithEquality(...)` annotation. Default equality is `data` if not -specified. This will become default equality for all sub-classes. You can change equality of each sub-class by using +specified. This will become default equality for all subclasses. You can change equality of each subclass by using this annotation on individual methods. Equality types: @@ -209,14 +209,14 @@ abstract class _Weather { ``` An abstract super class is generated with name equal to name of manifest class without the underline (here `Weather`). -Each method will become a sub-class. There should be at least one method. sub-class names are based on method name +Each method will become a subclass. There should be at least one method. subclass names are based on method name prefixed with super class name (for example `WeatherSunny`). Naming process can be tailored with use of `@WithPrefix` -and `@WithName` annotations. Each method argument will become a field in corresponding sub-class. Field names are equal +and `@WithName` annotations. Each method argument will become a field in corresponding subclass. Field names are equal to argument names and field types are equal to argument types or dynamic if not specified. Argument types can be overridden using `@WithType` annotation for example when type information is not available at build time. Note that you can have nullable and non-nullable fields. -To change prefix of sub-class names which by default is top class name, you can use `@WithPrefix` annotation. for +To change prefix of subclass names which by default is top class name, you can use `@WithPrefix` annotation. for example: ```dart @@ -228,9 +228,9 @@ abstract class _Weather { ``` Now `sunny` will be named `HelloSunny` instead of the default `WeatherSunny`. You can use `@WithPrefix('')` to remove -all prefix from sub-class names. +all prefix from subclass names. -To change sub-class names directly you can use `@WithName` annotation. It will override `WithPrefix` if specified. for +To change subclass names directly you can use `@WithName` annotation. It will override `WithPrefix` if specified. for example: ```dart @@ -244,8 +244,8 @@ abstract class _Weather { Now `sunny` will be named `Hello` instead of the default `WeatherSunny`. This is useful if you want not to use prefix for some items. -Almost all methods on sealed classes use short names extracted from manifest method names. Full sub-class names are not -used. It is recommended not to use sub-classes directly. There are factory methods for each item on super class. +Almost all methods on sealed classes use short names extracted from manifest method names. Full subclass names are not +used. It is recommended not to use subclasses directly. There are factory methods for each item on super class. ## Generic Usage @@ -371,8 +371,8 @@ abstract class _Basket { Sometimes you need some fields to be present in all of your sealed classes. For example consider making a sealed class for different types of errors, and all of them are required to have `code` and `message`. It is very annoying to add -code and message to all of sealeds manually. Also if you have an error object you are unable to get its code or message -without using cast or match methods. Here you can use common fields. +code and message to all of sealed classes manually. Also, if you have an error object you are unable to get its code or +message without using cast or match methods. Here you can use common fields. To declare a common field you can add a getter or a final field to a manifest class, and it will automatically be added to all of your sealed classes. for example: @@ -397,9 +397,9 @@ abstract class _ApiError { You can also use a constructor in pair with final fields equivalently. -common fields are available on `ApiError` objects as well as it's sub-classes. +common fields are available on `ApiError` objects as well as its subclasses. -If you specify common fields in your seaeld classes it has no effect. for example: +If you specify common fields in your sealed classes it has no effect. for example: ```dart @Sealed() @@ -413,7 +413,7 @@ abstract class _Common { } ``` -You can use sub-class of common field type in sealed classes. For example: +You can use subclass of common field type in sealed classes. For example: ```dart @Sealed() diff --git a/sealed_writer/README.md b/sealed_writer/README.md index ead2d749..f055f48e 100644 --- a/sealed_writer/README.md +++ b/sealed_writer/README.md @@ -10,7 +10,7 @@ Generate sealed class hierarchy for Dart and Flutter. ## Features -* Generate sealed class with abstract super type and data sub-classes. +* Generate sealed class with abstract super type and data subclasses. * Static factory methods. for example `Result.success(data: 0)`. * Cast methods. for example `a.asSuccess`, `a.isSuccess` or `a.asSuccessOrNull`. * Three types of equality and hashCode generation : data (like kotlin data classes), identity and distinct. @@ -163,14 +163,14 @@ class WeatherWindy extends Weather { Notes: -- Prefer using factories in super class instead of sub-class constructors. like `Whether.rainy()` instead +- Prefer using factories in super class instead of subclass constructors. like `Whether.rainy()` instead of `WhetherRainy()` - Minimize usage of cast methods, most of the time they can be replaced with a match method. ## Equality and generated class names You can choose between three types of equality using `@WithEquality(...)` annotation. Default equality is `data` if not -specified. This will become default equality for all sub-classes. You can change equality of each sub-class by using +specified. This will become default equality for all subclasses. You can change equality of each subclass by using this annotation on individual methods. Equality types: @@ -209,14 +209,14 @@ abstract class _Weather { ``` An abstract super class is generated with name equal to name of manifest class without the underline (here `Weather`). -Each method will become a sub-class. There should be at least one method. sub-class names are based on method name +Each method will become a subclass. There should be at least one method. subclass names are based on method name prefixed with super class name (for example `WeatherSunny`). Naming process can be tailored with use of `@WithPrefix` -and `@WithName` annotations. Each method argument will become a field in corresponding sub-class. Field names are equal +and `@WithName` annotations. Each method argument will become a field in corresponding subclass. Field names are equal to argument names and field types are equal to argument types or dynamic if not specified. Argument types can be overridden using `@WithType` annotation for example when type information is not available at build time. Note that you can have nullable and non-nullable fields. -To change prefix of sub-class names which by default is top class name, you can use `@WithPrefix` annotation. for +To change prefix of subclass names which by default is top class name, you can use `@WithPrefix` annotation. for example: ```dart @@ -228,9 +228,9 @@ abstract class _Weather { ``` Now `sunny` will be named `HelloSunny` instead of the default `WeatherSunny`. You can use `@WithPrefix('')` to remove -all prefix from sub-class names. +all prefix from subclass names. -To change sub-class names directly you can use `@WithName` annotation. It will override `WithPrefix` if specified. for +To change subclass names directly you can use `@WithName` annotation. It will override `WithPrefix` if specified. for example: ```dart @@ -244,8 +244,8 @@ abstract class _Weather { Now `sunny` will be named `Hello` instead of the default `WeatherSunny`. This is useful if you want not to use prefix for some items. -Almost all methods on sealed classes use short names extracted from manifest method names. Full sub-class names are not -used. It is recommended not to use sub-classes directly. There are factory methods for each item on super class. +Almost all methods on sealed classes use short names extracted from manifest method names. Full subclass names are not +used. It is recommended not to use subclasses directly. There are factory methods for each item on super class. ## Generic Usage @@ -371,8 +371,8 @@ abstract class _Basket { Sometimes you need some fields to be present in all of your sealed classes. For example consider making a sealed class for different types of errors, and all of them are required to have `code` and `message`. It is very annoying to add -code and message to all of sealeds manually. Also if you have an error object you are unable to get its code or message -without using cast or match methods. Here you can use common fields. +code and message to all of sealed classes manually. Also, if you have an error object you are unable to get its code or +message without using cast or match methods. Here you can use common fields. To declare a common field you can add a getter or a final field to a manifest class, and it will automatically be added to all of your sealed classes. for example: @@ -397,9 +397,9 @@ abstract class _ApiError { You can also use a constructor in pair with final fields equivalently. -common fields are available on `ApiError` objects as well as it's sub-classes. +common fields are available on `ApiError` objects as well as its subclasses. -If you specify common fields in your seaeld classes it has no effect. for example: +If you specify common fields in your sealed classes it has no effect. for example: ```dart @Sealed() @@ -413,7 +413,7 @@ abstract class _Common { } ``` -You can use sub-class of common field type in sealed classes. For example: +You can use subclass of common field type in sealed classes. For example: ```dart @Sealed() diff --git a/sealed_writer/example/README.md b/sealed_writer/example/README.md index ead2d749..f055f48e 100644 --- a/sealed_writer/example/README.md +++ b/sealed_writer/example/README.md @@ -10,7 +10,7 @@ Generate sealed class hierarchy for Dart and Flutter. ## Features -* Generate sealed class with abstract super type and data sub-classes. +* Generate sealed class with abstract super type and data subclasses. * Static factory methods. for example `Result.success(data: 0)`. * Cast methods. for example `a.asSuccess`, `a.isSuccess` or `a.asSuccessOrNull`. * Three types of equality and hashCode generation : data (like kotlin data classes), identity and distinct. @@ -163,14 +163,14 @@ class WeatherWindy extends Weather { Notes: -- Prefer using factories in super class instead of sub-class constructors. like `Whether.rainy()` instead +- Prefer using factories in super class instead of subclass constructors. like `Whether.rainy()` instead of `WhetherRainy()` - Minimize usage of cast methods, most of the time they can be replaced with a match method. ## Equality and generated class names You can choose between three types of equality using `@WithEquality(...)` annotation. Default equality is `data` if not -specified. This will become default equality for all sub-classes. You can change equality of each sub-class by using +specified. This will become default equality for all subclasses. You can change equality of each subclass by using this annotation on individual methods. Equality types: @@ -209,14 +209,14 @@ abstract class _Weather { ``` An abstract super class is generated with name equal to name of manifest class without the underline (here `Weather`). -Each method will become a sub-class. There should be at least one method. sub-class names are based on method name +Each method will become a subclass. There should be at least one method. subclass names are based on method name prefixed with super class name (for example `WeatherSunny`). Naming process can be tailored with use of `@WithPrefix` -and `@WithName` annotations. Each method argument will become a field in corresponding sub-class. Field names are equal +and `@WithName` annotations. Each method argument will become a field in corresponding subclass. Field names are equal to argument names and field types are equal to argument types or dynamic if not specified. Argument types can be overridden using `@WithType` annotation for example when type information is not available at build time. Note that you can have nullable and non-nullable fields. -To change prefix of sub-class names which by default is top class name, you can use `@WithPrefix` annotation. for +To change prefix of subclass names which by default is top class name, you can use `@WithPrefix` annotation. for example: ```dart @@ -228,9 +228,9 @@ abstract class _Weather { ``` Now `sunny` will be named `HelloSunny` instead of the default `WeatherSunny`. You can use `@WithPrefix('')` to remove -all prefix from sub-class names. +all prefix from subclass names. -To change sub-class names directly you can use `@WithName` annotation. It will override `WithPrefix` if specified. for +To change subclass names directly you can use `@WithName` annotation. It will override `WithPrefix` if specified. for example: ```dart @@ -244,8 +244,8 @@ abstract class _Weather { Now `sunny` will be named `Hello` instead of the default `WeatherSunny`. This is useful if you want not to use prefix for some items. -Almost all methods on sealed classes use short names extracted from manifest method names. Full sub-class names are not -used. It is recommended not to use sub-classes directly. There are factory methods for each item on super class. +Almost all methods on sealed classes use short names extracted from manifest method names. Full subclass names are not +used. It is recommended not to use subclasses directly. There are factory methods for each item on super class. ## Generic Usage @@ -371,8 +371,8 @@ abstract class _Basket { Sometimes you need some fields to be present in all of your sealed classes. For example consider making a sealed class for different types of errors, and all of them are required to have `code` and `message`. It is very annoying to add -code and message to all of sealeds manually. Also if you have an error object you are unable to get its code or message -without using cast or match methods. Here you can use common fields. +code and message to all of sealed classes manually. Also, if you have an error object you are unable to get its code or +message without using cast or match methods. Here you can use common fields. To declare a common field you can add a getter or a final field to a manifest class, and it will automatically be added to all of your sealed classes. for example: @@ -397,9 +397,9 @@ abstract class _ApiError { You can also use a constructor in pair with final fields equivalently. -common fields are available on `ApiError` objects as well as it's sub-classes. +common fields are available on `ApiError` objects as well as its subclasses. -If you specify common fields in your seaeld classes it has no effect. for example: +If you specify common fields in your sealed classes it has no effect. for example: ```dart @Sealed() @@ -413,7 +413,7 @@ abstract class _Common { } ``` -You can use sub-class of common field type in sealed classes. For example: +You can use subclass of common field type in sealed classes. For example: ```dart @Sealed() From 0d81bc8939cc017d1a9610f02f64b501d759a459 Mon Sep 17 00:00:00 2001 From: Amirreza Madani Date: Tue, 26 Mar 2024 13:45:18 +0330 Subject: [PATCH 08/21] ci(all): fix a little issue --- .github/workflows/dart.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index eac0b8bf..8c0e5dbc 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -15,7 +15,7 @@ jobs: - uses: dart-lang/setup-dart@v1 with: sdk: stable - - name: init + - name: pub get run: .tools/init - name: format run: .tools/format From 412dbebf8787a605445f5c660dc854d11d441f65 Mon Sep 17 00:00:00 2001 From: Amirreza Madani Date: Wed, 16 Apr 2025 10:38:53 +0330 Subject: [PATCH 09/21] ci(all): regenerate generated codes --- example/bin/sealed/nullsafe/data/generic/result.sealed.dart | 1 + .../bin/sealed/nullsafe/data/generic/result_common.sealed.dart | 1 + .../sealed/nullsafe/data/generic/result_common_split.sealed.dart | 1 + .../bin/sealed/nullsafe/data/generic/result_complex.sealed.dart | 1 + .../sealed/nullsafe/data/generic/result_hierarchy.sealed.dart | 1 + .../bin/sealed/nullsafe/data/generic/result_multi_1.sealed.dart | 1 + .../bin/sealed/nullsafe/data/generic/result_multi_2.sealed.dart | 1 + .../bin/sealed/nullsafe/data/generic/result_multi_3.sealed.dart | 1 + .../bin/sealed/nullsafe/data/generic/result_multi_4.sealed.dart | 1 + .../sealed/nullsafe/data/generic/result_no_upper_1.sealed.dart | 1 + .../sealed/nullsafe/data/generic/result_no_upper_2.sealed.dart | 1 + .../bin/sealed/nullsafe/data/generic/result_single_1.sealed.dart | 1 + .../bin/sealed/nullsafe/data/generic/result_single_2.sealed.dart | 1 + .../bin/sealed/nullsafe/data/generic/result_single_3.sealed.dart | 1 + .../bin/sealed/nullsafe/data/generic/result_single_4.sealed.dart | 1 + example/bin/sealed/nullsafe/data/simple/common.sealed.dart | 1 + .../bin/sealed/nullsafe/data/simple/common_complex.sealed.dart | 1 + example/bin/sealed/nullsafe/data/simple/functional.sealed.dart | 1 + example/bin/sealed/nullsafe/data/simple/hierarchy.sealed.dart | 1 + example/bin/sealed/nullsafe/data/simple/meta.sealed.dart | 1 + example/bin/sealed/nullsafe/data/simple/mixed.sealed.dart | 1 + example/bin/sealed/nullsafe/data/simple/weather.sealed.dart | 1 + example/bin/sealed/nullsafe/distinct/simple/weather.sealed.dart | 1 + example/bin/sealed/nullsafe/identity/simple/weather.sealed.dart | 1 + sealed_annotations/example/common.sealed.dart | 1 + sealed_annotations/example/hierarchy.sealed.dart | 1 + sealed_annotations/example/meta.sealed.dart | 1 + sealed_annotations/example/mixed.sealed.dart | 1 + sealed_annotations/example/result.sealed.dart | 1 + sealed_annotations/example/result_complex.sealed.dart | 1 + sealed_annotations/example/result_hierarchy.sealed.dart | 1 + sealed_annotations/example/weather.sealed.dart | 1 + sealed_generators/example/common.sealed.dart | 1 + sealed_generators/example/hierarchy.sealed.dart | 1 + sealed_generators/example/meta.sealed.dart | 1 + sealed_generators/example/mixed.sealed.dart | 1 + sealed_generators/example/result.sealed.dart | 1 + sealed_generators/example/result_complex.sealed.dart | 1 + sealed_generators/example/result_hierarchy.sealed.dart | 1 + sealed_generators/example/weather.sealed.dart | 1 + 40 files changed, 40 insertions(+) diff --git a/example/bin/sealed/nullsafe/data/generic/result.sealed.dart b/example/bin/sealed/nullsafe/data/generic/result.sealed.dart index ac95b722..9efb653c 100644 --- a/example/bin/sealed/nullsafe/data/generic/result.sealed.dart +++ b/example/bin/sealed/nullsafe/data/generic/result.sealed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // GENERATED CODE - DO NOT MODIFY BY HAND part of 'result.dart'; diff --git a/example/bin/sealed/nullsafe/data/generic/result_common.sealed.dart b/example/bin/sealed/nullsafe/data/generic/result_common.sealed.dart index aed445b6..9a941e1c 100644 --- a/example/bin/sealed/nullsafe/data/generic/result_common.sealed.dart +++ b/example/bin/sealed/nullsafe/data/generic/result_common.sealed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // GENERATED CODE - DO NOT MODIFY BY HAND part of 'result_common.dart'; diff --git a/example/bin/sealed/nullsafe/data/generic/result_common_split.sealed.dart b/example/bin/sealed/nullsafe/data/generic/result_common_split.sealed.dart index 4ce45689..d4c6f20e 100644 --- a/example/bin/sealed/nullsafe/data/generic/result_common_split.sealed.dart +++ b/example/bin/sealed/nullsafe/data/generic/result_common_split.sealed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // GENERATED CODE - DO NOT MODIFY BY HAND part of 'result_common_split.dart'; diff --git a/example/bin/sealed/nullsafe/data/generic/result_complex.sealed.dart b/example/bin/sealed/nullsafe/data/generic/result_complex.sealed.dart index ba2cbf4a..68425e32 100644 --- a/example/bin/sealed/nullsafe/data/generic/result_complex.sealed.dart +++ b/example/bin/sealed/nullsafe/data/generic/result_complex.sealed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // GENERATED CODE - DO NOT MODIFY BY HAND part of 'result_complex.dart'; diff --git a/example/bin/sealed/nullsafe/data/generic/result_hierarchy.sealed.dart b/example/bin/sealed/nullsafe/data/generic/result_hierarchy.sealed.dart index f2c52cc7..9fcf44c2 100644 --- a/example/bin/sealed/nullsafe/data/generic/result_hierarchy.sealed.dart +++ b/example/bin/sealed/nullsafe/data/generic/result_hierarchy.sealed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // GENERATED CODE - DO NOT MODIFY BY HAND part of 'result_hierarchy.dart'; diff --git a/example/bin/sealed/nullsafe/data/generic/result_multi_1.sealed.dart b/example/bin/sealed/nullsafe/data/generic/result_multi_1.sealed.dart index 68ed307a..45f52d68 100644 --- a/example/bin/sealed/nullsafe/data/generic/result_multi_1.sealed.dart +++ b/example/bin/sealed/nullsafe/data/generic/result_multi_1.sealed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // GENERATED CODE - DO NOT MODIFY BY HAND part of 'result_multi_1.dart'; diff --git a/example/bin/sealed/nullsafe/data/generic/result_multi_2.sealed.dart b/example/bin/sealed/nullsafe/data/generic/result_multi_2.sealed.dart index 015ece01..389d10ec 100644 --- a/example/bin/sealed/nullsafe/data/generic/result_multi_2.sealed.dart +++ b/example/bin/sealed/nullsafe/data/generic/result_multi_2.sealed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // GENERATED CODE - DO NOT MODIFY BY HAND part of 'result_multi_2.dart'; diff --git a/example/bin/sealed/nullsafe/data/generic/result_multi_3.sealed.dart b/example/bin/sealed/nullsafe/data/generic/result_multi_3.sealed.dart index a8e744ba..e281869f 100644 --- a/example/bin/sealed/nullsafe/data/generic/result_multi_3.sealed.dart +++ b/example/bin/sealed/nullsafe/data/generic/result_multi_3.sealed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // GENERATED CODE - DO NOT MODIFY BY HAND part of 'result_multi_3.dart'; diff --git a/example/bin/sealed/nullsafe/data/generic/result_multi_4.sealed.dart b/example/bin/sealed/nullsafe/data/generic/result_multi_4.sealed.dart index 455e642f..8f8af44d 100644 --- a/example/bin/sealed/nullsafe/data/generic/result_multi_4.sealed.dart +++ b/example/bin/sealed/nullsafe/data/generic/result_multi_4.sealed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // GENERATED CODE - DO NOT MODIFY BY HAND part of 'result_multi_4.dart'; diff --git a/example/bin/sealed/nullsafe/data/generic/result_no_upper_1.sealed.dart b/example/bin/sealed/nullsafe/data/generic/result_no_upper_1.sealed.dart index e86916f0..c2e04bdf 100644 --- a/example/bin/sealed/nullsafe/data/generic/result_no_upper_1.sealed.dart +++ b/example/bin/sealed/nullsafe/data/generic/result_no_upper_1.sealed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // GENERATED CODE - DO NOT MODIFY BY HAND part of 'result_no_upper_1.dart'; diff --git a/example/bin/sealed/nullsafe/data/generic/result_no_upper_2.sealed.dart b/example/bin/sealed/nullsafe/data/generic/result_no_upper_2.sealed.dart index 79094425..0e82230d 100644 --- a/example/bin/sealed/nullsafe/data/generic/result_no_upper_2.sealed.dart +++ b/example/bin/sealed/nullsafe/data/generic/result_no_upper_2.sealed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // GENERATED CODE - DO NOT MODIFY BY HAND part of 'result_no_upper_2.dart'; diff --git a/example/bin/sealed/nullsafe/data/generic/result_single_1.sealed.dart b/example/bin/sealed/nullsafe/data/generic/result_single_1.sealed.dart index 29a497b3..4b613299 100644 --- a/example/bin/sealed/nullsafe/data/generic/result_single_1.sealed.dart +++ b/example/bin/sealed/nullsafe/data/generic/result_single_1.sealed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // GENERATED CODE - DO NOT MODIFY BY HAND part of 'result_single_1.dart'; diff --git a/example/bin/sealed/nullsafe/data/generic/result_single_2.sealed.dart b/example/bin/sealed/nullsafe/data/generic/result_single_2.sealed.dart index f2b93f18..59ee429a 100644 --- a/example/bin/sealed/nullsafe/data/generic/result_single_2.sealed.dart +++ b/example/bin/sealed/nullsafe/data/generic/result_single_2.sealed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // GENERATED CODE - DO NOT MODIFY BY HAND part of 'result_single_2.dart'; diff --git a/example/bin/sealed/nullsafe/data/generic/result_single_3.sealed.dart b/example/bin/sealed/nullsafe/data/generic/result_single_3.sealed.dart index 090e26b1..0f414048 100644 --- a/example/bin/sealed/nullsafe/data/generic/result_single_3.sealed.dart +++ b/example/bin/sealed/nullsafe/data/generic/result_single_3.sealed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // GENERATED CODE - DO NOT MODIFY BY HAND part of 'result_single_3.dart'; diff --git a/example/bin/sealed/nullsafe/data/generic/result_single_4.sealed.dart b/example/bin/sealed/nullsafe/data/generic/result_single_4.sealed.dart index 48448ec1..c5ef3156 100644 --- a/example/bin/sealed/nullsafe/data/generic/result_single_4.sealed.dart +++ b/example/bin/sealed/nullsafe/data/generic/result_single_4.sealed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // GENERATED CODE - DO NOT MODIFY BY HAND part of 'result_single_4.dart'; diff --git a/example/bin/sealed/nullsafe/data/simple/common.sealed.dart b/example/bin/sealed/nullsafe/data/simple/common.sealed.dart index 9a1d9a12..ca480c99 100644 --- a/example/bin/sealed/nullsafe/data/simple/common.sealed.dart +++ b/example/bin/sealed/nullsafe/data/simple/common.sealed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // GENERATED CODE - DO NOT MODIFY BY HAND part of 'common.dart'; diff --git a/example/bin/sealed/nullsafe/data/simple/common_complex.sealed.dart b/example/bin/sealed/nullsafe/data/simple/common_complex.sealed.dart index ad3f9f11..cfc7a425 100644 --- a/example/bin/sealed/nullsafe/data/simple/common_complex.sealed.dart +++ b/example/bin/sealed/nullsafe/data/simple/common_complex.sealed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // GENERATED CODE - DO NOT MODIFY BY HAND part of 'common_complex.dart'; diff --git a/example/bin/sealed/nullsafe/data/simple/functional.sealed.dart b/example/bin/sealed/nullsafe/data/simple/functional.sealed.dart index 7f9bbd4c..07800d07 100644 --- a/example/bin/sealed/nullsafe/data/simple/functional.sealed.dart +++ b/example/bin/sealed/nullsafe/data/simple/functional.sealed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // GENERATED CODE - DO NOT MODIFY BY HAND part of 'functional.dart'; diff --git a/example/bin/sealed/nullsafe/data/simple/hierarchy.sealed.dart b/example/bin/sealed/nullsafe/data/simple/hierarchy.sealed.dart index fd2a2379..b261e5ec 100644 --- a/example/bin/sealed/nullsafe/data/simple/hierarchy.sealed.dart +++ b/example/bin/sealed/nullsafe/data/simple/hierarchy.sealed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // GENERATED CODE - DO NOT MODIFY BY HAND part of 'hierarchy.dart'; diff --git a/example/bin/sealed/nullsafe/data/simple/meta.sealed.dart b/example/bin/sealed/nullsafe/data/simple/meta.sealed.dart index c9206305..61f8176b 100644 --- a/example/bin/sealed/nullsafe/data/simple/meta.sealed.dart +++ b/example/bin/sealed/nullsafe/data/simple/meta.sealed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // GENERATED CODE - DO NOT MODIFY BY HAND part of 'meta.dart'; diff --git a/example/bin/sealed/nullsafe/data/simple/mixed.sealed.dart b/example/bin/sealed/nullsafe/data/simple/mixed.sealed.dart index 714eed71..1a0e5359 100644 --- a/example/bin/sealed/nullsafe/data/simple/mixed.sealed.dart +++ b/example/bin/sealed/nullsafe/data/simple/mixed.sealed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // GENERATED CODE - DO NOT MODIFY BY HAND part of 'mixed.dart'; diff --git a/example/bin/sealed/nullsafe/data/simple/weather.sealed.dart b/example/bin/sealed/nullsafe/data/simple/weather.sealed.dart index 313adf10..c4259ed6 100644 --- a/example/bin/sealed/nullsafe/data/simple/weather.sealed.dart +++ b/example/bin/sealed/nullsafe/data/simple/weather.sealed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // GENERATED CODE - DO NOT MODIFY BY HAND part of 'weather.dart'; diff --git a/example/bin/sealed/nullsafe/distinct/simple/weather.sealed.dart b/example/bin/sealed/nullsafe/distinct/simple/weather.sealed.dart index 4fc7f1ca..30465f14 100644 --- a/example/bin/sealed/nullsafe/distinct/simple/weather.sealed.dart +++ b/example/bin/sealed/nullsafe/distinct/simple/weather.sealed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // GENERATED CODE - DO NOT MODIFY BY HAND part of 'weather.dart'; diff --git a/example/bin/sealed/nullsafe/identity/simple/weather.sealed.dart b/example/bin/sealed/nullsafe/identity/simple/weather.sealed.dart index 1c4f9fc0..6cc63dcf 100644 --- a/example/bin/sealed/nullsafe/identity/simple/weather.sealed.dart +++ b/example/bin/sealed/nullsafe/identity/simple/weather.sealed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // GENERATED CODE - DO NOT MODIFY BY HAND part of 'weather.dart'; diff --git a/sealed_annotations/example/common.sealed.dart b/sealed_annotations/example/common.sealed.dart index 9a1d9a12..ca480c99 100644 --- a/sealed_annotations/example/common.sealed.dart +++ b/sealed_annotations/example/common.sealed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // GENERATED CODE - DO NOT MODIFY BY HAND part of 'common.dart'; diff --git a/sealed_annotations/example/hierarchy.sealed.dart b/sealed_annotations/example/hierarchy.sealed.dart index fd2a2379..b261e5ec 100644 --- a/sealed_annotations/example/hierarchy.sealed.dart +++ b/sealed_annotations/example/hierarchy.sealed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // GENERATED CODE - DO NOT MODIFY BY HAND part of 'hierarchy.dart'; diff --git a/sealed_annotations/example/meta.sealed.dart b/sealed_annotations/example/meta.sealed.dart index c9206305..61f8176b 100644 --- a/sealed_annotations/example/meta.sealed.dart +++ b/sealed_annotations/example/meta.sealed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // GENERATED CODE - DO NOT MODIFY BY HAND part of 'meta.dart'; diff --git a/sealed_annotations/example/mixed.sealed.dart b/sealed_annotations/example/mixed.sealed.dart index 714eed71..1a0e5359 100644 --- a/sealed_annotations/example/mixed.sealed.dart +++ b/sealed_annotations/example/mixed.sealed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // GENERATED CODE - DO NOT MODIFY BY HAND part of 'mixed.dart'; diff --git a/sealed_annotations/example/result.sealed.dart b/sealed_annotations/example/result.sealed.dart index ac95b722..9efb653c 100644 --- a/sealed_annotations/example/result.sealed.dart +++ b/sealed_annotations/example/result.sealed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // GENERATED CODE - DO NOT MODIFY BY HAND part of 'result.dart'; diff --git a/sealed_annotations/example/result_complex.sealed.dart b/sealed_annotations/example/result_complex.sealed.dart index ba2cbf4a..68425e32 100644 --- a/sealed_annotations/example/result_complex.sealed.dart +++ b/sealed_annotations/example/result_complex.sealed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // GENERATED CODE - DO NOT MODIFY BY HAND part of 'result_complex.dart'; diff --git a/sealed_annotations/example/result_hierarchy.sealed.dart b/sealed_annotations/example/result_hierarchy.sealed.dart index f2c52cc7..9fcf44c2 100644 --- a/sealed_annotations/example/result_hierarchy.sealed.dart +++ b/sealed_annotations/example/result_hierarchy.sealed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // GENERATED CODE - DO NOT MODIFY BY HAND part of 'result_hierarchy.dart'; diff --git a/sealed_annotations/example/weather.sealed.dart b/sealed_annotations/example/weather.sealed.dart index 313adf10..c4259ed6 100644 --- a/sealed_annotations/example/weather.sealed.dart +++ b/sealed_annotations/example/weather.sealed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // GENERATED CODE - DO NOT MODIFY BY HAND part of 'weather.dart'; diff --git a/sealed_generators/example/common.sealed.dart b/sealed_generators/example/common.sealed.dart index 9a1d9a12..ca480c99 100644 --- a/sealed_generators/example/common.sealed.dart +++ b/sealed_generators/example/common.sealed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // GENERATED CODE - DO NOT MODIFY BY HAND part of 'common.dart'; diff --git a/sealed_generators/example/hierarchy.sealed.dart b/sealed_generators/example/hierarchy.sealed.dart index fd2a2379..b261e5ec 100644 --- a/sealed_generators/example/hierarchy.sealed.dart +++ b/sealed_generators/example/hierarchy.sealed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // GENERATED CODE - DO NOT MODIFY BY HAND part of 'hierarchy.dart'; diff --git a/sealed_generators/example/meta.sealed.dart b/sealed_generators/example/meta.sealed.dart index c9206305..61f8176b 100644 --- a/sealed_generators/example/meta.sealed.dart +++ b/sealed_generators/example/meta.sealed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // GENERATED CODE - DO NOT MODIFY BY HAND part of 'meta.dart'; diff --git a/sealed_generators/example/mixed.sealed.dart b/sealed_generators/example/mixed.sealed.dart index 714eed71..1a0e5359 100644 --- a/sealed_generators/example/mixed.sealed.dart +++ b/sealed_generators/example/mixed.sealed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // GENERATED CODE - DO NOT MODIFY BY HAND part of 'mixed.dart'; diff --git a/sealed_generators/example/result.sealed.dart b/sealed_generators/example/result.sealed.dart index ac95b722..9efb653c 100644 --- a/sealed_generators/example/result.sealed.dart +++ b/sealed_generators/example/result.sealed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // GENERATED CODE - DO NOT MODIFY BY HAND part of 'result.dart'; diff --git a/sealed_generators/example/result_complex.sealed.dart b/sealed_generators/example/result_complex.sealed.dart index ba2cbf4a..68425e32 100644 --- a/sealed_generators/example/result_complex.sealed.dart +++ b/sealed_generators/example/result_complex.sealed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // GENERATED CODE - DO NOT MODIFY BY HAND part of 'result_complex.dart'; diff --git a/sealed_generators/example/result_hierarchy.sealed.dart b/sealed_generators/example/result_hierarchy.sealed.dart index f2c52cc7..9fcf44c2 100644 --- a/sealed_generators/example/result_hierarchy.sealed.dart +++ b/sealed_generators/example/result_hierarchy.sealed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // GENERATED CODE - DO NOT MODIFY BY HAND part of 'result_hierarchy.dart'; diff --git a/sealed_generators/example/weather.sealed.dart b/sealed_generators/example/weather.sealed.dart index 313adf10..c4259ed6 100644 --- a/sealed_generators/example/weather.sealed.dart +++ b/sealed_generators/example/weather.sealed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // GENERATED CODE - DO NOT MODIFY BY HAND part of 'weather.dart'; From 4c7b36326ac2c5ce19163d5003ba43f2c0affaa6 Mon Sep 17 00:00:00 2001 From: Amirreza Madani Date: Wed, 16 Apr 2025 10:41:35 +0330 Subject: [PATCH 10/21] doc(all): fix code docs --- sealed_annotations/lib/src/annotations.dart | 2 +- .../lib/src/writer/base/base_utils_writer.dart | 12 ++++++------ .../lib/src/writer/sub/sub_equatable_writer.dart | 2 +- .../src/writer/top/match/top_match_base_writer.dart | 2 +- .../top/match/top_match_map_or_null_writer.dart | 2 +- .../src/writer/top/match/top_match_map_writer.dart | 2 +- .../writer/top/match/top_match_maybe_map_writer.dart | 2 +- .../top/match/top_match_maybe_when_writer.dart | 2 +- .../top/match/top_match_when_or_null_writer.dart | 2 +- .../src/writer/top/match/top_match_when_writer.dart | 2 +- .../lib/src/writer/top/top_builder_writer.dart | 6 +++--- 11 files changed, 18 insertions(+), 18 deletions(-) diff --git a/sealed_annotations/lib/src/annotations.dart b/sealed_annotations/lib/src/annotations.dart index c634838a..73c9f387 100644 --- a/sealed_annotations/lib/src/annotations.dart +++ b/sealed_annotations/lib/src/annotations.dart @@ -95,7 +95,7 @@ class SealedManifest { }) class WithType { /// type name. - /// for example "int?", "double" or "Result". + /// for example "int?", "double" or "Result\". final String type; const WithType(this.type); diff --git a/sealed_writer/lib/src/writer/base/base_utils_writer.dart b/sealed_writer/lib/src/writer/base/base_utils_writer.dart index 7c954001..b9f9ed6c 100644 --- a/sealed_writer/lib/src/writer/base/base_utils_writer.dart +++ b/sealed_writer/lib/src/writer/base/base_utils_writer.dart @@ -45,30 +45,30 @@ abstract class BaseUtilsWriter extends BaseWriter { String genericDecPart(ManifestParam param) => '${param.name} extends ${typeSL(param.bound)}'; - /// ex. + /// ex. \ String get genericDec => manifest.params.map(genericDecPart).joinArgsSimple().withLtGtOrNot(); /// ex. T String genericCallPart(ManifestParam param) => param.name; - /// ex. + /// ex. \ String get genericCall => manifest.params.map(genericCallPart).joinArgsSimple().withLtGtOrNot(); /// top class name with params for declaration. - /// ex. Result or Weather + /// ex. Result\ or Weather String get topDec => '$top$genericDec'; /// top class name with params for call. - /// ex. Result or Weather + /// ex. Result\ or Weather String get topCall => '$top$genericCall'; /// sub class name with params for declaration. - /// ex. WeatherSunny or ResultSuccess + /// ex. WeatherSunny or ResultSuccess\ String subDec(ManifestItem item) => '${subFull(item)}$genericDec'; /// sub class name with params for call. - /// ex. WeatherSunny or ResultSuccess + /// ex. WeatherSunny or ResultSuccess\ String subCall(ManifestItem item) => '${subFull(item)}$genericCall'; } diff --git a/sealed_writer/lib/src/writer/sub/sub_equatable_writer.dart b/sealed_writer/lib/src/writer/sub/sub_equatable_writer.dart index aa2827df..0eac55f7 100644 --- a/sealed_writer/lib/src/writer/sub/sub_equatable_writer.dart +++ b/sealed_writer/lib/src/writer/sub/sub_equatable_writer.dart @@ -11,7 +11,7 @@ class SubEquatableWriter extends BaseUtilsWriter { Iterable subEquatableFieldNames(ManifestItem item) => item.fields.map(fieldName); - /// List get props => [a, b, ...]; + /// List\ get props => [a, b, ...]; String subEquatableEquality(ManifestItem item) => [ annotationOverride, [ diff --git a/sealed_writer/lib/src/writer/top/match/top_match_base_writer.dart b/sealed_writer/lib/src/writer/top/match/top_match_base_writer.dart index 8d82c527..96dc5f8b 100644 --- a/sealed_writer/lib/src/writer/top/match/top_match_base_writer.dart +++ b/sealed_writer/lib/src/writer/top/match/top_match_base_writer.dart @@ -7,7 +7,7 @@ import 'package:sealed_writer/src/writer/base/base_cast_utils_writer.dart'; class TopMatchBaseWriter extends BaseCastUtilsWriter { const TopMatchBaseWriter(Manifest manifest) : super(manifest); - /// + /// \ String get topMatchParam => ''; /// required (R Function(WeatherSunny sunny)) sunny diff --git a/sealed_writer/lib/src/writer/top/match/top_match_map_or_null_writer.dart b/sealed_writer/lib/src/writer/top/match/top_match_map_or_null_writer.dart index aa3c28af..7711429f 100644 --- a/sealed_writer/lib/src/writer/top/match/top_match_map_or_null_writer.dart +++ b/sealed_writer/lib/src/writer/top/match/top_match_map_or_null_writer.dart @@ -46,7 +46,7 @@ class TopMatchMapOrNullWriter extends TopMatchBaseWriter { topMatchMapOrNullArgs().joinArgsFull().withBraces().withParenthesis(), ].joinParts(); - /// R? mapOrNull(item..., orElse) {...} + /// R? mapOrNull\(item..., orElse) {...} String topMatchMapOrNull() => [ topMatchMapOrNullStart(), '{', diff --git a/sealed_writer/lib/src/writer/top/match/top_match_map_writer.dart b/sealed_writer/lib/src/writer/top/match/top_match_map_writer.dart index 50879227..8ad02b90 100644 --- a/sealed_writer/lib/src/writer/top/match/top_match_map_writer.dart +++ b/sealed_writer/lib/src/writer/top/match/top_match_map_writer.dart @@ -37,7 +37,7 @@ class TopMatchMapWriter extends TopMatchBaseWriter { topMatchMapArgs().joinArgsFull().withBraces().withParenthesis(), ].joinParts(); - /// R map(required item...) + /// R map\(required item...) /// {...} String topMatchMap() => [ topMatchMapStart(), diff --git a/sealed_writer/lib/src/writer/top/match/top_match_maybe_map_writer.dart b/sealed_writer/lib/src/writer/top/match/top_match_maybe_map_writer.dart index af619771..2651bab4 100644 --- a/sealed_writer/lib/src/writer/top/match/top_match_maybe_map_writer.dart +++ b/sealed_writer/lib/src/writer/top/match/top_match_maybe_map_writer.dart @@ -46,7 +46,7 @@ class TopMatchMaybeMapWriter extends TopMatchBaseWriter { topMatchMaybeMapArgs().joinArgsFull().withBraces().withParenthesis(), ].joinParts(); - /// R maybeMap(item..., required orElse) {...} + /// R maybeMap\(item..., required orElse) {...} String topMatchMaybeMap() => [ topMatchMaybeMapStart(), '{', diff --git a/sealed_writer/lib/src/writer/top/match/top_match_maybe_when_writer.dart b/sealed_writer/lib/src/writer/top/match/top_match_maybe_when_writer.dart index 59be6041..f8f8838c 100644 --- a/sealed_writer/lib/src/writer/top/match/top_match_maybe_when_writer.dart +++ b/sealed_writer/lib/src/writer/top/match/top_match_maybe_when_writer.dart @@ -46,7 +46,7 @@ class TopMatchMaybeWhenWriter extends TopMatchBaseWriter { topMatchMaybeWhenArgs().joinArgsFull().withBraces().withParenthesis(), ].joinParts(); - /// R maybeWhen(item..., required orElse) {...} + /// R maybeWhen\(item..., required orElse) {...} String topMatchMaybeWhen() => [ topMatchMaybeWhenStart(), '{', diff --git a/sealed_writer/lib/src/writer/top/match/top_match_when_or_null_writer.dart b/sealed_writer/lib/src/writer/top/match/top_match_when_or_null_writer.dart index 58d1a2fb..00b556d9 100644 --- a/sealed_writer/lib/src/writer/top/match/top_match_when_or_null_writer.dart +++ b/sealed_writer/lib/src/writer/top/match/top_match_when_or_null_writer.dart @@ -46,7 +46,7 @@ class TopMatchWhenOrNullWriter extends TopMatchBaseWriter { topMatchWhenOrNullArgs().joinArgsFull().withBraces().withParenthesis(), ].joinParts(); - /// R? whenOrNull(item..., orElse) {...} + /// R? whenOrNull\(item..., orElse) {...} String topMatchWhenOrNull() => [ topMatchWhenOrNullStart(), '{', diff --git a/sealed_writer/lib/src/writer/top/match/top_match_when_writer.dart b/sealed_writer/lib/src/writer/top/match/top_match_when_writer.dart index 90cbc619..914b4f4c 100644 --- a/sealed_writer/lib/src/writer/top/match/top_match_when_writer.dart +++ b/sealed_writer/lib/src/writer/top/match/top_match_when_writer.dart @@ -37,7 +37,7 @@ class TopMatchWhenWriter extends TopMatchBaseWriter { topMatchWhenArgs().joinArgsFull().withBraces().withParenthesis(), ].joinParts(); - /// R when(required item...) + /// R when\(required item...) /// {...} String topMatchWhen() => [ topMatchWhenStart(), diff --git a/sealed_writer/lib/src/writer/top/top_builder_writer.dart b/sealed_writer/lib/src/writer/top/top_builder_writer.dart index d86d4d2e..8c857748 100644 --- a/sealed_writer/lib/src/writer/top/top_builder_writer.dart +++ b/sealed_writer/lib/src/writer/top/top_builder_writer.dart @@ -47,8 +47,8 @@ class TopBuilderWriter extends BaseUtilsWriter { /// ex. static WeatherSunny sunny() => WeatherSunny(); /// - /// ex. static ResultSuccess success(...) => - /// ResultSuccess(...) + /// ex. static ResultSuccess\ \success(...) => + /// ResultSuccess\(...) String topStaticBuilder(ManifestItem item) => [ 'static ${subCall(item)} ${subLower(item)}$genericDec', topBuilderDecArgs(item), @@ -59,7 +59,7 @@ class TopBuilderWriter extends BaseUtilsWriter { /// ex. factory Weather.sunny() = WeatherSunny; /// - /// ex. factory Result.success(...) = ResultSuccess; + /// ex. factory Result.success(...) = ResultSuccess\; String topFactoryBuilder(ManifestItem item) => [ 'const factory $top.${subLower(item)}', topBuilderDecArgs(item), From 430075b69caa05085b051c83ad483a2ab0e021b4 Mon Sep 17 00:00:00 2001 From: Amirreza Madani Date: Wed, 16 Apr 2025 10:49:39 +0330 Subject: [PATCH 11/21] ci(all): fix formatting code --- .tools/fix | 8 ++++---- .tools/fix.bat | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.tools/fix b/.tools/fix index d04498a3..2560e7e4 100755 --- a/.tools/fix +++ b/.tools/fix @@ -4,20 +4,20 @@ echo HEADER format pushd sealed_annotations || exit 1 echo NOTE sealed_annotations -dart format --fix lib test +dart format lib test popd || exit 1 pushd sealed_writer || exit 1 echo NOTE sealed_writer -dart format --fix lib test +dart format lib test popd || exit 1 pushd sealed_generators || exit 1 echo NOTE sealed_generators -dart format --fix lib test +dart format lib test popd || exit 1 pushd example || exit 1 echo NOTE example -dart format --fix test +dart format test popd || exit 1 diff --git a/.tools/fix.bat b/.tools/fix.bat index 496e6286..4201a5d9 100755 --- a/.tools/fix.bat +++ b/.tools/fix.bat @@ -4,20 +4,20 @@ echo HEADER format pushd sealed_annotations || exit 1 echo NOTE sealed_annotations -call dart format --fix lib test +call dart format lib test popd || exit 1 pushd sealed_writer || exit 1 echo NOTE sealed_writer -call dart format --fix lib test +call dart format lib test popd || exit 1 pushd sealed_generators || exit 1 echo NOTE sealed_generators -call dart format --fix lib test +call dart format lib test popd || exit 1 pushd example || exit 1 echo NOTE example -call dart format --fix test +call dart format test popd || exit 1 From 741db3758b54f00ebf996cf9a9958952114ac09a Mon Sep 17 00:00:00 2001 From: Amirreza Madani Date: Wed, 16 Apr 2025 10:50:46 +0330 Subject: [PATCH 12/21] doc(all): update changelog --- CHANGELOG.md | 4 ++++ example/CHANGELOG.md | 4 ++++ sealed_annotations/CHANGELOG.md | 4 ++++ sealed_generators/CHANGELOG.md | 4 ++++ sealed_writer/CHANGELOG.md | 4 ++++ 5 files changed, 20 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 28d6f5a8..cadf6a3f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.0.0 + +- Migrate dart analyzer + ## 1.14.0 - Fixed some issues diff --git a/example/CHANGELOG.md b/example/CHANGELOG.md index 28d6f5a8..cadf6a3f 100644 --- a/example/CHANGELOG.md +++ b/example/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.0.0 + +- Migrate dart analyzer + ## 1.14.0 - Fixed some issues diff --git a/sealed_annotations/CHANGELOG.md b/sealed_annotations/CHANGELOG.md index 28d6f5a8..cadf6a3f 100644 --- a/sealed_annotations/CHANGELOG.md +++ b/sealed_annotations/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.0.0 + +- Migrate dart analyzer + ## 1.14.0 - Fixed some issues diff --git a/sealed_generators/CHANGELOG.md b/sealed_generators/CHANGELOG.md index 28d6f5a8..cadf6a3f 100644 --- a/sealed_generators/CHANGELOG.md +++ b/sealed_generators/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.0.0 + +- Migrate dart analyzer + ## 1.14.0 - Fixed some issues diff --git a/sealed_writer/CHANGELOG.md b/sealed_writer/CHANGELOG.md index 28d6f5a8..cadf6a3f 100644 --- a/sealed_writer/CHANGELOG.md +++ b/sealed_writer/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.0.0 + +- Migrate dart analyzer + ## 1.14.0 - Fixed some issues From 342a59c7878f3d7cc4f481031706d09098fd9f0b Mon Sep 17 00:00:00 2001 From: Amirreza Madani Date: Wed, 16 Apr 2025 10:50:57 +0330 Subject: [PATCH 13/21] ci(all): update pubspec versions --- example/pubspec.yaml | 6 +++--- sealed_annotations/pubspec.yaml | 2 +- sealed_generators/pubspec.yaml | 6 +++--- sealed_writer/pubspec.yaml | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/example/pubspec.yaml b/example/pubspec.yaml index b8369811..a0c3952a 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -3,7 +3,7 @@ description: Dart and Flutter sealed or union class generator and annotations, w repository: https://github.com/6thsolution/dart_sealed/tree/master/example homepage: https://github.com/6thsolution/dart_sealed -version: 1.14.0 +version: 2.0.0 # example package should not be published publish_to: 'none' @@ -13,11 +13,11 @@ environment: dependencies: # use fixed version dependency - sealed_annotations: '1.14.0' + sealed_annotations: '2.0.0' dev_dependencies: # use fixed version dependency - sealed_generators: '1.14.0' + sealed_generators: '2.0.0' lints: any test: any build_runner: any diff --git a/sealed_annotations/pubspec.yaml b/sealed_annotations/pubspec.yaml index fb303298..edf6c389 100644 --- a/sealed_annotations/pubspec.yaml +++ b/sealed_annotations/pubspec.yaml @@ -3,7 +3,7 @@ description: Dart and Flutter sealed or union class generator and annotations, w repository: https://github.com/6thsolution/dart_sealed/tree/master/sealed_annotations homepage: https://github.com/6thsolution/dart_sealed -version: 1.14.0 +version: 2.0.0 environment: sdk: '>=2.12.0 <4.0.0' diff --git a/sealed_generators/pubspec.yaml b/sealed_generators/pubspec.yaml index 9f038e78..146254b1 100644 --- a/sealed_generators/pubspec.yaml +++ b/sealed_generators/pubspec.yaml @@ -3,16 +3,16 @@ description: Dart and Flutter sealed or union class generator and annotations, w repository: https://github.com/6thsolution/dart_sealed/tree/master/sealed_generators homepage: https://github.com/6thsolution/dart_sealed -version: 1.14.0 +version: 2.0.0 environment: sdk: '>=2.12.0 <4.0.0' dependencies: # use fixed version dependency - sealed_annotations: '1.14.0' + sealed_annotations: '2.0.0' # use fixed version dependency - sealed_writer: '1.14.0' + sealed_writer: '2.0.0' build: any source_gen: any analyzer: any diff --git a/sealed_writer/pubspec.yaml b/sealed_writer/pubspec.yaml index c7288da0..a22cc95a 100644 --- a/sealed_writer/pubspec.yaml +++ b/sealed_writer/pubspec.yaml @@ -3,7 +3,7 @@ description: Dart and Flutter sealed or union class generator and annotations, w repository: https://github.com/6thsolution/dart_sealed/tree/master/sealed_writer homepage: https://github.com/6thsolution/dart_sealed -version: 1.14.0 +version: 2.0.0 environment: sdk: '>=2.12.0 <4.0.0' From 5d70ab2635c5fc37b02806137f808595c3061d04 Mon Sep 17 00:00:00 2001 From: Amirreza Madani Date: Wed, 16 Apr 2025 11:15:18 +0330 Subject: [PATCH 14/21] docs(all): update licenses and links --- LICENSE | 1 + README.md | 4 ++-- example/LICENSE | 1 + example/README.md | 4 ++-- example/pubspec.yaml | 4 ++-- sealed_annotations/LICENSE | 1 + sealed_annotations/README.md | 4 ++-- sealed_annotations/example/README.md | 4 ++-- sealed_annotations/pubspec.yaml | 4 ++-- sealed_generators/LICENSE | 1 + sealed_generators/README.md | 4 ++-- sealed_generators/example/README.md | 4 ++-- sealed_generators/pubspec.yaml | 4 ++-- sealed_writer/LICENSE | 1 + sealed_writer/README.md | 4 ++-- sealed_writer/example/README.md | 4 ++-- sealed_writer/pubspec.yaml | 4 ++-- 17 files changed, 29 insertions(+), 24 deletions(-) diff --git a/LICENSE b/LICENSE index 2018725d..e7e4d00c 100644 --- a/LICENSE +++ b/LICENSE @@ -1,5 +1,6 @@ MIT License +Copyright (c) 2025 Amirreza Madani Copyright (c) 2021 6thsolution Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/README.md b/README.md index f055f48e..ad5ee1cb 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Dart Sealed Class Generator -[![build](https://img.shields.io/github/actions/workflow/status/6thsolution/dart_sealed/.github/workflows/dart.yml?branch=master&label=build)](https://github.com/6thsolution/dart_sealed/actions/workflows/dart.yml) -[![build](https://img.shields.io/codecov/c/gh/6thsolution/dart_sealed?label=coverage)](https://codecov.io/gh/6thsolution/dart_sealed) +[![build](https://img.shields.io/github/actions/workflow/status/FatulM/dart_sealed/.github/workflows/dart.yml?branch=master&label=build)](https://github.com/FatulM/dart_sealed/actions/workflows/dart.yml) +[![build](https://img.shields.io/codecov/c/gh/FatulM/dart_sealed?label=coverage)](https://codecov.io/gh/FatulM/dart_sealed) [![pub](https://img.shields.io/pub/v/sealed_annotations.svg?color=blue&label=sealed_annotations)](https://pub.dev/packages/sealed_annotations) [![pub](https://img.shields.io/pub/v/sealed_generators.svg?color=blue&label=sealed_generators)](https://pub.dev/packages/sealed_generators) [![pub](https://img.shields.io/pub/v/sealed_writer.svg?color=blue&label=sealed_writer)](https://pub.dev/packages/sealed_writer) diff --git a/example/LICENSE b/example/LICENSE index 2018725d..e7e4d00c 100644 --- a/example/LICENSE +++ b/example/LICENSE @@ -1,5 +1,6 @@ MIT License +Copyright (c) 2025 Amirreza Madani Copyright (c) 2021 6thsolution Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/example/README.md b/example/README.md index f055f48e..ad5ee1cb 100644 --- a/example/README.md +++ b/example/README.md @@ -1,7 +1,7 @@ # Dart Sealed Class Generator -[![build](https://img.shields.io/github/actions/workflow/status/6thsolution/dart_sealed/.github/workflows/dart.yml?branch=master&label=build)](https://github.com/6thsolution/dart_sealed/actions/workflows/dart.yml) -[![build](https://img.shields.io/codecov/c/gh/6thsolution/dart_sealed?label=coverage)](https://codecov.io/gh/6thsolution/dart_sealed) +[![build](https://img.shields.io/github/actions/workflow/status/FatulM/dart_sealed/.github/workflows/dart.yml?branch=master&label=build)](https://github.com/FatulM/dart_sealed/actions/workflows/dart.yml) +[![build](https://img.shields.io/codecov/c/gh/FatulM/dart_sealed?label=coverage)](https://codecov.io/gh/FatulM/dart_sealed) [![pub](https://img.shields.io/pub/v/sealed_annotations.svg?color=blue&label=sealed_annotations)](https://pub.dev/packages/sealed_annotations) [![pub](https://img.shields.io/pub/v/sealed_generators.svg?color=blue&label=sealed_generators)](https://pub.dev/packages/sealed_generators) [![pub](https://img.shields.io/pub/v/sealed_writer.svg?color=blue&label=sealed_writer)](https://pub.dev/packages/sealed_writer) diff --git a/example/pubspec.yaml b/example/pubspec.yaml index a0c3952a..5d395149 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -1,7 +1,7 @@ name: example description: Dart and Flutter sealed or union class generator and annotations, with match methods and other utilities. -repository: https://github.com/6thsolution/dart_sealed/tree/master/example -homepage: https://github.com/6thsolution/dart_sealed +repository: https://github.com/FatulM/dart_sealed/tree/master/example +homepage: https://github.com/FatulM/dart_sealed version: 2.0.0 diff --git a/sealed_annotations/LICENSE b/sealed_annotations/LICENSE index 2018725d..e7e4d00c 100644 --- a/sealed_annotations/LICENSE +++ b/sealed_annotations/LICENSE @@ -1,5 +1,6 @@ MIT License +Copyright (c) 2025 Amirreza Madani Copyright (c) 2021 6thsolution Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/sealed_annotations/README.md b/sealed_annotations/README.md index f055f48e..ad5ee1cb 100644 --- a/sealed_annotations/README.md +++ b/sealed_annotations/README.md @@ -1,7 +1,7 @@ # Dart Sealed Class Generator -[![build](https://img.shields.io/github/actions/workflow/status/6thsolution/dart_sealed/.github/workflows/dart.yml?branch=master&label=build)](https://github.com/6thsolution/dart_sealed/actions/workflows/dart.yml) -[![build](https://img.shields.io/codecov/c/gh/6thsolution/dart_sealed?label=coverage)](https://codecov.io/gh/6thsolution/dart_sealed) +[![build](https://img.shields.io/github/actions/workflow/status/FatulM/dart_sealed/.github/workflows/dart.yml?branch=master&label=build)](https://github.com/FatulM/dart_sealed/actions/workflows/dart.yml) +[![build](https://img.shields.io/codecov/c/gh/FatulM/dart_sealed?label=coverage)](https://codecov.io/gh/FatulM/dart_sealed) [![pub](https://img.shields.io/pub/v/sealed_annotations.svg?color=blue&label=sealed_annotations)](https://pub.dev/packages/sealed_annotations) [![pub](https://img.shields.io/pub/v/sealed_generators.svg?color=blue&label=sealed_generators)](https://pub.dev/packages/sealed_generators) [![pub](https://img.shields.io/pub/v/sealed_writer.svg?color=blue&label=sealed_writer)](https://pub.dev/packages/sealed_writer) diff --git a/sealed_annotations/example/README.md b/sealed_annotations/example/README.md index f055f48e..ad5ee1cb 100644 --- a/sealed_annotations/example/README.md +++ b/sealed_annotations/example/README.md @@ -1,7 +1,7 @@ # Dart Sealed Class Generator -[![build](https://img.shields.io/github/actions/workflow/status/6thsolution/dart_sealed/.github/workflows/dart.yml?branch=master&label=build)](https://github.com/6thsolution/dart_sealed/actions/workflows/dart.yml) -[![build](https://img.shields.io/codecov/c/gh/6thsolution/dart_sealed?label=coverage)](https://codecov.io/gh/6thsolution/dart_sealed) +[![build](https://img.shields.io/github/actions/workflow/status/FatulM/dart_sealed/.github/workflows/dart.yml?branch=master&label=build)](https://github.com/FatulM/dart_sealed/actions/workflows/dart.yml) +[![build](https://img.shields.io/codecov/c/gh/FatulM/dart_sealed?label=coverage)](https://codecov.io/gh/FatulM/dart_sealed) [![pub](https://img.shields.io/pub/v/sealed_annotations.svg?color=blue&label=sealed_annotations)](https://pub.dev/packages/sealed_annotations) [![pub](https://img.shields.io/pub/v/sealed_generators.svg?color=blue&label=sealed_generators)](https://pub.dev/packages/sealed_generators) [![pub](https://img.shields.io/pub/v/sealed_writer.svg?color=blue&label=sealed_writer)](https://pub.dev/packages/sealed_writer) diff --git a/sealed_annotations/pubspec.yaml b/sealed_annotations/pubspec.yaml index edf6c389..1b7cb866 100644 --- a/sealed_annotations/pubspec.yaml +++ b/sealed_annotations/pubspec.yaml @@ -1,7 +1,7 @@ name: sealed_annotations description: Dart and Flutter sealed or union class generator and annotations, with match methods and other utilities. -repository: https://github.com/6thsolution/dart_sealed/tree/master/sealed_annotations -homepage: https://github.com/6thsolution/dart_sealed +repository: https://github.com/FatulM/dart_sealed/tree/master/sealed_annotations +homepage: https://github.com/FatulM/dart_sealed version: 2.0.0 diff --git a/sealed_generators/LICENSE b/sealed_generators/LICENSE index 2018725d..e7e4d00c 100644 --- a/sealed_generators/LICENSE +++ b/sealed_generators/LICENSE @@ -1,5 +1,6 @@ MIT License +Copyright (c) 2025 Amirreza Madani Copyright (c) 2021 6thsolution Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/sealed_generators/README.md b/sealed_generators/README.md index f055f48e..ad5ee1cb 100644 --- a/sealed_generators/README.md +++ b/sealed_generators/README.md @@ -1,7 +1,7 @@ # Dart Sealed Class Generator -[![build](https://img.shields.io/github/actions/workflow/status/6thsolution/dart_sealed/.github/workflows/dart.yml?branch=master&label=build)](https://github.com/6thsolution/dart_sealed/actions/workflows/dart.yml) -[![build](https://img.shields.io/codecov/c/gh/6thsolution/dart_sealed?label=coverage)](https://codecov.io/gh/6thsolution/dart_sealed) +[![build](https://img.shields.io/github/actions/workflow/status/FatulM/dart_sealed/.github/workflows/dart.yml?branch=master&label=build)](https://github.com/FatulM/dart_sealed/actions/workflows/dart.yml) +[![build](https://img.shields.io/codecov/c/gh/FatulM/dart_sealed?label=coverage)](https://codecov.io/gh/FatulM/dart_sealed) [![pub](https://img.shields.io/pub/v/sealed_annotations.svg?color=blue&label=sealed_annotations)](https://pub.dev/packages/sealed_annotations) [![pub](https://img.shields.io/pub/v/sealed_generators.svg?color=blue&label=sealed_generators)](https://pub.dev/packages/sealed_generators) [![pub](https://img.shields.io/pub/v/sealed_writer.svg?color=blue&label=sealed_writer)](https://pub.dev/packages/sealed_writer) diff --git a/sealed_generators/example/README.md b/sealed_generators/example/README.md index f055f48e..ad5ee1cb 100644 --- a/sealed_generators/example/README.md +++ b/sealed_generators/example/README.md @@ -1,7 +1,7 @@ # Dart Sealed Class Generator -[![build](https://img.shields.io/github/actions/workflow/status/6thsolution/dart_sealed/.github/workflows/dart.yml?branch=master&label=build)](https://github.com/6thsolution/dart_sealed/actions/workflows/dart.yml) -[![build](https://img.shields.io/codecov/c/gh/6thsolution/dart_sealed?label=coverage)](https://codecov.io/gh/6thsolution/dart_sealed) +[![build](https://img.shields.io/github/actions/workflow/status/FatulM/dart_sealed/.github/workflows/dart.yml?branch=master&label=build)](https://github.com/FatulM/dart_sealed/actions/workflows/dart.yml) +[![build](https://img.shields.io/codecov/c/gh/FatulM/dart_sealed?label=coverage)](https://codecov.io/gh/FatulM/dart_sealed) [![pub](https://img.shields.io/pub/v/sealed_annotations.svg?color=blue&label=sealed_annotations)](https://pub.dev/packages/sealed_annotations) [![pub](https://img.shields.io/pub/v/sealed_generators.svg?color=blue&label=sealed_generators)](https://pub.dev/packages/sealed_generators) [![pub](https://img.shields.io/pub/v/sealed_writer.svg?color=blue&label=sealed_writer)](https://pub.dev/packages/sealed_writer) diff --git a/sealed_generators/pubspec.yaml b/sealed_generators/pubspec.yaml index 146254b1..e8855fd3 100644 --- a/sealed_generators/pubspec.yaml +++ b/sealed_generators/pubspec.yaml @@ -1,7 +1,7 @@ name: sealed_generators description: Dart and Flutter sealed or union class generator and annotations, with match methods and other utilities. -repository: https://github.com/6thsolution/dart_sealed/tree/master/sealed_generators -homepage: https://github.com/6thsolution/dart_sealed +repository: https://github.com/FatulM/dart_sealed/tree/master/sealed_generators +homepage: https://github.com/FatulM/dart_sealed version: 2.0.0 diff --git a/sealed_writer/LICENSE b/sealed_writer/LICENSE index 2018725d..e7e4d00c 100644 --- a/sealed_writer/LICENSE +++ b/sealed_writer/LICENSE @@ -1,5 +1,6 @@ MIT License +Copyright (c) 2025 Amirreza Madani Copyright (c) 2021 6thsolution Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/sealed_writer/README.md b/sealed_writer/README.md index f055f48e..ad5ee1cb 100644 --- a/sealed_writer/README.md +++ b/sealed_writer/README.md @@ -1,7 +1,7 @@ # Dart Sealed Class Generator -[![build](https://img.shields.io/github/actions/workflow/status/6thsolution/dart_sealed/.github/workflows/dart.yml?branch=master&label=build)](https://github.com/6thsolution/dart_sealed/actions/workflows/dart.yml) -[![build](https://img.shields.io/codecov/c/gh/6thsolution/dart_sealed?label=coverage)](https://codecov.io/gh/6thsolution/dart_sealed) +[![build](https://img.shields.io/github/actions/workflow/status/FatulM/dart_sealed/.github/workflows/dart.yml?branch=master&label=build)](https://github.com/FatulM/dart_sealed/actions/workflows/dart.yml) +[![build](https://img.shields.io/codecov/c/gh/FatulM/dart_sealed?label=coverage)](https://codecov.io/gh/FatulM/dart_sealed) [![pub](https://img.shields.io/pub/v/sealed_annotations.svg?color=blue&label=sealed_annotations)](https://pub.dev/packages/sealed_annotations) [![pub](https://img.shields.io/pub/v/sealed_generators.svg?color=blue&label=sealed_generators)](https://pub.dev/packages/sealed_generators) [![pub](https://img.shields.io/pub/v/sealed_writer.svg?color=blue&label=sealed_writer)](https://pub.dev/packages/sealed_writer) diff --git a/sealed_writer/example/README.md b/sealed_writer/example/README.md index f055f48e..ad5ee1cb 100644 --- a/sealed_writer/example/README.md +++ b/sealed_writer/example/README.md @@ -1,7 +1,7 @@ # Dart Sealed Class Generator -[![build](https://img.shields.io/github/actions/workflow/status/6thsolution/dart_sealed/.github/workflows/dart.yml?branch=master&label=build)](https://github.com/6thsolution/dart_sealed/actions/workflows/dart.yml) -[![build](https://img.shields.io/codecov/c/gh/6thsolution/dart_sealed?label=coverage)](https://codecov.io/gh/6thsolution/dart_sealed) +[![build](https://img.shields.io/github/actions/workflow/status/FatulM/dart_sealed/.github/workflows/dart.yml?branch=master&label=build)](https://github.com/FatulM/dart_sealed/actions/workflows/dart.yml) +[![build](https://img.shields.io/codecov/c/gh/FatulM/dart_sealed?label=coverage)](https://codecov.io/gh/FatulM/dart_sealed) [![pub](https://img.shields.io/pub/v/sealed_annotations.svg?color=blue&label=sealed_annotations)](https://pub.dev/packages/sealed_annotations) [![pub](https://img.shields.io/pub/v/sealed_generators.svg?color=blue&label=sealed_generators)](https://pub.dev/packages/sealed_generators) [![pub](https://img.shields.io/pub/v/sealed_writer.svg?color=blue&label=sealed_writer)](https://pub.dev/packages/sealed_writer) diff --git a/sealed_writer/pubspec.yaml b/sealed_writer/pubspec.yaml index a22cc95a..021d01a6 100644 --- a/sealed_writer/pubspec.yaml +++ b/sealed_writer/pubspec.yaml @@ -1,7 +1,7 @@ name: sealed_writer description: Dart and Flutter sealed or union class generator and annotations, with match methods and other utilities. -repository: https://github.com/6thsolution/dart_sealed/tree/master/sealed_writer -homepage: https://github.com/6thsolution/dart_sealed +repository: https://github.com/FatulM/dart_sealed/tree/master/sealed_writer +homepage: https://github.com/FatulM/dart_sealed version: 2.0.0 From fc64fda939377528e8c94cd2fbe3b10d7060fba5 Mon Sep 17 00:00:00 2001 From: Amirreza Madani Date: Wed, 16 Apr 2025 11:24:34 +0330 Subject: [PATCH 15/21] ci(all): update pubspec yaml --- example/pubspec.yaml | 19 ++++++++++++++++--- sealed_annotations/pubspec.yaml | 2 +- sealed_generators/pubspec.yaml | 6 ++---- sealed_writer/pubspec.yaml | 2 +- 4 files changed, 20 insertions(+), 9 deletions(-) diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 5d395149..2ae1d3d4 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -12,17 +12,15 @@ environment: sdk: '>=2.12.0 <4.0.0' dependencies: - # use fixed version dependency sealed_annotations: '2.0.0' dev_dependencies: - # use fixed version dependency sealed_generators: '2.0.0' lints: any test: any build_runner: any -# remove this on pub branch +# Remove this on your own projects: dependency_overrides: sealed_annotations: path: ../sealed_annotations @@ -30,3 +28,18 @@ dependency_overrides: path: ../sealed_writer sealed_generators: path: ../sealed_generators + +# Use this on your own projects instead: +#dependency_overrides: +# sealed_annotations: +# git: +# url: https://github.com/FatulM/dart_sealed +# path: sealed_annotations/ +# sealed_writer: +# git: +# url: https://github.com/FatulM/dart_sealed +# path: sealed_writer/ +# sealed_generators: +# git: +# url: https://github.com/FatulM/dart_sealed +# path: sealed_generators/ diff --git a/sealed_annotations/pubspec.yaml b/sealed_annotations/pubspec.yaml index 1b7cb866..824ac936 100644 --- a/sealed_annotations/pubspec.yaml +++ b/sealed_annotations/pubspec.yaml @@ -16,5 +16,5 @@ dev_dependencies: lints: any test: any -# remove this on pub branch +# THIS IS NOT THE UPSTREAM REPOSITORY AND ONLY ACCESSIBLE THROUGH GIT: publish_to: 'none' diff --git a/sealed_generators/pubspec.yaml b/sealed_generators/pubspec.yaml index e8855fd3..83459367 100644 --- a/sealed_generators/pubspec.yaml +++ b/sealed_generators/pubspec.yaml @@ -9,9 +9,7 @@ environment: sdk: '>=2.12.0 <4.0.0' dependencies: - # use fixed version dependency sealed_annotations: '2.0.0' - # use fixed version dependency sealed_writer: '2.0.0' build: any source_gen: any @@ -23,10 +21,10 @@ dev_dependencies: test: any build_test: any -# remove this on pub branch +# THIS IS NOT THE UPSTREAM REPOSITORY AND ONLY ACCESSIBLE THROUGH GIT: publish_to: 'none' -# remove this on pub branch +# THIS SHOULD BE OVERRIDDEN IN YOUR OWN PROJECTS: dependency_overrides: sealed_annotations: path: ../sealed_annotations diff --git a/sealed_writer/pubspec.yaml b/sealed_writer/pubspec.yaml index 021d01a6..6a13278b 100644 --- a/sealed_writer/pubspec.yaml +++ b/sealed_writer/pubspec.yaml @@ -12,5 +12,5 @@ dev_dependencies: lints: any test: any -# remove this on pub branch +# THIS IS NOT THE UPSTREAM REPOSITORY AND ONLY ACCESSIBLE THROUGH GIT: publish_to: 'none' From 5689269e785a8e80e24cf42b9c8b44fb8c8710af Mon Sep 17 00:00:00 2001 From: Amirreza Madani Date: Wed, 16 Apr 2025 11:32:29 +0330 Subject: [PATCH 16/21] doc(all): update readme --- README.md | 6 +++--- example/README.md | 6 +++--- sealed_annotations/README.md | 6 +++--- sealed_annotations/example/README.md | 6 +++--- sealed_generators/README.md | 6 +++--- sealed_generators/example/README.md | 6 +++--- sealed_writer/README.md | 6 +++--- sealed_writer/example/README.md | 6 +++--- 8 files changed, 24 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index ad5ee1cb..01401559 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,9 @@ [![build](https://img.shields.io/github/actions/workflow/status/FatulM/dart_sealed/.github/workflows/dart.yml?branch=master&label=build)](https://github.com/FatulM/dart_sealed/actions/workflows/dart.yml) [![build](https://img.shields.io/codecov/c/gh/FatulM/dart_sealed?label=coverage)](https://codecov.io/gh/FatulM/dart_sealed) -[![pub](https://img.shields.io/pub/v/sealed_annotations.svg?color=blue&label=sealed_annotations)](https://pub.dev/packages/sealed_annotations) -[![pub](https://img.shields.io/pub/v/sealed_generators.svg?color=blue&label=sealed_generators)](https://pub.dev/packages/sealed_generators) -[![pub](https://img.shields.io/pub/v/sealed_writer.svg?color=blue&label=sealed_writer)](https://pub.dev/packages/sealed_writer) +[![pub](https://img.shields.io/badge/sealed__annotations-v2.0.0-blue)](https://github.com/FatulM/dart_sealed/tree/master/sealed_annotations) +[![pub](https://img.shields.io/badge/sealed__generators-v2.0.0-blue)](https://github.com/FatulM/dart_sealed/tree/master/sealed_generators) +[![version](https://img.shields.io/badge/sealed__writer-v2.0.0-blue)](https://github.com/FatulM/dart_sealed/tree/master/sealed_writer) Generate sealed class hierarchy for Dart and Flutter. diff --git a/example/README.md b/example/README.md index ad5ee1cb..01401559 100644 --- a/example/README.md +++ b/example/README.md @@ -2,9 +2,9 @@ [![build](https://img.shields.io/github/actions/workflow/status/FatulM/dart_sealed/.github/workflows/dart.yml?branch=master&label=build)](https://github.com/FatulM/dart_sealed/actions/workflows/dart.yml) [![build](https://img.shields.io/codecov/c/gh/FatulM/dart_sealed?label=coverage)](https://codecov.io/gh/FatulM/dart_sealed) -[![pub](https://img.shields.io/pub/v/sealed_annotations.svg?color=blue&label=sealed_annotations)](https://pub.dev/packages/sealed_annotations) -[![pub](https://img.shields.io/pub/v/sealed_generators.svg?color=blue&label=sealed_generators)](https://pub.dev/packages/sealed_generators) -[![pub](https://img.shields.io/pub/v/sealed_writer.svg?color=blue&label=sealed_writer)](https://pub.dev/packages/sealed_writer) +[![pub](https://img.shields.io/badge/sealed__annotations-v2.0.0-blue)](https://github.com/FatulM/dart_sealed/tree/master/sealed_annotations) +[![pub](https://img.shields.io/badge/sealed__generators-v2.0.0-blue)](https://github.com/FatulM/dart_sealed/tree/master/sealed_generators) +[![version](https://img.shields.io/badge/sealed__writer-v2.0.0-blue)](https://github.com/FatulM/dart_sealed/tree/master/sealed_writer) Generate sealed class hierarchy for Dart and Flutter. diff --git a/sealed_annotations/README.md b/sealed_annotations/README.md index ad5ee1cb..01401559 100644 --- a/sealed_annotations/README.md +++ b/sealed_annotations/README.md @@ -2,9 +2,9 @@ [![build](https://img.shields.io/github/actions/workflow/status/FatulM/dart_sealed/.github/workflows/dart.yml?branch=master&label=build)](https://github.com/FatulM/dart_sealed/actions/workflows/dart.yml) [![build](https://img.shields.io/codecov/c/gh/FatulM/dart_sealed?label=coverage)](https://codecov.io/gh/FatulM/dart_sealed) -[![pub](https://img.shields.io/pub/v/sealed_annotations.svg?color=blue&label=sealed_annotations)](https://pub.dev/packages/sealed_annotations) -[![pub](https://img.shields.io/pub/v/sealed_generators.svg?color=blue&label=sealed_generators)](https://pub.dev/packages/sealed_generators) -[![pub](https://img.shields.io/pub/v/sealed_writer.svg?color=blue&label=sealed_writer)](https://pub.dev/packages/sealed_writer) +[![pub](https://img.shields.io/badge/sealed__annotations-v2.0.0-blue)](https://github.com/FatulM/dart_sealed/tree/master/sealed_annotations) +[![pub](https://img.shields.io/badge/sealed__generators-v2.0.0-blue)](https://github.com/FatulM/dart_sealed/tree/master/sealed_generators) +[![version](https://img.shields.io/badge/sealed__writer-v2.0.0-blue)](https://github.com/FatulM/dart_sealed/tree/master/sealed_writer) Generate sealed class hierarchy for Dart and Flutter. diff --git a/sealed_annotations/example/README.md b/sealed_annotations/example/README.md index ad5ee1cb..01401559 100644 --- a/sealed_annotations/example/README.md +++ b/sealed_annotations/example/README.md @@ -2,9 +2,9 @@ [![build](https://img.shields.io/github/actions/workflow/status/FatulM/dart_sealed/.github/workflows/dart.yml?branch=master&label=build)](https://github.com/FatulM/dart_sealed/actions/workflows/dart.yml) [![build](https://img.shields.io/codecov/c/gh/FatulM/dart_sealed?label=coverage)](https://codecov.io/gh/FatulM/dart_sealed) -[![pub](https://img.shields.io/pub/v/sealed_annotations.svg?color=blue&label=sealed_annotations)](https://pub.dev/packages/sealed_annotations) -[![pub](https://img.shields.io/pub/v/sealed_generators.svg?color=blue&label=sealed_generators)](https://pub.dev/packages/sealed_generators) -[![pub](https://img.shields.io/pub/v/sealed_writer.svg?color=blue&label=sealed_writer)](https://pub.dev/packages/sealed_writer) +[![pub](https://img.shields.io/badge/sealed__annotations-v2.0.0-blue)](https://github.com/FatulM/dart_sealed/tree/master/sealed_annotations) +[![pub](https://img.shields.io/badge/sealed__generators-v2.0.0-blue)](https://github.com/FatulM/dart_sealed/tree/master/sealed_generators) +[![version](https://img.shields.io/badge/sealed__writer-v2.0.0-blue)](https://github.com/FatulM/dart_sealed/tree/master/sealed_writer) Generate sealed class hierarchy for Dart and Flutter. diff --git a/sealed_generators/README.md b/sealed_generators/README.md index ad5ee1cb..01401559 100644 --- a/sealed_generators/README.md +++ b/sealed_generators/README.md @@ -2,9 +2,9 @@ [![build](https://img.shields.io/github/actions/workflow/status/FatulM/dart_sealed/.github/workflows/dart.yml?branch=master&label=build)](https://github.com/FatulM/dart_sealed/actions/workflows/dart.yml) [![build](https://img.shields.io/codecov/c/gh/FatulM/dart_sealed?label=coverage)](https://codecov.io/gh/FatulM/dart_sealed) -[![pub](https://img.shields.io/pub/v/sealed_annotations.svg?color=blue&label=sealed_annotations)](https://pub.dev/packages/sealed_annotations) -[![pub](https://img.shields.io/pub/v/sealed_generators.svg?color=blue&label=sealed_generators)](https://pub.dev/packages/sealed_generators) -[![pub](https://img.shields.io/pub/v/sealed_writer.svg?color=blue&label=sealed_writer)](https://pub.dev/packages/sealed_writer) +[![pub](https://img.shields.io/badge/sealed__annotations-v2.0.0-blue)](https://github.com/FatulM/dart_sealed/tree/master/sealed_annotations) +[![pub](https://img.shields.io/badge/sealed__generators-v2.0.0-blue)](https://github.com/FatulM/dart_sealed/tree/master/sealed_generators) +[![version](https://img.shields.io/badge/sealed__writer-v2.0.0-blue)](https://github.com/FatulM/dart_sealed/tree/master/sealed_writer) Generate sealed class hierarchy for Dart and Flutter. diff --git a/sealed_generators/example/README.md b/sealed_generators/example/README.md index ad5ee1cb..01401559 100644 --- a/sealed_generators/example/README.md +++ b/sealed_generators/example/README.md @@ -2,9 +2,9 @@ [![build](https://img.shields.io/github/actions/workflow/status/FatulM/dart_sealed/.github/workflows/dart.yml?branch=master&label=build)](https://github.com/FatulM/dart_sealed/actions/workflows/dart.yml) [![build](https://img.shields.io/codecov/c/gh/FatulM/dart_sealed?label=coverage)](https://codecov.io/gh/FatulM/dart_sealed) -[![pub](https://img.shields.io/pub/v/sealed_annotations.svg?color=blue&label=sealed_annotations)](https://pub.dev/packages/sealed_annotations) -[![pub](https://img.shields.io/pub/v/sealed_generators.svg?color=blue&label=sealed_generators)](https://pub.dev/packages/sealed_generators) -[![pub](https://img.shields.io/pub/v/sealed_writer.svg?color=blue&label=sealed_writer)](https://pub.dev/packages/sealed_writer) +[![pub](https://img.shields.io/badge/sealed__annotations-v2.0.0-blue)](https://github.com/FatulM/dart_sealed/tree/master/sealed_annotations) +[![pub](https://img.shields.io/badge/sealed__generators-v2.0.0-blue)](https://github.com/FatulM/dart_sealed/tree/master/sealed_generators) +[![version](https://img.shields.io/badge/sealed__writer-v2.0.0-blue)](https://github.com/FatulM/dart_sealed/tree/master/sealed_writer) Generate sealed class hierarchy for Dart and Flutter. diff --git a/sealed_writer/README.md b/sealed_writer/README.md index ad5ee1cb..01401559 100644 --- a/sealed_writer/README.md +++ b/sealed_writer/README.md @@ -2,9 +2,9 @@ [![build](https://img.shields.io/github/actions/workflow/status/FatulM/dart_sealed/.github/workflows/dart.yml?branch=master&label=build)](https://github.com/FatulM/dart_sealed/actions/workflows/dart.yml) [![build](https://img.shields.io/codecov/c/gh/FatulM/dart_sealed?label=coverage)](https://codecov.io/gh/FatulM/dart_sealed) -[![pub](https://img.shields.io/pub/v/sealed_annotations.svg?color=blue&label=sealed_annotations)](https://pub.dev/packages/sealed_annotations) -[![pub](https://img.shields.io/pub/v/sealed_generators.svg?color=blue&label=sealed_generators)](https://pub.dev/packages/sealed_generators) -[![pub](https://img.shields.io/pub/v/sealed_writer.svg?color=blue&label=sealed_writer)](https://pub.dev/packages/sealed_writer) +[![pub](https://img.shields.io/badge/sealed__annotations-v2.0.0-blue)](https://github.com/FatulM/dart_sealed/tree/master/sealed_annotations) +[![pub](https://img.shields.io/badge/sealed__generators-v2.0.0-blue)](https://github.com/FatulM/dart_sealed/tree/master/sealed_generators) +[![version](https://img.shields.io/badge/sealed__writer-v2.0.0-blue)](https://github.com/FatulM/dart_sealed/tree/master/sealed_writer) Generate sealed class hierarchy for Dart and Flutter. diff --git a/sealed_writer/example/README.md b/sealed_writer/example/README.md index ad5ee1cb..01401559 100644 --- a/sealed_writer/example/README.md +++ b/sealed_writer/example/README.md @@ -2,9 +2,9 @@ [![build](https://img.shields.io/github/actions/workflow/status/FatulM/dart_sealed/.github/workflows/dart.yml?branch=master&label=build)](https://github.com/FatulM/dart_sealed/actions/workflows/dart.yml) [![build](https://img.shields.io/codecov/c/gh/FatulM/dart_sealed?label=coverage)](https://codecov.io/gh/FatulM/dart_sealed) -[![pub](https://img.shields.io/pub/v/sealed_annotations.svg?color=blue&label=sealed_annotations)](https://pub.dev/packages/sealed_annotations) -[![pub](https://img.shields.io/pub/v/sealed_generators.svg?color=blue&label=sealed_generators)](https://pub.dev/packages/sealed_generators) -[![pub](https://img.shields.io/pub/v/sealed_writer.svg?color=blue&label=sealed_writer)](https://pub.dev/packages/sealed_writer) +[![pub](https://img.shields.io/badge/sealed__annotations-v2.0.0-blue)](https://github.com/FatulM/dart_sealed/tree/master/sealed_annotations) +[![pub](https://img.shields.io/badge/sealed__generators-v2.0.0-blue)](https://github.com/FatulM/dart_sealed/tree/master/sealed_generators) +[![version](https://img.shields.io/badge/sealed__writer-v2.0.0-blue)](https://github.com/FatulM/dart_sealed/tree/master/sealed_writer) Generate sealed class hierarchy for Dart and Flutter. From 4aaf2f2d5833ed76510685f588e742abe4831273 Mon Sep 17 00:00:00 2001 From: Amirreza Madani Date: Wed, 16 Apr 2025 11:36:22 +0330 Subject: [PATCH 17/21] doc(all): update changelog --- CHANGELOG.md | 2 +- example/CHANGELOG.md | 2 +- sealed_annotations/CHANGELOG.md | 2 +- sealed_generators/CHANGELOG.md | 2 +- sealed_writer/CHANGELOG.md | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cadf6a3f..1fba92ae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ ## 2.0.0 -- Migrate dart analyzer +- TODO ## 1.14.0 diff --git a/example/CHANGELOG.md b/example/CHANGELOG.md index cadf6a3f..1fba92ae 100644 --- a/example/CHANGELOG.md +++ b/example/CHANGELOG.md @@ -1,6 +1,6 @@ ## 2.0.0 -- Migrate dart analyzer +- TODO ## 1.14.0 diff --git a/sealed_annotations/CHANGELOG.md b/sealed_annotations/CHANGELOG.md index cadf6a3f..1fba92ae 100644 --- a/sealed_annotations/CHANGELOG.md +++ b/sealed_annotations/CHANGELOG.md @@ -1,6 +1,6 @@ ## 2.0.0 -- Migrate dart analyzer +- TODO ## 1.14.0 diff --git a/sealed_generators/CHANGELOG.md b/sealed_generators/CHANGELOG.md index cadf6a3f..1fba92ae 100644 --- a/sealed_generators/CHANGELOG.md +++ b/sealed_generators/CHANGELOG.md @@ -1,6 +1,6 @@ ## 2.0.0 -- Migrate dart analyzer +- TODO ## 1.14.0 diff --git a/sealed_writer/CHANGELOG.md b/sealed_writer/CHANGELOG.md index cadf6a3f..1fba92ae 100644 --- a/sealed_writer/CHANGELOG.md +++ b/sealed_writer/CHANGELOG.md @@ -1,6 +1,6 @@ ## 2.0.0 -- Migrate dart analyzer +- TODO ## 1.14.0 From e80db0b5ff422f63756467f88df3416062eab6ca Mon Sep 17 00:00:00 2001 From: Amirreza Madani Date: Wed, 16 Apr 2025 16:42:01 +0330 Subject: [PATCH 18/21] doc(all): update readme --- README.md | 36 ++++++++++++++++++++++++++-- example/README.md | 36 ++++++++++++++++++++++++++-- sealed_annotations/README.md | 36 ++++++++++++++++++++++++++-- sealed_annotations/example/README.md | 36 ++++++++++++++++++++++++++-- sealed_generators/README.md | 36 ++++++++++++++++++++++++++-- sealed_generators/example/README.md | 36 ++++++++++++++++++++++++++-- sealed_writer/README.md | 36 ++++++++++++++++++++++++++-- sealed_writer/example/README.md | 36 ++++++++++++++++++++++++++-- 8 files changed, 272 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 01401559..cff7af66 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,9 @@ Generate sealed class hierarchy for Dart and Flutter. +**NOTE** that this is only a clone of the upstream git repository +which I have fixed some issues and updated some dependencies. + ## Features * Generate sealed class with abstract super type and data subclasses. @@ -26,12 +29,41 @@ Generate sealed class hierarchy for Dart and Flutter. Add dependencies in your `pubspec.yaml` file. +Since this is not the original repository, you can not use like this: + +```yaml +# WON'T WORK LIKE THIS: +dependencies: + sealed_annotations: '2.0.0' + +dev_dependencies: + sealed_generators: '2.0.0' +``` + +Instead, use like this: + +This will override the three dependencies to be downloaded from git. + ```yaml dependencies: - sealed_annotations: ^latest.version + sealed_annotations: '2.0.0' dev_dependencies: - sealed_generators: ^latest.version + sealed_generators: '2.0.0' + +dependency_overrides: + sealed_annotations: + git: + url: https://github.com/FatulM/dart_sealed + path: sealed_annotations/ + sealed_writer: + git: + url: https://github.com/FatulM/dart_sealed + path: sealed_writer/ + sealed_generators: + git: + url: https://github.com/FatulM/dart_sealed + path: sealed_generators/ ``` Import `sealed_annotations`. diff --git a/example/README.md b/example/README.md index 01401559..cff7af66 100644 --- a/example/README.md +++ b/example/README.md @@ -8,6 +8,9 @@ Generate sealed class hierarchy for Dart and Flutter. +**NOTE** that this is only a clone of the upstream git repository +which I have fixed some issues and updated some dependencies. + ## Features * Generate sealed class with abstract super type and data subclasses. @@ -26,12 +29,41 @@ Generate sealed class hierarchy for Dart and Flutter. Add dependencies in your `pubspec.yaml` file. +Since this is not the original repository, you can not use like this: + +```yaml +# WON'T WORK LIKE THIS: +dependencies: + sealed_annotations: '2.0.0' + +dev_dependencies: + sealed_generators: '2.0.0' +``` + +Instead, use like this: + +This will override the three dependencies to be downloaded from git. + ```yaml dependencies: - sealed_annotations: ^latest.version + sealed_annotations: '2.0.0' dev_dependencies: - sealed_generators: ^latest.version + sealed_generators: '2.0.0' + +dependency_overrides: + sealed_annotations: + git: + url: https://github.com/FatulM/dart_sealed + path: sealed_annotations/ + sealed_writer: + git: + url: https://github.com/FatulM/dart_sealed + path: sealed_writer/ + sealed_generators: + git: + url: https://github.com/FatulM/dart_sealed + path: sealed_generators/ ``` Import `sealed_annotations`. diff --git a/sealed_annotations/README.md b/sealed_annotations/README.md index 01401559..cff7af66 100644 --- a/sealed_annotations/README.md +++ b/sealed_annotations/README.md @@ -8,6 +8,9 @@ Generate sealed class hierarchy for Dart and Flutter. +**NOTE** that this is only a clone of the upstream git repository +which I have fixed some issues and updated some dependencies. + ## Features * Generate sealed class with abstract super type and data subclasses. @@ -26,12 +29,41 @@ Generate sealed class hierarchy for Dart and Flutter. Add dependencies in your `pubspec.yaml` file. +Since this is not the original repository, you can not use like this: + +```yaml +# WON'T WORK LIKE THIS: +dependencies: + sealed_annotations: '2.0.0' + +dev_dependencies: + sealed_generators: '2.0.0' +``` + +Instead, use like this: + +This will override the three dependencies to be downloaded from git. + ```yaml dependencies: - sealed_annotations: ^latest.version + sealed_annotations: '2.0.0' dev_dependencies: - sealed_generators: ^latest.version + sealed_generators: '2.0.0' + +dependency_overrides: + sealed_annotations: + git: + url: https://github.com/FatulM/dart_sealed + path: sealed_annotations/ + sealed_writer: + git: + url: https://github.com/FatulM/dart_sealed + path: sealed_writer/ + sealed_generators: + git: + url: https://github.com/FatulM/dart_sealed + path: sealed_generators/ ``` Import `sealed_annotations`. diff --git a/sealed_annotations/example/README.md b/sealed_annotations/example/README.md index 01401559..cff7af66 100644 --- a/sealed_annotations/example/README.md +++ b/sealed_annotations/example/README.md @@ -8,6 +8,9 @@ Generate sealed class hierarchy for Dart and Flutter. +**NOTE** that this is only a clone of the upstream git repository +which I have fixed some issues and updated some dependencies. + ## Features * Generate sealed class with abstract super type and data subclasses. @@ -26,12 +29,41 @@ Generate sealed class hierarchy for Dart and Flutter. Add dependencies in your `pubspec.yaml` file. +Since this is not the original repository, you can not use like this: + +```yaml +# WON'T WORK LIKE THIS: +dependencies: + sealed_annotations: '2.0.0' + +dev_dependencies: + sealed_generators: '2.0.0' +``` + +Instead, use like this: + +This will override the three dependencies to be downloaded from git. + ```yaml dependencies: - sealed_annotations: ^latest.version + sealed_annotations: '2.0.0' dev_dependencies: - sealed_generators: ^latest.version + sealed_generators: '2.0.0' + +dependency_overrides: + sealed_annotations: + git: + url: https://github.com/FatulM/dart_sealed + path: sealed_annotations/ + sealed_writer: + git: + url: https://github.com/FatulM/dart_sealed + path: sealed_writer/ + sealed_generators: + git: + url: https://github.com/FatulM/dart_sealed + path: sealed_generators/ ``` Import `sealed_annotations`. diff --git a/sealed_generators/README.md b/sealed_generators/README.md index 01401559..cff7af66 100644 --- a/sealed_generators/README.md +++ b/sealed_generators/README.md @@ -8,6 +8,9 @@ Generate sealed class hierarchy for Dart and Flutter. +**NOTE** that this is only a clone of the upstream git repository +which I have fixed some issues and updated some dependencies. + ## Features * Generate sealed class with abstract super type and data subclasses. @@ -26,12 +29,41 @@ Generate sealed class hierarchy for Dart and Flutter. Add dependencies in your `pubspec.yaml` file. +Since this is not the original repository, you can not use like this: + +```yaml +# WON'T WORK LIKE THIS: +dependencies: + sealed_annotations: '2.0.0' + +dev_dependencies: + sealed_generators: '2.0.0' +``` + +Instead, use like this: + +This will override the three dependencies to be downloaded from git. + ```yaml dependencies: - sealed_annotations: ^latest.version + sealed_annotations: '2.0.0' dev_dependencies: - sealed_generators: ^latest.version + sealed_generators: '2.0.0' + +dependency_overrides: + sealed_annotations: + git: + url: https://github.com/FatulM/dart_sealed + path: sealed_annotations/ + sealed_writer: + git: + url: https://github.com/FatulM/dart_sealed + path: sealed_writer/ + sealed_generators: + git: + url: https://github.com/FatulM/dart_sealed + path: sealed_generators/ ``` Import `sealed_annotations`. diff --git a/sealed_generators/example/README.md b/sealed_generators/example/README.md index 01401559..cff7af66 100644 --- a/sealed_generators/example/README.md +++ b/sealed_generators/example/README.md @@ -8,6 +8,9 @@ Generate sealed class hierarchy for Dart and Flutter. +**NOTE** that this is only a clone of the upstream git repository +which I have fixed some issues and updated some dependencies. + ## Features * Generate sealed class with abstract super type and data subclasses. @@ -26,12 +29,41 @@ Generate sealed class hierarchy for Dart and Flutter. Add dependencies in your `pubspec.yaml` file. +Since this is not the original repository, you can not use like this: + +```yaml +# WON'T WORK LIKE THIS: +dependencies: + sealed_annotations: '2.0.0' + +dev_dependencies: + sealed_generators: '2.0.0' +``` + +Instead, use like this: + +This will override the three dependencies to be downloaded from git. + ```yaml dependencies: - sealed_annotations: ^latest.version + sealed_annotations: '2.0.0' dev_dependencies: - sealed_generators: ^latest.version + sealed_generators: '2.0.0' + +dependency_overrides: + sealed_annotations: + git: + url: https://github.com/FatulM/dart_sealed + path: sealed_annotations/ + sealed_writer: + git: + url: https://github.com/FatulM/dart_sealed + path: sealed_writer/ + sealed_generators: + git: + url: https://github.com/FatulM/dart_sealed + path: sealed_generators/ ``` Import `sealed_annotations`. diff --git a/sealed_writer/README.md b/sealed_writer/README.md index 01401559..cff7af66 100644 --- a/sealed_writer/README.md +++ b/sealed_writer/README.md @@ -8,6 +8,9 @@ Generate sealed class hierarchy for Dart and Flutter. +**NOTE** that this is only a clone of the upstream git repository +which I have fixed some issues and updated some dependencies. + ## Features * Generate sealed class with abstract super type and data subclasses. @@ -26,12 +29,41 @@ Generate sealed class hierarchy for Dart and Flutter. Add dependencies in your `pubspec.yaml` file. +Since this is not the original repository, you can not use like this: + +```yaml +# WON'T WORK LIKE THIS: +dependencies: + sealed_annotations: '2.0.0' + +dev_dependencies: + sealed_generators: '2.0.0' +``` + +Instead, use like this: + +This will override the three dependencies to be downloaded from git. + ```yaml dependencies: - sealed_annotations: ^latest.version + sealed_annotations: '2.0.0' dev_dependencies: - sealed_generators: ^latest.version + sealed_generators: '2.0.0' + +dependency_overrides: + sealed_annotations: + git: + url: https://github.com/FatulM/dart_sealed + path: sealed_annotations/ + sealed_writer: + git: + url: https://github.com/FatulM/dart_sealed + path: sealed_writer/ + sealed_generators: + git: + url: https://github.com/FatulM/dart_sealed + path: sealed_generators/ ``` Import `sealed_annotations`. diff --git a/sealed_writer/example/README.md b/sealed_writer/example/README.md index 01401559..cff7af66 100644 --- a/sealed_writer/example/README.md +++ b/sealed_writer/example/README.md @@ -8,6 +8,9 @@ Generate sealed class hierarchy for Dart and Flutter. +**NOTE** that this is only a clone of the upstream git repository +which I have fixed some issues and updated some dependencies. + ## Features * Generate sealed class with abstract super type and data subclasses. @@ -26,12 +29,41 @@ Generate sealed class hierarchy for Dart and Flutter. Add dependencies in your `pubspec.yaml` file. +Since this is not the original repository, you can not use like this: + +```yaml +# WON'T WORK LIKE THIS: +dependencies: + sealed_annotations: '2.0.0' + +dev_dependencies: + sealed_generators: '2.0.0' +``` + +Instead, use like this: + +This will override the three dependencies to be downloaded from git. + ```yaml dependencies: - sealed_annotations: ^latest.version + sealed_annotations: '2.0.0' dev_dependencies: - sealed_generators: ^latest.version + sealed_generators: '2.0.0' + +dependency_overrides: + sealed_annotations: + git: + url: https://github.com/FatulM/dart_sealed + path: sealed_annotations/ + sealed_writer: + git: + url: https://github.com/FatulM/dart_sealed + path: sealed_writer/ + sealed_generators: + git: + url: https://github.com/FatulM/dart_sealed + path: sealed_generators/ ``` Import `sealed_annotations`. From 8edd337154ff3cbbb02ce47b8dab5d3d830d3239 Mon Sep 17 00:00:00 2001 From: Amirreza Madani Date: Wed, 16 Apr 2025 16:49:26 +0330 Subject: [PATCH 19/21] ci(all): fix coverage --- .tools/coverage | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.tools/coverage b/.tools/coverage index 98a844b5..86871779 100755 --- a/.tools/coverage +++ b/.tools/coverage @@ -12,19 +12,19 @@ rm coverage/lcov.info 2>NUL echo NOTE sealed_annotations pushd sealed_annotations || exit 1 dart test --coverage dart_coverage || exit 1 -dart pub global run coverage:format_coverage -i dart_coverage -o coverage/lcov.info --lcov --packages .packages --report-on lib || exit 1 +dart pub global run coverage:format_coverage -i dart_coverage -o coverage/lcov.info --lcov --packages=.dart_tool/package_config.json --report-on lib || exit 1 popd || exit 1 echo NOTE sealed_writer pushd sealed_writer || exit 1 dart test --coverage dart_coverage || exit 1 -dart pub global run coverage:format_coverage -i dart_coverage -o coverage/lcov.info --lcov --packages .packages --report-on lib || exit 1 +dart pub global run coverage:format_coverage -i dart_coverage -o coverage/lcov.info --lcov --packages=.dart_tool/package_config.json --report-on lib || exit 1 popd || exit 1 echo NOTE sealed_generators pushd sealed_generators || exit 1 dart test --coverage dart_coverage || exit 1 -dart pub global run coverage:format_coverage -i dart_coverage -o coverage/lcov.info --lcov --packages .packages --report-on lib || exit 1 +dart pub global run coverage:format_coverage -i dart_coverage -o coverage/lcov.info --lcov --packages=.dart_tool/package_config.json --report-on lib || exit 1 popd || exit 1 echo NOTE combining coverage From 9f919e139fcc01a76dcbb9095172977a474db446 Mon Sep 17 00:00:00 2001 From: Amirreza Madani Date: Wed, 16 Apr 2025 16:50:11 +0330 Subject: [PATCH 20/21] ci(all): fix coverage --- .tools/coverage.bat | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.tools/coverage.bat b/.tools/coverage.bat index 049361c2..f8acd07c 100755 --- a/.tools/coverage.bat +++ b/.tools/coverage.bat @@ -12,19 +12,19 @@ del coverage\lcov.info 2> NUL echo NOTE sealed_annotations pushd sealed_annotations || exit 1 call dart test --coverage dart_coverage || exit 1 -call dart pub global run coverage:format_coverage -i dart_coverage -o coverage/lcov.info --lcov --packages .packages --report-on lib || exit 1 +call dart pub global run coverage:format_coverage -i dart_coverage -o coverage/lcov.info --lcov --packages=.dart_tool/package_config.json --report-on lib || exit 1 popd || exit 1 echo NOTE sealed_writer pushd sealed_writer || exit 1 call dart test --coverage dart_coverage || exit 1 -call dart pub global run coverage:format_coverage -i dart_coverage -o coverage/lcov.info --lcov --packages .packages --report-on lib || exit 1 +call dart pub global run coverage:format_coverage -i dart_coverage -o coverage/lcov.info --lcov --packages=.dart_tool/package_config.json --report-on lib || exit 1 popd || exit 1 echo NOTE sealed_generators pushd sealed_generators || exit 1 call dart test --coverage dart_coverage || exit 1 -call dart pub global run coverage:format_coverage -i dart_coverage -o coverage/lcov.info --lcov --packages .packages --report-on lib || exit 1 +call dart pub global run coverage:format_coverage -i dart_coverage -o coverage/lcov.info --lcov --packages=.dart_tool/package_config.json --report-on lib || exit 1 popd || exit 1 echo NOTE combining coverage From a4a5687cbe6562f4d34fca364f273cf14728fe03 Mon Sep 17 00:00:00 2001 From: Amirreza Madani Date: Wed, 16 Apr 2025 16:57:17 +0330 Subject: [PATCH 21/21] ci(all): fix codecov --- .github/workflows/dart.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index 8c0e5dbc..20ac41c0 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -41,7 +41,7 @@ jobs: - name: coverage run: .tools/coverage - name: upload coverage to codecov - uses: codecov/codecov-action@v1 + uses: codecov/codecov-action@v5 with: token: ${{ secrets.CODECOV_TOKEN }} files: coverage/lcov.info