From 272eb80e3abdfc2d76646ff5e77ec427237dfead Mon Sep 17 00:00:00 2001 From: Sourcegraph Date: Thu, 26 Oct 2023 03:12:21 +0000 Subject: [PATCH 1/5] "Dart 2.19" --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 40816e9..eaf4560 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM drydock-prod.workiva.net/workiva/dart2_base_image:1 +FROM drydock-prod.workiva.net/workiva/dart2_base_image:2 WORKDIR /build/ ADD pubspec.yaml . RUN dart pub get From c772e3a3f99286d982534319a99e68f5980f5ce4 Mon Sep 17 00:00:00 2001 From: Rob Becker Date: Sat, 28 Oct 2023 15:55:02 -0600 Subject: [PATCH 2/5] Fix analyzer warnings --- lib/src/sse_proxy_handler.dart | 1 - pubspec.yaml | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/src/sse_proxy_handler.dart b/lib/src/sse_proxy_handler.dart index 6e6c0ed..94bb92a 100644 --- a/lib/src/sse_proxy_handler.dart +++ b/lib/src/sse_proxy_handler.dart @@ -84,7 +84,6 @@ class SseProxyHandler { sink.close(); }); }); - return shelf.Response.notFound(''); } Future _handle(shelf.Request req) async { diff --git a/pubspec.yaml b/pubspec.yaml index 5f14f01..0c9293a 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -8,7 +8,7 @@ description: > routing by rewriting 404s to the root index. environment: - sdk: '>=2.12.0 <3.0.0' + sdk: '>=2.18.0 <3.0.0' dependencies: args: ^2.3.1 From 2e54440945ff14a706c404f886fe4a3a26f95906 Mon Sep 17 00:00:00 2001 From: Rob Becker Date: Sat, 28 Oct 2023 16:05:12 -0600 Subject: [PATCH 3/5] don't run on dart 3 yet --- .github/workflows/dart_ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dart_ci.yml b/.github/workflows/dart_ci.yml index ec0957f..0a25145 100644 --- a/.github/workflows/dart_ci.yml +++ b/.github/workflows/dart_ci.yml @@ -15,7 +15,7 @@ jobs: strategy: fail-fast: false matrix: - sdk: [ 2.18.7, stable ] + sdk: [ 2.18.7, 2.19.6 ] steps: - uses: actions/checkout@v2 - uses: dart-lang/setup-dart@v1 From d422eecb85e093315680333c33e443f3949f694e Mon Sep 17 00:00:00 2001 From: Tod Bachman Date: Mon, 30 Oct 2023 10:45:58 -0600 Subject: [PATCH 4/5] Look for actual stdout message indicating ChromeDriver started --- test/chromedriver_utils.dart | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test/chromedriver_utils.dart b/test/chromedriver_utils.dart index b7d6a5a..e0abad9 100644 --- a/test/chromedriver_utils.dart +++ b/test/chromedriver_utils.dart @@ -18,8 +18,8 @@ Future startChromeDriver() async { } }); - // On windows this takes a while to boot up, wait for the first line - // of stdout as a signal that it is ready. + // On windows this takes a while to boot up, wait for a message on stdout + // indicating ChromeDriver started successfully. final stdOutLines = chromeDriver.stdout .transform(utf8.decoder) .transform(LineSplitter()) @@ -33,7 +33,8 @@ Future startChromeDriver() async { stdOutLines.listen((line) => print('ChromeDriver stdout: $line')); stdErrLines.listen((line) => print('ChromeDriver stderr: $line')); - await stdOutLines.first; + await stdOutLines.firstWhere( + (line) => line.contains('ChromeDriver was started successfully')); } catch (e) { throw StateError( 'Could not start ChromeDriver. Is it installed?\nError: $e'); From d47cffc5b2d8032f8046e5124ee5eee322a10903 Mon Sep 17 00:00:00 2001 From: Tod Bachman Date: Mon, 30 Oct 2023 10:49:27 -0600 Subject: [PATCH 5/5] Replace deprecated imports --- test/chromedriver_utils.dart | 2 +- test/sse_proxy_handler_test.dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/chromedriver_utils.dart b/test/chromedriver_utils.dart index e0abad9..2c4ced4 100644 --- a/test/chromedriver_utils.dart +++ b/test/chromedriver_utils.dart @@ -3,7 +3,7 @@ import 'dart:io'; import 'package:test/test.dart'; import 'package:webdev_proxy/src/port_utils.dart'; -import 'package:webdriver/io.dart' as wd; +import 'package:webdriver/async_io.dart' as wd; const chromeDriverPort = 4444; const chromeDriverUrlBase = 'wd/hub'; diff --git a/test/sse_proxy_handler_test.dart b/test/sse_proxy_handler_test.dart index 37d503a..2141137 100644 --- a/test/sse_proxy_handler_test.dart +++ b/test/sse_proxy_handler_test.dart @@ -8,7 +8,7 @@ import 'package:shelf_static/shelf_static.dart'; import 'package:sse/server/sse_handler.dart'; import 'package:test/test.dart'; import 'package:webdev_proxy/src/port_utils.dart'; -import 'package:webdriver/io.dart'; +import 'package:webdriver/async_io.dart'; import 'package:webdev_proxy/src/sse_proxy_handler.dart';