From f660acbd048ecc2296d59cb82cb75db26a1125d2 Mon Sep 17 00:00:00 2001 From: Felix Angelov Date: Mon, 13 Jan 2025 15:31:47 -0600 Subject: [PATCH] chore(shorebird_cli): upgrade `pkg:mason_logger` (#2754) --- packages/shorebird_cli/pubspec.lock | 88 ++++++++--------- packages/shorebird_cli/pubspec.yaml | 2 +- .../test/src/artifact_manager_test.dart | 98 ++++++++++--------- .../test/src/extensions/string_test.dart | 13 --- 4 files changed, 97 insertions(+), 104 deletions(-) diff --git a/packages/shorebird_cli/pubspec.lock b/packages/shorebird_cli/pubspec.lock index 8afaba6e5..cff306684 100644 --- a/packages/shorebird_cli/pubspec.lock +++ b/packages/shorebird_cli/pubspec.lock @@ -5,10 +5,10 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - sha256: "16e298750b6d0af7ce8a3ba7c18c69c3785d11b15ec83f6dcd0ad2a0009b3cab" + sha256: "88399e291da5f7e889359681a8f64b18c5123e03576b01f32a6a276611e511c3" url: "https://pub.dev" source: hosted - version: "76.0.0" + version: "78.0.0" _macros: dependency: transitive description: dart @@ -18,10 +18,10 @@ packages: dependency: transitive description: name: analyzer - sha256: "1f14db053a8c23e260789e9b0980fa27f2680dd640932cae5e1137cce0e46e1e" + sha256: "62899ef43d0b962b056ed2ebac6b47ec76ffd003d5f7c4e4dc870afe63188e33" url: "https://pub.dev" source: hosted - version: "6.11.0" + version: "7.1.0" archive: dependency: "direct main" description: @@ -74,34 +74,34 @@ packages: dependency: transitive description: name: build - sha256: "80184af8b6cb3e5c1c4ec6d8544d27711700bc3e6d2efad04238c7b5290889f0" + sha256: cef23f1eda9b57566c81e2133d196f8e3df48f244b317368d65c5943d91148f0 url: "https://pub.dev" source: hosted - version: "2.4.1" + version: "2.4.2" build_config: dependency: transitive description: name: build_config - sha256: bf80fcfb46a29945b423bd9aad884590fb1dc69b330a4d4700cac476af1708d1 + sha256: "4ae2de3e1e67ea270081eaee972e1bd8f027d459f249e0f1186730784c2e7e33" url: "https://pub.dev" source: hosted - version: "1.1.1" + version: "1.1.2" build_daemon: dependency: transitive description: name: build_daemon - sha256: "79b2aef6ac2ed00046867ed354c88778c9c0f029df8a20fe10b5436826721ef9" + sha256: "294a2edaf4814a378725bfe6358210196f5ea37af89ecd81bfa32960113d4948" url: "https://pub.dev" source: hosted - version: "4.0.2" + version: "4.0.3" build_resolvers: dependency: transitive description: name: build_resolvers - sha256: "339086358431fa15d7eca8b6a36e5d783728cf025e559b834f4609a1fcfb7b0a" + sha256: "99d3980049739a985cf9b21f30881f46db3ebc62c5b8d5e60e27440876b1ba1e" url: "https://pub.dev" source: hosted - version: "2.4.2" + version: "2.4.3" build_runner: dependency: "direct dev" description: @@ -146,10 +146,10 @@ packages: dependency: transitive description: name: built_value - sha256: c7913a9737ee4007efedaffc968c049fd0f3d0e49109e778edc10de9426005cb + sha256: "28a712df2576b63c6c005c465989a348604960c0958d28be5303ba9baa841ac2" url: "https://pub.dev" source: hosted - version: "8.9.2" + version: "8.9.3" characters: dependency: transitive description: @@ -234,10 +234,10 @@ packages: dependency: transitive description: name: dart_style - sha256: "7856d364b589d1f08986e140938578ed36ed948581fbc3bc9aef1805039ac5ab" + sha256: "27eb0ae77836989a3bc541ce55595e8ceee0992807f14511552a898ddd0d88ac" url: "https://pub.dev" source: hosted - version: "2.3.7" + version: "3.0.1" decimal: dependency: transitive description: @@ -330,18 +330,18 @@ packages: dependency: transitive description: name: http_multi_server - sha256: "97486f20f9c2f7be8f514851703d0119c3596d14ea63227af6f7a481ef2b2f8b" + sha256: aa6199f908078bb1c5efb8d8638d4ae191aac11b311132c3ef48ce352fb52ef8 url: "https://pub.dev" source: hosted - version: "3.2.1" + version: "3.2.2" http_parser: dependency: transitive description: name: http_parser - sha256: "76d306a1c3afb33fe82e2bbacad62a61f409b5634c915fceb0d799de1a913360" + sha256: "178d74305e7866013777bab2c3d8726205dc5a4dd935297175b19a23a2e66571" url: "https://pub.dev" source: hosted - version: "4.1.1" + version: "4.1.2" intl: dependency: "direct main" description: @@ -394,10 +394,10 @@ packages: dependency: "direct dev" description: name: json_serializable - sha256: "8f52361c07497a7f2c16c13aac159f9be6fb12b1d67719eac98a21d9a205d571" + sha256: b0a98230538fe5d0b60a22fb6bf1b6cb03471b53e3324ff6069c591679dd59c9 url: "https://pub.dev" source: hosted - version: "6.9.2" + version: "6.9.3" jwt: dependency: "direct main" description: @@ -425,18 +425,18 @@ packages: dependency: "direct main" description: name: mason_logger - sha256: b6d6d159927a4165f197ffc5993ea680dd41c59daf35bff23bae28390c09a36e + sha256: "28afd064c416f454aaabb870ecac813f25aec4a0c01fd13078624a5c26797a46" url: "https://pub.dev" source: hosted - version: "0.3.1" + version: "0.3.2" matcher: dependency: transitive description: name: matcher - sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb + sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2 url: "https://pub.dev" source: hosted - version: "0.12.16+1" + version: "0.12.17" maybe_just_nothing: dependency: transitive description: @@ -505,10 +505,10 @@ packages: dependency: transitive description: name: petitparser - sha256: c15605cd28af66339f8eb6fbe0e541bfe2d1b72d5825efc6598f3e0a31b9ad27 + sha256: "07c8f0b1913bcde1ff0d26e57ace2f3012ccbf2b204e070290dad3bb22797646" url: "https://pub.dev" source: hosted - version: "6.0.2" + version: "6.1.0" platform: dependency: "direct main" description: @@ -561,10 +561,10 @@ packages: dependency: "direct main" description: name: pubspec_parse - sha256: "81876843eb50dc2e1e5b151792c9a985c5ed2536914115ed04e9c8528f6647b0" + sha256: "0560ba233314abbed0a48a2956f7f022cce7c3e1e73df540277da7544cad4082" url: "https://pub.dev" source: hosted - version: "1.4.0" + version: "1.5.0" rational: dependency: transitive description: @@ -703,18 +703,18 @@ packages: dependency: transitive description: name: stack_trace - sha256: "9f47fd3630d76be3ab26f0ee06d213679aa425996925ff3feffdec504931c377" + sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1" url: "https://pub.dev" source: hosted - version: "1.12.0" + version: "1.12.1" stream_channel: dependency: transitive description: name: stream_channel - sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 + sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d" url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "2.1.4" stream_transform: dependency: "direct main" description: @@ -727,10 +727,10 @@ packages: dependency: transitive description: name: string_scanner - sha256: "0bd04f5bb74fcd6ff0606a888a30e917af9bd52820b178eaa464beb11dca84b6" + sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43" url: "https://pub.dev" source: hosted - version: "1.4.0" + version: "1.4.1" string_validator: dependency: transitive description: @@ -743,10 +743,10 @@ packages: dependency: transitive description: name: term_glyph - sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e" url: "https://pub.dev" source: hosted - version: "1.2.1" + version: "1.2.2" test: dependency: "direct dev" description: @@ -775,10 +775,10 @@ packages: dependency: transitive description: name: timing - sha256: "70a3b636575d4163c477e6de42f247a23b315ae20e86442bebe32d3cabf61c32" + sha256: "62ee18aca144e4a9f29d212f5a4c6a053be252b895ab14b5821996cff4ed90fe" url: "https://pub.dev" source: hosted - version: "1.0.1" + version: "1.0.2" ttl_cache: dependency: transitive description: @@ -823,10 +823,10 @@ packages: dependency: transitive description: name: watcher - sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8" + sha256: "69da27e49efa56a15f8afe8f4438c4ec02eff0a117df1b22ea4aad194fe1c104" url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.1.1" web: dependency: transitive description: @@ -863,10 +863,10 @@ packages: dependency: transitive description: name: win32 - sha256: "8b338d4486ab3fbc0ba0db9f9b4f5239b6697fcee427939a40e720cbb9ee0a69" + sha256: "154360849a56b7b67331c21f09a386562d88903f90a1099c5987afc1912e1f29" url: "https://pub.dev" source: hosted - version: "5.9.0" + version: "5.10.0" xml: dependency: "direct main" description: diff --git a/packages/shorebird_cli/pubspec.yaml b/packages/shorebird_cli/pubspec.yaml index 57bba5507..e72a05267 100644 --- a/packages/shorebird_cli/pubspec.yaml +++ b/packages/shorebird_cli/pubspec.yaml @@ -27,7 +27,7 @@ dependencies: json_path: ^0.7.1 jwt: path: ../jwt - mason_logger: ^0.3.1 + mason_logger: ^0.3.2 meta: ^1.16.0 path: ^1.9.1 pem: ^2.0.5 diff --git a/packages/shorebird_cli/test/src/artifact_manager_test.dart b/packages/shorebird_cli/test/src/artifact_manager_test.dart index 39e5b16dc..ef0b4ccd6 100644 --- a/packages/shorebird_cli/test/src/artifact_manager_test.dart +++ b/packages/shorebird_cli/test/src/artifact_manager_test.dart @@ -342,55 +342,61 @@ void main() { }); }); - group('when download succeeds', () { - late StreamController> responseStreamController; + group( + 'when download succeeds', + () { + late StreamController> responseStreamController; - setUp(() { - responseStreamController = StreamController>(); - when(() => httpClient.send(any())).thenAnswer( - (_) async => http.StreamedResponse( - responseStreamController.stream, - HttpStatus.ok, - contentLength: 5, - ), - ); - }); + setUp(() { + responseStreamController = StreamController>(); + when(() => httpClient.send(any())).thenAnswer( + (_) async => http.StreamedResponse( + responseStreamController.stream, + HttpStatus.ok, + contentLength: 5, + ), + ); + }); - test('progress updates with a throttled ', () async { - // Awaiting this will cause the test to hang - unawaited( - runWithOverrides( - () => artifactManager.downloadWithProgressUpdates( - Uri.parse('https://example.com'), - message: 'hello', - throttleDuration: const Duration(milliseconds: 50), + test('progress updates with a throttled ', () async { + // Awaiting this will cause the test to hang + unawaited( + runWithOverrides( + () => artifactManager.downloadWithProgressUpdates( + Uri.parse('https://example.com'), + message: 'hello', + throttleDuration: const Duration(milliseconds: 50), + ), ), - ), - ); - // Download the first 3/5. The first addition will trigger the first - // progress update, the second addition will be throttled, and the - // third addition will trigger the second progress update after the - // delay. - responseStreamController - ..add([1]) - ..add([1]) - ..add([1]); - await Future.delayed(const Duration(milliseconds: 70)); - // Download the last 2/5, bringing the total to 5/5 - responseStreamController.add([1, 1]); - await Future.delayed(const Duration(milliseconds: 70)); - verifyInOrder([ - () => progress.update('hello (20%)'), - () => progress.update('hello (60%)'), - () => progress.update('hello (100%)'), - ]); - verifyNever(() => progress.update('hello (0%)')); - verifyNever(() => progress.update('hello (20%)')); - verifyNever(() => progress.update('hello (80%)')); - verifyNoMoreInteractions(progress); - await responseStreamController.close(); - }); - }); + ); + // Download the first 3/5. The first addition will trigger the first + // progress update, the second addition will be throttled, and the + // third addition will trigger the second progress update after the + // delay. + responseStreamController + ..add([1]) + ..add([1]) + ..add([1]); + await Future.delayed(const Duration(milliseconds: 70)); + // Download the last 2/5, bringing the total to 5/5 + responseStreamController.add([1, 1]); + await Future.delayed(const Duration(milliseconds: 70)); + verifyInOrder([ + () => progress.update('hello (20%)'), + () => progress.update('hello (60%)'), + () => progress.update('hello (100%)'), + ]); + verifyNever(() => progress.update('hello (0%)')); + verifyNever(() => progress.update('hello (20%)')); + verifyNever(() => progress.update('hello (80%)')); + verifyNoMoreInteractions(progress); + await responseStreamController.close(); + }); + }, + onPlatform: { + 'windows': const Skip('Flaky on Windows'), + }, + ); }); group('extractZip', () { diff --git a/packages/shorebird_cli/test/src/extensions/string_test.dart b/packages/shorebird_cli/test/src/extensions/string_test.dart index c7091c4c0..7d0d2f4ec 100644 --- a/packages/shorebird_cli/test/src/extensions/string_test.dart +++ b/packages/shorebird_cli/test/src/extensions/string_test.dart @@ -33,19 +33,6 @@ void main() { ); }); - test('replaces ansi escape links with markdown links', () { - expect( - link(uri: Uri.parse('https://brickhub.dev/policy')).removeAnsiEscapes(), - equals('[https://brickhub.dev/policy](https://brickhub.dev/policy)'), - ); - - expect( - link(uri: Uri.parse('http://example.com'), message: 'Example') - .removeAnsiEscapes(), - equals('[Example](http://example.com)'), - ); - }); - test('returns string unchanged if no ansi escape codes are present', () { expect('test'.removeAnsiEscapes(), equals('test')); });