Skip to content

Commit 2f9c41d

Browse files
authored
eng: release v4 (#544)
1 parent 331ddef commit 2f9c41d

File tree

191 files changed

+4770
-3452
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

191 files changed

+4770
-3452
lines changed

analysis_options.yaml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@ include: package:lints/recommended.yaml
33
linter:
44
rules:
55
# This list is derived from the list of all available lints located at
6-
# https://github.com/dart-lang/linter/blob/master/example/all.yaml
6+
# https://github.com/dart-lang/sdk/blob/main/pkg/linter/example/all.yaml
77
- always_declare_return_types
88
# - always_put_control_body_on_new_line
99
# - always_put_required_named_parameters_first
1010
# - always_specify_types
1111
- always_use_package_imports
1212
- annotate_overrides
13+
- annotate_redeclares
1314
# - avoid_annotating_with_dynamic
1415
- avoid_bool_literals_in_conditional_expressions
1516
# - avoid_catches_without_on_clauses
@@ -23,6 +24,7 @@ linter:
2324
- avoid_field_initializers_in_const_classes
2425
# - avoid_final_parameters
2526
- avoid_function_literals_in_foreach_calls
27+
- avoid_futureor_void
2628
- avoid_implementing_value_types
2729
- avoid_init_to_null
2830
- avoid_js_rounded_ints
@@ -70,6 +72,7 @@ linter:
7072
- directives_ordering
7173
- discarded_futures
7274
- do_not_use_environment
75+
# - document_ignores
7376
- empty_catches
7477
- empty_constructor_bodies
7578
- empty_statements
@@ -82,6 +85,7 @@ linter:
8285
- implicit_call_tearoffs
8386
- implicit_reopen
8487
- invalid_case_patterns
88+
- invalid_runtime_check_with_js_interop_types
8589
- join_return_with_assignment
8690
# - leading_newlines_in_multiline_strings
8791
- library_annotations
@@ -91,6 +95,7 @@ linter:
9195
# - lines_longer_than_80_chars
9296
- literal_only_boolean_expressions
9397
- matching_super_parameters
98+
- missing_code_block_language_in_doc_comment
9499
- missing_whitespace_between_adjacent_strings
95100
- no_adjacent_strings_in_list
96101
- no_default_cases
@@ -107,10 +112,11 @@ linter:
107112
- null_check_on_nullable_type_parameter
108113
- null_closures
109114
- omit_local_variable_types
115+
- omit_obvious_local_variable_types
116+
- omit_obvious_property_types
110117
- one_member_abstracts
111118
- only_throw_errors
112119
- overridden_fields
113-
- package_api_docs
114120
- package_names
115121
- package_prefixed_library_names
116122
- parameter_assignments
@@ -165,13 +171,18 @@ linter:
165171
# - sort_constructors_first
166172
- sort_pub_dependencies
167173
- sort_unnamed_constructors_first
174+
# - specify_nonobvious_local_variable_types
175+
# - specify_nonobvious_property_types
176+
# - strict_top_level_inference
168177
- test_types_in_equals
169178
- throw_in_finally
170179
- tighten_type_of_initializing_formals
171180
- type_annotate_public_apis
172181
- type_init_formals
173182
- type_literal_in_constant_pattern
174183
- unawaited_futures
184+
- unintended_html_in_doc_comment
185+
- unnecessary_async
175186
# - unnecessary_await_in_return
176187
- unnecessary_brace_in_string_interps
177188
- unnecessary_breaks
@@ -182,6 +193,7 @@ linter:
182193
- unnecessary_lambdas
183194
- unnecessary_late
184195
- unnecessary_library_directive
196+
- unnecessary_library_name
185197
- unnecessary_new
186198
- unnecessary_null_aware_assignments
187199
- unnecessary_null_aware_operator_on_extension_on_nullable
@@ -196,9 +208,10 @@ linter:
196208
- unnecessary_string_interpolations
197209
- unnecessary_this
198210
- unnecessary_to_list_in_spreads
211+
- unnecessary_underscores
199212
# - unreachable_from_main
200213
- unrelated_type_equality_checks
201-
- unsafe_html
214+
# - unsafe_variance
202215
- use_build_context_synchronously
203216
- use_colored_box
204217
- use_decorated_box
@@ -218,6 +231,7 @@ linter:
218231
- use_super_parameters
219232
- use_test_throws_matchers
220233
- use_to_and_as_if_applicable
234+
- use_truncating_division
221235
- valid_regexps
222236
- void_checks
223237

example_graphql/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ version: 0.1.0
66
publish_to: none
77

88
environment:
9-
sdk: ">=2.18.0 <4.0.0"
9+
sdk: ">=3.4.0 <4.0.0"
1010
flutter: ">=3.0.0"
1111

1212
dependencies:
@@ -23,7 +23,7 @@ dependency_overrides:
2323
dev_dependencies:
2424
brick_offline_first_with_graphql_build:
2525
path: ../packages/brick_offline_first_with_graphql_build
26-
26+
2727
build_runner: any
2828
shelf: ^1.1.0
2929

example_rest/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ version: 0.1.0
66
publish_to: none
77

88
environment:
9-
sdk: ">=2.18.0 <4.0.0"
9+
sdk: ">=3.4.0 <4.0.0"
1010
flutter: ">=3.0.0"
1111

1212
dependencies:
1313
flutter:
1414
sdk: flutter
1515
cupertino_icons: ^1.0.2
1616
sqflite: any
17-
17+
1818
dependency_overrides:
1919
brick_sqlite_generators:
2020
path: ../packages/brick_sqlite_generators

example_supabase/lib/main.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ class MyHomePage extends StatelessWidget {
4848
body: Container(
4949
padding: const EdgeInsets.all(20),
5050
child: FutureBuilder(
51+
// necesary future
5152
// ignore: discarded_futures
5253
future: Repository().get<Pizza>(),
5354
builder: (context, AsyncSnapshot<List<Pizza>> pizzaList) {

packages/brick_build/CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
## Unreleased
1+
## 4.0.0
2+
3+
- Dart minimum SDK is updated to `3.4.0`
4+
- All dependency restrictions are updated to include the minimum released version.
25

36
## 3.3.1
47

packages/brick_build/example/pubspec.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,12 @@ publish_to: none
55
version: 0.0.0
66

77
environment:
8-
sdk: ">=2.18.0 <4.0.0"
8+
sdk: ">=3.4.0 <4.0.0"
99

1010
dependencies:
1111
brick_build:
1212
path: ../
13+
14+
dependency_overrides:
15+
brick_core:
16+
path: ../../brick_core

packages/brick_build/lib/src/adapter_generator.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ import 'package:brick_build/src/serdes_generator.dart';
22
import 'package:dart_style/dart_style.dart' as dart_style;
33
import 'package:source_gen/source_gen.dart';
44

5-
final _formatter = dart_style.DartFormatter();
5+
final _formatter =
6+
dart_style.DartFormatter(languageVersion: dart_style.DartFormatter.latestLanguageVersion);
67

78
/// Given a model, outputs generated code to use as a Brick adapter.
89
class AdapterGenerator {

packages/brick_build/lib/src/serdes_generator.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ import 'package:dart_style/dart_style.dart' as dart_style;
99
import 'package:meta/meta.dart';
1010
import 'package:source_gen/source_gen.dart';
1111

12-
final _formatter = dart_style.DartFormatter();
12+
final _formatter =
13+
dart_style.DartFormatter(languageVersion: dart_style.DartFormatter.latestLanguageVersion);
1314

1415
/// A generator that converts raw input into Dart code or Dart code into raw input. Most
1516
/// [Provider]s will require a `SerdesGenerator` to help the Repository normalize data.
@@ -83,6 +84,7 @@ abstract class SerdesGenerator<FieldAnnotation extends FieldSerializable,
8384

8485
/// Avoid linter error on subsequent passes for the repository.
8586
/// For example, if repository has already been casted to `!` it should not be recast
87+
// ignore: omit_obvious_property_types
8688
bool repositoryHasBeenForceCast = false;
8789

8890
/// For example, `OfflineFirst`

packages/brick_build/lib/src/utils/fields_for_class.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,17 +76,17 @@ class _FieldSet implements Comparable<_FieldSet> {
7676
int compareTo(_FieldSet other) => _sortByLocation(sortField, other.sortField);
7777

7878
static int _sortByLocation(FieldElement a, FieldElement b) {
79-
final checkerA = TypeChecker.fromStatic((a.enclosingElement as ClassElement).thisType);
79+
final checkerA = TypeChecker.fromStatic((a.enclosingElement3 as ClassElement).thisType);
8080

81-
if (!checkerA.isExactly(b.enclosingElement)) {
81+
if (!checkerA.isExactly(b.enclosingElement3)) {
8282
// in this case, you want to prioritize the enclosingElement that is more "super".
83-
if (checkerA.isAssignableFrom(b.enclosingElement)) {
83+
if (checkerA.isAssignableFrom(b.enclosingElement3)) {
8484
return -1;
8585
}
8686

87-
final checkerB = TypeChecker.fromStatic((b.enclosingElement as ClassElement).thisType);
87+
final checkerB = TypeChecker.fromStatic((b.enclosingElement3 as ClassElement).thisType);
8888

89-
if (checkerB.isAssignableFrom(a.enclosingElement)) {
89+
if (checkerB.isAssignableFrom(a.enclosingElement3)) {
9090
return 1;
9191
}
9292
}

packages/brick_build/pubspec.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,21 @@ homepage: https://github.com/GetDutchie/brick/tree/main/packages/brick_build
44
issue_tracker: https://github.com/GetDutchie/brick/issues
55
repository: https://github.com/GetDutchie/brick
66

7-
version: 3.3.1
7+
version: 4.0.0
88

99
environment:
10-
sdk: ">=2.18.0 <4.0.0"
10+
sdk: ">=3.4.0 <4.0.0"
1111

1212
dependencies:
13-
analyzer: ">=6.0.0 <7.0.0"
14-
brick_core: ">=1.4.0 <2.0.0"
15-
build: ^2.3.0
16-
dart_style: ">=2.0.0 <3.0.0"
13+
analyzer: ">=6.11.0 <8.0.0"
14+
brick_core: ">=2.0.0 <3.0.0"
15+
build: ">=2.4.2 <3.0.0"
16+
dart_style: ">=3.0.0 <4.0.0"
1717
glob: ">=2.1.0 <3.0.0"
1818
logging: ">=1.0.0 <2.0.0"
1919
meta: ">=1.3.0 <2.0.0"
20-
path: ">=1.8.2 <2.0.0"
21-
source_gen: ^1.2.2
20+
path: ">=1.9.0 <2.0.0"
21+
source_gen: ">=1.5.0 <3.0.0"
2222

2323
dev_dependencies:
2424
brick_build_test:

0 commit comments

Comments
 (0)