diff --git a/packages/auth/CHANGELOG.md b/packages/auth/CHANGELOG.md index 0ec94e79..3c1df8fd 100644 --- a/packages/auth/CHANGELOG.md +++ b/packages/auth/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## 8.1.0 + +* Updated `lints` to 3.0.0 + ## 8.0.0 * Require Dart >= 3.0 diff --git a/packages/auth/pubspec.yaml b/packages/auth/pubspec.yaml index 7c8a3228..48dab1e8 100644 --- a/packages/auth/pubspec.yaml +++ b/packages/auth/pubspec.yaml @@ -1,6 +1,6 @@ name: angel3_auth description: A complete authentication plugin for Angel3. Includes support for stateless JWT tokens, Basic Auth, and more. -version: 8.0.0 +version: 8.1.0 homepage: https://angel3-framework.web.app/ repository: https://github.com/dukefirehawk/angel/tree/master/packages/auth environment: @@ -19,7 +19,7 @@ dev_dependencies: http: ^1.0.0 io: ^1.0.0 test: ^1.24.0 - lints: ^2.1.0 + lints: ^3.0.0 # dependency_overrides: # angel3_container: # path: ../container/angel_container diff --git a/packages/client/CHANGELOG.md b/packages/client/CHANGELOG.md index 42f2641f..f8b36933 100644 --- a/packages/client/CHANGELOG.md +++ b/packages/client/CHANGELOG.md @@ -1,5 +1,10 @@ # Change Log +## 8.1.0 + +* Updated `lints` to 3.0.0 +* Fixed linter warnings + ## 8.0.0 * Require Dart >= 3.0 diff --git a/packages/client/lib/io.dart b/packages/client/lib/io.dart index ffc3e5c9..49ab641a 100644 --- a/packages/client/lib/io.dart +++ b/packages/client/lib/io.dart @@ -48,8 +48,7 @@ class RestService extends BaseAngelService { final Type? type; - RestService(http.BaseClient client, BaseAngelClient app, url, this.type) - : super(client, app, url); + RestService(super.client, super.app, super.url, this.type); @override Data? deserialize(x) { diff --git a/packages/client/pubspec.yaml b/packages/client/pubspec.yaml index 504bda45..f0da0f01 100644 --- a/packages/client/pubspec.yaml +++ b/packages/client/pubspec.yaml @@ -1,5 +1,5 @@ name: angel3_client -version: 8.0.0 +version: 8.1.0 description: A browser, mobile and command line based client that supports querying Angel3 servers homepage: https://angel3-framework.web.app/ repository: https://github.com/dukefirehawk/angel/tree/master/packages/client @@ -24,7 +24,7 @@ dev_dependencies: build_runner: ^2.4.0 build_web_compilers: ^4.0.0 test: ^1.24.0 - lints: ^2.1.0 + lints: ^3.0.0 # dependency_overrides: # angel3_container: # path: ../container/angel_container diff --git a/packages/configuration/CHANGELOG.md b/packages/configuration/CHANGELOG.md index 2aaedd2c..65799ad9 100644 --- a/packages/configuration/CHANGELOG.md +++ b/packages/configuration/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## 8.1.0 + +* Updated `lints` to 3.0.0 + ## 8.0.0 * Require Dart >= 3.0 diff --git a/packages/configuration/pubspec.yaml b/packages/configuration/pubspec.yaml index 1463fe69..014abbbe 100644 --- a/packages/configuration/pubspec.yaml +++ b/packages/configuration/pubspec.yaml @@ -1,5 +1,5 @@ name: angel3_configuration -version: 8.0.0 +version: 8.1.0 description: Automatic YAML application configuration loader for Angel 3, with .env support. homepage: https://angel3-framework.web.app/ repository: https://github.com/dukefirehawk/angel/tree/master/packages/configuration @@ -14,7 +14,7 @@ dependencies: dev_dependencies: io: ^1.0.0 logging: ^1.2.0 - lints: ^2.1.0 + lints: ^3.0.0 belatuk_pretty_logging: ^6.0.0 test: ^1.24.0 # dependency_overrides: diff --git a/packages/container/angel_container/CHANGELOG.md b/packages/container/angel_container/CHANGELOG.md index ab260842..f64e521f 100644 --- a/packages/container/angel_container/CHANGELOG.md +++ b/packages/container/angel_container/CHANGELOG.md @@ -1,5 +1,10 @@ # Change Log +## 8.1.0 + +* Updated `lints` to 3.0.0 +* Fixed analyser warnings + ## 8.0.0 * Require Dart >= 3.0 diff --git a/packages/container/angel_container/pubspec.yaml b/packages/container/angel_container/pubspec.yaml index 3c0173e2..70146525 100644 --- a/packages/container/angel_container/pubspec.yaml +++ b/packages/container/angel_container/pubspec.yaml @@ -1,5 +1,5 @@ name: angel3_container -version: 8.0.0 +version: 8.1.0 description: Angel3 hierarchical DI container, and pluggable backends for reflection. homepage: https://angel3-framework.web.app/ repository: https://github.com/dukefirehawk/angel/tree/master/packages/container/angel_container @@ -10,4 +10,4 @@ dependencies: quiver: ^3.2.0 dev_dependencies: test: ^1.24.0 - lints: ^2.1.0 \ No newline at end of file + lints: ^3.0.0 \ No newline at end of file diff --git a/packages/container/angel_container/test/common.dart b/packages/container/angel_container/test/common.dart index 8bbe8169..9fa9f114 100644 --- a/packages/container/angel_container/test/common.dart +++ b/packages/container/angel_container/test/common.dart @@ -116,7 +116,7 @@ class Pokemon { } class KantoPokemon extends Pokemon { - KantoPokemon(String name, PokemonType type) : super(name, type); + KantoPokemon(super.name, super.type); } enum PokemonType { water, fire, grass, ice, poison, flying } diff --git a/packages/container/angel_container_generator/CHANGELOG.md b/packages/container/angel_container_generator/CHANGELOG.md index d832dc97..0163c343 100644 --- a/packages/container/angel_container_generator/CHANGELOG.md +++ b/packages/container/angel_container_generator/CHANGELOG.md @@ -1,5 +1,10 @@ # Change Log +## 8.1.0 + +* Updated `lints` to 3.0.0 +* Fixed analyser warnings + ## 8.0.0 * Require Dart >= 3.0 diff --git a/packages/container/angel_container_generator/README.md b/packages/container/angel_container_generator/README.md index 4762e5a0..c41399e9 100644 --- a/packages/container/angel_container_generator/README.md +++ b/packages/container/angel_container_generator/README.md @@ -5,7 +5,7 @@ [![Gitter](https://img.shields.io/gitter/room/angel_dart/discussion)](https://gitter.im/angel_dart/discussion) [![License](https://img.shields.io/github/license/dukefirehawk/angel)](https://github.com/dukefirehawk/angel/tree/master/packages/container/angel3_container_generator/LICENSE) -An alternative container for Angel3 that uses `reflectable` package instead of `dart:mirrors` for reflection. However, `reflectable` has much limited relfection capabilities when compared to `dart:mirrors`. +An alternative container for Angel3 that uses `reflectable` package instead of `dart:mirrors` for reflection. However, `reflectable` has more limited relfection capabilities when compared to `dart:mirrors`. ## Usage @@ -26,6 +26,7 @@ An alternative container for Angel3 that uses `reflectable` package instead of ` ## Known limitation +* `analyser` 6.x is not supported due to `reflectable` * Reflection on functions/closures is not supported * Reflection on private declarations is not supported * Reflection on generic type is not supported diff --git a/packages/container/angel_container_generator/example/main.reflectable.dart b/packages/container/angel_container_generator/example/main.reflectable.dart index 78da37c2..b274955a 100644 --- a/packages/container/angel_container_generator/example/main.reflectable.dart +++ b/packages/container/angel_container_generator/example/main.reflectable.dart @@ -426,7 +426,7 @@ final _data = { }, 4, 10, - const [], + const [15], const [], null, (o) => false, diff --git a/packages/container/angel_container_generator/pubspec.yaml b/packages/container/angel_container_generator/pubspec.yaml index c29fdf25..7505be7d 100644 --- a/packages/container/angel_container_generator/pubspec.yaml +++ b/packages/container/angel_container_generator/pubspec.yaml @@ -1,5 +1,5 @@ name: angel3_container_generator -version: 8.0.0 +version: 8.1.0 description: Codegen support for using pkg:reflectable with pkg:angel3_container. homepage: https://angel3-framework.web.app/ repository: https://github.com/dukefirehawk/angel/tree/master/packages/container/angel_container_generator @@ -12,7 +12,7 @@ dev_dependencies: build_runner: ^2.4.0 build_test: ^2.1.0 test: ^1.24.0 - lints: ^2.1.0 + lints: ^3.0.0 # dependency_overrides: # angel3_container: # path: ../angel_container diff --git a/packages/container/angel_container_generator/test/reflector_test.dart b/packages/container/angel_container_generator/test/reflector_test.dart index a4070dce..4db6965e 100644 --- a/packages/container/angel_container_generator/test/reflector_test.dart +++ b/packages/container/angel_container_generator/test/reflector_test.dart @@ -142,7 +142,7 @@ class Pokemon { @contained class KantoPokemon extends Pokemon { - KantoPokemon(String name, PokemonType type) : super(name, type); + KantoPokemon(super.name, super.type); } @contained diff --git a/packages/container/angel_container_generator/test/reflector_test.reflectable.dart b/packages/container/angel_container_generator/test/reflector_test.reflectable.dart index 1cd81134..73aae70f 100644 --- a/packages/container/angel_container_generator/test/reflector_test.reflectable.dart +++ b/packages/container/angel_container_generator/test/reflector_test.reflectable.dart @@ -641,7 +641,7 @@ final _data = { }, 2, 18, - const [], + const [23], const [], null, (o) => false, @@ -3598,7 +3598,7 @@ final _data = { null), r.ParameterMirrorImpl( r'name', - 134348806, + 134349830, 70, const prefix0.ContainedReflectable(), 15, @@ -3610,7 +3610,7 @@ final _data = { null), r.ParameterMirrorImpl( r'type', - 134348806, + 134349830, 70, const prefix0.ContainedReflectable(), 6, diff --git a/packages/framework/CHANGELOG.md b/packages/framework/CHANGELOG.md index a3097776..2579bc79 100644 --- a/packages/framework/CHANGELOG.md +++ b/packages/framework/CHANGELOG.md @@ -1,5 +1,10 @@ # Change Log +## 8.3.0 + +* Updated `lints` to 3.0.0 +* Fixed linter warnings + ## 8.2.0 * Add `addResponseHeader` to `AngelHttp` to add headers to HTTP default response diff --git a/packages/framework/lib/src/core/anonymous_service.dart b/packages/framework/lib/src/core/anonymous_service.dart index 6c6c3ef1..e43e4f25 100644 --- a/packages/framework/lib/src/core/anonymous_service.dart +++ b/packages/framework/lib/src/core/anonymous_service.dart @@ -1,6 +1,4 @@ import 'dart:async'; -import 'request_context.dart'; -import 'response_context.dart'; import 'service.dart'; /// An easy helper class to create one-off services without having to create an entire class. @@ -22,8 +20,7 @@ class AnonymousService extends Service { FutureOr Function(Id id, Data data, [Map? params])? update, FutureOr Function(Id id, [Map? params])? remove, - FutureOr Function(RequestContext, ResponseContext)? readData}) - : super(readData: readData) { + super.readData}) { _index = index; _read = read; _create = create; diff --git a/packages/framework/lib/src/core/injection.dart b/packages/framework/lib/src/core/injection.dart index b2027173..eb4a0b06 100644 --- a/packages/framework/lib/src/core/injection.dart +++ b/packages/framework/lib/src/core/injection.dart @@ -1,4 +1,4 @@ -part of angel_framework.http.request_context; +part of 'request_context.dart'; const List _primitiveTypes = [String, int, num, double, Null]; diff --git a/packages/framework/lib/src/core/metadata.dart b/packages/framework/lib/src/core/metadata.dart index dfe08a63..a96aac5a 100644 --- a/packages/framework/lib/src/core/metadata.dart +++ b/packages/framework/lib/src/core/metadata.dart @@ -141,40 +141,26 @@ class Parameter { /// Shortcut for declaring a request header [Parameter]. class Header extends Parameter { - const Header(String header, {match, defaultValue, bool required = true}) - : super( - header: header, - match: match, - defaultValue: defaultValue, - required: required); + const Header(String header, {super.match, super.defaultValue, super.required}) + : super(header: header); } /// Shortcut for declaring a request session [Parameter]. class Session extends Parameter { - const Session(String session, {match, defaultValue, bool required = true}) - : super( - session: session, - match: match, - defaultValue: defaultValue, - required: required); + const Session(String session, + {super.match, super.defaultValue, super.required}) + : super(session: session); } /// Shortcut for declaring a request query [Parameter]. class Query extends Parameter { - const Query(String query, {match, defaultValue, bool required = true}) - : super( - query: query, - match: match, - defaultValue: defaultValue, - required: required); + const Query(String query, {super.match, super.defaultValue, super.required}) + : super(query: query); } /// Shortcut for declaring a request cookie [Parameter]. class CookieValue extends Parameter { - const CookieValue(String cookie, {match, defaultValue, bool required = true}) - : super( - cookie: cookie, - match: match, - defaultValue: defaultValue, - required: required); + const CookieValue(String cookie, + {super.match, super.defaultValue, super.required}) + : super(cookie: cookie); } diff --git a/packages/framework/lib/src/http/angel_http.dart b/packages/framework/lib/src/http/angel_http.dart index f17a53af..8568acf3 100644 --- a/packages/framework/lib/src/http/angel_http.dart +++ b/packages/framework/lib/src/http/angel_http.dart @@ -26,8 +26,8 @@ class AngelHttp extends Driver= 3.0 diff --git a/packages/http_exception/pubspec.yaml b/packages/http_exception/pubspec.yaml index af7f7e6c..e5eec268 100644 --- a/packages/http_exception/pubspec.yaml +++ b/packages/http_exception/pubspec.yaml @@ -1,9 +1,9 @@ name: angel3_http_exception -version: 8.0.0 +version: 8.1.0 description: Exception class that can be serialized to JSON and serialized to clients. homepage: https://angel3-framework.web.app/ repository: https://github.com/dukefirehawk/angel/tree/master/packages/http_exception environment: sdk: '>=3.0.0 <4.0.0' dev_dependencies: - lints: ^2.1.0 \ No newline at end of file + lints: ^3.0.0 \ No newline at end of file diff --git a/packages/mock_request/CHANGELOG.md b/packages/mock_request/CHANGELOG.md index d8cc3705..0841f866 100644 --- a/packages/mock_request/CHANGELOG.md +++ b/packages/mock_request/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## 8.1.0 + +* Updated `lints` to 3.0.0 + ## 8.0.0 * Require Dart >= 3.0 diff --git a/packages/mock_request/pubspec.yaml b/packages/mock_request/pubspec.yaml index 1877fa34..993f522c 100644 --- a/packages/mock_request/pubspec.yaml +++ b/packages/mock_request/pubspec.yaml @@ -1,5 +1,5 @@ name: angel3_mock_request -version: 8.0.0 +version: 8.1.0 description: Manufacture dart:io HttpRequests, HttpResponses, HttpHeaders, etc. homepage: https://angel3-framework.web.app/ repository: https://github.com/dukefirehawk/angel/tree/master/packages/mock_request @@ -11,7 +11,7 @@ dev_dependencies: #angel3_framework: ^7.0.0 http: ^1.0.0 test: ^1.24.0 - lints: ^2.1.0 + lints: ^3.0.0 # dependency_overrides: # angel3_framework: # path: ../framework diff --git a/packages/model/CHANGELOG.md b/packages/model/CHANGELOG.md index a5d38134..40268768 100644 --- a/packages/model/CHANGELOG.md +++ b/packages/model/CHANGELOG.md @@ -1,5 +1,10 @@ # Change Log +## 8.1.0 + +* Updated `lints` to 3.0.0 +* Fixed analyser warnings + ## 8.0.0 * Require Dart >= 3.0 diff --git a/packages/model/example/main.dart b/packages/model/example/main.dart index 81e8f711..d01d5874 100644 --- a/packages/model/example/main.dart +++ b/packages/model/example/main.dart @@ -11,10 +11,9 @@ class Todo extends Model { bool isComplete; Todo( - {required String id, + {required String super.id, this.text, this.isComplete = false, - DateTime? createdAt, - DateTime? updatedAt}) - : super(id: id, createdAt: createdAt, updatedAt: updatedAt); + super.createdAt, + super.updatedAt}); } diff --git a/packages/model/pubspec.yaml b/packages/model/pubspec.yaml index 96e89e4d..ca75ee6d 100644 --- a/packages/model/pubspec.yaml +++ b/packages/model/pubspec.yaml @@ -1,9 +1,9 @@ name: angel3_model -version: 8.0.0 +version: 8.1.0 description: Angel3 basic data model class, no longer with the added weight of the whole framework. homepage: https://angel3-framework.web.app/ repository: https://github.com/dukefirehawk/angel/tree/master/packages/model environment: sdk: '>=3.0.0 <4.0.0' dev_dependencies: - lints: ^2.1.0 + lints: ^3.0.0 diff --git a/packages/orm/angel_orm_mysql/README.md b/packages/orm/angel_orm_mysql/README.md index 75211981..c16921ea 100644 --- a/packages/orm/angel_orm_mysql/README.md +++ b/packages/orm/angel_orm_mysql/README.md @@ -5,7 +5,7 @@ [![Gitter](https://img.shields.io/gitter/room/angel_dart/discussion)](https://gitter.im/angel_dart/discussion) [![License](https://img.shields.io/github/license/dukefirehawk/angel)](https://github.com/dukefirehawk/angel/tree/master/packages/orm/angel_orm_mysql/LICENSE) -This package contains the SQL executor required by Angel3 ORM to work with MySQL and MariaDB respectively. In order to better support both MySQL and MariaDB, two different flavors of drives have been included; `mysql_client` and `mysql1`. They are implmented as `MySqlExecutor` and `MariaDbExecutor` respectively. +This package contains the SQL executor required by Angel3 ORM to work with MySQL or MariaDB. In order to better support both MySQL and MariaDB, two different flavors of drives have been included; `mysql_client` and `mysql1`. They are implmented as `MySqlExecutor` and `MariaDbExecutor` respectively. ## Supported databases @@ -73,23 +73,23 @@ This SQL executor is implemented using [`mysql1`](https://pub.dev/packages?q=mys 1. Login to MariaDB/MySQL database console with the following command. -```bash - mysql -u root -p -``` + ```bash + mysql -u root -p + ``` -1. Run the following commands to create a new database, `orm_test` and grant both local and remote access to user, `test`. Replace `orm_test`, `test` and `test123` with your own database name, username and password respectively. +2. Run the following commands to create a new database, `orm_test`, and grant both local and remote access to user, `test`. Replace `orm_test`, `test` and `test123` with your own database name, username and password. -```mysql - create database orm_test; - - -- Granting localhost access only - create user 'test'@'localhost' identified by 'test123'; - grant all privileges on orm_test.* to 'test'@'localhost'; + ```mysql + create database orm_test; + + -- Granting localhost access only + create user 'test'@'localhost' identified by 'test123'; + grant all privileges on orm_test.* to 'test'@'localhost'; - -- Granting localhost and remote access - create user 'test'@'%' identified by 'test123'; - grant all privileges on orm_test.* to 'test'@'%'; -``` + -- Granting localhost and remote access + create user 'test'@'%' identified by 'test123'; + grant all privileges on orm_test.* to 'test'@'%'; + ``` ## Compatibility Matrix diff --git a/packages/production/lib/src/runner.dart b/packages/production/lib/src/runner.dart index 8d228fe1..7a7c4037 100644 --- a/packages/production/lib/src/runner.dart +++ b/packages/production/lib/src/runner.dart @@ -114,7 +114,6 @@ class Runner { onError: onError.sendPort, errorsAreFatal: true && false) .then((isolate) {}) - //.catchError(c.completeError); .catchError((e) { c.completeError(e as Object); return null; @@ -192,7 +191,8 @@ class Runner { server = Server([adapter]); // Register clients - for (var i = 0; i < Platform.numberOfProcessors; i++) { + // for (var i = 0; i < Platform.numberOfProcessors; i++) { + for (var i = 0; i < options.concurrency; i++) { server.registerClient(ClientInfo('client$i')); } @@ -248,13 +248,15 @@ class Runner { if (args.options.ssl || args.options.http2) { securityContext = SecurityContext(); - if (args.options.certificateFile != null) { - securityContext.useCertificateChain(args.options.certificateFile!, + var certificateFile = args.options.certificateFile; + if (certificateFile != null) { + securityContext.useCertificateChain(certificateFile, password: args.options.certificatePassword); } - if (args.options.keyFile != null) { - securityContext.usePrivateKey(args.options.keyFile!, + var keyFile = args.options.keyFile; + if (keyFile != null) { + securityContext.usePrivateKey(keyFile, password: args.options.keyPassword); } } diff --git a/packages/route/CHANGELOG.md b/packages/route/CHANGELOG.md index f6568936..96328050 100644 --- a/packages/route/CHANGELOG.md +++ b/packages/route/CHANGELOG.md @@ -1,5 +1,10 @@ # Change Log +## 8.1.0 + +* Updated `lints` to 3.0.0 +* Fixed analyser warnings + ## 8.0.0 * Require Dart >= 3.0 diff --git a/packages/route/lib/src/grammar.dart b/packages/route/lib/src/grammar.dart index f9c818e3..ecacb589 100644 --- a/packages/route/lib/src/grammar.dart +++ b/packages/route/lib/src/grammar.dart @@ -1,4 +1,4 @@ -part of angel3_route.src.router; +part of 'router.dart'; class RouteGrammar { static const String notSlashRgx = r'([^/]+)'; diff --git a/packages/route/lib/src/route.dart b/packages/route/lib/src/route.dart index 225bd479..08c99bc4 100644 --- a/packages/route/lib/src/route.dart +++ b/packages/route/lib/src/route.dart @@ -1,4 +1,4 @@ -part of angel3_route.src.router; +part of 'router.dart'; /// Represents a virtual location within an application. class Route { diff --git a/packages/route/lib/src/routing_result.dart b/packages/route/lib/src/routing_result.dart index 7bb7b830..50edfeae 100644 --- a/packages/route/lib/src/routing_result.dart +++ b/packages/route/lib/src/routing_result.dart @@ -1,4 +1,4 @@ -part of angel3_route.src.router; +part of 'router.dart'; /// Represents a complex result of navigating to a path. class RoutingResult { diff --git a/packages/route/lib/src/symlink_route.dart b/packages/route/lib/src/symlink_route.dart index 2ee87201..cf46966e 100644 --- a/packages/route/lib/src/symlink_route.dart +++ b/packages/route/lib/src/symlink_route.dart @@ -1,9 +1,8 @@ -part of angel3_route.src.router; +part of 'router.dart'; /// Placeholder [Route] to serve as a symbolic link /// to a mounted [Router]. class SymlinkRoute extends Route { final Router router; - SymlinkRoute(String path, this.router) - : super(path, method: 'GET', handlers: []); + SymlinkRoute(super.path, this.router) : super(method: 'GET', handlers: []); } diff --git a/packages/route/pubspec.yaml b/packages/route/pubspec.yaml index fec9b417..b53d7c7c 100644 --- a/packages/route/pubspec.yaml +++ b/packages/route/pubspec.yaml @@ -1,12 +1,12 @@ name: angel3_route -version: 8.0.0 +version: 8.1.0 description: A powerful, isomorphic routing library for Dart. It is mainly used in the Angel3 framework, but can be used in Flutter and on the Web. homepage: https://angel3-framework.web.app/ repository: https://github.com/dukefirehawk/angel/tree/master/packages/route environment: sdk: '>=3.0.0 <4.0.0' dependencies: - belatuk_combinator: ^5.0.0 + belatuk_combinator: ^5.1.0 string_scanner: ^1.2.0 path: ^1.8.0 dev_dependencies: @@ -14,4 +14,4 @@ dev_dependencies: build_web_compilers: ^4.0.0 http: ^1.0.0 test: ^1.24.0 - lints: ^2.1.0 + lints: ^3.0.0 diff --git a/packages/validate/CHANGELOG.md b/packages/validate/CHANGELOG.md index 31b2c328..cbccc5b5 100644 --- a/packages/validate/CHANGELOG.md +++ b/packages/validate/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## 8.1.0 + +* Updated `lints` to 3.0.0 + ## 8.0.2 * Fixed incorrect mismatch message handling diff --git a/packages/validate/pubspec.yaml b/packages/validate/pubspec.yaml index 44515cd3..3bc4a6da 100644 --- a/packages/validate/pubspec.yaml +++ b/packages/validate/pubspec.yaml @@ -1,6 +1,6 @@ name: angel3_validate description: Cross-platform HTTP request body validator library based on `matcher`. -version: 8.0.2 +version: 8.1.0 homepage: https://angel3-framework.web.app/ repository: https://github.com/dukefirehawk/angel/tree/master/packages/validate environment: @@ -14,7 +14,7 @@ dev_dependencies: build_runner: ^2.4.0 build_web_compilers: ^4.0.0 logging: ^1.2.0 - lints: ^2.1.0 + lints: ^3.0.0 test: ^1.24.0 # dependency_overrides: # angel3_container: diff --git a/packages/websocket/CHANGELOG.md b/packages/websocket/CHANGELOG.md index 6bc6d1bd..8476a8bc 100644 --- a/packages/websocket/CHANGELOG.md +++ b/packages/websocket/CHANGELOG.md @@ -1,5 +1,11 @@ # Change Log +## 8.1.0 + +* Updated `lints` to 3.0.0 +* Fixed linter warnings +* Locked `web_socket_channel` to 2.4.0 temporarily. Starting with 2.4.1, its dependency on `dart:html` has been changed to `package:web` which is still highly experimental. + ## 8.0.0 * Require Dart >= 3.0 diff --git a/packages/websocket/lib/base_websocket_client.dart b/packages/websocket/lib/base_websocket_client.dart index eeae52f0..f0edd7f4 100644 --- a/packages/websocket/lib/base_websocket_client.dart +++ b/packages/websocket/lib/base_websocket_client.dart @@ -3,7 +3,6 @@ import 'dart:collection'; import 'dart:convert'; import 'package:angel3_client/angel3_client.dart'; import 'package:angel3_client/base_angel_client.dart'; -import 'package:http/http.dart'; import 'package:web_socket_channel/web_socket_channel.dart'; import 'package:web_socket_channel/status.dart' as status; import 'angel3_websocket.dart'; @@ -85,9 +84,8 @@ abstract class BaseWebSocketClient extends BaseAngelClient { } } - BaseWebSocketClient(BaseClient client, baseUrl, - {this.reconnectOnClose = true, Duration? reconnectInterval}) - : super(client, baseUrl) { + BaseWebSocketClient(super.client, super.baseUrl, + {this.reconnectOnClose = true, Duration? reconnectInterval}) { _reconnectInterval = reconnectInterval ?? Duration(seconds: 10); } diff --git a/packages/websocket/lib/browser.dart b/packages/websocket/lib/browser.dart index d69a5129..cd280862 100644 --- a/packages/websocket/lib/browser.dart +++ b/packages/websocket/lib/browser.dart @@ -106,7 +106,6 @@ class WebSockets extends BaseWebSocketClient { class BrowserWebSocketsService extends WebSocketsService { final Type? type; - BrowserWebSocketsService(WebSocketChannel? socket, WebSockets app, String uri, - {this.type, AngelDeserializer? deserializer}) - : super(socket, app, uri, deserializer: deserializer); + BrowserWebSocketsService(super.socket, WebSockets super.app, super.uri, + {this.type, super.deserializer}); } diff --git a/packages/websocket/lib/io.dart b/packages/websocket/lib/io.dart index 1423c1fb..aba5fc4b 100644 --- a/packages/websocket/lib/io.dart +++ b/packages/websocket/lib/io.dart @@ -60,7 +60,5 @@ class WebSockets extends BaseWebSocketClient { class IoWebSocketsService extends WebSocketsService { final Type? type; - IoWebSocketsService( - WebSocketChannel? socket, WebSockets app, String uri, this.type) - : super(socket, app, uri); + IoWebSocketsService(super.socket, WebSockets super.app, super.uri, this.type); } diff --git a/packages/websocket/lib/websocket_context.dart b/packages/websocket/lib/websocket_context.dart index 1de2aff6..54a59e83 100644 --- a/packages/websocket/lib/websocket_context.dart +++ b/packages/websocket/lib/websocket_context.dart @@ -1,4 +1,4 @@ -part of angel3_websocket.server; +part of 'server.dart'; /// Represents a WebSocket session, with the original /// [RequestContext] and [ResponseContext] attached. diff --git a/packages/websocket/lib/websocket_controller.dart b/packages/websocket/lib/websocket_controller.dart index 7c683299..178641b8 100644 --- a/packages/websocket/lib/websocket_controller.dart +++ b/packages/websocket/lib/websocket_controller.dart @@ -1,4 +1,4 @@ -part of angel3_websocket.server; +part of 'server.dart'; /// Marks a method as available to WebSockets. class ExposeWs { diff --git a/packages/websocket/pubspec.yaml b/packages/websocket/pubspec.yaml index ecd7e991..98c3ef11 100644 --- a/packages/websocket/pubspec.yaml +++ b/packages/websocket/pubspec.yaml @@ -1,5 +1,5 @@ name: angel3_websocket -version: 8.0.0 +version: 8.1.0 description: This library provides WebSockets support for Angel3 framework. homepage: https://angel3-framework.web.app/ repository: https://github.com/dukefirehawk/angel/tree/master/packages/websocket @@ -14,7 +14,7 @@ dependencies: http: ^1.0.0 meta: ^1.8.0 stream_channel: ^2.1.0 - web_socket_channel: ^2.1.0 + web_socket_channel: 2.4.0 collection: ^1.17.0 logging: ^1.1.0 dev_dependencies: @@ -22,7 +22,8 @@ dev_dependencies: angel3_model: ^8.0.0 quiver: ^3.2.0 test: ^1.24.0 - lints: ^2.1.0 + lints: ^3.0.0 + file: ^7.0.0 # dependency_overrides: # angel3_container: # path: ../container/angel_container diff --git a/packages/websocket/test/controller/common.dart b/packages/websocket/test/controller/common.dart index 13a441ff..febcf98a 100644 --- a/packages/websocket/test/controller/common.dart +++ b/packages/websocket/test/controller/common.dart @@ -29,7 +29,7 @@ const Game johnVsBob = Game(playerOne: 'John', playerTwo: 'Bob'); @Expose('/game') class GameController extends WebSocketController { - GameController(AngelWebSocket ws) : super(ws); + GameController(super.ws); @ExposeWs('search') dynamic search(WebSocketContext socket) async { diff --git a/packages/websocket/web/main.dart b/packages/websocket/web/main.dart index 8f1a9f17..8b44ac9b 100644 --- a/packages/websocket/web/main.dart +++ b/packages/websocket/web/main.dart @@ -6,6 +6,7 @@ void main() { var app = WebSockets(window.location.origin); window.alert(app.baseUrl.toString()); + // ignore: body_might_complete_normally_catch_error app.connect().catchError((_) { window.alert('no websocket'); });