From aaa5755af3e725a239b9a51fa2aeb83672c8a450 Mon Sep 17 00:00:00 2001 From: Tyler-Larkin Date: Fri, 18 Oct 2024 10:45:35 -0700 Subject: [PATCH] chore(common,notifications): update os_detect to 2.0.2 (#5569) * chore(common,notifications): update os_detect to version 2.0.2 --- .../packages/aws_common/pubspec.yaml | 2 +- .../amplify_push_notifications/pubspec.yaml | 2 +- packages/aws_common/pubspec.yaml | 2 +- .../test/config/file_location_test.dart | 18 +++++++++--------- packages/aws_common/tool/generate_tests.dart | 2 +- .../amplify_push_notifications/pubspec.yaml | 2 +- .../amplify_push_notifications_impl_test.dart | 14 +++++++------- .../push_notification_flutter_api_test.dart | 2 +- 8 files changed, 22 insertions(+), 22 deletions(-) diff --git a/packages/aft/test/version_bump/data/repo_snapshot/packages/aws_common/pubspec.yaml b/packages/aft/test/version_bump/data/repo_snapshot/packages/aws_common/pubspec.yaml index 084e039b30..55ac36694f 100644 --- a/packages/aft/test/version_bump/data/repo_snapshot/packages/aws_common/pubspec.yaml +++ b/packages/aft/test/version_bump/data/repo_snapshot/packages/aws_common/pubspec.yaml @@ -19,7 +19,7 @@ dependencies: logging: ^1.0.0 meta: ^1.7.0 mime: ^1.0.0 - os_detect: ^2.0.0 + os_detect: ^2.0.2 path: ">=1.8.0 <2.0.0" stream_transform: ^2.0.0 uuid: ">=3.0.6 <5.0.0" diff --git a/packages/aft/test/version_bump/data/repo_snapshot/packages/notifications/push/amplify_push_notifications/pubspec.yaml b/packages/aft/test/version_bump/data/repo_snapshot/packages/notifications/push/amplify_push_notifications/pubspec.yaml index d56c2fd498..0cbed520b8 100644 --- a/packages/aft/test/version_bump/data/repo_snapshot/packages/notifications/push/amplify_push_notifications/pubspec.yaml +++ b/packages/aft/test/version_bump/data/repo_snapshot/packages/notifications/push/amplify_push_notifications/pubspec.yaml @@ -15,7 +15,7 @@ dependencies: flutter: sdk: flutter flutter_plugin_android_lifecycle: ^2.0.9 - os_detect: ^2.0.0 + os_detect: ^2.0.2 shared_preferences: ^2.0.15 dev_dependencies: diff --git a/packages/aws_common/pubspec.yaml b/packages/aws_common/pubspec.yaml index e855e0ce77..00ff68a7e3 100644 --- a/packages/aws_common/pubspec.yaml +++ b/packages/aws_common/pubspec.yaml @@ -19,7 +19,7 @@ dependencies: logging: ^1.0.0 meta: ^1.7.0 mime: ^1.0.0 - os_detect: ^2.0.0 + os_detect: ^2.0.2 path: ">=1.8.0 <2.0.0" stream_transform: ^2.0.0 uuid: ">=3.0.6 <5.0.0" diff --git a/packages/aws_common/test/config/file_location_test.dart b/packages/aws_common/test/config/file_location_test.dart index fca22046e2..1ad94173ae 100644 --- a/packages/aws_common/test/config/file_location_test.dart +++ b/packages/aws_common/test/config/file_location_test.dart @@ -14,7 +14,7 @@ void main() { r'User home is loaded from $HOME with highest priority on non-windows platforms.', () { overrideOperatingSystem( - const OperatingSystem('linux', ''), + OperatingSystem('linux', ''), () { overrideEnvironment( { @@ -42,7 +42,7 @@ void main() { r'User home is loaded from $HOME with highest priority on windows platforms.', () { overrideOperatingSystem( - const OperatingSystem('windows', ''), + OperatingSystem('windows', ''), () { overrideEnvironment( { @@ -70,7 +70,7 @@ void main() { r'User home is loaded from $USERPROFILE on windows platforms when $HOME is not set.', () { overrideOperatingSystem( - const OperatingSystem('windows', ''), + OperatingSystem('windows', ''), () { overrideEnvironment( { @@ -97,7 +97,7 @@ void main() { r'User home is loaded from $HOMEDRIVE$HOMEPATH on windows platforms when $HOME and $USERPROFILE are not set.', () { overrideOperatingSystem( - const OperatingSystem('windows', ''), + OperatingSystem('windows', ''), () { overrideEnvironment( { @@ -123,7 +123,7 @@ void main() { r'The default config location can be overridden by the user on non-windows platforms.', () { overrideOperatingSystem( - const OperatingSystem('linux', ''), + OperatingSystem('linux', ''), () { overrideEnvironment( { @@ -149,7 +149,7 @@ void main() { r'The default credentials location can be overridden by the user on non-windows platforms.', () { overrideOperatingSystem( - const OperatingSystem('linux', ''), + OperatingSystem('linux', ''), () { overrideEnvironment( { @@ -175,7 +175,7 @@ void main() { r'The default credentials location can be overridden by the user on windows platforms.', () { overrideOperatingSystem( - const OperatingSystem('windows', ''), + OperatingSystem('windows', ''), () { overrideEnvironment( { @@ -201,7 +201,7 @@ void main() { r'The default credentials location can be overridden by the user on windows platforms.', () { overrideOperatingSystem( - const OperatingSystem('windows', ''), + OperatingSystem('windows', ''), () { overrideEnvironment( { @@ -226,7 +226,7 @@ void main() { test(r'The default profile can be overridden via environment variable.', () { overrideOperatingSystem( - const OperatingSystem('linux', ''), + OperatingSystem('linux', ''), () { overrideEnvironment( { diff --git a/packages/aws_common/tool/generate_tests.dart b/packages/aws_common/tool/generate_tests.dart index 6d18079bcd..57a7b15413 100644 --- a/packages/aws_common/tool/generate_tests.dart +++ b/packages/aws_common/tool/generate_tests.dart @@ -163,7 +163,7 @@ void main() { output.writeln( ''' test(r'${test.name}', () { - overrideOperatingSystem(const OperatingSystem('${test.platform.name}', ''), () { + overrideOperatingSystem(OperatingSystem('${test.platform.name}', ''), () { overrideEnvironment({ ${test.environment.entries.map((entry) => "'${entry.key}': r'${entry.value}',").join('\n')} }, () { diff --git a/packages/notifications/push/amplify_push_notifications/pubspec.yaml b/packages/notifications/push/amplify_push_notifications/pubspec.yaml index ef540fa1c2..d207d517f6 100644 --- a/packages/notifications/push/amplify_push_notifications/pubspec.yaml +++ b/packages/notifications/push/amplify_push_notifications/pubspec.yaml @@ -15,7 +15,7 @@ dependencies: flutter: sdk: flutter flutter_plugin_android_lifecycle: ^2.0.9 - os_detect: ^2.0.0 + os_detect: ^2.0.2 shared_preferences: ^2.0.15 dev_dependencies: diff --git a/packages/notifications/push/amplify_push_notifications/test/amplify_push_notifications_impl_test.dart b/packages/notifications/push/amplify_push_notifications/test/amplify_push_notifications_impl_test.dart index 327911ee43..3f5bde26f7 100644 --- a/packages/notifications/push/amplify_push_notifications/test/amplify_push_notifications_impl_test.dart +++ b/packages/notifications/push/amplify_push_notifications/test/amplify_push_notifications_impl_test.dart @@ -132,7 +132,7 @@ void main() { test('should register background processor on Android', () async { await overrideOperatingSystem( - const OperatingSystem('android', ''), + OperatingSystem('android', ''), () async { when(mockPushNotificationsHostApi.getLaunchNotification()).thenAnswer( (_) async => standardAndroidPushMessage.cast(), @@ -254,7 +254,7 @@ void main() { ); overrideOperatingSystem( - const OperatingSystem('ios', ''), + OperatingSystem('ios', ''), () { expect( () async => plugin.setBadgeCount(42), @@ -388,7 +388,7 @@ void main() { }); test('getBadgeCount returns a badge count', () async { await overrideOperatingSystem( - const OperatingSystem('ios', ''), + OperatingSystem('ios', ''), () async { plugin = TestAmplifyPushNotifications( serviceProviderClient: mockServiceProviderClient, @@ -415,7 +415,7 @@ void main() { test('setBadgeCount calls the native layer to set', () async { await overrideOperatingSystem( - const OperatingSystem('ios', ''), + OperatingSystem('ios', ''), () async { plugin = TestAmplifyPushNotifications( serviceProviderClient: mockServiceProviderClient, @@ -487,7 +487,7 @@ void main() { 'onNotificationReceivedInBackground throws an Exception when the given callback function is not top-level or static', () async { overrideOperatingSystem( - const OperatingSystem('android', ''), + OperatingSystem('android', ''), () { plugin = TestAmplifyPushNotifications( serviceProviderClient: mockServiceProviderClient, @@ -514,7 +514,7 @@ void main() { 'onNotificationReceivedInBackground should register a top-level or static callback function', () async { await overrideOperatingSystem( - const OperatingSystem('android', ''), + OperatingSystem('android', ''), () async { SharedPreferences.setMockInitialValues({}); final pref = await SharedPreferences.getInstance(); @@ -534,7 +534,7 @@ void main() { test('onNotificationReceivedInBackground should accept the callback on iOS', () async { overrideOperatingSystem( - const OperatingSystem('ios', ''), + OperatingSystem('ios', ''), () { void localiOScallback(testGlobalCallbackFunction) {} plugin = TestAmplifyPushNotifications( diff --git a/packages/notifications/push/amplify_push_notifications/test/push_notification_flutter_api_test.dart b/packages/notifications/push/amplify_push_notifications/test/push_notification_flutter_api_test.dart index 75335c7a55..0035960d22 100644 --- a/packages/notifications/push/amplify_push_notifications/test/push_notification_flutter_api_test.dart +++ b/packages/notifications/push/amplify_push_notifications/test/push_notification_flutter_api_test.dart @@ -80,7 +80,7 @@ void main() { 'should invoke the top-level or static external callback function on Android', () async { await overrideOperatingSystem( - const OperatingSystem('android', ''), + OperatingSystem('android', ''), () async { final pref = await SharedPreferences.getInstance(); TestAmplifyPushNotifications(