Skip to content

Commit 7034d76

Browse files
committed
Merge branch 'master' into migrate-to-integration-tests-rework
2 parents a6c7714 + 5442fc0 commit 7034d76

File tree

129 files changed

+2992
-596
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

129 files changed

+2992
-596
lines changed

.github/workflows/scripts/functions/package-lock.json

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CHANGELOG.md

Lines changed: 184 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,190 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## 2022-10-06
7+
8+
### Changes
9+
10+
---
11+
12+
Packages with breaking changes:
13+
14+
- There are no breaking changes in this release.
15+
16+
Packages with other changes:
17+
18+
- [`_flutterfire_internals` - `v1.0.2`](#_flutterfire_internals---v102)
19+
- [`cloud_firestore` - `v3.5.1`](#cloud_firestore---v351)
20+
- [`cloud_firestore_odm` - `v1.0.0-dev.33`](#cloud_firestore_odm---v100-dev33)
21+
- [`cloud_firestore_odm_generator` - `v1.0.0-dev.33`](#cloud_firestore_odm_generator---v100-dev33)
22+
- [`cloud_firestore_platform_interface` - `v5.7.7`](#cloud_firestore_platform_interface---v577)
23+
- [`cloud_firestore_web` - `v2.8.10`](#cloud_firestore_web---v2810)
24+
- [`firebase_app_check_platform_interface` - `v0.0.5+1`](#firebase_app_check_platform_interface---v0051)
25+
- [`firebase_app_installations_platform_interface` - `v0.1.1+19`](#firebase_app_installations_platform_interface---v01119)
26+
- [`firebase_auth` - `v3.11.2`](#firebase_auth---v3112)
27+
- [`firebase_auth_platform_interface` - `v6.10.1`](#firebase_auth_platform_interface---v6101)
28+
- [`firebase_crashlytics` - `v2.8.13`](#firebase_crashlytics---v2813)
29+
- [`firebase_crashlytics_platform_interface` - `v3.2.19`](#firebase_crashlytics_platform_interface---v3219)
30+
- [`firebase_database_platform_interface` - `v0.2.2+7`](#firebase_database_platform_interface---v0227)
31+
- [`firebase_messaging` - `v13.1.0`](#firebase_messaging---v1310)
32+
- [`firebase_messaging_platform_interface` - `v4.2.0`](#firebase_messaging_platform_interface---v420)
33+
- [`firebase_messaging_web` - `v3.2.0`](#firebase_messaging_web---v320)
34+
- [`firebase_remote_config_platform_interface` - `v1.1.19`](#firebase_remote_config_platform_interface---v1119)
35+
- [`firebase_in_app_messaging_platform_interface` - `v0.2.1+19`](#firebase_in_app_messaging_platform_interface---v02119)
36+
- [`firebase_app_check_web` - `v0.0.7+1`](#firebase_app_check_web---v0071)
37+
- [`firebase_app_installations_web` - `v0.1.1+8`](#firebase_app_installations_web---v0118)
38+
- [`firebase_performance_platform_interface` - `v0.1.1+19`](#firebase_performance_platform_interface---v01119)
39+
- [`firebase_analytics_web` - `v0.4.2+7`](#firebase_analytics_web---v0427)
40+
- [`firebase_storage_web` - `v3.3.9`](#firebase_storage_web---v339)
41+
- [`firebase_performance_web` - `v0.1.1+8`](#firebase_performance_web---v0118)
42+
- [`firebase_dynamic_links_platform_interface` - `v0.2.3+15`](#firebase_dynamic_links_platform_interface---v02315)
43+
- [`firebase_analytics_platform_interface` - `v3.3.7`](#firebase_analytics_platform_interface---v337)
44+
- [`firebase_remote_config_web` - `v1.1.8`](#firebase_remote_config_web---v118)
45+
- [`firebase_remote_config` - `v2.0.20`](#firebase_remote_config---v2020)
46+
- [`firebase_in_app_messaging` - `v0.6.0+27`](#firebase_in_app_messaging---v06027)
47+
- [`firebase_app_check` - `v0.0.9+1`](#firebase_app_check---v0091)
48+
- [`firebase_app_installations` - `v0.1.1+10`](#firebase_app_installations---v01110)
49+
- [`firebase_performance` - `v0.8.3+3`](#firebase_performance---v0833)
50+
- [`firebase_analytics` - `v9.3.8`](#firebase_analytics---v938)
51+
- [`firebase_storage` - `v10.3.11`](#firebase_storage---v10311)
52+
- [`firebase_auth_web` - `v4.6.1`](#firebase_auth_web---v461)
53+
- [`firebase_dynamic_links` - `v4.3.10`](#firebase_dynamic_links---v4310)
54+
- [`firebase_database` - `v9.1.7`](#firebase_database---v917)
55+
- [`firebase_database_web` - `v0.2.1+9`](#firebase_database_web---v0219)
56+
- [`flutterfire_ui` - `v0.4.3+13`](#flutterfire_ui---v04313)
57+
58+
Packages with dependency updates only:
59+
60+
> Packages listed below depend on other packages in this workspace that have had changes. Their versions have been incremented to bump the minimum dependency versions of the packages they depend upon in this project.
61+
62+
- `firebase_remote_config_platform_interface` - `v1.1.19`
63+
- `firebase_in_app_messaging_platform_interface` - `v0.2.1+19`
64+
- `firebase_app_check_web` - `v0.0.7+1`
65+
- `firebase_app_installations_web` - `v0.1.1+8`
66+
- `firebase_performance_platform_interface` - `v0.1.1+19`
67+
- `firebase_analytics_web` - `v0.4.2+7`
68+
- `firebase_storage_web` - `v3.3.9`
69+
- `firebase_performance_web` - `v0.1.1+8`
70+
- `firebase_dynamic_links_platform_interface` - `v0.2.3+15`
71+
- `firebase_analytics_platform_interface` - `v3.3.7`
72+
- `firebase_remote_config_web` - `v1.1.8`
73+
- `firebase_remote_config` - `v2.0.20`
74+
- `firebase_in_app_messaging` - `v0.6.0+27`
75+
- `firebase_app_check` - `v0.0.9+1`
76+
- `firebase_app_installations` - `v0.1.1+10`
77+
- `firebase_performance` - `v0.8.3+3`
78+
- `firebase_analytics` - `v9.3.8`
79+
- `firebase_storage` - `v10.3.11`
80+
- `firebase_auth_web` - `v4.6.1`
81+
- `firebase_dynamic_links` - `v4.3.10`
82+
- `firebase_database` - `v9.1.7`
83+
- `firebase_database_web` - `v0.2.1+9`
84+
- `flutterfire_ui` - `v0.4.3+13`
85+
86+
---
87+
88+
#### `_flutterfire_internals` - `v1.0.2`
89+
90+
- **FIX**: Exceptions inside Query.snapshots() and more now have a stack trace that correctly points to the invocation of the throwing method ([#9639](https://github.com/firebase/flutterfire/issues/9639)). ([2f7adcb7](https://github.com/firebase/flutterfire/commit/2f7adcb777cd6bc4e3b5b3dd03c975c725bacef7))
91+
92+
#### `cloud_firestore` - `v3.5.1`
93+
94+
- **FIX**: fix a query error in Flutter Web that was affecting the parsing of ancient dates ([#9633](https://github.com/firebase/flutterfire/issues/9633)). ([9250d45f](https://github.com/firebase/flutterfire/commit/9250d45f1d7ece9335b2c4c4795fecc728df3de5))
95+
96+
#### `cloud_firestore_odm` - `v1.0.0-dev.33`
97+
98+
- **FIX**: Update ignored lints in generated files ([#9683](https://github.com/firebase/flutterfire/issues/9683)). ([3ab283bb](https://github.com/firebase/flutterfire/commit/3ab283bb3ec6e5dbc0befefb062c5069959f9fb5))
99+
- **FEAT**: Add transaction utilities to the ODM ([#9670](https://github.com/firebase/flutterfire/issues/9670)). ([7d84d70a](https://github.com/firebase/flutterfire/commit/7d84d70a1120f7751f5ff817d7b10b330dcf7e06))
100+
101+
#### `cloud_firestore_odm_generator` - `v1.0.0-dev.33`
102+
103+
- **FIX**: Update ignored lints in generated files ([#9683](https://github.com/firebase/flutterfire/issues/9683)). ([3ab283bb](https://github.com/firebase/flutterfire/commit/3ab283bb3ec6e5dbc0befefb062c5069959f9fb5))
104+
- **FEAT**: Add transaction utilities to the ODM ([#9670](https://github.com/firebase/flutterfire/issues/9670)). ([7d84d70a](https://github.com/firebase/flutterfire/commit/7d84d70a1120f7751f5ff817d7b10b330dcf7e06))
105+
106+
#### `cloud_firestore_platform_interface` - `v5.7.7`
107+
108+
- **FIX**: Exceptions inside Query.snapshots() and more now have a stack trace that correctly points to the invocation of the throwing method ([#9639](https://github.com/firebase/flutterfire/issues/9639)). ([2f7adcb7](https://github.com/firebase/flutterfire/commit/2f7adcb777cd6bc4e3b5b3dd03c975c725bacef7))
109+
110+
#### `cloud_firestore_web` - `v2.8.10`
111+
112+
- **FIX**: fix a query error in Flutter Web that was affecting the parsing of ancient dates ([#9633](https://github.com/firebase/flutterfire/issues/9633)). ([9250d45f](https://github.com/firebase/flutterfire/commit/9250d45f1d7ece9335b2c4c4795fecc728df3de5))
113+
114+
#### `firebase_app_check_platform_interface` - `v0.0.5+1`
115+
116+
- **FIX**: Exceptions inside Query.snapshots() and more now have a stack trace that correctly points to the invocation of the throwing method ([#9639](https://github.com/firebase/flutterfire/issues/9639)). ([2f7adcb7](https://github.com/firebase/flutterfire/commit/2f7adcb777cd6bc4e3b5b3dd03c975c725bacef7))
117+
118+
#### `firebase_app_installations_platform_interface` - `v0.1.1+19`
119+
120+
- **FIX**: Exceptions inside Query.snapshots() and more now have a stack trace that correctly points to the invocation of the throwing method ([#9639](https://github.com/firebase/flutterfire/issues/9639)). ([2f7adcb7](https://github.com/firebase/flutterfire/commit/2f7adcb777cd6bc4e3b5b3dd03c975c725bacef7))
121+
122+
#### `firebase_auth` - `v3.11.2`
123+
124+
- **DOCS**: update `setSettings()` inline documentation ([#9655](https://github.com/firebase/flutterfire/issues/9655)). ([39ca0029](https://github.com/firebase/flutterfire/commit/39ca00299ec5c6e0f2dc9b0b5a8d71b8d59d51d4))
125+
126+
#### `firebase_auth_platform_interface` - `v6.10.1`
127+
128+
- **FIX**: Exceptions inside Query.snapshots() and more now have a stack trace that correctly points to the invocation of the throwing method ([#9639](https://github.com/firebase/flutterfire/issues/9639)). ([2f7adcb7](https://github.com/firebase/flutterfire/commit/2f7adcb777cd6bc4e3b5b3dd03c975c725bacef7))
129+
- **DOCS**: update `setSettings()` inline documentation ([#9655](https://github.com/firebase/flutterfire/issues/9655)). ([39ca0029](https://github.com/firebase/flutterfire/commit/39ca00299ec5c6e0f2dc9b0b5a8d71b8d59d51d4))
130+
131+
#### `firebase_crashlytics` - `v2.8.13`
132+
133+
- **FIX**: parameter `information` accepts `Iterable<Object>` for further diagnostic logging information ([#9678](https://github.com/firebase/flutterfire/issues/9678)). ([2d2b5b03](https://github.com/firebase/flutterfire/commit/2d2b5b03901b68976047e5f2888beb0296f4af45))
134+
- **DOCS**: add note for `crash()` that the app needs to be restarted to send a crash report ([#9586](https://github.com/firebase/flutterfire/issues/9586)). ([3a3e5212](https://github.com/firebase/flutterfire/commit/3a3e52123f04eac6d73c21474155e6e67cb357c1))
135+
136+
#### `firebase_crashlytics_platform_interface` - `v3.2.19`
137+
138+
- **DOCS**: add note for `crash()` that the app needs to be restarted to send a crash report ([#9586](https://github.com/firebase/flutterfire/issues/9586)). ([3a3e5212](https://github.com/firebase/flutterfire/commit/3a3e52123f04eac6d73c21474155e6e67cb357c1))
139+
140+
#### `firebase_database_platform_interface` - `v0.2.2+7`
141+
142+
- **FIX**: Exceptions inside Query.snapshots() and more now have a stack trace that correctly points to the invocation of the throwing method ([#9639](https://github.com/firebase/flutterfire/issues/9639)). ([2f7adcb7](https://github.com/firebase/flutterfire/commit/2f7adcb777cd6bc4e3b5b3dd03c975c725bacef7))
143+
144+
#### `firebase_messaging` - `v13.1.0`
145+
146+
- **FEAT**: add support for exporting delivery metrics to BigQuery ([#9636](https://github.com/firebase/flutterfire/issues/9636)). ([170b99b9](https://github.com/firebase/flutterfire/commit/170b99b91573f28316172e43188d57ca14600446))
147+
148+
#### `firebase_messaging_platform_interface` - `v4.2.0`
149+
150+
- **FEAT**: add support for exporting delivery metrics to BigQuery ([#9636](https://github.com/firebase/flutterfire/issues/9636)). ([170b99b9](https://github.com/firebase/flutterfire/commit/170b99b91573f28316172e43188d57ca14600446))
151+
152+
#### `firebase_messaging_web` - `v3.2.0`
153+
154+
- **FEAT**: add support for exporting delivery metrics to BigQuery ([#9636](https://github.com/firebase/flutterfire/issues/9636)). ([170b99b9](https://github.com/firebase/flutterfire/commit/170b99b91573f28316172e43188d57ca14600446))
155+
156+
157+
## 2022-10-03
158+
159+
### Changes
160+
161+
---
162+
163+
Packages with breaking changes:
164+
165+
- There are no breaking changes in this release.
166+
167+
Packages with other changes:
168+
169+
- [`firebase_app_check` - `v0.0.9`](#firebase_app_check---v009)
170+
- [`firebase_auth` - `v3.11.1`](#firebase_auth---v3120)
171+
- [`flutterfire_ui` - `v0.4.3+12`](#flutterfire_ui---v04312)
172+
173+
Packages with dependency updates only:
174+
175+
> Packages listed below depend on other packages in this workspace that have had changes. Their versions have been incremented to bump the minimum dependency versions of the packages they depend upon in this project.
176+
177+
- `flutterfire_ui` - `v0.4.3+12`
178+
179+
---
180+
181+
#### `firebase_app_check` - `v0.0.9`
182+
183+
- **FEAT**: provide `androidDebugProvider` boolean for android debug provider & update app check example app ([#9412](https://github.com/firebase/flutterfire/issues/9412)). ([f1f26748](https://github.com/firebase/flutterfire/commit/f1f26748615c7c9d406e1d3d605e2987e1134ee7))
184+
185+
#### `firebase_auth` - `v3.11.1`
186+
187+
- **FIX**: fix an iOS crash when using Sign In With Apple due to invalid return of nil instead of NSNull ([#9644](https://github.com/firebase/flutterfire/issues/9644)). ([3f76b53f](https://github.com/firebase/flutterfire/commit/3f76b53f375f4398652abfa7c9236571ee0bd87f))
188+
189+
6190
## 2022-09-29
7191

8192
### Changes

docs/cloud-messaging/receive.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,3 +339,71 @@ Here's how to use the second method:
339339
},
340340
}
341341
```
342+
343+
344+
## Enable message delivery data export
345+
346+
You can export your message data into BigQuery for further analysis. BigQuery allows you to analyze the data using BigQuery SQL,
347+
export it to another cloud provider, or use the data for your custom ML models. An export to BigQuery
348+
includes all available data for messages, regardless of message type or whether the message is sent via
349+
the API or the Notifications composer.
350+
351+
To enable the export, first follow the steps [described here](https://firebase.google.com/docs/cloud-messaging/understand-delivery?platform=ios#bigquery-data-export),
352+
then follow these instructions:
353+
354+
### Android
355+
356+
You can use the following code:
357+
```dart
358+
await FirebaseMessaging.instance.setDeliveryMetricsExportToBigQuery(true);
359+
```
360+
361+
### iOS
362+
363+
For iOS, you need to change the `AppDelegate.m` with the following content.
364+
365+
```objective-c
366+
#import "AppDelegate.h"
367+
#import "GeneratedPluginRegistrant.h"
368+
#import <Firebase/Firebase.h>
369+
370+
@implementation AppDelegate
371+
372+
- (BOOL)application:(UIApplication *)application
373+
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
374+
[GeneratedPluginRegistrant registerWithRegistry:self];
375+
// Override point for customization after application launch.
376+
return [super application:application didFinishLaunchingWithOptions:launchOptions];
377+
}
378+
379+
- (void)application:(UIApplication *)application
380+
didReceiveRemoteNotification:(NSDictionary *)userInfo
381+
fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler {
382+
[[FIRMessaging extensionHelper] exportDeliveryMetricsToBigQueryWithMessageInfo:userInfo];
383+
}
384+
385+
@end
386+
```
387+
388+
### Web
389+
390+
For Web, you need to change your service worker in order to use the v9 version of the SDK.
391+
The v9 version needs to be bundled, so you need to use a bundler like `esbuild` for instance
392+
to get the service worker to work.
393+
See [the example app](https://github.com/firebase/flutterfire/blob/master/packages/firebase_messaging/firebase_messaging/example/bundled-service-worker) to see how to achieve this.
394+
395+
Once you've migrated to the v9 SDK, you can use the following code:
396+
397+
``` typescript
398+
import {
399+
experimentalSetDeliveryMetricsExportedToBigQueryEnabled,
400+
getMessaging,
401+
} from 'firebase/messaging/sw';
402+
403+
...
404+
405+
const messaging = getMessaging(app);
406+
experimentalSetDeliveryMetricsExportedToBigQueryEnabled(messaging, true);
407+
```
408+
409+
Don't forget to run `yarn build` in order to export the new version of your service worker to the `web` folder.

docs/crashlytics/_customize-crash-reports.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ event is reported or when the app restarts.
9797
Note: {{crashlytics}} only stores the most recent eight recorded non-fatal
9898
exceptions. If your app throws more than eight, older exceptions are lost. This
9999
count is reset each time a fatal exception is thrown, since this causes a report
100-
to be sent to {{crashlytics}}.
100+
to be sent to {{crashlytics}}.
101101

102102
Use the `recordError` method to record non-fatal exceptions in your app's catch
103103
blocks. For example:
@@ -110,6 +110,18 @@ await FirebaseCrashlytics.instance.recordError(
110110
);
111111
```
112112

113+
You may also wish to log further information about the error which is possible
114+
using the `information` property:
115+
116+
```dart
117+
await FirebaseCrashlytics.instance.recordError(
118+
error,
119+
stackTrace,
120+
reason: 'a non-fatal error',
121+
information: ['further diagnostic information about the error', 'version 2.0'],
122+
);
123+
```
124+
113125
Warning: If you want to include a unique value (for example, a user ID or a
114126
timestamp) in your exception message, use a [custom key](#add-keys) instead of
115127
adding the value directly in the exception message. Adding values directly can

packages/_flutterfire_internals/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 1.0.2
2+
3+
- **FIX**: Exceptions inside Query.snapshots() and more now have a stack trace that correctly points to the invocation of the throwing method ([#9639](https://github.com/firebase/flutterfire/issues/9639)). ([2f7adcb7](https://github.com/firebase/flutterfire/commit/2f7adcb777cd6bc4e3b5b3dd03c975c725bacef7))
4+
15
## 1.0.1
26

37
- Update a dependency to the latest release.

packages/_flutterfire_internals/lib/src/exception.dart

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,15 @@ import 'package:flutter/services.dart';
1111
/// If the [Exception] is a [PlatformException], a [FirebaseException] is returned.
1212
Never convertPlatformExceptionToFirebaseException(
1313
Object exception,
14-
StackTrace stackTrace, {
14+
StackTrace rawStackTrace, {
1515
required String plugin,
1616
}) {
17-
if (exception is! Exception || exception is! PlatformException) {
17+
var stackTrace = rawStackTrace;
18+
if (stackTrace == StackTrace.empty) {
19+
stackTrace = StackTrace.current;
20+
}
21+
22+
if (exception is! PlatformException) {
1823
Error.throwWithStackTrace(exception, stackTrace);
1924
}
2025

@@ -51,3 +56,21 @@ FirebaseException platformExceptionToFirebaseException(
5156
message: message,
5257
);
5358
}
59+
60+
/// A custom [EventChannel] with default error handling logic.
61+
extension EventChannelExtension on EventChannel {
62+
/// Similar to [receiveBroadcastStream], but with enforced error handling.
63+
Stream<dynamic> receiveGuardedBroadcastStream({
64+
dynamic arguments,
65+
required dynamic Function(Object error, StackTrace stackTrace) onError,
66+
}) {
67+
final incomingStackTrace = StackTrace.current;
68+
69+
return receiveBroadcastStream(arguments).handleError((Object error) {
70+
// TODO(rrousselGit): use package:stack_trace to merge the error's StackTrace with "incomingStackTrace"
71+
// This TODO assumes that EventChannel is updated to actually pass a StackTrace
72+
// (as it currently only sends StackTrace.empty)
73+
return onError(error, incomingStackTrace);
74+
});
75+
}
76+
}

packages/_flutterfire_internals/pubspec.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ name: _flutterfire_internals
22
description: A package hosting Dart code shared between FlutterFire plugins.
33
homepage: https://firebase.google.com/docs/firestore
44
repository: https://github.com/firebase/flutterfire/tree/master/packages/_flutterfire_internals
5-
version: 1.0.1
5+
version: 1.0.2
66

77
environment:
88
sdk: '>=2.16.0 <3.0.0'
99
flutter: '>=1.12.13+hotfix.5'
1010

1111
dependencies:
12-
cloud_firestore_platform_interface: ^5.7.6
13-
cloud_firestore_web: ^2.8.9
12+
cloud_firestore_platform_interface: ^5.7.7
13+
cloud_firestore_web: ^2.8.10
1414
collection: ^1.0.0
1515
firebase_core: ^1.10.2
1616
firebase_core_platform_interface: ^4.5.1

packages/cloud_firestore/cloud_firestore/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 3.5.1
2+
3+
- **FIX**: fix a query error in Flutter Web that was affecting the parsing of ancient dates ([#9633](https://github.com/firebase/flutterfire/issues/9633)). ([9250d45f](https://github.com/firebase/flutterfire/commit/9250d45f1d7ece9335b2c4c4795fecc728df3de5))
4+
15
## 3.5.0
26

37
- **FEAT**: add OAuth Access Token support to sign in with providers ([#9593](https://github.com/firebase/flutterfire/issues/9593)). ([cb6661bb](https://github.com/firebase/flutterfire/commit/cb6661bbc701031d6f920ace3a6efc8e8d56aa4c))

0 commit comments

Comments
 (0)