Skip to content

Commit 33e1848

Browse files
Merge master into release
2 parents 56aad27 + d87d3a8 commit 33e1848

Some content is hidden

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

61 files changed

+461
-147
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@firebase/rules-unit-testing': patch
3+
---
4+
5+
Add Node ESM build to rules-unit-testing.

.changeset/rotten-tables-brush.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@firebase/database": patch
3+
---
4+
5+
Fixed issue where `get()` saved results incorrectly for non-default queries.

.changeset/sharp-rules-enjoy.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@firebase/analytics': patch
3+
---
4+
5+
Fix typo in GtagConfigParams

.changeset/tame-rice-peel.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"@firebase/app-check": patch
3+
"@firebase/database": patch
4+
"@firebase/util": patch
5+
---
6+
7+
Extract uuid function into @firebase/util

.github/workflows/e2e-test.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ jobs:
6161
env:
6262
WEBHOOK_URL: ${{ secrets.JSCORE_CHAT_WEBHOOK_URL }}
6363
RELEASE_TRACKER_URL: ${{ secrets.RELEASE_TRACKER_URL }}
64+
VERSION_OR_TAG: ${{ github.event.client_payload.versionOrTag }}
6465
# run in root
6566
working-directory: '.'
6667
- name: Tests failed
@@ -69,5 +70,6 @@ jobs:
6970
env:
7071
WEBHOOK_URL: ${{ secrets.JSCORE_CHAT_WEBHOOK_URL }}
7172
RELEASE_TRACKER_URL: ${{ secrets.RELEASE_TRACKER_URL }}
73+
VERSION_OR_TAG: ${{ github.event.client_payload.versionOrTag }}
7274
# run in root
7375
working-directory: '.'

.vscode/launch.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,15 @@
88
"type": "node",
99
"request": "launch",
1010
"name": "RTDB Unit Tests (Node)",
11-
"program": "${workspaceRoot}/packages/firebase/node_modules/.bin/_mocha",
11+
"program": "${workspaceRoot}/node_modules/.bin/_mocha",
1212
"cwd": "${workspaceRoot}/packages/database",
1313
"args": [
1414
"test/{,!(browser)/**/}*.test.ts",
15-
"--file", "index.node.ts",
16-
"--config", "../../config/mocharc.node.js"
15+
"--file", "src/index.node.ts",
16+
"--config", "../../config/mocharc.node.js",
1717
],
1818
"env": {
19+
"TS_NODE_FILES":true,
1920
"TS_NODE_CACHE": "NO",
2021
"TS_NODE_COMPILER_OPTIONS" : "{\"module\":\"commonjs\"}"
2122
},
@@ -30,7 +31,7 @@
3031
"cwd": "${workspaceRoot}/packages/firestore",
3132
"args": [
3233
"--require", "babel-register.js",
33-
"--require", "index.node.ts",
34+
"--require", "src/index.node.ts",
3435
"--timeout", "5000",
3536
"test/{,!(browser|integration)/**/}*.test.ts",
3637
"--exit"

common/api-review/analytics.api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,10 @@ export function getAnalytics(app?: FirebaseApp): Analytics;
121121

122122
// @public
123123
export interface GtagConfigParams {
124-
'allow_google_signals?': boolean;
125124
// (undocumented)
126125
[key: string]: unknown;
127126
'allow_ad_personalization_signals'?: boolean;
127+
'allow_google_signals'?: boolean;
128128
'cookie_domain'?: string;
129129
'cookie_expires'?: number;
130130
'cookie_flags'?: string;

common/api-review/util.api.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,9 @@ export interface Subscribe<T> {
422422
// @public (undocumented)
423423
export type Unsubscribe = () => void;
424424

425+
// @public
426+
export const uuidv4: () => string;
427+
425428
// Warning: (ae-missing-release-tag) "validateArgCount" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
426429
//
427430
// @public

packages/analytics/src/get-config.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,9 @@ async function attemptFetchDynamicConfigWithRetry(
188188
logger.warn(
189189
`Timed out fetching this Firebase app's measurement ID from the server.` +
190190
` Falling back to the measurement ID ${measurementId}` +
191-
` provided in the "measurementId" field in the local Firebase config. [${e.message}]`
191+
` provided in the "measurementId" field in the local Firebase config. [${
192+
(e as Error)?.message
193+
}]`
192194
);
193195
return { appId, measurementId };
194196
}
@@ -203,13 +205,14 @@ async function attemptFetchDynamicConfigWithRetry(
203205

204206
return response;
205207
} catch (e) {
206-
if (!isRetriableError(e)) {
208+
const error = e as Error;
209+
if (!isRetriableError(error)) {
207210
retryData.deleteThrottleMetadata(appId);
208211
if (measurementId) {
209212
logger.warn(
210213
`Failed to fetch this Firebase app's measurement ID from the server.` +
211214
` Falling back to the measurement ID ${measurementId}` +
212-
` provided in the "measurementId" field in the local Firebase config. [${e.message}]`
215+
` provided in the "measurementId" field in the local Firebase config. [${error?.message}]`
213216
);
214217
return { appId, measurementId };
215218
} else {
@@ -218,7 +221,7 @@ async function attemptFetchDynamicConfigWithRetry(
218221
}
219222

220223
const backoffMillis =
221-
Number(e.customData.httpStatus) === 503
224+
Number(error?.customData?.httpStatus) === 503
222225
? calculateBackoffMillis(
223226
backoffCount,
224227
retryData.intervalMillis,

packages/analytics/src/initialize-analytics.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ async function validateIndexedDB(): Promise<boolean> {
4343
} catch (e) {
4444
logger.warn(
4545
ERROR_FACTORY.create(AnalyticsError.INDEXEDDB_UNAVAILABLE, {
46-
errorInfo: e
46+
errorInfo: (e as Error)?.toString()
4747
}).message
4848
);
4949
return false;

0 commit comments

Comments
 (0)