From 1ba5ffd1679a06c2c89095197bca67bd9b2f5893 Mon Sep 17 00:00:00 2001 From: Tobe O Date: Thu, 11 Apr 2019 11:54:46 -0400 Subject: [PATCH] Bump to 2.0.0-rc.2 --- CHANGELOG.md | 3 +++ lib/src/core/routable.dart | 3 ++- lib/src/core/server.dart | 3 ++- pubspec.yaml | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 015f93cd..2cb68f3d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +# 2.0.0-rc.2 +* Fixes Pub analyzer lints (see `angel_route@3.0.6`) + # 2.0.0-rc.1 * Fix logic error that allowed content to be written to streaming responses after `close` was closed. diff --git a/lib/src/core/routable.dart b/lib/src/core/routable.dart index 05463d70..f98bc074 100644 --- a/lib/src/core/routable.dart +++ b/lib/src/core/routable.dart @@ -95,7 +95,8 @@ class Routable extends Router { @override Route addRoute( String method, String path, RequestHandler handler, - {Iterable middleware = const []}) { + {Iterable middleware}) { + middleware ??= []; final handlers = []; // Merge @Middleware declaration, if any Middleware middlewareDeclaration = diff --git a/lib/src/core/server.dart b/lib/src/core/server.dart index 8055f6ca..f75b2787 100644 --- a/lib/src/core/server.dart +++ b/lib/src/core/server.dart @@ -150,7 +150,8 @@ class Angel extends Routable { @override Route addRoute( String method, String path, RequestHandler handler, - {Iterable middleware = const []}) { + {Iterable middleware}) { + middleware ??= []; if (_flattened != null) { logger?.warning( 'WARNING: You added a route ($method $path) to the router, after it had been optimized.'); diff --git a/pubspec.yaml b/pubspec.yaml index 9aeb3e67..df1bf31f 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: angel_framework -version: 2.0.0-rc.1 +version: 2.0.0-rc.2 description: A high-powered HTTP server with dependency injection, routing and much more. author: Tobe O homepage: https://github.com/angel-dart/angel_framework