From c56611255f3f02642da10750448a8c90a9fa7b47 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Mon, 24 Jun 2024 09:36:13 -0700 Subject: [PATCH] Drop use of deprecated APIs, bump min SDK and other dependencies (#2449) --- .github/workflows/dart.yml | 4 +-- dwds/CHANGELOG.md | 1 + dwds/debug_extension/pubspec.yaml | 2 +- dwds/lib/src/debugging/inspector.dart | 5 ++- dwds/pubspec.yaml | 38 ++++++++++----------- example/pubspec.yaml | 2 +- fixtures/_experimentSound/pubspec.yaml | 2 +- fixtures/_testCircular1Sound/pubspec.yaml | 2 +- fixtures/_testCircular2Sound/pubspec.yaml | 2 +- fixtures/_testHotRestart1Sound/pubspec.yaml | 2 +- fixtures/_testHotRestart2Sound/pubspec.yaml | 2 +- fixtures/_testPackageSound/pubspec.yaml | 2 +- fixtures/_testSound/pubspec.yaml | 2 +- fixtures/_webdevSoundSmoke/pubspec.yaml | 2 +- frontend_server_common/pubspec.yaml | 2 +- tool/ci.sh | 18 ++++------ webdev/pubspec.yaml | 4 +-- 17 files changed, 44 insertions(+), 48 deletions(-) diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index 79dceb835..dd5ae2b11 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -1,4 +1,4 @@ -# Created with package:mono_repo v6.6.0 +# Created with package:mono_repo v6.6.1 name: Dart CI on: push: @@ -37,7 +37,7 @@ jobs: name: Checkout repository uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b - name: mono_repo self validate - run: dart pub global activate mono_repo 6.6.0 + run: dart pub global activate mono_repo 6.6.1 - name: mono_repo self validate run: dart pub global run mono_repo generate --validate job_002: diff --git a/dwds/CHANGELOG.md b/dwds/CHANGELOG.md index e6a48cfa2..e83dbc16e 100644 --- a/dwds/CHANGELOG.md +++ b/dwds/CHANGELOG.md @@ -6,6 +6,7 @@ - Add implementation for the VM Service's `getFlagList` API. - [#2438](https://github.com/dart-lang/webdev/pull/2438) - Hide more variables from the local scope when debugging. These variables were synthetically added by the compiler to support late local variables and don't appear in the original source code. - [#2445](https://github.com/dart-lang/webdev/pull/2445) +- Require Dart `^3.4` ## 24.0.0 diff --git a/dwds/debug_extension/pubspec.yaml b/dwds/debug_extension/pubspec.yaml index 82d1cd109..ebfb5e86e 100644 --- a/dwds/debug_extension/pubspec.yaml +++ b/dwds/debug_extension/pubspec.yaml @@ -6,7 +6,7 @@ description: >- A Chrome extension for Dart debugging. environment: - sdk: ^3.2.0-36.0.dev + sdk: ^3.2.0 dependencies: built_value: ^8.3.0 diff --git a/dwds/lib/src/debugging/inspector.dart b/dwds/lib/src/debugging/inspector.dart index 588051396..b167ee06d 100644 --- a/dwds/lib/src/debugging/inspector.dart +++ b/dwds/lib/src/debugging/inspector.dart @@ -5,7 +5,6 @@ import 'dart:math' as math; import 'package:async/async.dart'; -import 'package:collection/collection.dart'; import 'package:dwds/src/config/tool_configuration.dart'; import 'package:dwds/src/connections/app_connection.dart'; import 'package:dwds/src/debugging/classes.dart'; @@ -113,9 +112,9 @@ class AppInspector implements AppInspectorInterface { final scripts = await scriptRefs; await DartUri.initialize(); - DartUri.recordAbsoluteUris(libraries.map((lib) => lib.uri).whereNotNull()); + DartUri.recordAbsoluteUris(libraries.map((lib) => lib.uri).nonNulls); DartUri.recordAbsoluteUris( - scripts.map((script) => script.uri).whereNotNull(), + scripts.map((script) => script.uri).nonNulls, ); isolate.extensionRPCs?.addAll(await _getExtensionRpcs()); diff --git a/dwds/pubspec.yaml b/dwds/pubspec.yaml index ec5e9d8ac..d0c4473cc 100644 --- a/dwds/pubspec.yaml +++ b/dwds/pubspec.yaml @@ -6,7 +6,7 @@ description: >- service protocol. repository: https://github.com/dart-lang/webdev/tree/master/dwds environment: - sdk: ^3.2.0-36.0.dev + sdk: ^3.4.0 dependencies: async: ^2.9.0 @@ -15,46 +15,46 @@ dependencies: collection: ^1.15.0 crypto: ^3.0.2 dds: ^4.1.0 - file: ">=6.0.0 <8.0.0" - http: ^0.13.4 + file: ">=6.1.4 <8.0.0" + http: ^1.0.0 http_multi_server: ^3.2.0 logging: ^1.0.2 - meta: ^1.7.0 + meta: ^1.9.1 package_config: ^2.0.2 path: ^1.8.1 pool: ^1.5.0 pub_semver: ^2.1.1 shelf: ^1.3.0 - shelf_packages_handler: "^3.0.0" - shelf_proxy: ^1.0.1 + shelf_packages_handler: ^3.0.0 + shelf_proxy: ^1.0.4 shelf_static: ^1.1.0 - shelf_web_socket: ^1.0.1 + shelf_web_socket: '>=1.0.0 <3.0.0' source_maps: ^0.10.10 stack_trace: ^1.10.0 sse: ^4.1.2 - uuid: ^3.0.6 - vm_service: ^14.0.0 + uuid: ^4.0.0 + vm_service: ^14.2.4 vm_service_interface: 1.1.0 - web_socket_channel: ^2.2.0 + web_socket_channel: ^2.4.0 webkit_inspection_protocol: ^1.0.1 dev_dependencies: - args: ^2.3.1 - build: ^2.3.0 + args: ^2.4.2 + build: ^2.3.1 build_daemon: ^4.0.0 - build_runner: ^2.4.0 + build_runner: ^2.4.1 build_version: ^2.1.1 - build_web_compilers: ^4.0.4 - built_value_generator: ^8.3.0 + build_web_compilers: ^4.0.8 + built_value_generator: ^8.4.2 graphs: ^2.1.0 frontend_server_common: path: ../frontend_server_common - js: ^0.6.4 + js: ">=0.6.4 <0.8.0" lints: ^4.0.0 pubspec_parse: ^1.2.0 - puppeteer: ^3.0.0 - stream_channel: ^2.1.0 - test: ^1.21.1 + puppeteer: ^3.1.1 + stream_channel: ^2.1.2 + test: ^1.21.6 test_common: path: ../test_common webdriver: ^3.0.0 diff --git a/example/pubspec.yaml b/example/pubspec.yaml index bbaf11574..ceaaeb2bf 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -4,7 +4,7 @@ description: A web app example for webdev CLI. publish_to: none environment: - sdk: ^3.2.0-36.0.dev + sdk: ^3.2.0 dev_dependencies: build_runner: ^2.4.0 diff --git a/fixtures/_experimentSound/pubspec.yaml b/fixtures/_experimentSound/pubspec.yaml index 6640daef1..12760da0f 100644 --- a/fixtures/_experimentSound/pubspec.yaml +++ b/fixtures/_experimentSound/pubspec.yaml @@ -5,7 +5,7 @@ description: >- publish_to: none environment: - sdk: ^3.2.0-36.0.dev + sdk: ^3.2.0 dependencies: intl: ^0.17.0 diff --git a/fixtures/_testCircular1Sound/pubspec.yaml b/fixtures/_testCircular1Sound/pubspec.yaml index a95c387ff..f5c9f5e56 100644 --- a/fixtures/_testCircular1Sound/pubspec.yaml +++ b/fixtures/_testCircular1Sound/pubspec.yaml @@ -5,7 +5,7 @@ description: >- publish_to: none environment: - sdk: ^3.2.0-36.0.dev + sdk: ^3.2.0 dependencies: intl: ^0.17.0 diff --git a/fixtures/_testCircular2Sound/pubspec.yaml b/fixtures/_testCircular2Sound/pubspec.yaml index 233a2384c..c60a49687 100644 --- a/fixtures/_testCircular2Sound/pubspec.yaml +++ b/fixtures/_testCircular2Sound/pubspec.yaml @@ -5,7 +5,7 @@ description: >- publish_to: none environment: - sdk: ^3.2.0-36.0.dev + sdk: ^3.2.0 dependencies: _test_circular1_sound: diff --git a/fixtures/_testHotRestart1Sound/pubspec.yaml b/fixtures/_testHotRestart1Sound/pubspec.yaml index c250bb72e..0bfea2e10 100644 --- a/fixtures/_testHotRestart1Sound/pubspec.yaml +++ b/fixtures/_testHotRestart1Sound/pubspec.yaml @@ -5,7 +5,7 @@ description: >- publish_to: none environment: - sdk: ^3.2.0-36.0.dev + sdk: ^3.2.0 dependencies: intl: ^0.17.0 diff --git a/fixtures/_testHotRestart2Sound/pubspec.yaml b/fixtures/_testHotRestart2Sound/pubspec.yaml index a57b8dfad..f0967ff53 100644 --- a/fixtures/_testHotRestart2Sound/pubspec.yaml +++ b/fixtures/_testHotRestart2Sound/pubspec.yaml @@ -5,7 +5,7 @@ description: >- publish_to: none environment: - sdk: ^3.2.0-36.0.dev + sdk: ^3.2.0 dependencies: intl: ^0.17.0 diff --git a/fixtures/_testPackageSound/pubspec.yaml b/fixtures/_testPackageSound/pubspec.yaml index e547e7168..965cc97b5 100644 --- a/fixtures/_testPackageSound/pubspec.yaml +++ b/fixtures/_testPackageSound/pubspec.yaml @@ -5,7 +5,7 @@ description: >- publish_to: none environment: - sdk: ^3.2.0-36.0.dev + sdk: ^3.2.0 dependencies: _test_sound: diff --git a/fixtures/_testSound/pubspec.yaml b/fixtures/_testSound/pubspec.yaml index 36cc7d1bb..59c75eb4a 100644 --- a/fixtures/_testSound/pubspec.yaml +++ b/fixtures/_testSound/pubspec.yaml @@ -5,7 +5,7 @@ description: >- publish_to: none environment: - sdk: ^3.2.0-36.0.dev + sdk: ^3.2.0 dependencies: intl: ^0.17.0 diff --git a/fixtures/_webdevSoundSmoke/pubspec.yaml b/fixtures/_webdevSoundSmoke/pubspec.yaml index b286a9962..edf964a16 100644 --- a/fixtures/_webdevSoundSmoke/pubspec.yaml +++ b/fixtures/_webdevSoundSmoke/pubspec.yaml @@ -4,7 +4,7 @@ description: A test fixture for webdev testing with sound support. publish_to: none environment: - sdk: ^3.2.0-36.0.dev + sdk: ^3.2.0 dev_dependencies: build_runner: ^2.4.0 diff --git a/frontend_server_common/pubspec.yaml b/frontend_server_common/pubspec.yaml index 0e1fde902..11629092f 100644 --- a/frontend_server_common/pubspec.yaml +++ b/frontend_server_common/pubspec.yaml @@ -3,7 +3,7 @@ publish_to: none description: >- Frontend server integration code to use for dwds tests. Mimics flutter code. environment: - sdk: ^3.2.0-36.0.dev + sdk: ^3.2.0 dependencies: dwds: any diff --git a/tool/ci.sh b/tool/ci.sh index 116a97713..c8168715b 100755 --- a/tool/ci.sh +++ b/tool/ci.sh @@ -1,9 +1,10 @@ #!/bin/bash -# Created with package:mono_repo v6.6.0 +# Created with package:mono_repo v6.6.1 # Support built in commands on windows out of the box. + # When it is a flutter repo (check the pubspec.yaml for "sdk: flutter") -# then "flutter" is called instead of "pub". +# then "flutter pub" is called instead of "dart pub". # This assumes that the Flutter SDK has been installed in a previous step. function pub() { if grep -Fq "sdk: flutter" "${PWD}/pubspec.yaml"; then @@ -12,18 +13,13 @@ function pub() { command dart pub "$@" fi } -# When it is a flutter repo (check the pubspec.yaml for "sdk: flutter") -# then "flutter" is called instead of "pub". -# This assumes that the Flutter SDK has been installed in a previous step. + function format() { - if grep -Fq "sdk: flutter" "${PWD}/pubspec.yaml"; then - command flutter format "$@" - else - command dart format "$@" - fi + command dart format "$@" } + # When it is a flutter repo (check the pubspec.yaml for "sdk: flutter") -# then "flutter" is called instead of "pub". +# then "flutter analyze" is called instead of "dart analyze". # This assumes that the Flutter SDK has been installed in a previous step. function analyze() { if grep -Fq "sdk: flutter" "${PWD}/pubspec.yaml"; then diff --git a/webdev/pubspec.yaml b/webdev/pubspec.yaml index ac5ae87ae..009a7bde5 100644 --- a/webdev/pubspec.yaml +++ b/webdev/pubspec.yaml @@ -8,7 +8,7 @@ description: >- features for users and tools to build and deploy web applications with Dart. repository: https://github.com/dart-lang/webdev/tree/master/webdev environment: - sdk: ^3.2.0-36.0.dev + sdk: ^3.2.0 dependencies: args: ^2.3.1 @@ -20,7 +20,7 @@ dependencies: dds: ^4.1.0 # Pin DWDS to avoid dependency conflicts with vm_service: dwds: 24.0.0 - http: ^0.13.4 + http: ^1.0.0 http_multi_server: ^3.2.0 io: ^1.0.3 logging: ^1.0.2