Skip to content

Commit 16c995f

Browse files
Merge
2 parents d3604f3 + 565004d commit 16c995f

Some content is hidden

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

59 files changed

+2638
-1211
lines changed

.changeset/config.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
"@firebase/app-types-exp",
1515
"@firebase/functions-exp",
1616
"@firebase/functions-types-exp",
17+
"@firebase/installations-exp",
18+
"@firebase/installations-types-exp",
1719
"@firebase/testing",
1820
"firebase-exp",
1921
"@firebase/app-compat",

.changeset/great-dolphins-tie.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+
The SDK can now infer a default database URL if none is provided in the config.

.changeset/polite-readers-wait.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@firebase/database': patch
3+
'@firebase/rules-unit-testing': patch
4+
---
5+
6+
Fix detection of admin context in Realtime Database SDK

.changeset/swift-pillows-retire.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@firebase/remote-config': patch
3+
---
4+
5+
Moved `calculateBackoffMillis()` exponential backoff function to util and have remote-config
6+
import it from util.

.changeset/thin-buses-fail.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@firebase/firestore': minor
3+
'@firebase/firestore-types': minor
4+
---
5+
6+
Use FirestoreError instead of Error in onSnapshot*() error callbacks.

.changeset/thin-rivers-relax.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@firebase/util': patch
3+
---
4+
5+
Moved `calculateBackoffMillis()` exponential backoff function from remote-config to util,
6+
where it can be shared between packages.

.changeset/witty-deers-study.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
'@firebase/analytics': minor
3+
'@firebase/analytics-types': minor
4+
'firebase': minor
5+
---
6+
7+
Analytics now dynamically fetches the app's Measurement ID from the Dynamic Config backend
8+
instead of depending on the local Firebase config. It will fall back to any `measurementId`
9+
value found in the local config if the Dynamic Config fetch fails.

config/ci.config.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@
44
"databaseURL": "https://jscore-sandbox-141b5.firebaseio.com",
55
"projectId": "jscore-sandbox-141b5",
66
"storageBucket": "jscore-sandbox-141b5.appspot.com",
7-
"messagingSenderId": "280127633210"
7+
"messagingSenderId": "280127633210",
8+
"appId": "1:280127633210:web:1eb2f7e8799c4d5a46c203"
89
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"dev": "lerna run --parallel --scope @firebase/* --scope firebase --scope rxfire dev",
2525
"build": "lerna run --scope @firebase/app-exp build:deps && lerna run --scope @firebase/* --scope firebase --scope rxfire --ignore @firebase/app-exp build",
2626
"build:exp": "lerna run --scope @firebase/*-exp --scope @firebase/*-compat --scope firebase-exp build",
27-
"build:release": "lerna run --scope @firebase/app-exp build:deps && lerna run --scope @firebase/* --scope firebase --scope rxfire --ignore @firebase/*-exp prepare",
27+
"build:release": "lerna run --scope @firebase/app-exp build:deps && lerna run --scope @firebase/* --scope firebase --scope rxfire --ignore @firebase/*-exp --ignore @firebase/*-compat prepare",
2828
"build:exp:release": "yarn --cwd packages/app build:deps && lerna run --scope @firebase/*-exp --scope @firebase/*-compat --scope firebase-exp prepare && yarn --cwd packages-exp/app-exp typings:public",
2929
"build:changed": "ts-node-script scripts/ci-test/build_changed.ts",
3030
"link:packages": "lerna exec --scope @firebase/* --scope firebase --scope rxfire -- yarn link",

packages/analytics-types/index.d.ts

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,37 @@ export interface Promotion {
235235
name?: string;
236236
}
237237

238+
/**
239+
* Dynamic configuration fetched from server.
240+
* See https://firebase.google.com/docs/projects/api/reference/rest/v1beta1/projects.webApps/getConfig
241+
*/
242+
interface DynamicConfig {
243+
projectId: string;
244+
appId: string;
245+
databaseURL: string;
246+
storageBucket: string;
247+
locationId: string;
248+
apiKey: string;
249+
authDomain: string;
250+
messagingSenderId: string;
251+
measurementId: string;
252+
}
253+
254+
interface MinimalDynamicConfig {
255+
appId: string;
256+
measurementId: string;
257+
}
258+
259+
/**
260+
* Encapsulates metadata concerning throttled fetch requests.
261+
*/
262+
export interface ThrottleMetadata {
263+
// The number of times fetch has backed off. Used for resuming backoff after a timeout.
264+
backoffCount: number;
265+
// The Unix timestamp in milliseconds when callers can retry a request.
266+
throttleEndTimeMillis: number;
267+
}
268+
238269
declare module '@firebase/component' {
239270
interface NameServiceMapping {
240271
'analytics': FirebaseAnalytics;

packages/analytics/.eslintrc.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,33 @@
1+
/**
2+
* @license
3+
* Copyright 2020 Google LLC
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
const path = require('path');
18+
119
module.exports = {
220
'extends': '../../config/.eslintrc.js',
321
'parserOptions': {
422
'project': 'tsconfig.json',
523
'tsconfigRootDir': __dirname
24+
},
25+
rules: {
26+
'import/no-extraneous-dependencies': [
27+
'error',
28+
{
29+
'packageDir': [path.resolve(__dirname, '../../'), __dirname]
30+
}
31+
]
632
}
733
};

0 commit comments

Comments
 (0)