From be8b9aac2a12f7f55f4a7972c5ad65491b4c0627 Mon Sep 17 00:00:00 2001 From: kenzieschmoll Date: Wed, 24 Apr 2019 11:25:11 -0700 Subject: [PATCH 01/66] first commit --- pkgs/browser_launcher/README.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 pkgs/browser_launcher/README.md diff --git a/pkgs/browser_launcher/README.md b/pkgs/browser_launcher/README.md new file mode 100644 index 000000000..2743a0a24 --- /dev/null +++ b/pkgs/browser_launcher/README.md @@ -0,0 +1 @@ +# browser_launcher From b36f3fa0765372194a9fd88d42f421d330bbf295 Mon Sep 17 00:00:00 2001 From: kenzieschmoll Date: Wed, 24 Apr 2019 14:45:43 -0700 Subject: [PATCH 02/66] Setup package skeleton for browser_launcher --- pkgs/browser_launcher/.gitignore | 3 ++ pkgs/browser_launcher/.travis.yml | 23 ++++++++++ pkgs/browser_launcher/AUTHORS | 6 +++ pkgs/browser_launcher/CHANGELOG.md | 3 ++ pkgs/browser_launcher/LICENSE | 26 +++++++++++ pkgs/browser_launcher/README.md | 4 +- pkgs/browser_launcher/analysis_options.yaml | 43 +++++++++++++++++++ .../lib/browser_launcher.dart | 5 +++ pkgs/browser_launcher/lib/src/chrome.dart | 3 ++ pkgs/browser_launcher/pubspec.yaml | 15 +++++++ 10 files changed, 130 insertions(+), 1 deletion(-) create mode 100644 pkgs/browser_launcher/.gitignore create mode 100644 pkgs/browser_launcher/.travis.yml create mode 100644 pkgs/browser_launcher/AUTHORS create mode 100644 pkgs/browser_launcher/CHANGELOG.md create mode 100644 pkgs/browser_launcher/LICENSE create mode 100644 pkgs/browser_launcher/analysis_options.yaml create mode 100644 pkgs/browser_launcher/lib/browser_launcher.dart create mode 100644 pkgs/browser_launcher/lib/src/chrome.dart create mode 100644 pkgs/browser_launcher/pubspec.yaml diff --git a/pkgs/browser_launcher/.gitignore b/pkgs/browser_launcher/.gitignore new file mode 100644 index 000000000..49ce72d76 --- /dev/null +++ b/pkgs/browser_launcher/.gitignore @@ -0,0 +1,3 @@ +.dart_tool/ +.packages +pubspec.lock diff --git a/pkgs/browser_launcher/.travis.yml b/pkgs/browser_launcher/.travis.yml new file mode 100644 index 000000000..c936b6f9f --- /dev/null +++ b/pkgs/browser_launcher/.travis.yml @@ -0,0 +1,23 @@ +language: dart + +dart: + - 2.2.0 + - dev + +dart_task: + # - test + - dartanalyzer: --fatal-infos --fatal-warnings . + +matrix: + include: + # Only validate formatting using the dev release + - dart: dev + dart_task: dartfmt + +# Only building master means that we don't run two builds for each pull request. +branches: + only: [master] + +cache: + directories: + - $HOME/.pub-cache diff --git a/pkgs/browser_launcher/AUTHORS b/pkgs/browser_launcher/AUTHORS new file mode 100644 index 000000000..e8063a8cd --- /dev/null +++ b/pkgs/browser_launcher/AUTHORS @@ -0,0 +1,6 @@ +# Below is a list of people and organizations that have contributed +# to the project. Names should be added to the list like so: +# +# Name/Organization + +Google Inc. diff --git a/pkgs/browser_launcher/CHANGELOG.md b/pkgs/browser_launcher/CHANGELOG.md new file mode 100644 index 000000000..d4ce76a7d --- /dev/null +++ b/pkgs/browser_launcher/CHANGELOG.md @@ -0,0 +1,3 @@ +## 0.1.0 + +- initial (pre-release) release diff --git a/pkgs/browser_launcher/LICENSE b/pkgs/browser_launcher/LICENSE new file mode 100644 index 000000000..f75d7c237 --- /dev/null +++ b/pkgs/browser_launcher/LICENSE @@ -0,0 +1,26 @@ +Copyright 2019, the Dart project authors. All rights reserved. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google Inc. nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/pkgs/browser_launcher/README.md b/pkgs/browser_launcher/README.md index 2743a0a24..afda08192 100644 --- a/pkgs/browser_launcher/README.md +++ b/pkgs/browser_launcher/README.md @@ -1 +1,3 @@ -# browser_launcher +## What is this? +This package provides a standardized way to launch web browsers. Currently, Chrome is the only supported browser. Support +for other browsers will be added in the future. diff --git a/pkgs/browser_launcher/analysis_options.yaml b/pkgs/browser_launcher/analysis_options.yaml new file mode 100644 index 000000000..0711acad5 --- /dev/null +++ b/pkgs/browser_launcher/analysis_options.yaml @@ -0,0 +1,43 @@ +include: package:pedantic/analysis_options.yaml +analyzer: + strong-mode: + implicit-casts: false +linter: + rules: + - avoid_empty_else + - avoid_init_to_null + - avoid_null_checks_in_equality_operators + - avoid_unused_constructor_parameters + - await_only_futures + - camel_case_types + - cancel_subscriptions + - constant_identifier_names + - control_flow_in_finally + - directives_ordering + - empty_catches + - empty_constructor_bodies + - empty_statements + - hash_and_equals + - implementation_imports + - iterable_contains_unrelated_type + - library_names + - library_prefixes + - list_remove_unrelated_type + - non_constant_identifier_names + - overridden_fields + - package_api_docs + - package_names + - package_prefixed_library_names + - prefer_equal_for_default_values + - prefer_final_fields + - prefer_generic_function_type_aliases + - prefer_is_not_empty + - slash_for_doc_comments + - test_types_in_equals + - throw_in_finally + - type_init_formals + - unnecessary_brace_in_string_interps + - unnecessary_const + - unnecessary_new + - unrelated_type_equality_checks + - valid_regexps diff --git a/pkgs/browser_launcher/lib/browser_launcher.dart b/pkgs/browser_launcher/lib/browser_launcher.dart new file mode 100644 index 000000000..7d85dadce --- /dev/null +++ b/pkgs/browser_launcher/lib/browser_launcher.dart @@ -0,0 +1,5 @@ +// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +export 'src/chrome.dart'; diff --git a/pkgs/browser_launcher/lib/src/chrome.dart b/pkgs/browser_launcher/lib/src/chrome.dart new file mode 100644 index 000000000..79bf40242 --- /dev/null +++ b/pkgs/browser_launcher/lib/src/chrome.dart @@ -0,0 +1,3 @@ +// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. diff --git a/pkgs/browser_launcher/pubspec.yaml b/pkgs/browser_launcher/pubspec.yaml new file mode 100644 index 000000000..ad8b8bb86 --- /dev/null +++ b/pkgs/browser_launcher/pubspec.yaml @@ -0,0 +1,15 @@ +name: browser_launcher +description: A standardized way to launch web browsers. + +version: 0.1.0-dev + +author: Dart Team +homepage: https://github.com/dart-lang/browser_launcher + +environment: + sdk: '>=2.2.0 <3.0.0' + +dependencies: + +dev_dependnecies: + pedantic: ^1.5.0 From e8124d4bbc21ee3893ae784db395823fdfc559c2 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Wed, 24 Apr 2019 16:49:56 -0700 Subject: [PATCH 03/66] small tweaks to readme and .gitignore (dart-lang/browser_launcher#2) --- pkgs/browser_launcher/.gitignore | 1 + pkgs/browser_launcher/README.md | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/pkgs/browser_launcher/.gitignore b/pkgs/browser_launcher/.gitignore index 49ce72d76..ec8eae3f1 100644 --- a/pkgs/browser_launcher/.gitignore +++ b/pkgs/browser_launcher/.gitignore @@ -1,3 +1,4 @@ +# Don’t commit the following directories created by pub. .dart_tool/ .packages pubspec.lock diff --git a/pkgs/browser_launcher/README.md b/pkgs/browser_launcher/README.md index afda08192..6b10c5460 100644 --- a/pkgs/browser_launcher/README.md +++ b/pkgs/browser_launcher/README.md @@ -1,3 +1,5 @@ -## What is this? -This package provides a standardized way to launch web browsers. Currently, Chrome is the only supported browser. Support -for other browsers will be added in the future. +Provides a standardized way to launch web browsers. + +Currently, Chrome is the only supported browser. + +Support for other browsers will be added in the future. From a6ce764f27c3ff182bfc6d0956f7cb56919aab1f Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Wed, 24 Apr 2019 16:52:38 -0700 Subject: [PATCH 04/66] Add travis badge to readme (dart-lang/browser_launcher#3) --- pkgs/browser_launcher/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/browser_launcher/README.md b/pkgs/browser_launcher/README.md index 6b10c5460..3bb3c5cb0 100644 --- a/pkgs/browser_launcher/README.md +++ b/pkgs/browser_launcher/README.md @@ -1,3 +1,5 @@ +[![Build Status](https://travis-ci.org/dart-lang/browser_launcher.svg?branch=master)](https://travis-ci.org/dart-lang/browser_launcher) + Provides a standardized way to launch web browsers. Currently, Chrome is the only supported browser. From 705313d52d8995a17ebdcb8bd73d8940664b1013 Mon Sep 17 00:00:00 2001 From: Kenzie Schmoll <43759233+kenzieschmoll@users.noreply.github.com> Date: Fri, 26 Apr 2019 10:44:25 -0700 Subject: [PATCH 05/66] Add chrome launching code to browser_launcher (dart-lang/browser_launcher#4) * Add chrome launching code to browser_launcher --- pkgs/browser_launcher/.travis.yml | 2 +- pkgs/browser_launcher/lib/src/chrome.dart | 183 ++++++++++++++++++++ pkgs/browser_launcher/pubspec.yaml | 5 +- pkgs/browser_launcher/test/chrome_test.dart | 59 +++++++ 4 files changed, 247 insertions(+), 2 deletions(-) create mode 100644 pkgs/browser_launcher/test/chrome_test.dart diff --git a/pkgs/browser_launcher/.travis.yml b/pkgs/browser_launcher/.travis.yml index c936b6f9f..b4e199117 100644 --- a/pkgs/browser_launcher/.travis.yml +++ b/pkgs/browser_launcher/.travis.yml @@ -5,7 +5,7 @@ dart: - dev dart_task: - # - test + - test - dartanalyzer: --fatal-infos --fatal-warnings . matrix: diff --git a/pkgs/browser_launcher/lib/src/chrome.dart b/pkgs/browser_launcher/lib/src/chrome.dart index 79bf40242..7f1250b01 100644 --- a/pkgs/browser_launcher/lib/src/chrome.dart +++ b/pkgs/browser_launcher/lib/src/chrome.dart @@ -1,3 +1,186 @@ // Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. + +import 'dart:async'; +import 'dart:convert'; +import 'dart:io'; + +import 'package:path/path.dart' as p; +import 'package:webkit_inspection_protocol/webkit_inspection_protocol.dart'; + +const _chromeEnvironment = 'CHROME_EXECUTABLE'; +const _linuxExecutable = 'google-chrome'; +const _macOSExecutable = + '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome'; +const _windowsExecutable = r'Google\Chrome\Application\chrome.exe'; + +String get _executable { + if (Platform.environment.containsKey(_chromeEnvironment)) { + return Platform.environment[_chromeEnvironment]; + } + if (Platform.isLinux) return _linuxExecutable; + if (Platform.isMacOS) return _macOSExecutable; + if (Platform.isWindows) { + final windowsPrefixes = [ + Platform.environment['LOCALAPPDATA'], + Platform.environment['PROGRAMFILES'], + Platform.environment['PROGRAMFILES(X86)'] + ]; + return p.join( + windowsPrefixes.firstWhere((prefix) { + if (prefix == null) return false; + final path = p.join(prefix, _windowsExecutable); + return File(path).existsSync(); + }, orElse: () => '.'), + _windowsExecutable, + ); + } + throw StateError('Unexpected platform type.'); +} + +/// Manager for an instance of Chrome. +class Chrome { + Chrome._( + this.debugPort, + this.chromeConnection, { + Process process, + Directory dataDir, + }) : _process = process, + _dataDir = dataDir; + + final int debugPort; + final ChromeConnection chromeConnection; + final Process _process; + final Directory _dataDir; + + /// Connects to an instance of Chrome with an open debug port. + static Future fromExisting(int port) async => + _connect(Chrome._(port, ChromeConnection('localhost', port))); + + /// Starts Chrome with the given arguments and a specific port. + /// + /// Only one instance of Chrome can run at a time. Each url in [urls] will be + /// loaded in a separate tab. + static Future startWithDebugPort( + List urls, { + int debugPort, + bool headless = false, + }) async { + final dataDir = Directory.systemTemp.createTempSync(); + final port = debugPort == null || debugPort == 0 + ? await findUnusedPort() + : debugPort; + final args = [ + // Using a tmp directory ensures that a new instance of chrome launches + // allowing for the remote debug port to be enabled. + '--user-data-dir=${dataDir.path}', + '--remote-debugging-port=$port', + // When the DevTools has focus we don't want to slow down the application. + '--disable-background-timer-throttling', + // Since we are using a temp profile, disable features that slow the + // Chrome launch. + '--disable-extensions', + '--disable-popup-blocking', + '--bwsi', + '--no-first-run', + '--no-default-browser-check', + '--disable-default-apps', + '--disable-translate', + ]; + if (headless) { + args.add('--headless'); + } + + final process = await _startProcess(urls, args: args); + + // Wait until the DevTools are listening before trying to connect. + await process.stderr + .transform(utf8.decoder) + .transform(const LineSplitter()) + .firstWhere((line) => line.startsWith('DevTools listening')) + .timeout(Duration(seconds: 60), + onTimeout: () => + throw Exception('Unable to connect to Chrome DevTools.')); + + return _connect(Chrome._( + port, + ChromeConnection('localhost', port), + process: process, + dataDir: dataDir, + )); + } + + /// Starts Chrome with the given arguments. + /// + /// Each url in [urls] will be loaded in a separate tab. + static Future start( + List urls, { + List args = const [], + }) async { + await _startProcess(urls, args: args); + } + + static Future _startProcess( + List urls, { + List args = const [], + }) async { + final processArgs = args.toList()..addAll(urls); + return await Process.start(_executable, processArgs); + } + + static Future _connect(Chrome chrome) async { + // The connection is lazy. Try a simple call to make sure the provided + // connection is valid. + try { + await chrome.chromeConnection.getTabs(); + } catch (e) { + await chrome.close(); + throw ChromeError( + 'Unable to connect to Chrome debug port: ${chrome.debugPort}\n $e'); + } + return chrome; + } + + Future close() async { + chromeConnection.close(); + _process?.kill(ProcessSignal.sigkill); + await _process?.exitCode; + try { + // Chrome starts another process as soon as it dies that modifies the + // profile information. Give it some time before attempting to delete + // the directory. + await Future.delayed(Duration(milliseconds: 500)); + await _dataDir?.delete(recursive: true); + } catch (_) { + // Silently fail if we can't clean up the profile information. + // It is a system tmp directory so it should get cleaned up eventually. + } + } +} + +class ChromeError extends Error { + final String details; + ChromeError(this.details); + + @override + String toString() => 'ChromeError: $details'; +} + +/// Returns a port that is probably, but not definitely, not in use. +/// +/// This has a built-in race condition: another process may bind this port at +/// any time after this call has returned. +Future findUnusedPort() async { + int port; + ServerSocket socket; + try { + socket = + await ServerSocket.bind(InternetAddress.loopbackIPv6, 0, v6Only: true); + } on SocketException { + socket = await ServerSocket.bind(InternetAddress.loopbackIPv4, 0); + } + port = socket.port; + await socket.close(); + return port; +} diff --git a/pkgs/browser_launcher/pubspec.yaml b/pkgs/browser_launcher/pubspec.yaml index ad8b8bb86..f5cbaafc7 100644 --- a/pkgs/browser_launcher/pubspec.yaml +++ b/pkgs/browser_launcher/pubspec.yaml @@ -10,6 +10,9 @@ environment: sdk: '>=2.2.0 <3.0.0' dependencies: + path: ^1.6.2 + webkit_inspection_protocol: ^0.4.0 -dev_dependnecies: +dev_dependencies: pedantic: ^1.5.0 + test: ^1.0.0 diff --git a/pkgs/browser_launcher/test/chrome_test.dart b/pkgs/browser_launcher/test/chrome_test.dart new file mode 100644 index 000000000..a63220f10 --- /dev/null +++ b/pkgs/browser_launcher/test/chrome_test.dart @@ -0,0 +1,59 @@ +// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@OnPlatform({'windows': Skip('appveyor is not setup to install Chrome')}) +import 'dart:async'; + +import 'package:browser_launcher/src/chrome.dart'; +import 'package:test/test.dart'; +import 'package:webkit_inspection_protocol/webkit_inspection_protocol.dart'; + +void main() { + Chrome chrome; + + Future launchChromeWithDebugPort({int port}) async { + chrome = await Chrome.startWithDebugPort([_googleUrl], debugPort: port); + } + + Future launchChrome() async { + await Chrome.start([_googleUrl]); + } + + tearDown(() async { + await chrome?.close(); + chrome = null; + }); + + test('can launch chrome', () async { + await launchChrome(); + expect(chrome, isNull); + }); + + test('can launch chrome with debug port', () async { + await launchChromeWithDebugPort(); + expect(chrome, isNotNull); + }); + + test('debugger is working', () async { + await launchChromeWithDebugPort(); + var tabs = await chrome.chromeConnection.getTabs(); + expect( + tabs, + contains(const TypeMatcher() + .having((t) => t.url, 'url', _googleUrl))); + }); + + test('uses open debug port if provided port is 0', () async { + await launchChromeWithDebugPort(port: 0); + expect(chrome.debugPort, isNot(equals(0))); + }); + + test('can provide a specific debug port', () async { + var port = await findUnusedPort(); + await launchChromeWithDebugPort(port: port); + expect(chrome.debugPort, port); + }); +} + +const _googleUrl = 'https://www.google.com/'; From 1123d7f125ff16f8126b6aaa6f53e341ea30a8e1 Mon Sep 17 00:00:00 2001 From: Kenzie Schmoll <43759233+kenzieschmoll@users.noreply.github.com> Date: Fri, 26 Apr 2019 10:54:54 -0700 Subject: [PATCH 06/66] Prepare browser_launcher for 0.1.0 release (dart-lang/browser_launcher#5) --- pkgs/browser_launcher/CHANGELOG.md | 2 +- pkgs/browser_launcher/pubspec.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/browser_launcher/CHANGELOG.md b/pkgs/browser_launcher/CHANGELOG.md index d4ce76a7d..6da57666c 100644 --- a/pkgs/browser_launcher/CHANGELOG.md +++ b/pkgs/browser_launcher/CHANGELOG.md @@ -1,3 +1,3 @@ ## 0.1.0 -- initial (pre-release) release +- initial release diff --git a/pkgs/browser_launcher/pubspec.yaml b/pkgs/browser_launcher/pubspec.yaml index f5cbaafc7..8780abaff 100644 --- a/pkgs/browser_launcher/pubspec.yaml +++ b/pkgs/browser_launcher/pubspec.yaml @@ -1,7 +1,7 @@ name: browser_launcher description: A standardized way to launch web browsers. -version: 0.1.0-dev +version: 0.1.0 author: Dart Team homepage: https://github.com/dart-lang/browser_launcher From 3e62c4ef3c80135d4014de5f727c1f9deef2438f Mon Sep 17 00:00:00 2001 From: Kenzie Schmoll <43759233+kenzieschmoll@users.noreply.github.com> Date: Fri, 26 Apr 2019 15:14:34 -0700 Subject: [PATCH 07/66] Add example to improve pub score. (dart-lang/browser_launcher#6) --- pkgs/browser_launcher/CHANGELOG.md | 4 ++++ pkgs/browser_launcher/example/main.dart | 27 +++++++++++++++++++++++ pkgs/browser_launcher/lib/src/chrome.dart | 3 +-- pkgs/browser_launcher/pubspec.yaml | 4 ++-- 4 files changed, 34 insertions(+), 4 deletions(-) create mode 100644 pkgs/browser_launcher/example/main.dart diff --git a/pkgs/browser_launcher/CHANGELOG.md b/pkgs/browser_launcher/CHANGELOG.md index 6da57666c..5ce899024 100644 --- a/pkgs/browser_launcher/CHANGELOG.md +++ b/pkgs/browser_launcher/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.1.1 + +- added example + ## 0.1.0 - initial release diff --git a/pkgs/browser_launcher/example/main.dart b/pkgs/browser_launcher/example/main.dart new file mode 100644 index 000000000..a586de464 --- /dev/null +++ b/pkgs/browser_launcher/example/main.dart @@ -0,0 +1,27 @@ +import 'package:browser_launcher/browser_launcher.dart'; + +const _googleUrl = 'https://www.google.com/'; +const _googleImagesUrl = 'https://www.google.com/imghp?hl=en'; + +Future main() async { + // Launches a chrome browser with two tabs open to [_googleUrl] and + // [_googleImagesUrl]. + await Chrome.start([_googleUrl, _googleImagesUrl]); + print('launched Chrome'); + + // Pause briefly before opening Chrome with a debug port. + await Future.delayed(Duration(seconds: 3)); + + // Launches a chrome browser open to [_googleUrl]. Since we are launching with + // a debug port, we will use a variety of different launch configurations, + // such as launching in a new browser. + final chrome = await Chrome.startWithDebugPort([_googleUrl], debugPort: 8888); + print('launched Chrome with a debug port'); + + // When running this dart code, observe that the browser stays open for 3 + // seconds before we close it. + await Future.delayed(Duration(seconds: 3)); + + await chrome.close(); + print('closed Chrome'); +} diff --git a/pkgs/browser_launcher/lib/src/chrome.dart b/pkgs/browser_launcher/lib/src/chrome.dart index 7f1250b01..c1c4084da 100644 --- a/pkgs/browser_launcher/lib/src/chrome.dart +++ b/pkgs/browser_launcher/lib/src/chrome.dart @@ -60,8 +60,7 @@ class Chrome { /// Starts Chrome with the given arguments and a specific port. /// - /// Only one instance of Chrome can run at a time. Each url in [urls] will be - /// loaded in a separate tab. + /// Each url in [urls] will be loaded in a separate tab. static Future startWithDebugPort( List urls, { int debugPort, diff --git a/pkgs/browser_launcher/pubspec.yaml b/pkgs/browser_launcher/pubspec.yaml index 8780abaff..1375c6e92 100644 --- a/pkgs/browser_launcher/pubspec.yaml +++ b/pkgs/browser_launcher/pubspec.yaml @@ -1,7 +1,7 @@ name: browser_launcher -description: A standardized way to launch web browsers. +description: A package that provides a standardized way to launch web browsers. -version: 0.1.0 +version: 0.1.1-dev author: Dart Team homepage: https://github.com/dart-lang/browser_launcher From 842d7b48c7c66ddc06695595fa250efedd4030f6 Mon Sep 17 00:00:00 2001 From: Kenzie Schmoll <43759233+kenzieschmoll@users.noreply.github.com> Date: Fri, 26 Apr 2019 15:33:10 -0700 Subject: [PATCH 08/66] Prepare for 0.1.1 release. (dart-lang/browser_launcher#7) * Prepare for 0.1.1 release. --- pkgs/browser_launcher/pubspec.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/browser_launcher/pubspec.yaml b/pkgs/browser_launcher/pubspec.yaml index 1375c6e92..409870f77 100644 --- a/pkgs/browser_launcher/pubspec.yaml +++ b/pkgs/browser_launcher/pubspec.yaml @@ -1,7 +1,7 @@ name: browser_launcher -description: A package that provides a standardized way to launch web browsers. +description: Provides a standardized way to launch web browsers for testing and tools. -version: 0.1.1-dev +version: 0.1.1 author: Dart Team homepage: https://github.com/dart-lang/browser_launcher From 1aae1f23cb0417d31f13001e8caca4da84e695cb Mon Sep 17 00:00:00 2001 From: Kenzie Schmoll <43759233+kenzieschmoll@users.noreply.github.com> Date: Mon, 29 Apr 2019 10:55:05 -0700 Subject: [PATCH 09/66] Change min sdk and prepare for release 0.1.2 (dart-lang/browser_launcher#8) * change min sdk version to match flutter stable --- pkgs/browser_launcher/.travis.yml | 2 +- pkgs/browser_launcher/CHANGELOG.md | 4 ++++ pkgs/browser_launcher/pubspec.yaml | 4 ++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/pkgs/browser_launcher/.travis.yml b/pkgs/browser_launcher/.travis.yml index b4e199117..5fa4a53d4 100644 --- a/pkgs/browser_launcher/.travis.yml +++ b/pkgs/browser_launcher/.travis.yml @@ -1,7 +1,7 @@ language: dart dart: - - 2.2.0 + - 2.1.2-dev.0.0 - dev dart_task: diff --git a/pkgs/browser_launcher/CHANGELOG.md b/pkgs/browser_launcher/CHANGELOG.md index 5ce899024..9428cd527 100644 --- a/pkgs/browser_launcher/CHANGELOG.md +++ b/pkgs/browser_launcher/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.1.2 + +- lower min sdk version to match Flutter stable + ## 0.1.1 - added example diff --git a/pkgs/browser_launcher/pubspec.yaml b/pkgs/browser_launcher/pubspec.yaml index 409870f77..ea8a37312 100644 --- a/pkgs/browser_launcher/pubspec.yaml +++ b/pkgs/browser_launcher/pubspec.yaml @@ -1,13 +1,13 @@ name: browser_launcher description: Provides a standardized way to launch web browsers for testing and tools. -version: 0.1.1 +version: 0.1.2 author: Dart Team homepage: https://github.com/dart-lang/browser_launcher environment: - sdk: '>=2.2.0 <3.0.0' + sdk: '>=2.1.2-dev.0.0 <3.0.0' dependencies: path: ^1.6.2 From 276f56b202747c90453134c3fcc2af898987c102 Mon Sep 17 00:00:00 2001 From: Devon Carew Date: Wed, 14 Aug 2019 13:30:08 -0700 Subject: [PATCH 10/66] widen the version range on webkit_inspection_protocol (dart-lang/browser_launcher#9) --- pkgs/browser_launcher/CHANGELOG.md | 4 ++++ pkgs/browser_launcher/pubspec.yaml | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/browser_launcher/CHANGELOG.md b/pkgs/browser_launcher/CHANGELOG.md index 9428cd527..f83d5d2ae 100644 --- a/pkgs/browser_launcher/CHANGELOG.md +++ b/pkgs/browser_launcher/CHANGELOG.md @@ -1,3 +1,7 @@ +## unreleased + +- widen the version constraint on `package:webkit_inspection_protocol` + ## 0.1.2 - lower min sdk version to match Flutter stable diff --git a/pkgs/browser_launcher/pubspec.yaml b/pkgs/browser_launcher/pubspec.yaml index ea8a37312..9cacf1c41 100644 --- a/pkgs/browser_launcher/pubspec.yaml +++ b/pkgs/browser_launcher/pubspec.yaml @@ -1,7 +1,7 @@ name: browser_launcher description: Provides a standardized way to launch web browsers for testing and tools. -version: 0.1.2 +version: 0.1.3-dev author: Dart Team homepage: https://github.com/dart-lang/browser_launcher @@ -11,7 +11,7 @@ environment: dependencies: path: ^1.6.2 - webkit_inspection_protocol: ^0.4.0 + webkit_inspection_protocol: '>=0.4.0 <0.6.0' dev_dependencies: pedantic: ^1.5.0 From 810b8525f4192fb61e333df5939bf045e311ad73 Mon Sep 17 00:00:00 2001 From: Devon Carew Date: Fri, 23 Aug 2019 12:27:41 -0700 Subject: [PATCH 11/66] rev to 0.1.3 (dart-lang/browser_launcher#11) --- pkgs/browser_launcher/CHANGELOG.md | 2 +- pkgs/browser_launcher/pubspec.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/browser_launcher/CHANGELOG.md b/pkgs/browser_launcher/CHANGELOG.md index f83d5d2ae..6ac053705 100644 --- a/pkgs/browser_launcher/CHANGELOG.md +++ b/pkgs/browser_launcher/CHANGELOG.md @@ -1,4 +1,4 @@ -## unreleased +## 0.1.3 - widen the version constraint on `package:webkit_inspection_protocol` diff --git a/pkgs/browser_launcher/pubspec.yaml b/pkgs/browser_launcher/pubspec.yaml index 9cacf1c41..7ea781ef4 100644 --- a/pkgs/browser_launcher/pubspec.yaml +++ b/pkgs/browser_launcher/pubspec.yaml @@ -1,7 +1,7 @@ name: browser_launcher description: Provides a standardized way to launch web browsers for testing and tools. -version: 0.1.3-dev +version: 0.1.3 author: Dart Team homepage: https://github.com/dart-lang/browser_launcher From 2e67248e07abd3a43d7fe774fca890c0fff90bec Mon Sep 17 00:00:00 2001 From: Danny Tuppeny Date: Thu, 5 Sep 2019 18:28:44 +0100 Subject: [PATCH 12/66] Return process from start() (dart-lang/browser_launcher#12) --- pkgs/browser_launcher/lib/src/chrome.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/browser_launcher/lib/src/chrome.dart b/pkgs/browser_launcher/lib/src/chrome.dart index c1c4084da..6bc975ece 100644 --- a/pkgs/browser_launcher/lib/src/chrome.dart +++ b/pkgs/browser_launcher/lib/src/chrome.dart @@ -113,11 +113,11 @@ class Chrome { /// Starts Chrome with the given arguments. /// /// Each url in [urls] will be loaded in a separate tab. - static Future start( + static Future start( List urls, { List args = const [], }) async { - await _startProcess(urls, args: args); + return await _startProcess(urls, args: args); } static Future _startProcess( From 7358e2a60ea162f36fe62e133b56609f7aac9874 Mon Sep 17 00:00:00 2001 From: Gary Roumanis Date: Thu, 26 Sep 2019 12:07:53 -0700 Subject: [PATCH 13/66] Start Chrome maximized (dart-lang/browser_launcher#13) --- pkgs/browser_launcher/CHANGELOG.md | 4 ++++ pkgs/browser_launcher/lib/src/chrome.dart | 1 + pkgs/browser_launcher/pubspec.yaml | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/browser_launcher/CHANGELOG.md b/pkgs/browser_launcher/CHANGELOG.md index 6ac053705..7922d3645 100644 --- a/pkgs/browser_launcher/CHANGELOG.md +++ b/pkgs/browser_launcher/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.1.4 + +- Start Chrome maximized. + ## 0.1.3 - widen the version constraint on `package:webkit_inspection_protocol` diff --git a/pkgs/browser_launcher/lib/src/chrome.dart b/pkgs/browser_launcher/lib/src/chrome.dart index 6bc975ece..ea1a14439 100644 --- a/pkgs/browser_launcher/lib/src/chrome.dart +++ b/pkgs/browser_launcher/lib/src/chrome.dart @@ -86,6 +86,7 @@ class Chrome { '--no-default-browser-check', '--disable-default-apps', '--disable-translate', + '--start-maximized', ]; if (headless) { args.add('--headless'); diff --git a/pkgs/browser_launcher/pubspec.yaml b/pkgs/browser_launcher/pubspec.yaml index 7ea781ef4..9a3ffc689 100644 --- a/pkgs/browser_launcher/pubspec.yaml +++ b/pkgs/browser_launcher/pubspec.yaml @@ -1,7 +1,7 @@ name: browser_launcher description: Provides a standardized way to launch web browsers for testing and tools. -version: 0.1.3 +version: 0.1.4 author: Dart Team homepage: https://github.com/dart-lang/browser_launcher From 7013135c6b9f73c6bf75be56b666fcb4c5cbe227 Mon Sep 17 00:00:00 2001 From: Alan Knight Date: Mon, 21 Oct 2019 16:46:42 -0700 Subject: [PATCH 14/66] Allow passing in a user-data-dir (dart-lang/browser_launcher#14) --- pkgs/browser_launcher/CHANGELOG.md | 4 +++ pkgs/browser_launcher/lib/src/chrome.dart | 31 +++++++++++++---------- pkgs/browser_launcher/pubspec.yaml | 2 +- 3 files changed, 22 insertions(+), 15 deletions(-) diff --git a/pkgs/browser_launcher/CHANGELOG.md b/pkgs/browser_launcher/CHANGELOG.md index 7922d3645..4a1b46065 100644 --- a/pkgs/browser_launcher/CHANGELOG.md +++ b/pkgs/browser_launcher/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.1.5 + +- Add a parameter to use a specified user-data-dir instead of a system temp. + ## 0.1.4 - Start Chrome maximized. diff --git a/pkgs/browser_launcher/lib/src/chrome.dart b/pkgs/browser_launcher/lib/src/chrome.dart index ea1a14439..2a8b3de82 100644 --- a/pkgs/browser_launcher/lib/src/chrome.dart +++ b/pkgs/browser_launcher/lib/src/chrome.dart @@ -41,18 +41,16 @@ String get _executable { /// Manager for an instance of Chrome. class Chrome { - Chrome._( - this.debugPort, - this.chromeConnection, { - Process process, - Directory dataDir, - }) : _process = process, + Chrome._(this.debugPort, this.chromeConnection, + {Process process, Directory dataDir, this.deleteDataDir = false}) + : _process = process, _dataDir = dataDir; final int debugPort; final ChromeConnection chromeConnection; final Process _process; final Directory _dataDir; + final bool deleteDataDir; /// Connects to an instance of Chrome with an open debug port. static Future fromExisting(int port) async => @@ -61,12 +59,14 @@ class Chrome { /// Starts Chrome with the given arguments and a specific port. /// /// Each url in [urls] will be loaded in a separate tab. - static Future startWithDebugPort( - List urls, { - int debugPort, - bool headless = false, - }) async { - final dataDir = Directory.systemTemp.createTempSync(); + static Future startWithDebugPort(List urls, + {int debugPort, bool headless = false, String userDataDir}) async { + Directory dataDir; + if (userDataDir == null) { + dataDir = Directory.systemTemp.createTempSync(); + } else { + dataDir = Directory(userDataDir); + } final port = debugPort == null || debugPort == 0 ? await findUnusedPort() : debugPort; @@ -108,6 +108,7 @@ class Chrome { ChromeConnection('localhost', port), process: process, dataDir: dataDir, + deleteDataDir: userDataDir = null, )); } @@ -150,8 +151,10 @@ class Chrome { // Chrome starts another process as soon as it dies that modifies the // profile information. Give it some time before attempting to delete // the directory. - await Future.delayed(Duration(milliseconds: 500)); - await _dataDir?.delete(recursive: true); + if (deleteDataDir) { + await Future.delayed(Duration(milliseconds: 500)); + await _dataDir?.delete(recursive: true); + } } catch (_) { // Silently fail if we can't clean up the profile information. // It is a system tmp directory so it should get cleaned up eventually. diff --git a/pkgs/browser_launcher/pubspec.yaml b/pkgs/browser_launcher/pubspec.yaml index 9a3ffc689..59c3d4678 100644 --- a/pkgs/browser_launcher/pubspec.yaml +++ b/pkgs/browser_launcher/pubspec.yaml @@ -1,7 +1,7 @@ name: browser_launcher description: Provides a standardized way to launch web browsers for testing and tools. -version: 0.1.4 +version: 0.1.5 author: Dart Team homepage: https://github.com/dart-lang/browser_launcher From eaf6c0ca4007b8c72625c990ef699070cf42863f Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Tue, 21 Jan 2020 09:50:17 -0800 Subject: [PATCH 15/66] Update lower SDK bound to 2.2.0 (dart-lang/browser_launcher#15) --- pkgs/browser_launcher/.travis.yml | 2 +- pkgs/browser_launcher/CHANGELOG.md | 4 ++++ pkgs/browser_launcher/pubspec.yaml | 4 ++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/pkgs/browser_launcher/.travis.yml b/pkgs/browser_launcher/.travis.yml index 5fa4a53d4..b4e199117 100644 --- a/pkgs/browser_launcher/.travis.yml +++ b/pkgs/browser_launcher/.travis.yml @@ -1,7 +1,7 @@ language: dart dart: - - 2.1.2-dev.0.0 + - 2.2.0 - dev dart_task: diff --git a/pkgs/browser_launcher/CHANGELOG.md b/pkgs/browser_launcher/CHANGELOG.md index 4a1b46065..e9d9fb55b 100644 --- a/pkgs/browser_launcher/CHANGELOG.md +++ b/pkgs/browser_launcher/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.1.6-dev + +- Update lower Dart SDK requirement to 2.2.0. + ## 0.1.5 - Add a parameter to use a specified user-data-dir instead of a system temp. diff --git a/pkgs/browser_launcher/pubspec.yaml b/pkgs/browser_launcher/pubspec.yaml index 59c3d4678..7c614c85e 100644 --- a/pkgs/browser_launcher/pubspec.yaml +++ b/pkgs/browser_launcher/pubspec.yaml @@ -1,13 +1,13 @@ name: browser_launcher description: Provides a standardized way to launch web browsers for testing and tools. -version: 0.1.5 +version: 0.1.6-dev author: Dart Team homepage: https://github.com/dart-lang/browser_launcher environment: - sdk: '>=2.1.2-dev.0.0 <3.0.0' + sdk: '>=2.2.0 <3.0.0' dependencies: path: ^1.6.2 From 88e6bdb6426eec225b8f454e8efbeb4fe2e266ed Mon Sep 17 00:00:00 2001 From: Devon Carew Date: Wed, 13 May 2020 13:37:59 -0700 Subject: [PATCH 16/66] widen the dep range on package:webkit_inspection_protocol (dart-lang/browser_launcher#17) widen the dep range on package:webkit_inspection_protocol --- pkgs/browser_launcher/CHANGELOG.md | 5 +++-- pkgs/browser_launcher/pubspec.yaml | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/pkgs/browser_launcher/CHANGELOG.md b/pkgs/browser_launcher/CHANGELOG.md index e9d9fb55b..fe210d2b5 100644 --- a/pkgs/browser_launcher/CHANGELOG.md +++ b/pkgs/browser_launcher/CHANGELOG.md @@ -1,6 +1,7 @@ -## 0.1.6-dev +## 0.1.6 -- Update lower Dart SDK requirement to 2.2.0. +- Update lower Dart SDK requirement to `2.2.0`. +- Update the dependency range on `package:webkit_inspection_protocol`. ## 0.1.5 diff --git a/pkgs/browser_launcher/pubspec.yaml b/pkgs/browser_launcher/pubspec.yaml index 7c614c85e..37dbaf5c7 100644 --- a/pkgs/browser_launcher/pubspec.yaml +++ b/pkgs/browser_launcher/pubspec.yaml @@ -1,7 +1,7 @@ name: browser_launcher description: Provides a standardized way to launch web browsers for testing and tools. -version: 0.1.6-dev +version: 0.1.6 author: Dart Team homepage: https://github.com/dart-lang/browser_launcher @@ -11,7 +11,7 @@ environment: dependencies: path: ^1.6.2 - webkit_inspection_protocol: '>=0.4.0 <0.6.0' + webkit_inspection_protocol: '>=0.4.0 <0.7.0' dev_dependencies: pedantic: ^1.5.0 From 16b9e73b240a54b7f4671f06c1c09b6356d77e51 Mon Sep 17 00:00:00 2001 From: Devon Carew Date: Mon, 18 May 2020 18:36:01 -0700 Subject: [PATCH 17/66] rev to 0.1.7 (dart-lang/browser_launcher#18) rev to 0.1.7 --- pkgs/browser_launcher/CHANGELOG.md | 4 ++++ pkgs/browser_launcher/pubspec.yaml | 5 ++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/pkgs/browser_launcher/CHANGELOG.md b/pkgs/browser_launcher/CHANGELOG.md index fe210d2b5..2bfd551e8 100644 --- a/pkgs/browser_launcher/CHANGELOG.md +++ b/pkgs/browser_launcher/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.1.7 + +- Widen the dependency range on `package:webkit_inspection_protocol`. + ## 0.1.6 - Update lower Dart SDK requirement to `2.2.0`. diff --git a/pkgs/browser_launcher/pubspec.yaml b/pkgs/browser_launcher/pubspec.yaml index 37dbaf5c7..17b88229a 100644 --- a/pkgs/browser_launcher/pubspec.yaml +++ b/pkgs/browser_launcher/pubspec.yaml @@ -1,9 +1,8 @@ name: browser_launcher description: Provides a standardized way to launch web browsers for testing and tools. -version: 0.1.6 +version: 0.1.7 -author: Dart Team homepage: https://github.com/dart-lang/browser_launcher environment: @@ -11,7 +10,7 @@ environment: dependencies: path: ^1.6.2 - webkit_inspection_protocol: '>=0.4.0 <0.7.0' + webkit_inspection_protocol: '>=0.4.0 <0.8.0' dev_dependencies: pedantic: ^1.5.0 From 559c1434bfca5288a055c27500850b8a7a48a953 Mon Sep 17 00:00:00 2001 From: Gary Roumanis Date: Thu, 3 Dec 2020 14:49:51 -0800 Subject: [PATCH 18/66] Migrate to Github Actions (dart-lang/browser_launcher#21) --- .../.github/workflows/dart.yml | 36 +++++++++++++++++++ pkgs/browser_launcher/.travis.yml | 23 ------------ pkgs/browser_launcher/CHANGELOG.md | 4 +++ pkgs/browser_launcher/lib/src/chrome.dart | 21 +++++++---- pkgs/browser_launcher/pubspec.yaml | 2 +- 5 files changed, 55 insertions(+), 31 deletions(-) create mode 100644 pkgs/browser_launcher/.github/workflows/dart.yml delete mode 100644 pkgs/browser_launcher/.travis.yml diff --git a/pkgs/browser_launcher/.github/workflows/dart.yml b/pkgs/browser_launcher/.github/workflows/dart.yml new file mode 100644 index 000000000..d667bc88d --- /dev/null +++ b/pkgs/browser_launcher/.github/workflows/dart.yml @@ -0,0 +1,36 @@ +name: Dart + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + test: + runs-on: ubuntu-latest + + env: + DISPLAY: ':99' + + steps: + - uses: actions/checkout@v2 + - uses: cedx/setup-dart@v2 + with: + release-channel: stable + version: latest + + - name: Print Dart SDK version + run: dart --version + + - name: Install dependencies + run: dart pub get + + - name: Analyze project source + run: dart analyze + + - name: Run Xvfb + run: Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 & + + - name: Run tests + run: dart test diff --git a/pkgs/browser_launcher/.travis.yml b/pkgs/browser_launcher/.travis.yml deleted file mode 100644 index b4e199117..000000000 --- a/pkgs/browser_launcher/.travis.yml +++ /dev/null @@ -1,23 +0,0 @@ -language: dart - -dart: - - 2.2.0 - - dev - -dart_task: - - test - - dartanalyzer: --fatal-infos --fatal-warnings . - -matrix: - include: - # Only validate formatting using the dev release - - dart: dev - dart_task: dartfmt - -# Only building master means that we don't run two builds for each pull request. -branches: - only: [master] - -cache: - directories: - - $HOME/.pub-cache diff --git a/pkgs/browser_launcher/CHANGELOG.md b/pkgs/browser_launcher/CHANGELOG.md index 2bfd551e8..9f9759aa0 100644 --- a/pkgs/browser_launcher/CHANGELOG.md +++ b/pkgs/browser_launcher/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.1.8 + +- Log `STDERR` on Chrome launch failure. + ## 0.1.7 - Widen the dependency range on `package:webkit_inspection_protocol`. diff --git a/pkgs/browser_launcher/lib/src/chrome.dart b/pkgs/browser_launcher/lib/src/chrome.dart index 2a8b3de82..bfa427095 100644 --- a/pkgs/browser_launcher/lib/src/chrome.dart +++ b/pkgs/browser_launcher/lib/src/chrome.dart @@ -95,13 +95,20 @@ class Chrome { final process = await _startProcess(urls, args: args); // Wait until the DevTools are listening before trying to connect. - await process.stderr - .transform(utf8.decoder) - .transform(const LineSplitter()) - .firstWhere((line) => line.startsWith('DevTools listening')) - .timeout(Duration(seconds: 60), - onTimeout: () => - throw Exception('Unable to connect to Chrome DevTools.')); + var _errorLines = []; + try { + await process.stderr + .transform(utf8.decoder) + .transform(const LineSplitter()) + .firstWhere((line) { + _errorLines.add(line); + return line.startsWith('DevTools listening'); + }).timeout(Duration(seconds: 60)); + } catch (_) { + throw Exception('Unable to connect to Chrome DevTools.\n\n' + 'Chrome STDERR:\n' + + _errorLines.join('\n')); + } return _connect(Chrome._( port, diff --git a/pkgs/browser_launcher/pubspec.yaml b/pkgs/browser_launcher/pubspec.yaml index 17b88229a..1d8367b20 100644 --- a/pkgs/browser_launcher/pubspec.yaml +++ b/pkgs/browser_launcher/pubspec.yaml @@ -1,7 +1,7 @@ name: browser_launcher description: Provides a standardized way to launch web browsers for testing and tools. -version: 0.1.7 +version: 0.1.8 homepage: https://github.com/dart-lang/browser_launcher From e3f43952ac4c1b2b2ce0ab7e109649bbcbc38e51 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Fri, 4 Dec 2020 10:34:52 -0800 Subject: [PATCH 19/66] Update badge (dart-lang/browser_launcher#22) --- pkgs/browser_launcher/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/browser_launcher/README.md b/pkgs/browser_launcher/README.md index 3bb3c5cb0..674006326 100644 --- a/pkgs/browser_launcher/README.md +++ b/pkgs/browser_launcher/README.md @@ -1,4 +1,4 @@ -[![Build Status](https://travis-ci.org/dart-lang/browser_launcher.svg?branch=master)](https://travis-ci.org/dart-lang/browser_launcher) +[![Dart](https://github.com/dart-lang/browser_launcher/workflows/Dart/badge.svg)](https://github.com/dart-lang/browser_launcher/actions?query=workflow%3ADart) Provides a standardized way to launch web browsers. From cb4ab864182eb721178b2d9b1a2d4a8d0387baa2 Mon Sep 17 00:00:00 2001 From: Gary Roumanis Date: Fri, 4 Dec 2020 12:33:43 -0800 Subject: [PATCH 20/66] Only show CI results for master (dart-lang/browser_launcher#23) --- pkgs/browser_launcher/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/browser_launcher/README.md b/pkgs/browser_launcher/README.md index 674006326..3c83cde87 100644 --- a/pkgs/browser_launcher/README.md +++ b/pkgs/browser_launcher/README.md @@ -1,4 +1,4 @@ -[![Dart](https://github.com/dart-lang/browser_launcher/workflows/Dart/badge.svg)](https://github.com/dart-lang/browser_launcher/actions?query=workflow%3ADart) +[![Dart](https://github.com/dart-lang/browser_launcher/workflows/Dart/badge.svg)](https://github.com/dart-lang/browser_launcher/actions?query=workflow%3ADart+branch%3Amaster) Provides a standardized way to launch web browsers. From 0e93231c861deb9e0923a9af16a4d0c75ae88eb2 Mon Sep 17 00:00:00 2001 From: MarkZ Date: Thu, 18 Mar 2021 15:04:59 -0700 Subject: [PATCH 21/66] Adding additional Chrome environment variables for executable resolution. (dart-lang/browser_launcher#24) * Adding additional Chrome environment variables to executable resolution. * Updating changelog and version --- pkgs/browser_launcher/CHANGELOG.md | 4 ++++ pkgs/browser_launcher/lib/src/chrome.dart | 8 +++++--- pkgs/browser_launcher/pubspec.yaml | 2 +- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/pkgs/browser_launcher/CHANGELOG.md b/pkgs/browser_launcher/CHANGELOG.md index 9f9759aa0..42f89bf24 100644 --- a/pkgs/browser_launcher/CHANGELOG.md +++ b/pkgs/browser_launcher/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.1.9 + + - Add support for Chrome executables in `CHROME_PATH`. + ## 0.1.8 - Log `STDERR` on Chrome launch failure. diff --git a/pkgs/browser_launcher/lib/src/chrome.dart b/pkgs/browser_launcher/lib/src/chrome.dart index bfa427095..04d0262d3 100644 --- a/pkgs/browser_launcher/lib/src/chrome.dart +++ b/pkgs/browser_launcher/lib/src/chrome.dart @@ -9,15 +9,17 @@ import 'dart:io'; import 'package:path/path.dart' as p; import 'package:webkit_inspection_protocol/webkit_inspection_protocol.dart'; -const _chromeEnvironment = 'CHROME_EXECUTABLE'; +const _chromeEnvironments = ['CHROME_EXECUTABLE', 'CHROME_PATH']; const _linuxExecutable = 'google-chrome'; const _macOSExecutable = '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome'; const _windowsExecutable = r'Google\Chrome\Application\chrome.exe'; String get _executable { - if (Platform.environment.containsKey(_chromeEnvironment)) { - return Platform.environment[_chromeEnvironment]; + for (var chromeEnv in _chromeEnvironments) { + if (Platform.environment.containsKey(chromeEnv)) { + return Platform.environment[chromeEnv]; + } } if (Platform.isLinux) return _linuxExecutable; if (Platform.isMacOS) return _macOSExecutable; diff --git a/pkgs/browser_launcher/pubspec.yaml b/pkgs/browser_launcher/pubspec.yaml index 1d8367b20..186703f1a 100644 --- a/pkgs/browser_launcher/pubspec.yaml +++ b/pkgs/browser_launcher/pubspec.yaml @@ -1,7 +1,7 @@ name: browser_launcher description: Provides a standardized way to launch web browsers for testing and tools. -version: 0.1.8 +version: 0.1.9 homepage: https://github.com/dart-lang/browser_launcher From 874023a3063fb6e636d24fc9f8f061f4e2476915 Mon Sep 17 00:00:00 2001 From: Gary Roumanis Date: Thu, 25 Mar 2021 14:17:17 -0700 Subject: [PATCH 22/66] Support latest webkit_inspection_protocol (dart-lang/browser_launcher#25) --- pkgs/browser_launcher/CHANGELOG.md | 4 ++++ pkgs/browser_launcher/pubspec.yaml | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/browser_launcher/CHANGELOG.md b/pkgs/browser_launcher/CHANGELOG.md index 42f89bf24..90fd3b569 100644 --- a/pkgs/browser_launcher/CHANGELOG.md +++ b/pkgs/browser_launcher/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.1.10 + + - Support `webkit_inspection_protocol` version `^1.0.0`. + ## 0.1.9 - Add support for Chrome executables in `CHROME_PATH`. diff --git a/pkgs/browser_launcher/pubspec.yaml b/pkgs/browser_launcher/pubspec.yaml index 186703f1a..ad724322a 100644 --- a/pkgs/browser_launcher/pubspec.yaml +++ b/pkgs/browser_launcher/pubspec.yaml @@ -1,7 +1,7 @@ name: browser_launcher description: Provides a standardized way to launch web browsers for testing and tools. -version: 0.1.9 +version: 0.1.10 homepage: https://github.com/dart-lang/browser_launcher @@ -10,7 +10,7 @@ environment: dependencies: path: ^1.6.2 - webkit_inspection_protocol: '>=0.4.0 <0.8.0' + webkit_inspection_protocol: ^1.0.0 dev_dependencies: pedantic: ^1.5.0 From 8140ac10bc3c0bd72916bfb8ea766c34b99ec2be Mon Sep 17 00:00:00 2001 From: Franklin Yow <58489007+franklinyow@users.noreply.github.com> Date: Wed, 31 Mar 2021 17:25:39 -0700 Subject: [PATCH 23/66] Update LICENSE Changes to comply to internal review --- pkgs/browser_launcher/LICENSE | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/browser_launcher/LICENSE b/pkgs/browser_launcher/LICENSE index f75d7c237..767000764 100644 --- a/pkgs/browser_launcher/LICENSE +++ b/pkgs/browser_launcher/LICENSE @@ -1,4 +1,5 @@ -Copyright 2019, the Dart project authors. All rights reserved. +Copyright 2019, the Dart project authors. + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -9,7 +10,7 @@ met: copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - * Neither the name of Google Inc. nor the names of its + * Neither the name of Google LLC nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. From 723189aa5c00bf846db53bf7e8e24c978e86330f Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Fri, 23 Apr 2021 10:37:13 -0700 Subject: [PATCH 24/66] Update CI bits (dart-lang/browser_launcher#26) --- .../.github/workflows/dart.yml | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/pkgs/browser_launcher/.github/workflows/dart.yml b/pkgs/browser_launcher/.github/workflows/dart.yml index d667bc88d..f2baf3184 100644 --- a/pkgs/browser_launcher/.github/workflows/dart.yml +++ b/pkgs/browser_launcher/.github/workflows/dart.yml @@ -1,36 +1,36 @@ name: Dart on: + # Run on PRs and pushes to the default branch. push: branches: [ master ] pull_request: branches: [ master ] + schedule: + - cron: "0 0 * * 0" + +env: + PUB_ENVIRONMENT: bot.github + DISPLAY: ':99' jobs: test: runs-on: ubuntu-latest - - env: - DISPLAY: ':99' - + strategy: + matrix: + sdk: [2.12.0, dev] steps: - uses: actions/checkout@v2 - - uses: cedx/setup-dart@v2 + - uses: dart-lang/setup-dart@v1.0 with: - release-channel: stable - version: latest - - - name: Print Dart SDK version - run: dart --version + sdk: ${{ matrix.sdk }} - - name: Install dependencies - run: dart pub get + - run: dart pub get + id: install - - name: Analyze project source - run: dart analyze + - run: dart analyze --fatal-infos - name: Run Xvfb run: Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 & - - name: Run tests - run: dart test + - run: dart test From bf3087d6021b3b6f14aecebee882962b185f7c9c Mon Sep 17 00:00:00 2001 From: Kenzie Schmoll <43759233+kenzieschmoll@users.noreply.github.com> Date: Fri, 7 May 2021 14:40:24 -0700 Subject: [PATCH 25/66] Migrate browser_launcher to null-safety. (dart-lang/browser_launcher#27) --- pkgs/browser_launcher/CHANGELOG.md | 4 +++ pkgs/browser_launcher/lib/src/chrome.dart | 32 ++++++++++++--------- pkgs/browser_launcher/pubspec.yaml | 10 +++---- pkgs/browser_launcher/test/chrome_test.dart | 10 +++---- 4 files changed, 33 insertions(+), 23 deletions(-) diff --git a/pkgs/browser_launcher/CHANGELOG.md b/pkgs/browser_launcher/CHANGELOG.md index 90fd3b569..d83ac83f3 100644 --- a/pkgs/browser_launcher/CHANGELOG.md +++ b/pkgs/browser_launcher/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.0 + + - Migrate to null-safety. + ## 0.1.10 - Support `webkit_inspection_protocol` version `^1.0.0`. diff --git a/pkgs/browser_launcher/lib/src/chrome.dart b/pkgs/browser_launcher/lib/src/chrome.dart index 04d0262d3..139188461 100644 --- a/pkgs/browser_launcher/lib/src/chrome.dart +++ b/pkgs/browser_launcher/lib/src/chrome.dart @@ -18,7 +18,7 @@ const _windowsExecutable = r'Google\Chrome\Application\chrome.exe'; String get _executable { for (var chromeEnv in _chromeEnvironments) { if (Platform.environment.containsKey(chromeEnv)) { - return Platform.environment[chromeEnv]; + return Platform.environment[chromeEnv]!; } } if (Platform.isLinux) return _linuxExecutable; @@ -34,7 +34,7 @@ String get _executable { if (prefix == null) return false; final path = p.join(prefix, _windowsExecutable); return File(path).existsSync(); - }, orElse: () => '.'), + }, orElse: () => '.')!, _windowsExecutable, ); } @@ -43,15 +43,19 @@ String get _executable { /// Manager for an instance of Chrome. class Chrome { - Chrome._(this.debugPort, this.chromeConnection, - {Process process, Directory dataDir, this.deleteDataDir = false}) - : _process = process, + Chrome._( + this.debugPort, + this.chromeConnection, { + Process? process, + Directory? dataDir, + this.deleteDataDir = false, + }) : _process = process, _dataDir = dataDir; final int debugPort; final ChromeConnection chromeConnection; - final Process _process; - final Directory _dataDir; + final Process? _process; + final Directory? _dataDir; final bool deleteDataDir; /// Connects to an instance of Chrome with an open debug port. @@ -61,17 +65,19 @@ class Chrome { /// Starts Chrome with the given arguments and a specific port. /// /// Each url in [urls] will be loaded in a separate tab. - static Future startWithDebugPort(List urls, - {int debugPort, bool headless = false, String userDataDir}) async { + static Future startWithDebugPort( + List urls, { + int debugPort = 0, + bool headless = false, + String? userDataDir, + }) async { Directory dataDir; if (userDataDir == null) { dataDir = Directory.systemTemp.createTempSync(); } else { dataDir = Directory(userDataDir); } - final port = debugPort == null || debugPort == 0 - ? await findUnusedPort() - : debugPort; + final port = debugPort == 0 ? await findUnusedPort() : debugPort; final args = [ // Using a tmp directory ensures that a new instance of chrome launches // allowing for the remote debug port to be enabled. @@ -117,7 +123,7 @@ class Chrome { ChromeConnection('localhost', port), process: process, dataDir: dataDir, - deleteDataDir: userDataDir = null, + deleteDataDir: userDataDir == null, )); } diff --git a/pkgs/browser_launcher/pubspec.yaml b/pkgs/browser_launcher/pubspec.yaml index ad724322a..7233840cf 100644 --- a/pkgs/browser_launcher/pubspec.yaml +++ b/pkgs/browser_launcher/pubspec.yaml @@ -1,17 +1,17 @@ name: browser_launcher description: Provides a standardized way to launch web browsers for testing and tools. -version: 0.1.10 +version: 1.0.0 homepage: https://github.com/dart-lang/browser_launcher environment: - sdk: '>=2.2.0 <3.0.0' + sdk: '>=2.12.0 <3.0.0' dependencies: - path: ^1.6.2 + path: ^1.8.0 webkit_inspection_protocol: ^1.0.0 dev_dependencies: - pedantic: ^1.5.0 - test: ^1.0.0 + pedantic: ^1.11.0 + test: ^1.17.3 diff --git a/pkgs/browser_launcher/test/chrome_test.dart b/pkgs/browser_launcher/test/chrome_test.dart index a63220f10..02632254d 100644 --- a/pkgs/browser_launcher/test/chrome_test.dart +++ b/pkgs/browser_launcher/test/chrome_test.dart @@ -10,9 +10,9 @@ import 'package:test/test.dart'; import 'package:webkit_inspection_protocol/webkit_inspection_protocol.dart'; void main() { - Chrome chrome; + Chrome? chrome; - Future launchChromeWithDebugPort({int port}) async { + Future launchChromeWithDebugPort({int port = 0}) async { chrome = await Chrome.startWithDebugPort([_googleUrl], debugPort: port); } @@ -37,7 +37,7 @@ void main() { test('debugger is working', () async { await launchChromeWithDebugPort(); - var tabs = await chrome.chromeConnection.getTabs(); + var tabs = await chrome!.chromeConnection.getTabs(); expect( tabs, contains(const TypeMatcher() @@ -46,13 +46,13 @@ void main() { test('uses open debug port if provided port is 0', () async { await launchChromeWithDebugPort(port: 0); - expect(chrome.debugPort, isNot(equals(0))); + expect(chrome!.debugPort, isNot(equals(0))); }); test('can provide a specific debug port', () async { var port = await findUnusedPort(); await launchChromeWithDebugPort(port: port); - expect(chrome.debugPort, port); + expect(chrome!.debugPort, port); }); } From 6b588f7a055e2a84113432d01bf20b51c0f1a0c4 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Wed, 20 Oct 2021 12:33:20 -0700 Subject: [PATCH 26/66] Move to pkg:lints (dart-lang/browser_launcher#28) --- pkgs/browser_launcher/CHANGELOG.md | 8 +++-- pkgs/browser_launcher/analysis_options.yaml | 39 ++++----------------- pkgs/browser_launcher/pubspec.yaml | 4 +-- 3 files changed, 14 insertions(+), 37 deletions(-) diff --git a/pkgs/browser_launcher/CHANGELOG.md b/pkgs/browser_launcher/CHANGELOG.md index d83ac83f3..66736db95 100644 --- a/pkgs/browser_launcher/CHANGELOG.md +++ b/pkgs/browser_launcher/CHANGELOG.md @@ -1,14 +1,16 @@ +## 1.0.1-dev + ## 1.0.0 - - Migrate to null-safety. +- Migrate to null-safety. ## 0.1.10 - - Support `webkit_inspection_protocol` version `^1.0.0`. +- Support `webkit_inspection_protocol` version `^1.0.0`. ## 0.1.9 - - Add support for Chrome executables in `CHROME_PATH`. +- Add support for Chrome executables in `CHROME_PATH`. ## 0.1.8 diff --git a/pkgs/browser_launcher/analysis_options.yaml b/pkgs/browser_launcher/analysis_options.yaml index 0711acad5..b19160534 100644 --- a/pkgs/browser_launcher/analysis_options.yaml +++ b/pkgs/browser_launcher/analysis_options.yaml @@ -1,43 +1,18 @@ -include: package:pedantic/analysis_options.yaml +include: package:lints/recommended.yaml + analyzer: strong-mode: implicit-casts: false + linter: rules: - - avoid_empty_else - - avoid_init_to_null - - avoid_null_checks_in_equality_operators + - always_declare_return_types - avoid_unused_constructor_parameters - - await_only_futures - - camel_case_types - cancel_subscriptions - - constant_identifier_names - - control_flow_in_finally - directives_ordering - - empty_catches - - empty_constructor_bodies - - empty_statements - - hash_and_equals - - implementation_imports - - iterable_contains_unrelated_type - - library_names - - library_prefixes - - list_remove_unrelated_type - - non_constant_identifier_names - - overridden_fields + - omit_local_variable_types - package_api_docs - - package_names - - package_prefixed_library_names - - prefer_equal_for_default_values - - prefer_final_fields - - prefer_generic_function_type_aliases - - prefer_is_not_empty - - slash_for_doc_comments + - prefer_single_quotes - test_types_in_equals - throw_in_finally - - type_init_formals - - unnecessary_brace_in_string_interps - - unnecessary_const - - unnecessary_new - - unrelated_type_equality_checks - - valid_regexps + - unawaited_futures diff --git a/pkgs/browser_launcher/pubspec.yaml b/pkgs/browser_launcher/pubspec.yaml index 7233840cf..082db41c6 100644 --- a/pkgs/browser_launcher/pubspec.yaml +++ b/pkgs/browser_launcher/pubspec.yaml @@ -1,7 +1,7 @@ name: browser_launcher description: Provides a standardized way to launch web browsers for testing and tools. -version: 1.0.0 +version: 1.0.1-dev homepage: https://github.com/dart-lang/browser_launcher @@ -13,5 +13,5 @@ dependencies: webkit_inspection_protocol: ^1.0.0 dev_dependencies: - pedantic: ^1.11.0 + lints: ^1.0.0 test: ^1.17.3 From b8aadc7feb0dc257b6f5d37f8a5415aee87f888f Mon Sep 17 00:00:00 2001 From: Anna Gringauze Date: Fri, 21 Jan 2022 11:30:18 -0800 Subject: [PATCH 27/66] Allow signing into default profile and enabling extensions (dart-lang/browser_launcher#29) * Allow signing into default profile and enabling extensions - Add `signIn` argument to `startWithDebugPort` API. - Add tests. Related: https://github.com/dart-lang/webdev/issues/1490 * Addressed CR comments, fixed test failure * Addressed more CR comments * Addressed CR comments, fixed test flake * Create tem dir for eacch test, better flake fix * Make closing chrome on each test explicit --- pkgs/browser_launcher/CHANGELOG.md | 6 +- pkgs/browser_launcher/lib/src/chrome.dart | 15 +- pkgs/browser_launcher/pubspec.yaml | 2 +- pkgs/browser_launcher/test/chrome_test.dart | 148 ++++++++++++++++---- 4 files changed, 138 insertions(+), 33 deletions(-) diff --git a/pkgs/browser_launcher/CHANGELOG.md b/pkgs/browser_launcher/CHANGELOG.md index 66736db95..8a339c877 100644 --- a/pkgs/browser_launcher/CHANGELOG.md +++ b/pkgs/browser_launcher/CHANGELOG.md @@ -1,4 +1,8 @@ -## 1.0.1-dev +## 1.1.0-dev + +- Add optional `signIn` argument to `startWithDebugPort`. + To be used together with `user-data-dir` to start a chrome + window signed into the default profile with extensions enabled. ## 1.0.0 diff --git a/pkgs/browser_launcher/lib/src/chrome.dart b/pkgs/browser_launcher/lib/src/chrome.dart index 139188461..ed6673e0a 100644 --- a/pkgs/browser_launcher/lib/src/chrome.dart +++ b/pkgs/browser_launcher/lib/src/chrome.dart @@ -65,14 +65,25 @@ class Chrome { /// Starts Chrome with the given arguments and a specific port. /// /// Each url in [urls] will be loaded in a separate tab. + /// + /// If [userDataDir] is `null`, a new temp directory will be + /// passed to chrome as a user data directory. Chrome will + /// start without sign in and with extensions disabled. + /// + /// If [userDataDir] is not `null`, it will be passed to chrome + /// as a user data directory. Chrome will start signed into + /// the default profile with extensions enabled if [signIn] + /// is also true. static Future startWithDebugPort( List urls, { int debugPort = 0, bool headless = false, String? userDataDir, + bool signIn = false, }) async { Directory dataDir; if (userDataDir == null) { + signIn = false; dataDir = Directory.systemTemp.createTempSync(); } else { dataDir = Directory(userDataDir); @@ -87,9 +98,9 @@ class Chrome { '--disable-background-timer-throttling', // Since we are using a temp profile, disable features that slow the // Chrome launch. - '--disable-extensions', + if (!signIn) '--disable-extensions', '--disable-popup-blocking', - '--bwsi', + if (!signIn) '--bwsi', '--no-first-run', '--no-default-browser-check', '--disable-default-apps', diff --git a/pkgs/browser_launcher/pubspec.yaml b/pkgs/browser_launcher/pubspec.yaml index 082db41c6..d2eb157db 100644 --- a/pkgs/browser_launcher/pubspec.yaml +++ b/pkgs/browser_launcher/pubspec.yaml @@ -1,7 +1,7 @@ name: browser_launcher description: Provides a standardized way to launch web browsers for testing and tools. -version: 1.0.1-dev +version: 1.1.0-dev homepage: https://github.com/dart-lang/browser_launcher diff --git a/pkgs/browser_launcher/test/chrome_test.dart b/pkgs/browser_launcher/test/chrome_test.dart index 02632254d..0c098a24d 100644 --- a/pkgs/browser_launcher/test/chrome_test.dart +++ b/pkgs/browser_launcher/test/chrome_test.dart @@ -4,6 +4,7 @@ @OnPlatform({'windows': Skip('appveyor is not setup to install Chrome')}) import 'dart:async'; +import 'dart:io'; import 'package:browser_launcher/src/chrome.dart'; import 'package:test/test.dart'; @@ -12,48 +13,137 @@ import 'package:webkit_inspection_protocol/webkit_inspection_protocol.dart'; void main() { Chrome? chrome; - Future launchChromeWithDebugPort({int port = 0}) async { - chrome = await Chrome.startWithDebugPort([_googleUrl], debugPort: port); + Future connectToTab(String url) async { + var tab = await chrome!.chromeConnection.getTab((t) => t.url.contains(url)); + expect(tab, isNotNull); + return tab!.connect(); + } + + Future openTab(String url) async { + await chrome!.chromeConnection.getUrl(_openTabUrl(url)); + } + + Future launchChromeWithDebugPort( + {int port = 0, String? userDataDir, bool signIn = false}) async { + chrome = await Chrome.startWithDebugPort([_googleUrl], + debugPort: port, userDataDir: userDataDir, signIn: signIn); } Future launchChrome() async { await Chrome.start([_googleUrl]); } - tearDown(() async { - await chrome?.close(); - chrome = null; - }); + group('chrome with temp data dir', () { + tearDown(() async { + await chrome?.close(); + chrome = null; + }); - test('can launch chrome', () async { - await launchChrome(); - expect(chrome, isNull); - }); + test('can launch chrome', () async { + await launchChrome(); + expect(chrome, isNull); + }); - test('can launch chrome with debug port', () async { - await launchChromeWithDebugPort(); - expect(chrome, isNotNull); - }); + test('can launch chrome with debug port', () async { + await launchChromeWithDebugPort(); + expect(chrome, isNotNull); + }); - test('debugger is working', () async { - await launchChromeWithDebugPort(); - var tabs = await chrome!.chromeConnection.getTabs(); - expect( - tabs, - contains(const TypeMatcher() - .having((t) => t.url, 'url', _googleUrl))); - }); + test('has a working debugger', () async { + await launchChromeWithDebugPort(); + var tabs = await chrome!.chromeConnection.getTabs(); + expect( + tabs, + contains(const TypeMatcher() + .having((t) => t.url, 'url', _googleUrl))); + }); + + test('uses open debug port if provided port is 0', () async { + await launchChromeWithDebugPort(port: 0); + expect(chrome!.debugPort, isNot(equals(0))); + }); - test('uses open debug port if provided port is 0', () async { - await launchChromeWithDebugPort(port: 0); - expect(chrome!.debugPort, isNot(equals(0))); + test('can provide a specific debug port', () async { + var port = await findUnusedPort(); + await launchChromeWithDebugPort(port: port); + expect(chrome!.debugPort, port); + }); }); - test('can provide a specific debug port', () async { - var port = await findUnusedPort(); - await launchChromeWithDebugPort(port: port); - expect(chrome!.debugPort, port); + group('chrome with user data dir', () { + late Directory dataDir; + + for (var signIn in [false, true]) { + group('and signIn = $signIn', () { + setUp(() { + dataDir = Directory.systemTemp.createTempSync(_userDataDirName); + }); + + tearDown(() async { + await chrome?.close(); + chrome = null; + + var attempts = 0; + while (true) { + try { + attempts++; + await Future.delayed(const Duration(milliseconds: 100)); + dataDir.deleteSync(recursive: true); + break; + } catch (_) { + if (attempts > 3) rethrow; + } + } + }); + + test('can launch with debug port', () async { + await launchChromeWithDebugPort( + userDataDir: dataDir.path, signIn: signIn); + expect(chrome, isNotNull); + }); + + test('has a working debugger', () async { + await launchChromeWithDebugPort( + userDataDir: dataDir.path, signIn: signIn); + var tabs = await chrome!.chromeConnection.getTabs(); + expect( + tabs, + contains(const TypeMatcher() + .having((t) => t.url, 'url', _googleUrl))); + }); + + test('has correct profile path', () async { + await launchChromeWithDebugPort( + userDataDir: dataDir.path, signIn: signIn); + await openTab(_chromeVersionUrl); + + var wipConnection = await connectToTab(_chromeVersionUrl); + var result = await _evaluateExpression(wipConnection.page, + "document.getElementById('profile_path').textContent"); + + expect(result, contains(_userDataDirName)); + }); + }); + } }); } +String _openTabUrl(String url) => '/json/new?$url'; + +Future _evaluateExpression(WipPage page, String expression) async { + var result = ''; + while (result.isEmpty) { + await Future.delayed(Duration(milliseconds: 100)); + var wipResponse = await page.sendCommand( + 'Runtime.evaluate', + params: {'expression': expression}, + ); + var value = wipResponse.json['result']['result']['value']; + result = (value != null && value is String) ? value : ''; + } + return result; +} + const _googleUrl = 'https://www.google.com/'; +const _chromeVersionUrl = 'chrome://version/'; +const _userDataDirName = 'data dir'; From d9374a7ef9b145067329ca21bad0b364c50c8dcd Mon Sep 17 00:00:00 2001 From: Devon Carew Date: Thu, 17 Feb 2022 14:50:39 -0800 Subject: [PATCH 28/66] enable the avoid_dynamic_calls lint (dart-lang/browser_launcher#30) --- pkgs/browser_launcher/CHANGELOG.md | 1 + pkgs/browser_launcher/analysis_options.yaml | 1 + pkgs/browser_launcher/test/chrome_test.dart | 3 ++- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/browser_launcher/CHANGELOG.md b/pkgs/browser_launcher/CHANGELOG.md index 8a339c877..d428a711a 100644 --- a/pkgs/browser_launcher/CHANGELOG.md +++ b/pkgs/browser_launcher/CHANGELOG.md @@ -3,6 +3,7 @@ - Add optional `signIn` argument to `startWithDebugPort`. To be used together with `user-data-dir` to start a chrome window signed into the default profile with extensions enabled. +- Enable the `avoid_dynamic_calls` lint. ## 1.0.0 diff --git a/pkgs/browser_launcher/analysis_options.yaml b/pkgs/browser_launcher/analysis_options.yaml index b19160534..87eecf145 100644 --- a/pkgs/browser_launcher/analysis_options.yaml +++ b/pkgs/browser_launcher/analysis_options.yaml @@ -7,6 +7,7 @@ analyzer: linter: rules: - always_declare_return_types + - avoid_dynamic_calls - avoid_unused_constructor_parameters - cancel_subscriptions - directives_ordering diff --git a/pkgs/browser_launcher/test/chrome_test.dart b/pkgs/browser_launcher/test/chrome_test.dart index 0c098a24d..be87d53ec 100644 --- a/pkgs/browser_launcher/test/chrome_test.dart +++ b/pkgs/browser_launcher/test/chrome_test.dart @@ -138,7 +138,8 @@ Future _evaluateExpression(WipPage page, String expression) async { 'Runtime.evaluate', params: {'expression': expression}, ); - var value = wipResponse.json['result']['result']['value']; + var response = wipResponse.json['result'] as Map; + var value = (response['result'] as Map)['value']; result = (value != null && value is String) ? value : ''; } return result; From ad39f103259b33affe5892b03a7f4f063c5319ce Mon Sep 17 00:00:00 2001 From: Anna Gringauze Date: Mon, 21 Mar 2022 13:49:48 -0700 Subject: [PATCH 29/66] Update version (dart-lang/browser_launcher#31) --- pkgs/browser_launcher/CHANGELOG.md | 2 +- pkgs/browser_launcher/pubspec.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/browser_launcher/CHANGELOG.md b/pkgs/browser_launcher/CHANGELOG.md index d428a711a..1b93e142d 100644 --- a/pkgs/browser_launcher/CHANGELOG.md +++ b/pkgs/browser_launcher/CHANGELOG.md @@ -1,4 +1,4 @@ -## 1.1.0-dev +## 1.1.0 - Add optional `signIn` argument to `startWithDebugPort`. To be used together with `user-data-dir` to start a chrome diff --git a/pkgs/browser_launcher/pubspec.yaml b/pkgs/browser_launcher/pubspec.yaml index d2eb157db..6729bb269 100644 --- a/pkgs/browser_launcher/pubspec.yaml +++ b/pkgs/browser_launcher/pubspec.yaml @@ -1,7 +1,7 @@ name: browser_launcher description: Provides a standardized way to launch web browsers for testing and tools. -version: 1.1.0-dev +version: 1.1.0 homepage: https://github.com/dart-lang/browser_launcher From 9934aceea98c660268d2dd202b628f4fd167577e Mon Sep 17 00:00:00 2001 From: Devon Carew Date: Tue, 19 Apr 2022 08:53:01 -0700 Subject: [PATCH 30/66] Update pubspec.yaml (dart-lang/browser_launcher#32) --- pkgs/browser_launcher/pubspec.yaml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pkgs/browser_launcher/pubspec.yaml b/pkgs/browser_launcher/pubspec.yaml index 6729bb269..1678f1002 100644 --- a/pkgs/browser_launcher/pubspec.yaml +++ b/pkgs/browser_launcher/pubspec.yaml @@ -1,9 +1,7 @@ name: browser_launcher -description: Provides a standardized way to launch web browsers for testing and tools. - version: 1.1.0 - -homepage: https://github.com/dart-lang/browser_launcher +description: Provides a standardized way to launch web browsers for testing and tools. +repository: https://github.com/dart-lang/browser_launcher environment: sdk: '>=2.12.0 <3.0.0' From dc9cb608723501e4e42062465ce4a71436226d6f Mon Sep 17 00:00:00 2001 From: Devon Carew Date: Wed, 15 Jun 2022 11:25:15 -0700 Subject: [PATCH 31/66] prep for publishing (dart-lang/browser_launcher#33) --- pkgs/browser_launcher/CHANGELOG.md | 4 ++++ pkgs/browser_launcher/README.md | 7 ++++--- pkgs/browser_launcher/pubspec.yaml | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/pkgs/browser_launcher/CHANGELOG.md b/pkgs/browser_launcher/CHANGELOG.md index 1b93e142d..f014ae24c 100644 --- a/pkgs/browser_launcher/CHANGELOG.md +++ b/pkgs/browser_launcher/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.1.1 + +- Populate the pubspec `repository` field. + ## 1.1.0 - Add optional `signIn` argument to `startWithDebugPort`. diff --git a/pkgs/browser_launcher/README.md b/pkgs/browser_launcher/README.md index 3c83cde87..cf534ab3e 100644 --- a/pkgs/browser_launcher/README.md +++ b/pkgs/browser_launcher/README.md @@ -1,7 +1,8 @@ [![Dart](https://github.com/dart-lang/browser_launcher/workflows/Dart/badge.svg)](https://github.com/dart-lang/browser_launcher/actions?query=workflow%3ADart+branch%3Amaster) +[![pub package](https://img.shields.io/pub/v/browser_launcher.svg)](https://pub.dev/packages/browser_launcher) +[![package publisher](https://img.shields.io/pub/publisher/browser_launcher.svg)](https://pub.dev/packages/browser_launcher/publisher) Provides a standardized way to launch web browsers. -Currently, Chrome is the only supported browser. - -Support for other browsers will be added in the future. +Currently, Chrome is the only supported browser; support for other browsers may +be added in the future. diff --git a/pkgs/browser_launcher/pubspec.yaml b/pkgs/browser_launcher/pubspec.yaml index 1678f1002..549d94284 100644 --- a/pkgs/browser_launcher/pubspec.yaml +++ b/pkgs/browser_launcher/pubspec.yaml @@ -1,5 +1,5 @@ name: browser_launcher -version: 1.1.0 +version: 1.1.1 description: Provides a standardized way to launch web browsers for testing and tools. repository: https://github.com/dart-lang/browser_launcher From 9463626f3a42f7422f89ed5351d283fd2370ab58 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Tue, 1 Nov 2022 11:26:51 -0700 Subject: [PATCH 32/66] Update lints, require Dart 2.17, add dependabot (dart-lang/browser_launcher#34) --- pkgs/browser_launcher/.github/dependabot.yml | 9 +++ .../.github/workflows/dart.yml | 7 +- pkgs/browser_launcher/CHANGELOG.md | 4 + pkgs/browser_launcher/analysis_options.yaml | 40 +++++++++- pkgs/browser_launcher/example/main.dart | 4 +- pkgs/browser_launcher/lib/src/chrome.dart | 52 +++++++------ pkgs/browser_launcher/pubspec.yaml | 6 +- pkgs/browser_launcher/test/chrome_test.dart | 74 ++++++++++++------- 8 files changed, 137 insertions(+), 59 deletions(-) create mode 100644 pkgs/browser_launcher/.github/dependabot.yml diff --git a/pkgs/browser_launcher/.github/dependabot.yml b/pkgs/browser_launcher/.github/dependabot.yml new file mode 100644 index 000000000..e7af80137 --- /dev/null +++ b/pkgs/browser_launcher/.github/dependabot.yml @@ -0,0 +1,9 @@ +# Set update schedule for GitHub Actions + +version: 2 +updates: + +- package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "monthly" diff --git a/pkgs/browser_launcher/.github/workflows/dart.yml b/pkgs/browser_launcher/.github/workflows/dart.yml index f2baf3184..b6afb61bb 100644 --- a/pkgs/browser_launcher/.github/workflows/dart.yml +++ b/pkgs/browser_launcher/.github/workflows/dart.yml @@ -18,16 +18,17 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - sdk: [2.12.0, dev] + sdk: [2.17.0, dev] steps: - - uses: actions/checkout@v2 - - uses: dart-lang/setup-dart@v1.0 + - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 + - uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d with: sdk: ${{ matrix.sdk }} - run: dart pub get id: install + - run: dart format --output=none --set-exit-if-changed . - run: dart analyze --fatal-infos - name: Run Xvfb diff --git a/pkgs/browser_launcher/CHANGELOG.md b/pkgs/browser_launcher/CHANGELOG.md index f014ae24c..8befbbf43 100644 --- a/pkgs/browser_launcher/CHANGELOG.md +++ b/pkgs/browser_launcher/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.1.2-dev + +- Require Dart 2.17 + ## 1.1.1 - Populate the pubspec `repository` field. diff --git a/pkgs/browser_launcher/analysis_options.yaml b/pkgs/browser_launcher/analysis_options.yaml index 87eecf145..4a111f39a 100644 --- a/pkgs/browser_launcher/analysis_options.yaml +++ b/pkgs/browser_launcher/analysis_options.yaml @@ -1,19 +1,55 @@ +# https://dart.dev/guides/language/analysis-options include: package:lints/recommended.yaml analyzer: - strong-mode: - implicit-casts: false + language: + strict-casts: true + strict-inference: true + strict-raw-types: true linter: rules: - always_declare_return_types + - avoid_bool_literals_in_conditional_expressions + - avoid_catching_errors + - avoid_classes_with_only_static_members - avoid_dynamic_calls + - avoid_private_typedef_functions + - avoid_redundant_argument_values + - avoid_returning_null_for_future + - avoid_returning_this - avoid_unused_constructor_parameters + - avoid_void_async - cancel_subscriptions + - comment_references - directives_ordering + - join_return_with_assignment + - lines_longer_than_80_chars + - literal_only_boolean_expressions + - missing_whitespace_between_adjacent_strings + - no_adjacent_strings_in_list + - no_runtimeType_toString - omit_local_variable_types + - only_throw_errors - package_api_docs + - prefer_asserts_in_initializer_lists + - prefer_const_constructors + - prefer_const_declarations + - prefer_expression_function_bodies + - prefer_final_locals + - prefer_relative_imports - prefer_single_quotes + - require_trailing_commas + - sort_pub_dependencies - test_types_in_equals - throw_in_finally + - type_annotate_public_apis - unawaited_futures + - unnecessary_lambdas + - unnecessary_parenthesis + - unnecessary_raw_strings + - unnecessary_statements + - use_if_null_to_convert_nulls_to_bools + - use_raw_strings + - use_string_buffers + - use_super_parameters diff --git a/pkgs/browser_launcher/example/main.dart b/pkgs/browser_launcher/example/main.dart index a586de464..86b4eea3a 100644 --- a/pkgs/browser_launcher/example/main.dart +++ b/pkgs/browser_launcher/example/main.dart @@ -10,7 +10,7 @@ Future main() async { print('launched Chrome'); // Pause briefly before opening Chrome with a debug port. - await Future.delayed(Duration(seconds: 3)); + await Future.delayed(const Duration(seconds: 3)); // Launches a chrome browser open to [_googleUrl]. Since we are launching with // a debug port, we will use a variety of different launch configurations, @@ -20,7 +20,7 @@ Future main() async { // When running this dart code, observe that the browser stays open for 3 // seconds before we close it. - await Future.delayed(Duration(seconds: 3)); + await Future.delayed(const Duration(seconds: 3)); await chrome.close(); print('closed Chrome'); diff --git a/pkgs/browser_launcher/lib/src/chrome.dart b/pkgs/browser_launcher/lib/src/chrome.dart index ed6673e0a..5fea228cf 100644 --- a/pkgs/browser_launcher/lib/src/chrome.dart +++ b/pkgs/browser_launcher/lib/src/chrome.dart @@ -30,11 +30,14 @@ String get _executable { Platform.environment['PROGRAMFILES(X86)'] ]; return p.join( - windowsPrefixes.firstWhere((prefix) { - if (prefix == null) return false; - final path = p.join(prefix, _windowsExecutable); - return File(path).existsSync(); - }, orElse: () => '.')!, + windowsPrefixes.firstWhere( + (prefix) { + if (prefix == null) return false; + final path = p.join(prefix, _windowsExecutable); + return File(path).existsSync(); + }, + orElse: () => '.', + )!, _windowsExecutable, ); } @@ -114,28 +117,31 @@ class Chrome { final process = await _startProcess(urls, args: args); // Wait until the DevTools are listening before trying to connect. - var _errorLines = []; + final errorLines = []; try { await process.stderr .transform(utf8.decoder) .transform(const LineSplitter()) .firstWhere((line) { - _errorLines.add(line); + errorLines.add(line); return line.startsWith('DevTools listening'); - }).timeout(Duration(seconds: 60)); + }).timeout(const Duration(seconds: 60)); } catch (_) { - throw Exception('Unable to connect to Chrome DevTools.\n\n' - 'Chrome STDERR:\n' + - _errorLines.join('\n')); + throw Exception( + 'Unable to connect to Chrome DevTools.\n\n' + 'Chrome STDERR:\n${errorLines.join('\n')}', + ); } - return _connect(Chrome._( - port, - ChromeConnection('localhost', port), - process: process, - dataDir: dataDir, - deleteDataDir: userDataDir == null, - )); + return _connect( + Chrome._( + port, + ChromeConnection('localhost', port), + process: process, + dataDir: dataDir, + deleteDataDir: userDataDir == null, + ), + ); } /// Starts Chrome with the given arguments. @@ -144,9 +150,8 @@ class Chrome { static Future start( List urls, { List args = const [], - }) async { - return await _startProcess(urls, args: args); - } + }) async => + await _startProcess(urls, args: args); static Future _startProcess( List urls, { @@ -164,7 +169,8 @@ class Chrome { } catch (e) { await chrome.close(); throw ChromeError( - 'Unable to connect to Chrome debug port: ${chrome.debugPort}\n $e'); + 'Unable to connect to Chrome debug port: ${chrome.debugPort}\n $e', + ); } return chrome; } @@ -178,7 +184,7 @@ class Chrome { // profile information. Give it some time before attempting to delete // the directory. if (deleteDataDir) { - await Future.delayed(Duration(milliseconds: 500)); + await Future.delayed(const Duration(milliseconds: 500)); await _dataDir?.delete(recursive: true); } } catch (_) { diff --git a/pkgs/browser_launcher/pubspec.yaml b/pkgs/browser_launcher/pubspec.yaml index 549d94284..83dbe5430 100644 --- a/pkgs/browser_launcher/pubspec.yaml +++ b/pkgs/browser_launcher/pubspec.yaml @@ -1,15 +1,15 @@ name: browser_launcher -version: 1.1.1 +version: 1.1.2-dev description: Provides a standardized way to launch web browsers for testing and tools. repository: https://github.com/dart-lang/browser_launcher environment: - sdk: '>=2.12.0 <3.0.0' + sdk: '>=2.17.0 <3.0.0' dependencies: path: ^1.8.0 webkit_inspection_protocol: ^1.0.0 dev_dependencies: - lints: ^1.0.0 + lints: ^2.0.0 test: ^1.17.3 diff --git a/pkgs/browser_launcher/test/chrome_test.dart b/pkgs/browser_launcher/test/chrome_test.dart index be87d53ec..df8ca4778 100644 --- a/pkgs/browser_launcher/test/chrome_test.dart +++ b/pkgs/browser_launcher/test/chrome_test.dart @@ -14,7 +14,8 @@ void main() { Chrome? chrome; Future connectToTab(String url) async { - var tab = await chrome!.chromeConnection.getTab((t) => t.url.contains(url)); + final tab = + await chrome!.chromeConnection.getTab((t) => t.url.contains(url)); expect(tab, isNotNull); return tab!.connect(); } @@ -23,10 +24,17 @@ void main() { await chrome!.chromeConnection.getUrl(_openTabUrl(url)); } - Future launchChromeWithDebugPort( - {int port = 0, String? userDataDir, bool signIn = false}) async { - chrome = await Chrome.startWithDebugPort([_googleUrl], - debugPort: port, userDataDir: userDataDir, signIn: signIn); + Future launchChromeWithDebugPort({ + int port = 0, + String? userDataDir, + bool signIn = false, + }) async { + chrome = await Chrome.startWithDebugPort( + [_googleUrl], + debugPort: port, + userDataDir: userDataDir, + signIn: signIn, + ); } Future launchChrome() async { @@ -51,20 +59,23 @@ void main() { test('has a working debugger', () async { await launchChromeWithDebugPort(); - var tabs = await chrome!.chromeConnection.getTabs(); + final tabs = await chrome!.chromeConnection.getTabs(); expect( - tabs, - contains(const TypeMatcher() - .having((t) => t.url, 'url', _googleUrl))); + tabs, + contains( + const TypeMatcher() + .having((t) => t.url, 'url', _googleUrl), + ), + ); }); test('uses open debug port if provided port is 0', () async { - await launchChromeWithDebugPort(port: 0); + await launchChromeWithDebugPort(); expect(chrome!.debugPort, isNot(equals(0))); }); test('can provide a specific debug port', () async { - var port = await findUnusedPort(); + final port = await findUnusedPort(); await launchChromeWithDebugPort(port: port); expect(chrome!.debugPort, port); }); @@ -87,7 +98,7 @@ void main() { while (true) { try { attempts++; - await Future.delayed(const Duration(milliseconds: 100)); + await Future.delayed(const Duration(milliseconds: 100)); dataDir.deleteSync(recursive: true); break; } catch (_) { @@ -98,28 +109,39 @@ void main() { test('can launch with debug port', () async { await launchChromeWithDebugPort( - userDataDir: dataDir.path, signIn: signIn); + userDataDir: dataDir.path, + signIn: signIn, + ); expect(chrome, isNotNull); }); test('has a working debugger', () async { await launchChromeWithDebugPort( - userDataDir: dataDir.path, signIn: signIn); - var tabs = await chrome!.chromeConnection.getTabs(); + userDataDir: dataDir.path, + signIn: signIn, + ); + final tabs = await chrome!.chromeConnection.getTabs(); expect( - tabs, - contains(const TypeMatcher() - .having((t) => t.url, 'url', _googleUrl))); + tabs, + contains( + const TypeMatcher() + .having((t) => t.url, 'url', _googleUrl), + ), + ); }); test('has correct profile path', () async { await launchChromeWithDebugPort( - userDataDir: dataDir.path, signIn: signIn); + userDataDir: dataDir.path, + signIn: signIn, + ); await openTab(_chromeVersionUrl); - var wipConnection = await connectToTab(_chromeVersionUrl); - var result = await _evaluateExpression(wipConnection.page, - "document.getElementById('profile_path').textContent"); + final wipConnection = await connectToTab(_chromeVersionUrl); + final result = await _evaluateExpression( + wipConnection.page, + "document.getElementById('profile_path').textContent", + ); expect(result, contains(_userDataDirName)); }); @@ -133,13 +155,13 @@ String _openTabUrl(String url) => '/json/new?$url'; Future _evaluateExpression(WipPage page, String expression) async { var result = ''; while (result.isEmpty) { - await Future.delayed(Duration(milliseconds: 100)); - var wipResponse = await page.sendCommand( + await Future.delayed(const Duration(milliseconds: 100)); + final wipResponse = await page.sendCommand( 'Runtime.evaluate', params: {'expression': expression}, ); - var response = wipResponse.json['result'] as Map; - var value = (response['result'] as Map)['value']; + final response = wipResponse.json['result'] as Map; + final value = (response['result'] as Map)['value']; result = (value != null && value is String) ? value : ''; } return result; From 0191084c44402f0bd44ebb3b2b1d64ca865aa7f8 Mon Sep 17 00:00:00 2001 From: Anna Gringauze Date: Tue, 13 Dec 2022 10:32:41 -0800 Subject: [PATCH 33/66] Fix internal CI test failures (dart-lang/browser_launcher#35) * Addeed headless-only mode for tests, added headless tests * Remove redundant waits, fix flakes * Fix flakes * Enable debugger and runtime for expression evalaution * Address CR comments --- pkgs/browser_launcher/CHANGELOG.md | 2 + pkgs/browser_launcher/lib/src/chrome.dart | 16 +- pkgs/browser_launcher/pubspec.yaml | 1 + pkgs/browser_launcher/test/chrome_test.dart | 254 ++++++++++++-------- 4 files changed, 168 insertions(+), 105 deletions(-) diff --git a/pkgs/browser_launcher/CHANGELOG.md b/pkgs/browser_launcher/CHANGELOG.md index 8befbbf43..89132ecc0 100644 --- a/pkgs/browser_launcher/CHANGELOG.md +++ b/pkgs/browser_launcher/CHANGELOG.md @@ -1,6 +1,8 @@ ## 1.1.2-dev - Require Dart 2.17 +- Log errors from chrome +- Allow tests to detect headless-only environment (for CI). ## 1.1.1 diff --git a/pkgs/browser_launcher/lib/src/chrome.dart b/pkgs/browser_launcher/lib/src/chrome.dart index 5fea228cf..0d52656cf 100644 --- a/pkgs/browser_launcher/lib/src/chrome.dart +++ b/pkgs/browser_launcher/lib/src/chrome.dart @@ -6,6 +6,7 @@ import 'dart:async'; import 'dart:convert'; import 'dart:io'; +import 'package:logging/logging.dart'; import 'package:path/path.dart' as p; import 'package:webkit_inspection_protocol/webkit_inspection_protocol.dart'; @@ -46,6 +47,8 @@ String get _executable { /// Manager for an instance of Chrome. class Chrome { + static final _logger = Logger('BROWSER_LAUNCHER.CHROME'); + Chrome._( this.debugPort, this.chromeConnection, { @@ -119,16 +122,23 @@ class Chrome { // Wait until the DevTools are listening before trying to connect. final errorLines = []; try { - await process.stderr + final stderr = process.stderr.asBroadcastStream(); + stderr + .transform(utf8.decoder) + .transform(const LineSplitter()) + .listen(_logger.fine); + + await stderr .transform(utf8.decoder) .transform(const LineSplitter()) .firstWhere((line) { errorLines.add(line); return line.startsWith('DevTools listening'); }).timeout(const Duration(seconds: 60)); - } catch (_) { + } on TimeoutException catch (e, s) { + _logger.severe('Unable to connect to Chrome DevTools', e, s); throw Exception( - 'Unable to connect to Chrome DevTools.\n\n' + 'Unable to connect to Chrome DevTools: $e.\n\n' 'Chrome STDERR:\n${errorLines.join('\n')}', ); } diff --git a/pkgs/browser_launcher/pubspec.yaml b/pkgs/browser_launcher/pubspec.yaml index 83dbe5430..f6043bea7 100644 --- a/pkgs/browser_launcher/pubspec.yaml +++ b/pkgs/browser_launcher/pubspec.yaml @@ -7,6 +7,7 @@ environment: sdk: '>=2.17.0 <3.0.0' dependencies: + logging: ^1.0.0 path: ^1.8.0 webkit_inspection_protocol: ^1.0.0 diff --git a/pkgs/browser_launcher/test/chrome_test.dart b/pkgs/browser_launcher/test/chrome_test.dart index df8ca4778..79cdd3c4c 100644 --- a/pkgs/browser_launcher/test/chrome_test.dart +++ b/pkgs/browser_launcher/test/chrome_test.dart @@ -7,120 +7,91 @@ import 'dart:async'; import 'dart:io'; import 'package:browser_launcher/src/chrome.dart'; +import 'package:logging/logging.dart'; import 'package:test/test.dart'; import 'package:webkit_inspection_protocol/webkit_inspection_protocol.dart'; +const _headlessOnlyEnvironment = 'HEADLESS_ONLY'; + +bool get headlessOnlyEnvironment => + Platform.environment[_headlessOnlyEnvironment] == 'true'; + +void _configureLogging(bool verbose) { + Logger.root.level = verbose ? Level.ALL : Level.INFO; + Logger.root.onRecord.listen((record) { + print('${record.level.name}: ${record.time}: ${record.message}'); + }); +} + void main() { Chrome? chrome; + // Pass 'true' for debugging. + _configureLogging(false); + + Future getTab(String url) => chrome!.chromeConnection.getTab( + (t) => t.url.contains(url), + retryFor: const Duration(seconds: 5), + ); + + Future?> getTabs() => chrome!.chromeConnection.getTabs( + retryFor: const Duration(seconds: 5), + ); + Future connectToTab(String url) async { - final tab = - await chrome!.chromeConnection.getTab((t) => t.url.contains(url)); + final tab = await getTab(url); expect(tab, isNotNull); return tab!.connect(); } - Future openTab(String url) async { - await chrome!.chromeConnection.getUrl(_openTabUrl(url)); - } + Future openTab(String url) => + chrome!.chromeConnection.getUrl(_openTabUrl(url)); Future launchChromeWithDebugPort({ int port = 0, String? userDataDir, bool signIn = false, + bool headless = false, }) async { chrome = await Chrome.startWithDebugPort( [_googleUrl], debugPort: port, userDataDir: userDataDir, signIn: signIn, + headless: headless, ); } - Future launchChrome() async { - await Chrome.start([_googleUrl]); + Future launchChrome({bool headless = false}) async { + await Chrome.start([_googleUrl], args: [if (headless) '--headless']); } - group('chrome with temp data dir', () { - tearDown(() async { - await chrome?.close(); - chrome = null; - }); - - test('can launch chrome', () async { - await launchChrome(); - expect(chrome, isNull); - }); - - test('can launch chrome with debug port', () async { - await launchChromeWithDebugPort(); - expect(chrome, isNotNull); - }); - - test('has a working debugger', () async { - await launchChromeWithDebugPort(); - final tabs = await chrome!.chromeConnection.getTabs(); - expect( - tabs, - contains( - const TypeMatcher() - .having((t) => t.url, 'url', _googleUrl), - ), - ); - }); - - test('uses open debug port if provided port is 0', () async { - await launchChromeWithDebugPort(); - expect(chrome!.debugPort, isNot(equals(0))); - }); - - test('can provide a specific debug port', () async { - final port = await findUnusedPort(); - await launchChromeWithDebugPort(port: port); - expect(chrome!.debugPort, port); - }); - }); - - group('chrome with user data dir', () { - late Directory dataDir; - - for (var signIn in [false, true]) { - group('and signIn = $signIn', () { - setUp(() { - dataDir = Directory.systemTemp.createTempSync(_userDataDirName); - }); + final headlessModes = [ + true, + if (!headlessOnlyEnvironment) false, + ]; + for (var headless in headlessModes) { + group('(headless: $headless)', () { + group('chrome with temp data dir', () { tearDown(() async { await chrome?.close(); chrome = null; + }); - var attempts = 0; - while (true) { - try { - attempts++; - await Future.delayed(const Duration(milliseconds: 100)); - dataDir.deleteSync(recursive: true); - break; - } catch (_) { - if (attempts > 3) rethrow; - } - } + test('can launch chrome', () async { + await launchChrome(headless: headless); + expect(chrome, isNull); }); - test('can launch with debug port', () async { - await launchChromeWithDebugPort( - userDataDir: dataDir.path, - signIn: signIn, - ); + test('can launch chrome with debug port', () async { + await launchChromeWithDebugPort(headless: headless); expect(chrome, isNotNull); }); test('has a working debugger', () async { - await launchChromeWithDebugPort( - userDataDir: dataDir.path, - signIn: signIn, - ); - final tabs = await chrome!.chromeConnection.getTabs(); + await launchChromeWithDebugPort(headless: headless); + final tabs = await getTabs(); expect( tabs, contains( @@ -130,39 +101,118 @@ void main() { ); }); - test('has correct profile path', () async { - await launchChromeWithDebugPort( - userDataDir: dataDir.path, - signIn: signIn, - ); - await openTab(_chromeVersionUrl); - - final wipConnection = await connectToTab(_chromeVersionUrl); - final result = await _evaluateExpression( - wipConnection.page, - "document.getElementById('profile_path').textContent", - ); + test('uses open debug port if provided port is 0', () async { + await launchChromeWithDebugPort(headless: headless); + expect(chrome!.debugPort, isNot(equals(0))); + }); - expect(result, contains(_userDataDirName)); + test('can provide a specific debug port', () async { + final port = await findUnusedPort(); + await launchChromeWithDebugPort(port: port, headless: headless); + expect(chrome!.debugPort, port); }); }); - } - }); + + group('chrome with user data dir', () { + late Directory dataDir; + const waitMilliseconds = Duration(milliseconds: 100); + + for (var signIn in [false, true]) { + group('and signIn = $signIn', () { + setUp(() { + dataDir = Directory.systemTemp.createTempSync(_userDataDirName); + }); + + tearDown(() async { + await chrome?.close(); + chrome = null; + + var attempts = 0; + while (true) { + try { + attempts++; + await Future.delayed(waitMilliseconds); + dataDir.deleteSync(recursive: true); + break; + } catch (_) { + if (attempts > 3) rethrow; + } + } + }); + + test('can launch with debug port', () async { + await launchChromeWithDebugPort( + userDataDir: dataDir.path, + signIn: signIn, + headless: headless, + ); + expect(chrome, isNotNull); + }); + + test('has a working debugger', () async { + await launchChromeWithDebugPort( + userDataDir: dataDir.path, + signIn: signIn, + headless: headless, + ); + final tabs = await getTabs(); + expect( + tabs, + contains( + const TypeMatcher() + .having((t) => t.url, 'url', _googleUrl), + ), + ); + }); + + test( + 'has correct profile path', + () async { + await launchChromeWithDebugPort( + userDataDir: dataDir.path, + signIn: signIn, + headless: headless, + ); + await openTab(_chromeVersionUrl); + final wipConnection = await connectToTab(_chromeVersionUrl); + await wipConnection.debugger.enable(); + await wipConnection.runtime.enable(); + final result = await _evaluate( + wipConnection.page, + "document.getElementById('profile_path').textContent", + ); + expect(result, contains(_userDataDirName)); + }, + skip: headless, // headless mode does not allow chrome: urls. + ); + }); + } + }); + }); + } } String _openTabUrl(String url) => '/json/new?$url'; -Future _evaluateExpression(WipPage page, String expression) async { - var result = ''; - while (result.isEmpty) { - await Future.delayed(const Duration(milliseconds: 100)); - final wipResponse = await page.sendCommand( - 'Runtime.evaluate', - params: {'expression': expression}, - ); - final response = wipResponse.json['result'] as Map; - final value = (response['result'] as Map)['value']; - result = (value != null && value is String) ? value : ''; +Future _evaluate(WipPage page, String expression) async { + String? result; + const stopInSeconds = Duration(seconds: 5); + const waitMilliseconds = Duration(milliseconds: 100); + final stopTime = DateTime.now().add(stopInSeconds); + + while (result == null && DateTime.now().isBefore(stopTime)) { + await Future.delayed(waitMilliseconds); + try { + final wipResponse = await page.sendCommand( + 'Runtime.evaluate', + params: {'expression': expression}, + ); + final response = wipResponse.json['result'] as Map; + final value = (response['result'] as Map)['value']; + result = value?.toString(); + } catch (_) { + return null; + } } return result; } From ae0d2ea602f5968a7cd3886cbcbc61eea00fee43 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 3 Jan 2023 13:04:25 -0800 Subject: [PATCH 34/66] Bump actions/checkout from 3.1.0 to 3.2.0 (dart-lang/browser_launcher#37) Bumps [actions/checkout](https://github.com/actions/checkout) from 3.1.0 to 3.2.0. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8...755da8c3cf115ac066823e79a1e1788f8940201b) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pkgs/browser_launcher/.github/workflows/dart.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/browser_launcher/.github/workflows/dart.yml b/pkgs/browser_launcher/.github/workflows/dart.yml index b6afb61bb..c273ab50e 100644 --- a/pkgs/browser_launcher/.github/workflows/dart.yml +++ b/pkgs/browser_launcher/.github/workflows/dart.yml @@ -20,7 +20,7 @@ jobs: matrix: sdk: [2.17.0, dev] steps: - - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 + - uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b - uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d with: sdk: ${{ matrix.sdk }} From ed93e5e2e5eb22008ea3aa5947a208149673d393 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 31 Jan 2023 22:55:56 -0800 Subject: [PATCH 35/66] Bump actions/checkout from 3.2.0 to 3.3.0 (dart-lang/browser_launcher#39) Bumps [actions/checkout](https://github.com/actions/checkout) from 3.2.0 to 3.3.0. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/755da8c3cf115ac066823e79a1e1788f8940201b...ac593985615ec2ede58e132d2e21d2b1cbd6127c) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pkgs/browser_launcher/.github/workflows/dart.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/browser_launcher/.github/workflows/dart.yml b/pkgs/browser_launcher/.github/workflows/dart.yml index c273ab50e..a6f8d7156 100644 --- a/pkgs/browser_launcher/.github/workflows/dart.yml +++ b/pkgs/browser_launcher/.github/workflows/dart.yml @@ -20,7 +20,7 @@ jobs: matrix: sdk: [2.17.0, dev] steps: - - uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b + - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c - uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d with: sdk: ${{ matrix.sdk }} From 23446395bd8e9f7aab2467542503ee8770f50f61 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 31 Jan 2023 23:31:07 -0800 Subject: [PATCH 36/66] Bump dart-lang/setup-dart from 1.3 to 1.4 (dart-lang/browser_launcher#38) Bumps [dart-lang/setup-dart](https://github.com/dart-lang/setup-dart) from 1.3 to 1.4. - [Release notes](https://github.com/dart-lang/setup-dart/releases) - [Changelog](https://github.com/dart-lang/setup-dart/blob/main/CHANGELOG.md) - [Commits](https://github.com/dart-lang/setup-dart/compare/6a218f2413a3e78e9087f638a238f6b40893203d...a57a6c04cf7d4840e88432aad6281d1e125f0d46) --- updated-dependencies: - dependency-name: dart-lang/setup-dart dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pkgs/browser_launcher/.github/workflows/dart.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/browser_launcher/.github/workflows/dart.yml b/pkgs/browser_launcher/.github/workflows/dart.yml index a6f8d7156..b6a177b1a 100644 --- a/pkgs/browser_launcher/.github/workflows/dart.yml +++ b/pkgs/browser_launcher/.github/workflows/dart.yml @@ -21,7 +21,7 @@ jobs: sdk: [2.17.0, dev] steps: - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c - - uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d + - uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46 with: sdk: ${{ matrix.sdk }} From b68ab873f8a54a13ed06f09640784864879dfca6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 4 Apr 2023 09:51:18 -0700 Subject: [PATCH 37/66] Bump actions/checkout from 3.3.0 to 3.5.0 (dart-lang/browser_launcher#41) Bumps [actions/checkout](https://github.com/actions/checkout) from 3.3.0 to 3.5.0. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/ac593985615ec2ede58e132d2e21d2b1cbd6127c...8f4b7f84864484a7bf31766abe9204da3cbe65b3) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pkgs/browser_launcher/.github/workflows/dart.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/browser_launcher/.github/workflows/dart.yml b/pkgs/browser_launcher/.github/workflows/dart.yml index b6a177b1a..a070221fb 100644 --- a/pkgs/browser_launcher/.github/workflows/dart.yml +++ b/pkgs/browser_launcher/.github/workflows/dart.yml @@ -20,7 +20,7 @@ jobs: matrix: sdk: [2.17.0, dev] steps: - - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c + - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 - uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46 with: sdk: ${{ matrix.sdk }} From 32282621501d99bf591fc72a5bf0ee55e26553ff Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 4 Apr 2023 11:22:54 -0700 Subject: [PATCH 38/66] Bump dart-lang/setup-dart from 1.4.0 to 1.5.0 (dart-lang/browser_launcher#40) Bumps [dart-lang/setup-dart](https://github.com/dart-lang/setup-dart) from 1.4.0 to 1.5.0. - [Release notes](https://github.com/dart-lang/setup-dart/releases) - [Changelog](https://github.com/dart-lang/setup-dart/blob/main/CHANGELOG.md) - [Commits](https://github.com/dart-lang/setup-dart/compare/a57a6c04cf7d4840e88432aad6281d1e125f0d46...d6a63dab3335f427404425de0fbfed4686d93c4f) --- updated-dependencies: - dependency-name: dart-lang/setup-dart dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pkgs/browser_launcher/.github/workflows/dart.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/browser_launcher/.github/workflows/dart.yml b/pkgs/browser_launcher/.github/workflows/dart.yml index a070221fb..af1f312bb 100644 --- a/pkgs/browser_launcher/.github/workflows/dart.yml +++ b/pkgs/browser_launcher/.github/workflows/dart.yml @@ -21,7 +21,7 @@ jobs: sdk: [2.17.0, dev] steps: - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 - - uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46 + - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f with: sdk: ${{ matrix.sdk }} From 2ad7f58d4609b01ab2f1083ce0b6019ce80b2f92 Mon Sep 17 00:00:00 2001 From: Elliott Brooks <21270878+elliette@users.noreply.github.com> Date: Thu, 11 May 2023 12:45:14 -0700 Subject: [PATCH 39/66] Disable test (dart-lang/browser_launcher#44) --- pkgs/browser_launcher/test/chrome_test.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/browser_launcher/test/chrome_test.dart b/pkgs/browser_launcher/test/chrome_test.dart index 79cdd3c4c..b37f56a7c 100644 --- a/pkgs/browser_launcher/test/chrome_test.dart +++ b/pkgs/browser_launcher/test/chrome_test.dart @@ -183,7 +183,9 @@ void main() { ); expect(result, contains(_userDataDirName)); }, - skip: headless, // headless mode does not allow chrome: urls. + // Note: When re-enabling, skip for headless mode because headless + // mode does not allow chrome: urls. + skip: 'https://github.com/dart-lang/sdk/issues/52357', ); }); } From 990caecc3d7f669e8d55cbdea4036e38b05f168e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 11 May 2023 12:47:41 -0700 Subject: [PATCH 40/66] Bump actions/checkout from 3.5.0 to 3.5.2 (dart-lang/browser_launcher#43) Bumps [actions/checkout](https://github.com/actions/checkout) from 3.5.0 to 3.5.2. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/8f4b7f84864484a7bf31766abe9204da3cbe65b3...8e5e7e5ab8b370d6c329ec480221332ada57f0ab) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pkgs/browser_launcher/.github/workflows/dart.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/browser_launcher/.github/workflows/dart.yml b/pkgs/browser_launcher/.github/workflows/dart.yml index af1f312bb..98f096444 100644 --- a/pkgs/browser_launcher/.github/workflows/dart.yml +++ b/pkgs/browser_launcher/.github/workflows/dart.yml @@ -20,7 +20,7 @@ jobs: matrix: sdk: [2.17.0, dev] steps: - - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 + - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f with: sdk: ${{ matrix.sdk }} From 24a01531421bfbf9dfe9c471a65834cef47b9312 Mon Sep 17 00:00:00 2001 From: Devon Carew Date: Fri, 12 May 2023 15:07:49 -0700 Subject: [PATCH 41/66] blast_repo fixes (dart-lang/browser_launcher#45) dependabot --- pkgs/browser_launcher/.github/dependabot.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkgs/browser_launcher/.github/dependabot.yml b/pkgs/browser_launcher/.github/dependabot.yml index e7af80137..8184a38da 100644 --- a/pkgs/browser_launcher/.github/dependabot.yml +++ b/pkgs/browser_launcher/.github/dependabot.yml @@ -3,7 +3,9 @@ version: 2 updates: -- package-ecosystem: "github-actions" - directory: "/" +- package-ecosystem: github-actions + directory: / schedule: - interval: "monthly" + interval: monthly + labels: + - autosubmit From 1a99465f1a4eabab8fc2c560db81c39d62fd1b9f Mon Sep 17 00:00:00 2001 From: Devon Carew Date: Wed, 5 Jul 2023 15:11:58 -0700 Subject: [PATCH 42/66] update formatting for recent lints (dart-lang/browser_launcher#47) --- pkgs/browser_launcher/lib/src/chrome.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/browser_launcher/lib/src/chrome.dart b/pkgs/browser_launcher/lib/src/chrome.dart index 0d52656cf..76807658b 100644 --- a/pkgs/browser_launcher/lib/src/chrome.dart +++ b/pkgs/browser_launcher/lib/src/chrome.dart @@ -28,7 +28,7 @@ String get _executable { final windowsPrefixes = [ Platform.environment['LOCALAPPDATA'], Platform.environment['PROGRAMFILES'], - Platform.environment['PROGRAMFILES(X86)'] + Platform.environment['PROGRAMFILES(X86)'], ]; return p.join( windowsPrefixes.firstWhere( From 6d5ac8792210b8578fe94b46249a499fc470c2d2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 5 Jul 2023 22:30:10 +0000 Subject: [PATCH 43/66] Bump actions/checkout from 3.5.2 to 3.5.3 (dart-lang/browser_launcher#46) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [actions/checkout](https://github.com/actions/checkout) from 3.5.2 to 3.5.3.
Release notes

Sourced from actions/checkout's releases.

v3.5.3

What's Changed

New Contributors

Full Changelog: https://github.com/actions/checkout/compare/v3...v3.5.3

Changelog

Sourced from actions/checkout's changelog.

Changelog

v3.5.3

v3.5.2

v3.5.1

v3.5.0

v3.4.0

v3.3.0

v3.2.0

v3.1.0

v3.0.2

v3.0.1

v3.0.0

v2.3.1

... (truncated)

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/checkout&package-manager=github_actions&previous-version=3.5.2&new-version=3.5.3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- pkgs/browser_launcher/.github/workflows/dart.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/browser_launcher/.github/workflows/dart.yml b/pkgs/browser_launcher/.github/workflows/dart.yml index 98f096444..229ca81a9 100644 --- a/pkgs/browser_launcher/.github/workflows/dart.yml +++ b/pkgs/browser_launcher/.github/workflows/dart.yml @@ -20,7 +20,7 @@ jobs: matrix: sdk: [2.17.0, dev] steps: - - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab + - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f with: sdk: ${{ matrix.sdk }} From d4c13c6471c2ec584c3cdf86781b5b1696b6fb11 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Sep 2023 03:25:53 +0000 Subject: [PATCH 44/66] Bump actions/checkout from 3.5.3 to 3.6.0 (dart-lang/browser_launcher#48) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [actions/checkout](https://github.com/actions/checkout) from 3.5.3 to 3.6.0.
Release notes

Sourced from actions/checkout's releases.

v3.6.0

What's Changed

New Contributors

Full Changelog: https://github.com/actions/checkout/compare/v3.5.3...v3.6.0

Changelog

Sourced from actions/checkout's changelog.

Changelog

v3.6.0

v3.5.3

v3.5.2

v3.5.1

v3.5.0

v3.4.0

v3.3.0

v3.2.0

v3.1.0

v3.0.2

v3.0.1

v3.0.0

... (truncated)

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/checkout&package-manager=github_actions&previous-version=3.5.3&new-version=3.6.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- pkgs/browser_launcher/.github/workflows/dart.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/browser_launcher/.github/workflows/dart.yml b/pkgs/browser_launcher/.github/workflows/dart.yml index 229ca81a9..c37b04264 100644 --- a/pkgs/browser_launcher/.github/workflows/dart.yml +++ b/pkgs/browser_launcher/.github/workflows/dart.yml @@ -20,7 +20,7 @@ jobs: matrix: sdk: [2.17.0, dev] steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 + - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f with: sdk: ${{ matrix.sdk }} From af2bc2c11aee7fc2c0c710ce7f7ef9acbb233838 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 1 Oct 2023 03:10:07 +0000 Subject: [PATCH 45/66] Bump actions/checkout from 3.6.0 to 4.1.0 (dart-lang/browser_launcher#50) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [actions/checkout](https://github.com/actions/checkout) from 3.6.0 to 4.1.0.
Release notes

Sourced from actions/checkout's releases.

v4.1.0

What's Changed

New Contributors

Full Changelog: https://github.com/actions/checkout/compare/v4.0.0...v4.1.0

v4.0.0

What's Changed

New Contributors

Full Changelog: https://github.com/actions/checkout/compare/v3...v4.0.0

Changelog

Sourced from actions/checkout's changelog.

Changelog

v4.1.0

v4.0.0

v3.6.0

v3.5.3

v3.5.2

v3.5.1

v3.5.0

v3.4.0

v3.3.0

v3.2.0

v3.1.0

v3.0.2

... (truncated)

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/checkout&package-manager=github_actions&previous-version=3.6.0&new-version=4.1.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- pkgs/browser_launcher/.github/workflows/dart.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/browser_launcher/.github/workflows/dart.yml b/pkgs/browser_launcher/.github/workflows/dart.yml index c37b04264..63b8473d8 100644 --- a/pkgs/browser_launcher/.github/workflows/dart.yml +++ b/pkgs/browser_launcher/.github/workflows/dart.yml @@ -20,7 +20,7 @@ jobs: matrix: sdk: [2.17.0, dev] steps: - - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 + - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f with: sdk: ${{ matrix.sdk }} From 84e3f15329d4991a6cd924f1970a3abd505ef2d9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 3 Oct 2023 07:15:04 -0700 Subject: [PATCH 46/66] Bump dart-lang/setup-dart from 1.5.0 to 1.5.1 (dart-lang/browser_launcher#49) Bumps [dart-lang/setup-dart](https://github.com/dart-lang/setup-dart) from 1.5.0 to 1.5.1. - [Release notes](https://github.com/dart-lang/setup-dart/releases) - [Changelog](https://github.com/dart-lang/setup-dart/blob/main/CHANGELOG.md) - [Commits](https://github.com/dart-lang/setup-dart/compare/d6a63dab3335f427404425de0fbfed4686d93c4f...8a4b97ea2017cc079571daec46542f76189836b1) --- updated-dependencies: - dependency-name: dart-lang/setup-dart dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pkgs/browser_launcher/.github/workflows/dart.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/browser_launcher/.github/workflows/dart.yml b/pkgs/browser_launcher/.github/workflows/dart.yml index 63b8473d8..844ab0428 100644 --- a/pkgs/browser_launcher/.github/workflows/dart.yml +++ b/pkgs/browser_launcher/.github/workflows/dart.yml @@ -21,7 +21,7 @@ jobs: sdk: [2.17.0, dev] steps: - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f + - uses: dart-lang/setup-dart@8a4b97ea2017cc079571daec46542f76189836b1 with: sdk: ${{ matrix.sdk }} From 7248b760cc79b9f9ea3b78f692fca67a5bf053a6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Nov 2023 03:16:43 +0000 Subject: [PATCH 47/66] Bump actions/checkout from 4.1.0 to 4.1.1 (dart-lang/browser_launcher#52) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.0 to 4.1.1.
Release notes

Sourced from actions/checkout's releases.

v4.1.1

What's Changed

New Contributors

Full Changelog: https://github.com/actions/checkout/compare/v4.1.0...v4.1.1

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/checkout&package-manager=github_actions&previous-version=4.1.0&new-version=4.1.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- pkgs/browser_launcher/.github/workflows/dart.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/browser_launcher/.github/workflows/dart.yml b/pkgs/browser_launcher/.github/workflows/dart.yml index 844ab0428..cafc77c94 100644 --- a/pkgs/browser_launcher/.github/workflows/dart.yml +++ b/pkgs/browser_launcher/.github/workflows/dart.yml @@ -20,7 +20,7 @@ jobs: matrix: sdk: [2.17.0, dev] steps: - - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - uses: dart-lang/setup-dart@8a4b97ea2017cc079571daec46542f76189836b1 with: sdk: ${{ matrix.sdk }} From c908ef334ae294d63980a1e0234ba96a975c4d8d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Nov 2023 03:18:20 +0000 Subject: [PATCH 48/66] Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (dart-lang/browser_launcher#51) Bumps [dart-lang/setup-dart](https://github.com/dart-lang/setup-dart) from 1.5.1 to 1.6.0.
Release notes

Sourced from dart-lang/setup-dart's releases.

v1.6.0

  • Enable provisioning of the latest Dart SDK patch release by specifying just the major and minor version (e.g. 3.2).
Changelog

Sourced from dart-lang/setup-dart's changelog.

v1.6.0

  • Enable provisioning of the latest Dart SDK patch release by specifying just the major and minor version (e.g. 3.2).

v1.5.1

  • No longer test the setup-dart action on pre-2.12 SDKs.
  • Upgrade JS interop code to use extension types (the new name for inline classes).
  • The upcoming rename of the be channel to main is now supported with forward compatibility that switches when the rename happens.

v1.5.0

  • Re-wrote the implementation of the action into Dart.
  • Auto-detect the platform architecture (x64, ia32, arm, arm64).
  • Improved the caching and download resilience of the sdk.
  • Added a new action output: dart-version - the installed version of the sdk.

v1.4.0

  • Automatically create OIDC token for pub.dev.
  • Add a reusable workflow for publishing.

v1.3.0

v1.2.0

  • Fixed a path issue impacting git dependencies on Windows.

v1.1.0

  • Added a flavor option setup.sh to allow downloading unpublished builds.

v1.0.0

  • Promoted to 1.0 stable.

v0.5

  • Fixed a Windows pub global activate path issue.

... (truncated)

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=dart-lang/setup-dart&package-manager=github_actions&previous-version=1.5.1&new-version=1.6.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- pkgs/browser_launcher/.github/workflows/dart.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/browser_launcher/.github/workflows/dart.yml b/pkgs/browser_launcher/.github/workflows/dart.yml index cafc77c94..8dc527628 100644 --- a/pkgs/browser_launcher/.github/workflows/dart.yml +++ b/pkgs/browser_launcher/.github/workflows/dart.yml @@ -21,7 +21,7 @@ jobs: sdk: [2.17.0, dev] steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - - uses: dart-lang/setup-dart@8a4b97ea2017cc079571daec46542f76189836b1 + - uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d with: sdk: ${{ matrix.sdk }} From 33b8c6633079b8e2cf60f0b31a9f0c6b97647d30 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Thu, 9 Nov 2023 12:59:48 -0800 Subject: [PATCH 49/66] Update and fix lints, require Dart 3.0 (dart-lang/browser_launcher#53) --- .../.github/workflows/dart.yml | 2 +- pkgs/browser_launcher/CHANGELOG.md | 4 ++-- pkgs/browser_launcher/analysis_options.yaml | 23 +------------------ pkgs/browser_launcher/pubspec.yaml | 6 ++--- pkgs/browser_launcher/test/chrome_test.dart | 2 ++ 5 files changed, 9 insertions(+), 28 deletions(-) diff --git a/pkgs/browser_launcher/.github/workflows/dart.yml b/pkgs/browser_launcher/.github/workflows/dart.yml index 8dc527628..8ef0f0ec8 100644 --- a/pkgs/browser_launcher/.github/workflows/dart.yml +++ b/pkgs/browser_launcher/.github/workflows/dart.yml @@ -18,7 +18,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - sdk: [2.17.0, dev] + sdk: [3.0, dev] steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d diff --git a/pkgs/browser_launcher/CHANGELOG.md b/pkgs/browser_launcher/CHANGELOG.md index 89132ecc0..2d3dd434c 100644 --- a/pkgs/browser_launcher/CHANGELOG.md +++ b/pkgs/browser_launcher/CHANGELOG.md @@ -1,6 +1,6 @@ -## 1.1.2-dev +## 1.1.2-wip -- Require Dart 2.17 +- Require Dart 3.0 - Log errors from chrome - Allow tests to detect headless-only environment (for CI). diff --git a/pkgs/browser_launcher/analysis_options.yaml b/pkgs/browser_launcher/analysis_options.yaml index 4a111f39a..69e023edc 100644 --- a/pkgs/browser_launcher/analysis_options.yaml +++ b/pkgs/browser_launcher/analysis_options.yaml @@ -1,5 +1,5 @@ # https://dart.dev/guides/language/analysis-options -include: package:lints/recommended.yaml +include: package:dart_flutter_team_lints/analysis_options.yaml analyzer: language: @@ -9,11 +9,8 @@ analyzer: linter: rules: - - always_declare_return_types - avoid_bool_literals_in_conditional_expressions - - avoid_catching_errors - avoid_classes_with_only_static_members - - avoid_dynamic_calls - avoid_private_typedef_functions - avoid_redundant_argument_values - avoid_returning_null_for_future @@ -21,35 +18,17 @@ linter: - avoid_unused_constructor_parameters - avoid_void_async - cancel_subscriptions - - comment_references - - directives_ordering - join_return_with_assignment - - lines_longer_than_80_chars - literal_only_boolean_expressions - missing_whitespace_between_adjacent_strings - no_adjacent_strings_in_list - no_runtimeType_toString - - omit_local_variable_types - - only_throw_errors - package_api_docs - - prefer_asserts_in_initializer_lists - - prefer_const_constructors - prefer_const_declarations - prefer_expression_function_bodies - prefer_final_locals - - prefer_relative_imports - - prefer_single_quotes - require_trailing_commas - - sort_pub_dependencies - - test_types_in_equals - - throw_in_finally - - type_annotate_public_apis - - unawaited_futures - - unnecessary_lambdas - - unnecessary_parenthesis - unnecessary_raw_strings - - unnecessary_statements - use_if_null_to_convert_nulls_to_bools - use_raw_strings - use_string_buffers - - use_super_parameters diff --git a/pkgs/browser_launcher/pubspec.yaml b/pkgs/browser_launcher/pubspec.yaml index f6043bea7..952ffe27b 100644 --- a/pkgs/browser_launcher/pubspec.yaml +++ b/pkgs/browser_launcher/pubspec.yaml @@ -1,10 +1,10 @@ name: browser_launcher -version: 1.1.2-dev +version: 1.1.2-wip description: Provides a standardized way to launch web browsers for testing and tools. repository: https://github.com/dart-lang/browser_launcher environment: - sdk: '>=2.17.0 <3.0.0' + sdk: ^3.0.0 dependencies: logging: ^1.0.0 @@ -12,5 +12,5 @@ dependencies: webkit_inspection_protocol: ^1.0.0 dev_dependencies: - lints: ^2.0.0 + dart_flutter_team_lints: ^2.0.0 test: ^1.17.3 diff --git a/pkgs/browser_launcher/test/chrome_test.dart b/pkgs/browser_launcher/test/chrome_test.dart index b37f56a7c..92437681a 100644 --- a/pkgs/browser_launcher/test/chrome_test.dart +++ b/pkgs/browser_launcher/test/chrome_test.dart @@ -3,6 +3,8 @@ // BSD-style license that can be found in the LICENSE file. @OnPlatform({'windows': Skip('appveyor is not setup to install Chrome')}) +library; + import 'dart:async'; import 'dart:io'; From 2b05a6669e22a7f2e3ea2e75ac2ec4c27c9a66c1 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Mon, 4 Dec 2023 10:39:44 -0800 Subject: [PATCH 50/66] drop outdated lints --- pkgs/browser_launcher/analysis_options.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/pkgs/browser_launcher/analysis_options.yaml b/pkgs/browser_launcher/analysis_options.yaml index 69e023edc..556f883c8 100644 --- a/pkgs/browser_launcher/analysis_options.yaml +++ b/pkgs/browser_launcher/analysis_options.yaml @@ -13,7 +13,6 @@ linter: - avoid_classes_with_only_static_members - avoid_private_typedef_functions - avoid_redundant_argument_values - - avoid_returning_null_for_future - avoid_returning_this - avoid_unused_constructor_parameters - avoid_void_async From 606134a014d9207f2aec6cbf51654f55e4e0e7d2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 1 Feb 2024 03:43:47 +0000 Subject: [PATCH 51/66] Bump dart-lang/setup-dart from 1.6.0 to 1.6.2 (dart-lang/browser_launcher#54) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [dart-lang/setup-dart](https://github.com/dart-lang/setup-dart) from 1.6.0 to 1.6.2.
Release notes

Sourced from dart-lang/setup-dart's releases.

v1.6.2

v1.6.1

  • Updated the google storage url for main channel releases.
Changelog

Sourced from dart-lang/setup-dart's changelog.

v1.6.2

v1.6.1

  • Updated the google storage url for main channel releases.

v1.6.0

  • Enable provisioning of the latest Dart SDK patch release by specifying just the major and minor version (e.g. 3.2).

v1.5.1

  • No longer test the setup-dart action on pre-2.12 SDKs.
  • Upgrade JS interop code to use extension types (the new name for inline classes).
  • The upcoming rename of the be channel to main is now supported with forward compatibility that switches when the rename happens.

v1.5.0

  • Re-wrote the implementation of the action into Dart.
  • Auto-detect the platform architecture (x64, ia32, arm, arm64).
  • Improved the caching and download resilience of the sdk.
  • Added a new action output: dart-version - the installed version of the sdk.

v1.4.0

  • Automatically create OIDC token for pub.dev.
  • Add a reusable workflow for publishing.

v1.3.0

v1.2.0

  • Fixed a path issue impacting git dependencies on Windows.

v1.1.0

... (truncated)

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=dart-lang/setup-dart&package-manager=github_actions&previous-version=1.6.0&new-version=1.6.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- pkgs/browser_launcher/.github/workflows/dart.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/browser_launcher/.github/workflows/dart.yml b/pkgs/browser_launcher/.github/workflows/dart.yml index 8ef0f0ec8..418fabd61 100644 --- a/pkgs/browser_launcher/.github/workflows/dart.yml +++ b/pkgs/browser_launcher/.github/workflows/dart.yml @@ -21,7 +21,7 @@ jobs: sdk: [3.0, dev] steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - - uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d + - uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 with: sdk: ${{ matrix.sdk }} From ee14d22e180ebf0304f240f51fbdf16d6e33ced5 Mon Sep 17 00:00:00 2001 From: sigmundch Date: Fri, 16 Feb 2024 14:32:54 -0800 Subject: [PATCH 52/66] Add extra flags to disable throttling behavior. (dart-lang/browser_launcher#55) * Add extra flags to disabling throttling behavior. These flags [were added in our internal SDK test infrastructure][1] and they helped reduce flaky timeout behavior in the past. It's very likely that these and the `--disable-background-timer-throttling` flag that's already here have some overlap, though. I have not been able to find much documentation about whether they do overlap, so I was inclined to try to add these by default and assess the effect in our CI. [1]: https://dart-review.googlesource.com/c/sdk/+/325780/2/pkg/test_runner/lib/src/browser_controller.dart * ... add CHANGELOG --- pkgs/browser_launcher/CHANGELOG.md | 1 + pkgs/browser_launcher/lib/src/chrome.dart | 2 ++ 2 files changed, 3 insertions(+) diff --git a/pkgs/browser_launcher/CHANGELOG.md b/pkgs/browser_launcher/CHANGELOG.md index 2d3dd434c..5fe87804c 100644 --- a/pkgs/browser_launcher/CHANGELOG.md +++ b/pkgs/browser_launcher/CHANGELOG.md @@ -3,6 +3,7 @@ - Require Dart 3.0 - Log errors from chrome - Allow tests to detect headless-only environment (for CI). +- Add extra flags that may help disable additional throttling in background tabs ## 1.1.1 diff --git a/pkgs/browser_launcher/lib/src/chrome.dart b/pkgs/browser_launcher/lib/src/chrome.dart index 76807658b..b8524bb14 100644 --- a/pkgs/browser_launcher/lib/src/chrome.dart +++ b/pkgs/browser_launcher/lib/src/chrome.dart @@ -102,6 +102,8 @@ class Chrome { '--remote-debugging-port=$port', // When the DevTools has focus we don't want to slow down the application. '--disable-background-timer-throttling', + '--disable-blink-features=TimerThrottlingForBackgroundTabs', + '--disable-features=IntensiveWakeUpThrottling', // Since we are using a temp profile, disable features that slow the // Chrome launch. if (!signIn) '--disable-extensions', From 45d85783a23e8db2c456614642ea0b7047ca8ff8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Apr 2024 03:03:09 +0000 Subject: [PATCH 53/66] Bump actions/checkout from 4.1.1 to 4.1.2 (dart-lang/browser_launcher#56) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.1 to 4.1.2.
Release notes

Sourced from actions/checkout's releases.

v4.1.2

We are investigating the following issue with this release and have rolled-back the v4 tag to point to v4.1.1

What's Changed

New Contributors

Full Changelog: https://github.com/actions/checkout/compare/v4.1.1...v4.1.2

Changelog

Sourced from actions/checkout's changelog.

Changelog

v4.1.2

v4.1.1

v4.1.0

v4.0.0

v3.6.0

v3.5.3

v3.5.2

v3.5.1

v3.5.0

v3.4.0

v3.3.0

v3.2.0

... (truncated)

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/checkout&package-manager=github_actions&previous-version=4.1.1&new-version=4.1.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- pkgs/browser_launcher/.github/workflows/dart.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/browser_launcher/.github/workflows/dart.yml b/pkgs/browser_launcher/.github/workflows/dart.yml index 418fabd61..ba22e0212 100644 --- a/pkgs/browser_launcher/.github/workflows/dart.yml +++ b/pkgs/browser_launcher/.github/workflows/dart.yml @@ -20,7 +20,7 @@ jobs: matrix: sdk: [3.0, dev] steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 - uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 with: sdk: ${{ matrix.sdk }} From 0e72faadc731ed0f0c72afc1b232f5b663371638 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 May 2024 03:54:41 +0000 Subject: [PATCH 54/66] Bump dart-lang/setup-dart from 1.6.2 to 1.6.4 (dart-lang/browser_launcher#58) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [dart-lang/setup-dart](https://github.com/dart-lang/setup-dart) from 1.6.2 to 1.6.4.
Release notes

Sourced from dart-lang/setup-dart's releases.

v1.6.4

  • Rebuild JS code to include changes from v1.6.3

v1.6.3

Changelog

Sourced from dart-lang/setup-dart's changelog.

v1.6.4

  • Rebuild JS code.

v1.6.3

v1.6.2

v1.6.1

  • Updated the google storage url for main channel releases.

v1.6.0

  • Enable provisioning of the latest Dart SDK patch release by specifying just the major and minor version (e.g. 3.2).

v1.5.1

  • No longer test the setup-dart action on pre-2.12 SDKs.
  • Upgrade JS interop code to use extension types (the new name for inline classes).
  • The upcoming rename of the be channel to main is now supported with forward compatibility that switches when the rename happens.

v1.5.0

  • Re-wrote the implementation of the action into Dart.
  • Auto-detect the platform architecture (x64, ia32, arm, arm64).
  • Improved the caching and download resilience of the sdk.
  • Added a new action output: dart-version - the installed version of the sdk.

v1.4.0

  • Automatically create OIDC token for pub.dev.
  • Add a reusable workflow for publishing.

v1.3.0

  • The install location of the Dart SDK is now available

... (truncated)

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=dart-lang/setup-dart&package-manager=github_actions&previous-version=1.6.2&new-version=1.6.4)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- pkgs/browser_launcher/.github/workflows/dart.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/browser_launcher/.github/workflows/dart.yml b/pkgs/browser_launcher/.github/workflows/dart.yml index ba22e0212..eaf712b08 100644 --- a/pkgs/browser_launcher/.github/workflows/dart.yml +++ b/pkgs/browser_launcher/.github/workflows/dart.yml @@ -21,7 +21,7 @@ jobs: sdk: [3.0, dev] steps: - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 - - uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 + - uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 with: sdk: ${{ matrix.sdk }} From ea9fcad1e0747321dc8666526d4e3630b6125c42 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 May 2024 15:32:49 +0000 Subject: [PATCH 55/66] Bump actions/checkout from 4.1.2 to 4.1.4 (dart-lang/browser_launcher#57) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.2 to 4.1.4.
Release notes

Sourced from actions/checkout's releases.

v4.1.4

What's Changed

Full Changelog: https://github.com/actions/checkout/compare/v4.1.3...v4.1.4

v4.1.3

What's Changed

Full Changelog: https://github.com/actions/checkout/compare/v4.1.2...v4.1.3

Changelog

Sourced from actions/checkout's changelog.

Changelog

v4.1.4

v4.1.3

v4.1.2

v4.1.1

v4.1.0

v4.0.0

v3.6.0

v3.5.3

v3.5.2

v3.5.1

v3.5.0

v3.4.0

... (truncated)

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/checkout&package-manager=github_actions&previous-version=4.1.2&new-version=4.1.4)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- pkgs/browser_launcher/.github/workflows/dart.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/browser_launcher/.github/workflows/dart.yml b/pkgs/browser_launcher/.github/workflows/dart.yml index eaf712b08..c68bc7000 100644 --- a/pkgs/browser_launcher/.github/workflows/dart.yml +++ b/pkgs/browser_launcher/.github/workflows/dart.yml @@ -20,7 +20,7 @@ jobs: matrix: sdk: [3.0, dev] steps: - - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 + - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b - uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 with: sdk: ${{ matrix.sdk }} From 1e99a8669c20b7f01909fbc0e71d129f5e6f5613 Mon Sep 17 00:00:00 2001 From: Devon Carew Date: Fri, 3 May 2024 15:09:48 -0700 Subject: [PATCH 56/66] blast_repo fixes (dart-lang/browser_launcher#59) dependabot --- pkgs/browser_launcher/.github/dependabot.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/browser_launcher/.github/dependabot.yml b/pkgs/browser_launcher/.github/dependabot.yml index 8184a38da..5a11cf58c 100644 --- a/pkgs/browser_launcher/.github/dependabot.yml +++ b/pkgs/browser_launcher/.github/dependabot.yml @@ -9,3 +9,7 @@ updates: interval: monthly labels: - autosubmit + groups: + github-actions: + patterns: + - "*" From 5d5082ed1369df8e2069a927013c4623a1ec8940 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 1 Jun 2024 03:10:17 +0000 Subject: [PATCH 57/66] Bump actions/checkout from 4.1.4 to 4.1.6 in the github-actions group (dart-lang/browser_launcher#60) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps the github-actions group with 1 update: [actions/checkout](https://github.com/actions/checkout). Updates `actions/checkout` from 4.1.4 to 4.1.6
Release notes

Sourced from actions/checkout's releases.

v4.1.6

What's Changed

Full Changelog: https://github.com/actions/checkout/compare/v4.1.5...v4.1.6

v4.1.5

What's Changed

Full Changelog: https://github.com/actions/checkout/compare/v4.1.4...v4.1.5

Changelog

Sourced from actions/checkout's changelog.

Changelog

v4.1.6

v4.1.5

v4.1.4

v4.1.3

v4.1.2

v4.1.1

v4.1.0

v4.0.0

v3.6.0

v3.5.3

v3.5.2

v3.5.1

... (truncated)

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/checkout&package-manager=github_actions&previous-version=4.1.4&new-version=4.1.6)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore ` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore ` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore ` will remove the ignore condition of the specified dependency and ignore conditions
--- pkgs/browser_launcher/.github/workflows/dart.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/browser_launcher/.github/workflows/dart.yml b/pkgs/browser_launcher/.github/workflows/dart.yml index c68bc7000..f7526fd49 100644 --- a/pkgs/browser_launcher/.github/workflows/dart.yml +++ b/pkgs/browser_launcher/.github/workflows/dart.yml @@ -20,7 +20,7 @@ jobs: matrix: sdk: [3.0, dev] steps: - - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b + - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 - uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 with: sdk: ${{ matrix.sdk }} From 2ff8ff92def82e2c00a5bce37762a146fc065ec7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Jul 2024 03:44:59 +0000 Subject: [PATCH 58/66] Bump the github-actions group with 2 updates (dart-lang/browser_launcher#61) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps the github-actions group with 2 updates: [actions/checkout](https://github.com/actions/checkout) and [dart-lang/setup-dart](https://github.com/dart-lang/setup-dart). Updates `actions/checkout` from 4.1.6 to 4.1.7
Release notes

Sourced from actions/checkout's releases.

v4.1.7

What's Changed

New Contributors

Full Changelog: https://github.com/actions/checkout/compare/v4.1.6...v4.1.7

Changelog

Sourced from actions/checkout's changelog.

Changelog

v4.1.7

v4.1.6

v4.1.5

v4.1.4

v4.1.3

v4.1.2

v4.1.1

v4.1.0

v4.0.0

v3.6.0

v3.5.3

... (truncated)

Commits

Updates `dart-lang/setup-dart` from 1.6.4 to 1.6.5
Release notes

Sourced from dart-lang/setup-dart's releases.

v1.6.5

dart-lang/browser_launcher#118: dart-lang/setup-dartdart-lang/browser_launcher#118

Changelog

Sourced from dart-lang/setup-dart's changelog.

v1.6.5

dart-lang/browser_launcher#118: dart-lang/setup-dartdart-lang/browser_launcher#118

v1.6.4

  • Rebuild JS code.

v1.6.3

v1.6.2

v1.6.1

  • Updated the google storage url for main channel releases.

v1.6.0

  • Enable provisioning of the latest Dart SDK patch release by specifying just the major and minor version (e.g. 3.2).

v1.5.1

  • No longer test the setup-dart action on pre-2.12 SDKs.
  • Upgrade JS interop code to use extension types (the new name for inline classes).
  • The upcoming rename of the be channel to main is now supported with forward compatibility that switches when the rename happens.

v1.5.0

  • Re-wrote the implementation of the action into Dart.
  • Auto-detect the platform architecture (x64, ia32, arm, arm64).
  • Improved the caching and download resilience of the sdk.
  • Added a new action output: dart-version - the installed version of the sdk.

v1.4.0

... (truncated)

Commits

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore ` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore ` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore ` will remove the ignore condition of the specified dependency and ignore conditions
--- pkgs/browser_launcher/.github/workflows/dart.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/browser_launcher/.github/workflows/dart.yml b/pkgs/browser_launcher/.github/workflows/dart.yml index f7526fd49..d05567758 100644 --- a/pkgs/browser_launcher/.github/workflows/dart.yml +++ b/pkgs/browser_launcher/.github/workflows/dart.yml @@ -20,8 +20,8 @@ jobs: matrix: sdk: [3.0, dev] steps: - - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 - - uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 + - uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: sdk: ${{ matrix.sdk }} From 8ed7db49b81c0768d701b271b69094bb21aaccd0 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Mon, 8 Jul 2024 10:41:35 -0700 Subject: [PATCH 59/66] update lints (dart-lang/browser_launcher#62) --- pkgs/browser_launcher/.github/workflows/dart.yml | 2 +- pkgs/browser_launcher/CHANGELOG.md | 6 +++--- pkgs/browser_launcher/pubspec.yaml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pkgs/browser_launcher/.github/workflows/dart.yml b/pkgs/browser_launcher/.github/workflows/dart.yml index d05567758..abf4388e1 100644 --- a/pkgs/browser_launcher/.github/workflows/dart.yml +++ b/pkgs/browser_launcher/.github/workflows/dart.yml @@ -18,7 +18,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - sdk: [3.0, dev] + sdk: [3.4, dev] steps: - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 diff --git a/pkgs/browser_launcher/CHANGELOG.md b/pkgs/browser_launcher/CHANGELOG.md index 5fe87804c..cb3fbe68c 100644 --- a/pkgs/browser_launcher/CHANGELOG.md +++ b/pkgs/browser_launcher/CHANGELOG.md @@ -1,6 +1,6 @@ ## 1.1.2-wip -- Require Dart 3.0 +- Require Dart 3.4 - Log errors from chrome - Allow tests to detect headless-only environment (for CI). - Add extra flags that may help disable additional throttling in background tabs @@ -12,8 +12,8 @@ ## 1.1.0 - Add optional `signIn` argument to `startWithDebugPort`. - To be used together with `user-data-dir` to start a chrome - window signed into the default profile with extensions enabled. + To be used together with `user-data-dir` to start a Chrome + window signed in to the default profile with extensions enabled. - Enable the `avoid_dynamic_calls` lint. ## 1.0.0 diff --git a/pkgs/browser_launcher/pubspec.yaml b/pkgs/browser_launcher/pubspec.yaml index 952ffe27b..39a4d3196 100644 --- a/pkgs/browser_launcher/pubspec.yaml +++ b/pkgs/browser_launcher/pubspec.yaml @@ -4,7 +4,7 @@ description: Provides a standardized way to launch web browsers for testing and repository: https://github.com/dart-lang/browser_launcher environment: - sdk: ^3.0.0 + sdk: ^3.4.0 dependencies: logging: ^1.0.0 @@ -12,5 +12,5 @@ dependencies: webkit_inspection_protocol: ^1.0.0 dev_dependencies: - dart_flutter_team_lints: ^2.0.0 + dart_flutter_team_lints: ^3.0.0 test: ^1.17.3 From 2c690eb7515d1a3a405c6753576b877b0750a813 Mon Sep 17 00:00:00 2001 From: Srujan Gaddam <58529443+srujzs@users.noreply.github.com> Date: Thu, 22 Aug 2024 09:14:22 -0700 Subject: [PATCH 60/66] Add --use-mock-keychain to Chrome args (dart-lang/browser_launcher#63) Bug: https://github.com/dart-lang/sdk/issues/56519 Rolling the Chrome version in Dart CI to 128.0.6613.36 results in a system dialog requesting Chrome to use the keychain in MacOS. This then results in timeouts due to it being blocking. Instead, use a mock keychain. --- pkgs/browser_launcher/lib/src/chrome.dart | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/browser_launcher/lib/src/chrome.dart b/pkgs/browser_launcher/lib/src/chrome.dart index b8524bb14..8ee14f05d 100644 --- a/pkgs/browser_launcher/lib/src/chrome.dart +++ b/pkgs/browser_launcher/lib/src/chrome.dart @@ -114,6 +114,10 @@ class Chrome { '--disable-default-apps', '--disable-translate', '--start-maximized', + // When running on MacOS, Chrome may open system dialogs requesting + // credentials. This uses a mock keychain to avoid that dialog from + // blocking. + '--use-mock-keychain', ]; if (headless) { args.add('--headless'); From 7e49da4be920f314b9ab15b40758325739b54d10 Mon Sep 17 00:00:00 2001 From: Srujan Gaddam <58529443+srujzs@users.noreply.github.com> Date: Thu, 22 Aug 2024 13:39:48 -0700 Subject: [PATCH 61/66] Add CHANGELOG entry for https://github.com/dart-lang/browser_launcher/pull/63 and publish 1.2.2 (dart-lang/browser_launcher#64) --- pkgs/browser_launcher/CHANGELOG.md | 3 ++- pkgs/browser_launcher/pubspec.yaml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/browser_launcher/CHANGELOG.md b/pkgs/browser_launcher/CHANGELOG.md index cb3fbe68c..4fb8a354d 100644 --- a/pkgs/browser_launcher/CHANGELOG.md +++ b/pkgs/browser_launcher/CHANGELOG.md @@ -1,9 +1,10 @@ -## 1.1.2-wip +## 1.1.2 - Require Dart 3.4 - Log errors from chrome - Allow tests to detect headless-only environment (for CI). - Add extra flags that may help disable additional throttling in background tabs +- Add `--use-mock-keychain` flag to avoid blocking dialog on MacOS. ## 1.1.1 diff --git a/pkgs/browser_launcher/pubspec.yaml b/pkgs/browser_launcher/pubspec.yaml index 39a4d3196..39da2c9f7 100644 --- a/pkgs/browser_launcher/pubspec.yaml +++ b/pkgs/browser_launcher/pubspec.yaml @@ -1,5 +1,5 @@ name: browser_launcher -version: 1.1.2-wip +version: 1.1.2 description: Provides a standardized way to launch web browsers for testing and tools. repository: https://github.com/dart-lang/browser_launcher From dd6f2225e45ff9e32fb4f3c4efd6072e5c80e377 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 1 Oct 2024 03:02:50 +0000 Subject: [PATCH 62/66] Bump actions/checkout from 4.1.7 to 4.2.0 in the github-actions group (dart-lang/browser_launcher#65) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps the github-actions group with 1 update: [actions/checkout](https://github.com/actions/checkout). Updates `actions/checkout` from 4.1.7 to 4.2.0
Release notes

Sourced from actions/checkout's releases.

v4.2.0

What's Changed

New Contributors

Full Changelog: https://github.com/actions/checkout/compare/v4.1.7...v4.2.0

Changelog

Sourced from actions/checkout's changelog.

Changelog

v4.2.0

v4.1.7

v4.1.6

v4.1.5

v4.1.4

v4.1.3

v4.1.2

v4.1.1

v4.1.0

v4.0.0

v3.6.0

... (truncated)

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/checkout&package-manager=github_actions&previous-version=4.1.7&new-version=4.2.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore ` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore ` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore ` will remove the ignore condition of the specified dependency and ignore conditions
--- pkgs/browser_launcher/.github/workflows/dart.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/browser_launcher/.github/workflows/dart.yml b/pkgs/browser_launcher/.github/workflows/dart.yml index abf4388e1..6e1bfe272 100644 --- a/pkgs/browser_launcher/.github/workflows/dart.yml +++ b/pkgs/browser_launcher/.github/workflows/dart.yml @@ -20,7 +20,7 @@ jobs: matrix: sdk: [3.4, dev] steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 + - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 - uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: sdk: ${{ matrix.sdk }} From 82f509f0e2a7a456515d428eb30d47e60c5a637b Mon Sep 17 00:00:00 2001 From: Moritz Date: Fri, 25 Oct 2024 11:17:44 +0200 Subject: [PATCH 63/66] Add issue template and other fixes --- .github/ISSUE_TEMPLATE/browser_launcher.md | 5 +++++ pkgs/browser_launcher/pubspec.yaml | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .github/ISSUE_TEMPLATE/browser_launcher.md diff --git a/.github/ISSUE_TEMPLATE/browser_launcher.md b/.github/ISSUE_TEMPLATE/browser_launcher.md new file mode 100644 index 000000000..7dbd844ee --- /dev/null +++ b/.github/ISSUE_TEMPLATE/browser_launcher.md @@ -0,0 +1,5 @@ +--- +name: "package:browser_launcher" +about: "Create a bug or file a feature request against package:browser_launcher." +labels: "package:browser_launcher" +--- \ No newline at end of file diff --git a/pkgs/browser_launcher/pubspec.yaml b/pkgs/browser_launcher/pubspec.yaml index 39da2c9f7..ac083ca70 100644 --- a/pkgs/browser_launcher/pubspec.yaml +++ b/pkgs/browser_launcher/pubspec.yaml @@ -1,7 +1,7 @@ name: browser_launcher version: 1.1.2 description: Provides a standardized way to launch web browsers for testing and tools. -repository: https://github.com/dart-lang/browser_launcher +repository: https://github.com/dart-lang/tools/tree/main/pkgs/browser_launcher environment: sdk: ^3.4.0 From 81400d71df189cd749aa46b2ce9cddff34663bc8 Mon Sep 17 00:00:00 2001 From: Moritz Date: Fri, 25 Oct 2024 11:21:54 +0200 Subject: [PATCH 64/66] Moving fixes --- .github/labeler.yml | 4 ++++ .../workflows/browser_launcher.yaml | 16 +++++++++++++--- README.md | 1 + pkgs/browser_launcher/.github/dependabot.yml | 15 --------------- pkgs/browser_launcher/CHANGELOG.md | 4 ++++ pkgs/browser_launcher/README.md | 2 +- pkgs/browser_launcher/pubspec.yaml | 2 +- 7 files changed, 24 insertions(+), 20 deletions(-) rename pkgs/browser_launcher/.github/workflows/dart.yml => .github/workflows/browser_launcher.yaml (68%) delete mode 100644 pkgs/browser_launcher/.github/dependabot.yml diff --git a/.github/labeler.yml b/.github/labeler.yml index c3d5de0b9..55df9dc25 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -8,6 +8,10 @@ - changed-files: - any-glob-to-any-file: 'pkgs/boolean_selector/**' +'package:browser_launcher': + - changed-files: + - any-glob-to-any-file: 'pkgs/browser_launcher/**' + 'package:cli_config': - changed-files: - any-glob-to-any-file: 'pkgs/cli_config/**' diff --git a/pkgs/browser_launcher/.github/workflows/dart.yml b/.github/workflows/browser_launcher.yaml similarity index 68% rename from pkgs/browser_launcher/.github/workflows/dart.yml rename to .github/workflows/browser_launcher.yaml index 6e1bfe272..bdc6bba9d 100644 --- a/pkgs/browser_launcher/.github/workflows/dart.yml +++ b/.github/workflows/browser_launcher.yaml @@ -1,11 +1,17 @@ -name: Dart +name: package:browser_launcher on: # Run on PRs and pushes to the default branch. push: - branches: [ master ] + branches: [ main ] + paths: + - '.github/workflows/browser_launcher.yml' + - 'pkgs/browser_launcher/**' pull_request: - branches: [ master ] + branches: [ main ] + paths: + - '.github/workflows/browser_launcher.yml' + - 'pkgs/browser_launcher/**' schedule: - cron: "0 0 * * 0" @@ -13,6 +19,10 @@ env: PUB_ENVIRONMENT: bot.github DISPLAY: ':99' +defaults: + run: + working-directory: pkgs/browser_launcher/ + jobs: test: runs-on: ubuntu-latest diff --git a/README.md b/README.md index ac4edf204..1c6999914 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,7 @@ don't naturally belong to other topic monorepos (like | Package | Description | Version | | --- | --- | --- | | [boolean_selector](pkgs/boolean_selector/) | A flexible syntax for boolean expressions, based on a simplified version of Dart's expression syntax. | [![pub package](https://img.shields.io/pub/v/boolean_selector.svg)](https://pub.dev/packages/boolean_selector) | +| [browser_launcher](pkgs/browser_launcher/) | Provides a standardized way to launch web browsers for testing and tools. | [![pub package](https://img.shields.io/pub/v/browser_launcher.svg)](https://pub.dev/packages/browser_launcher) | | [cli_config](pkgs/cli_config/) | A library to take config values from configuration files, CLI arguments, and environment variables. | [![pub package](https://img.shields.io/pub/v/cli_config.svg)](https://pub.dev/packages/cli_config) | | [coverage](pkgs/coverage/) | Coverage data manipulation and formatting. | [![pub package](https://img.shields.io/pub/v/coverage.svg)](https://pub.dev/packages/coverage) | | [extension_discovery](pkgs/extension_discovery/) | A convention and utilities for package extension discovery. | [![pub package](https://img.shields.io/pub/v/extension_discovery.svg)](https://pub.dev/packages/extension_discovery) | diff --git a/pkgs/browser_launcher/.github/dependabot.yml b/pkgs/browser_launcher/.github/dependabot.yml deleted file mode 100644 index 5a11cf58c..000000000 --- a/pkgs/browser_launcher/.github/dependabot.yml +++ /dev/null @@ -1,15 +0,0 @@ -# Set update schedule for GitHub Actions - -version: 2 -updates: - -- package-ecosystem: github-actions - directory: / - schedule: - interval: monthly - labels: - - autosubmit - groups: - github-actions: - patterns: - - "*" diff --git a/pkgs/browser_launcher/CHANGELOG.md b/pkgs/browser_launcher/CHANGELOG.md index 4fb8a354d..f37505648 100644 --- a/pkgs/browser_launcher/CHANGELOG.md +++ b/pkgs/browser_launcher/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.1.3 + +- Move to `dart-lang/tools` monorepo. + ## 1.1.2 - Require Dart 3.4 diff --git a/pkgs/browser_launcher/README.md b/pkgs/browser_launcher/README.md index cf534ab3e..f6398b63c 100644 --- a/pkgs/browser_launcher/README.md +++ b/pkgs/browser_launcher/README.md @@ -1,4 +1,4 @@ -[![Dart](https://github.com/dart-lang/browser_launcher/workflows/Dart/badge.svg)](https://github.com/dart-lang/browser_launcher/actions?query=workflow%3ADart+branch%3Amaster) +[![Build Status](https://github.com/dart-lang/tools/actions/workflows/browser_launcher.yaml/badge.svg)](https://github.com/dart-lang/tools/actions/workflows/browser_launcher.yaml) [![pub package](https://img.shields.io/pub/v/browser_launcher.svg)](https://pub.dev/packages/browser_launcher) [![package publisher](https://img.shields.io/pub/publisher/browser_launcher.svg)](https://pub.dev/packages/browser_launcher/publisher) diff --git a/pkgs/browser_launcher/pubspec.yaml b/pkgs/browser_launcher/pubspec.yaml index ac083ca70..1647d5251 100644 --- a/pkgs/browser_launcher/pubspec.yaml +++ b/pkgs/browser_launcher/pubspec.yaml @@ -1,5 +1,5 @@ name: browser_launcher -version: 1.1.2 +version: 1.1.3 description: Provides a standardized way to launch web browsers for testing and tools. repository: https://github.com/dart-lang/tools/tree/main/pkgs/browser_launcher From 96c7b01a8aebc8139f28a0902fd69e3ccc5d6810 Mon Sep 17 00:00:00 2001 From: Moritz Date: Mon, 28 Oct 2024 09:40:39 +0100 Subject: [PATCH 65/66] Changes as per review --- .github/workflows/browser_launcher.yaml | 1 - pkgs/browser_launcher/example/main.dart | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/browser_launcher.yaml b/.github/workflows/browser_launcher.yaml index bdc6bba9d..be9ede1e2 100644 --- a/.github/workflows/browser_launcher.yaml +++ b/.github/workflows/browser_launcher.yaml @@ -36,7 +36,6 @@ jobs: sdk: ${{ matrix.sdk }} - run: dart pub get - id: install - run: dart format --output=none --set-exit-if-changed . - run: dart analyze --fatal-infos diff --git a/pkgs/browser_launcher/example/main.dart b/pkgs/browser_launcher/example/main.dart index 86b4eea3a..6814bceff 100644 --- a/pkgs/browser_launcher/example/main.dart +++ b/pkgs/browser_launcher/example/main.dart @@ -1,3 +1,7 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + import 'package:browser_launcher/browser_launcher.dart'; const _googleUrl = 'https://www.google.com/'; From 561291e2f2f015f1f59df024c9888d5a9f671356 Mon Sep 17 00:00:00 2001 From: Moritz Date: Mon, 28 Oct 2024 09:43:05 +0100 Subject: [PATCH 66/66] Remove lint rule --- pkgs/browser_launcher/analysis_options.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/pkgs/browser_launcher/analysis_options.yaml b/pkgs/browser_launcher/analysis_options.yaml index 556f883c8..9125368fd 100644 --- a/pkgs/browser_launcher/analysis_options.yaml +++ b/pkgs/browser_launcher/analysis_options.yaml @@ -22,7 +22,6 @@ linter: - missing_whitespace_between_adjacent_strings - no_adjacent_strings_in_list - no_runtimeType_toString - - package_api_docs - prefer_const_declarations - prefer_expression_function_bodies - prefer_final_locals