Skip to content

Commit ace278e

Browse files
authored
chore(common,notifications): update os_detect to 2.0.2 (#5569)
* chore(common,notifications): update os_detect to version 2.0.2
1 parent 0feddcb commit ace278e

File tree

8 files changed

+22
-22
lines changed

8 files changed

+22
-22
lines changed

packages/aft/test/version_bump/data/repo_snapshot/packages/aws_common/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/aft/test/version_bump/data/repo_snapshot/packages/notifications/push/amplify_push_notifications/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/aws_common/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ dependencies:
1919
logging: ^1.0.0
2020
meta: ^1.7.0
2121
mime: ^1.0.0
22-
os_detect: ^2.0.0
22+
os_detect: ^2.0.2
2323
path: ">=1.8.0 <2.0.0"
2424
stream_transform: ^2.0.0
2525
uuid: ">=3.0.6 <5.0.0"

packages/aws_common/test/config/file_location_test.dart

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ void main() {
1414
r'User home is loaded from $HOME with highest priority on non-windows platforms.',
1515
() {
1616
overrideOperatingSystem(
17-
const OperatingSystem('linux', ''),
17+
OperatingSystem('linux', ''),
1818
() {
1919
overrideEnvironment(
2020
{
@@ -42,7 +42,7 @@ void main() {
4242
r'User home is loaded from $HOME with highest priority on windows platforms.',
4343
() {
4444
overrideOperatingSystem(
45-
const OperatingSystem('windows', ''),
45+
OperatingSystem('windows', ''),
4646
() {
4747
overrideEnvironment(
4848
{
@@ -70,7 +70,7 @@ void main() {
7070
r'User home is loaded from $USERPROFILE on windows platforms when $HOME is not set.',
7171
() {
7272
overrideOperatingSystem(
73-
const OperatingSystem('windows', ''),
73+
OperatingSystem('windows', ''),
7474
() {
7575
overrideEnvironment(
7676
{
@@ -97,7 +97,7 @@ void main() {
9797
r'User home is loaded from $HOMEDRIVE$HOMEPATH on windows platforms when $HOME and $USERPROFILE are not set.',
9898
() {
9999
overrideOperatingSystem(
100-
const OperatingSystem('windows', ''),
100+
OperatingSystem('windows', ''),
101101
() {
102102
overrideEnvironment(
103103
{
@@ -123,7 +123,7 @@ void main() {
123123
r'The default config location can be overridden by the user on non-windows platforms.',
124124
() {
125125
overrideOperatingSystem(
126-
const OperatingSystem('linux', ''),
126+
OperatingSystem('linux', ''),
127127
() {
128128
overrideEnvironment(
129129
{
@@ -149,7 +149,7 @@ void main() {
149149
r'The default credentials location can be overridden by the user on non-windows platforms.',
150150
() {
151151
overrideOperatingSystem(
152-
const OperatingSystem('linux', ''),
152+
OperatingSystem('linux', ''),
153153
() {
154154
overrideEnvironment(
155155
{
@@ -175,7 +175,7 @@ void main() {
175175
r'The default credentials location can be overridden by the user on windows platforms.',
176176
() {
177177
overrideOperatingSystem(
178-
const OperatingSystem('windows', ''),
178+
OperatingSystem('windows', ''),
179179
() {
180180
overrideEnvironment(
181181
{
@@ -201,7 +201,7 @@ void main() {
201201
r'The default credentials location can be overridden by the user on windows platforms.',
202202
() {
203203
overrideOperatingSystem(
204-
const OperatingSystem('windows', ''),
204+
OperatingSystem('windows', ''),
205205
() {
206206
overrideEnvironment(
207207
{
@@ -226,7 +226,7 @@ void main() {
226226
test(r'The default profile can be overridden via environment variable.',
227227
() {
228228
overrideOperatingSystem(
229-
const OperatingSystem('linux', ''),
229+
OperatingSystem('linux', ''),
230230
() {
231231
overrideEnvironment(
232232
{

packages/aws_common/tool/generate_tests.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ void main() {
163163
output.writeln(
164164
'''
165165
test(r'${test.name}', () {
166-
overrideOperatingSystem(const OperatingSystem('${test.platform.name}', ''), () {
166+
overrideOperatingSystem(OperatingSystem('${test.platform.name}', ''), () {
167167
overrideEnvironment({
168168
${test.environment.entries.map((entry) => "'${entry.key}': r'${entry.value}',").join('\n')}
169169
}, () {

packages/notifications/push/amplify_push_notifications/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ dependencies:
1515
flutter:
1616
sdk: flutter
1717
flutter_plugin_android_lifecycle: ^2.0.9
18-
os_detect: ^2.0.0
18+
os_detect: ^2.0.2
1919
shared_preferences: ^2.0.15
2020

2121
dev_dependencies:

packages/notifications/push/amplify_push_notifications/test/amplify_push_notifications_impl_test.dart

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ void main() {
132132

133133
test('should register background processor on Android', () async {
134134
await overrideOperatingSystem(
135-
const OperatingSystem('android', ''),
135+
OperatingSystem('android', ''),
136136
() async {
137137
when(mockPushNotificationsHostApi.getLaunchNotification()).thenAnswer(
138138
(_) async => standardAndroidPushMessage.cast(),
@@ -254,7 +254,7 @@ void main() {
254254
);
255255

256256
overrideOperatingSystem(
257-
const OperatingSystem('ios', ''),
257+
OperatingSystem('ios', ''),
258258
() {
259259
expect(
260260
() async => plugin.setBadgeCount(42),
@@ -388,7 +388,7 @@ void main() {
388388
});
389389
test('getBadgeCount returns a badge count', () async {
390390
await overrideOperatingSystem(
391-
const OperatingSystem('ios', ''),
391+
OperatingSystem('ios', ''),
392392
() async {
393393
plugin = TestAmplifyPushNotifications(
394394
serviceProviderClient: mockServiceProviderClient,
@@ -415,7 +415,7 @@ void main() {
415415

416416
test('setBadgeCount calls the native layer to set', () async {
417417
await overrideOperatingSystem(
418-
const OperatingSystem('ios', ''),
418+
OperatingSystem('ios', ''),
419419
() async {
420420
plugin = TestAmplifyPushNotifications(
421421
serviceProviderClient: mockServiceProviderClient,
@@ -487,7 +487,7 @@ void main() {
487487
'onNotificationReceivedInBackground throws an Exception when the given callback function is not top-level or static',
488488
() async {
489489
overrideOperatingSystem(
490-
const OperatingSystem('android', ''),
490+
OperatingSystem('android', ''),
491491
() {
492492
plugin = TestAmplifyPushNotifications(
493493
serviceProviderClient: mockServiceProviderClient,
@@ -514,7 +514,7 @@ void main() {
514514
'onNotificationReceivedInBackground should register a top-level or static callback function',
515515
() async {
516516
await overrideOperatingSystem(
517-
const OperatingSystem('android', ''),
517+
OperatingSystem('android', ''),
518518
() async {
519519
SharedPreferences.setMockInitialValues({});
520520
final pref = await SharedPreferences.getInstance();
@@ -534,7 +534,7 @@ void main() {
534534
test('onNotificationReceivedInBackground should accept the callback on iOS',
535535
() async {
536536
overrideOperatingSystem(
537-
const OperatingSystem('ios', ''),
537+
OperatingSystem('ios', ''),
538538
() {
539539
void localiOScallback(testGlobalCallbackFunction) {}
540540
plugin = TestAmplifyPushNotifications(

packages/notifications/push/amplify_push_notifications/test/push_notification_flutter_api_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ void main() {
8080
'should invoke the top-level or static external callback function on Android',
8181
() async {
8282
await overrideOperatingSystem(
83-
const OperatingSystem('android', ''),
83+
OperatingSystem('android', ''),
8484
() async {
8585
final pref = await SharedPreferences.getInstance();
8686
TestAmplifyPushNotifications(

0 commit comments

Comments
 (0)