Skip to content

Commit 6ba08b7

Browse files
Merge branch 'master' into mrschmidt/tokenprovider
2 parents f0ea3f0 + b07f822 commit 6ba08b7

File tree

415 files changed

+36019
-12652
lines changed

Some content is hidden

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

415 files changed

+36019
-12652
lines changed

.changeset/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Changesets
2+
3+
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
4+
with multi-package repos, or single-package repos to help you version and publish your code. You can
5+
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
6+
7+
We have a quick list of common questions to get you started engaging with this project in
8+
[our documentation](https://github.com/changesets/changesets/blob/master/docs/common-questions.md)

.changeset/config.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
3+
"changelog": ["@changesets/changelog-github", { "repo": "firebase/firebase-js-sdk"}],
4+
"commit": false,
5+
"linked": [],
6+
"access": "public",
7+
"baseBranch": "master",
8+
"updateInternalDependencies": "patch",
9+
"ignore": [
10+
"firebase-browserify-test",
11+
"firebase-package-typings-test",
12+
"firebase-firestore-integration-test",
13+
"firebase-messaging-selenium-test",
14+
"firebase-typescript-test",
15+
"firebase-webpack-test",
16+
"@firebase/app-exp",
17+
"@firebase/app-types-exp",
18+
"@firebase/functions-exp",
19+
"@firebase/functions-types-exp",
20+
"firebase-exp"
21+
],
22+
"___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": {
23+
"onlyUpdatePeerDependentsWhenOutOfRange": true,
24+
"useCalculatedVersionForSnapshots": true
25+
}
26+
}

.changeset/friendly-crews-dream.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
---

.changeset/gorgeous-beers-build.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
---

.changeset/late-ladybugs-wash.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
---

.changeset/nice-deers-suffer.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
---

.changeset/popular-cups-melt.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"firebase": patch
3+
"@firebase/storage-types": patch
4+
"@firebase/storage": patch
5+
---
6+
7+
[fix] Updated the TypeScript types for all APIs using Observers to allow callback omission.

.changeset/rotten-owls-drive.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
---

.changeset/smart-cars-doubt.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"firebase": patch
3+
"@firebase/firestore": patch
4+
---
5+
6+
The SDK no longer crashes if an IndexedDB failure occurs when unsubscribing from a Query.

.changeset/thick-rabbits-guess.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
"firebase": patch
3+
"@firebase/firestore": patch
4+
---
5+
6+
[fixed] Removed a delay that may have prevented Firestore from immediately
7+
reestablishing a network connection if a connectivity change occurred while
8+
the app was in the background.

.changeset/wild-otters-fly.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
---

.github/CODEOWNERS

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ packages/messaging-types @zwu52 @firebase/jssdk-global-approvers
5555
integration/messaging @zwu52 @firebase/jssdk-global-approvers
5656

5757
# Auth Code
58-
packages/auth @bojeil-google @wti806 @firebase/jssdk-global-approvers
59-
packages/auth-types @bojeil-google @wti806 @firebase/jssdk-global-approvers
58+
packages/auth @bojeil-google @avolkovi @samhorlbeck @scottcrossen @firebase/jssdk-global-approvers
59+
packages/auth-types @bojeil-google @avolkovi @samhorlbeck @scottcrossen @firebase/jssdk-global-approvers
6060

6161
# Testing Code
6262
packages/testing @avolkovi @samhorlbeck @scottcrossen @yuchenshi @firebase/jssdk-global-approvers
@@ -83,3 +83,6 @@ packages/remote-config-types @erikeldridge @firebase/jssdk-global-approvers
8383
# Documentation Changes
8484
packages/firebase/index.d.ts @egilmorez @firebase/jssdk-global-approvers
8585
scripts/docgen/content-sources/ @egilmorez @firebase/jssdk-global-approvers
86+
87+
# Changeset
88+
.changeset @firebase/jssdk-changeset-approvers @firebase/firestore-js-team @firebase/jssdk-global-approvers

.github/workflows/release.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- release
7+
8+
jobs:
9+
release:
10+
name: Release
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout Repo
14+
uses: actions/checkout@master
15+
with:
16+
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
17+
fetch-depth: 0
18+
19+
- name: Setup Node.js 12.x
20+
uses: actions/setup-node@master
21+
with:
22+
node-version: 12.x
23+
24+
- name: Install Dependencies
25+
run: yarn
26+
27+
- name: Create Release Pull Request
28+
uses: changesets/action@master
29+
env:
30+
GITHUB_TOKEN: ${{ secrets.OSS_BOT_GITHUB_TOKEN }}

.github/workflows/test-all.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ jobs:
2525
run: yarn build
2626
- name: Run unit tests
2727
run: xvfb-run yarn test:ci
28-
env:
29-
FCM_TEST_PROJECT_SERVER_KEY: $${{secrets.FCM_TEST_PROJECT_SERVER_KEY}}
3028
- name: Generate coverage file
3129
run: yarn ci:coverage
3230
- name: Run coverage

.github/workflows/test-changed.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,4 @@ jobs:
2727
- name: yarn build
2828
run: yarn build
2929
- name: Run tests on changed packages
30-
run: xvfb-run yarn test:changed
31-
env:
32-
FCM_TEST_PROJECT_SERVER_KEY: $${{secrets.FCM_TEST_PROJECT_SERVER_KEY}}
30+
run: xvfb-run yarn test:changed

.prettierrc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
{
22
singleQuote: true,
33
printWidth: 80,
4-
quoteProps: preserve
5-
}
4+
quoteProps: preserve,
5+
trailingComma: none,
6+
arrowParens: avoid
7+
}

CONTRIBUTING.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,40 @@ Before you start working on a larger contribution, you should get in touch with
9797
```
9898

9999
* In GitHub, send a pull request to `firebase-js-sdk:master`.
100+
* Add changeset. See [Adding changeset to PR](#adding-changeset-to-pr)
100101
* All pull requests must be reviewed by a member of the Firebase JS SDK team, who will merge it when/if they feel it is good to go.
101102

102103
That's it! Thank you for your contribution!
103104
105+
#### Adding changeset to PR
106+
Every PR that would trigger a release should include a changeset file. To make
107+
this process easy, a message will be sent to every PR with a link that you can
108+
click to add changeset files in the Github UI directly.
109+
[Example message](https://github.com/firebase/firebase-js-sdk/pull/3284#issuecomment-649718617).
110+
111+
#### What to include in the changset file
112+
113+
You should include the version bump for your package as well as the description
114+
for the change. Valid version bump types are `patch`, `minor` and `major`.
115+
Please always include the `firebase` package with the same version bump type as
116+
your package. This is to ensure that the version of the `firebase` package will
117+
be bumped correctly. For example,
118+
119+
```
120+
---
121+
"@firebase/storage": minor
122+
"firebase": minor
123+
---
124+
125+
This is a test.
126+
```
127+
128+
#### Multiple changeset files
129+
130+
If your PR touches multiple SDKs or addresses multiple issues that require
131+
different version bump or different description, you can create multiple
132+
changeset files in the PR.
133+
104134
## <a name="docs"></a> Updating Documentation
105135
106136
Reference docs for the Firebase [JS SDK](https://firebase.google.com/docs/reference/js/) and [Node (client) SDK](https://firebase.google.com/docs/reference/node/) are generated by [Typedoc](https://typedoc.org/).
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
## API Report File for "@firebase/functions-exp"
2+
3+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4+
5+
```ts
6+
7+
import { FirebaseApp } from '@firebase/app-types-exp';
8+
import { Functions } from '@firebase/functions-types-exp';
9+
import { HttpsCallable } from '@firebase/functions-types-exp';
10+
import { HttpsCallableOptions } from '@firebase/functions-types-exp';
11+
12+
// @public
13+
export function getFunctions(app: FirebaseApp, region?: string): Functions;
14+
15+
// @public
16+
export function httpsCallable(functionsInstance: Functions, name: string, options?: HttpsCallableOptions): HttpsCallable;
17+
18+
// @public
19+
export function useFunctionsEmulator(functionsInstance: Functions, origin: string): void;
20+
21+
22+
// (No @packageDocumentation comment for this package)
23+
24+
```

config/functions/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
"description": "Cloud Functions for Firebase",
44
"dependencies": {
55
"cors": "2.8.5",
6-
"firebase-admin": "8.11.0",
7-
"firebase-functions": "3.6.1"
6+
"firebase-admin": "8.13.0",
7+
"firebase-functions": "3.7.0"
88
},
99
"private": true,
1010
"engines": {
11-
"node": "8"
11+
"node": "10"
1212
}
1313
}

config/karma.base.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ const config = {
6767
// test results reporter to use
6868
// possible values: 'dots', 'progress'
6969
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
70-
reporters: ['spec', 'coverage-istanbul' /*, 'saucelabs' */],
70+
reporters: ['mocha', 'coverage-istanbul' /*, 'saucelabs' */],
7171

7272
// web server port
7373
port: 8089,
@@ -124,13 +124,13 @@ const config = {
124124
if (false /* process.env.TRAVIS */) {
125125
config.browsers = [...config.browsers, ...Object.keys(sauceLabsBrowsers)];
126126
}
127-
127+
config.mochaReporter = {
128+
showDiff: true
129+
};
128130
// Make it easy to spot failed tests in CI
129131
if (process.env.CI) {
130-
config.specReporter = {
131-
suppressErrorSummary: true,
132-
suppressPassed: true, // do not print information about passed tests
133-
suppressSkipped: true
132+
config.mochaReporter = {
133+
output: 'minimal'
134134
};
135135
}
136136

config/karma.saucelabs.js

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,22 @@ const browserMap = {
4646
* Any special options per package.
4747
*/
4848
const packageConfigs = {
49-
messaging: {
49+
'@firebase/messaging': {
5050
// Messaging currently only supports these browsers.
5151
browsers: ['Chrome_Windows', 'Firefox_Windows', 'Edge_Windows']
5252
},
53-
firestore: {
53+
// Firestore unit tests have OOM problems compiling with Babel for IE.
54+
// Firestore integration/firestore tests do run on all browsers.
55+
'@firebase/firestore': {
56+
browsers: [
57+
'Chrome_Windows',
58+
'Firefox_Windows',
59+
'Edge_Windows',
60+
'Safari_macOS'
61+
]
62+
},
63+
// Installations has IE errors related to `idb` library that need to be figured out.
64+
'@firebase/installations': {
5465
browsers: [
5566
'Chrome_Windows',
5667
'Firefox_Windows',
@@ -84,12 +95,12 @@ function getSauceLabsBrowsers(packageName) {
8495
*/
8596
function getPackageLabels() {
8697
const match = testConfigFile.match(
87-
/([a-zA-Z]+)\/([a-zA-Z-]+)\/karma\.conf\.js/
98+
/([a-zA-Z]+\/[a-zA-Z-]+)\/karma\.conf\.js/
8899
);
89-
return {
90-
type: match[1],
91-
name: match[2]
92-
};
100+
const packagePath = match[1];
101+
const root = path.resolve(__dirname, '..');
102+
const pkg = require(path.join(root, packagePath, 'package.json'));
103+
return pkg.name;
93104
}
94105

95106
/**
@@ -106,11 +117,8 @@ function getTestFiles() {
106117
}
107118

108119
function seleniumLauncher(browserName, platform, version) {
109-
const { name, type } = getPackageLabels();
110-
const testName =
111-
type === 'integration'
112-
? `${type}-${name}-${browserName}`
113-
: `${name}-${browserName}`;
120+
const { name } = getPackageLabels();
121+
const testName = `${name}-${browserName}`;
114122
return {
115123
base: 'SauceLabs',
116124
browserName: browserName,
@@ -145,13 +153,13 @@ function appiumLauncher(
145153
};
146154
}
147155

148-
module.exports = function(config) {
156+
module.exports = function (config) {
149157
const { packageName, files: testFiles } = getTestFiles();
150158
const sauceLabsBrowsers = getSauceLabsBrowsers(packageName);
151159

152160
const sauceLabsConfig = {
153-
tunnelIdentifier: process.env.TRAVIS_JOB_NUMBER + '-' + packageName,
154-
build: process.env.TRAVIS_BUILD_NUMBER || argv['buildNumber'],
161+
tunnelIdentifier: process.env.GITHUB_RUN_ID + '-' + packageName,
162+
build: process.env.GITHUB_RUN_ID || argv['buildNumber'],
155163
username: process.env.SAUCE_USERNAME,
156164
accessKey: process.env.SAUCE_ACCESS_KEY,
157165
startConnect: true,
@@ -210,7 +218,7 @@ module.exports = function(config) {
210218
maxLogLines: 5,
211219
suppressErrorSummary: false,
212220
suppressFailed: false,
213-
suppressPassed: false,
221+
suppressPassed: true,
214222
suppressSkipped: true,
215223
showSpecTiming: true,
216224
failFast: false

config/webpack.test.js

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* @license
3-
* Copyright 2017 Google Inc.
3+
* Copyright 2017 Google LLC
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
66
* you may not use this file except in compliance with the License.
@@ -18,6 +18,12 @@
1818
const path = require('path');
1919
const webpack = require('webpack');
2020

21+
/**
22+
* A regular expression used to replace Firestore's platform specific modules,
23+
* which are located under 'packages/firestore/src/platform/'.
24+
*/
25+
const FIRESTORE_PLATFORM_RE = /^(.*)\/platform\/([^.\/]*)(\.ts)?$/;
26+
2127
module.exports = {
2228
mode: 'development',
2329
devtool: 'source-map',
@@ -77,6 +83,15 @@ module.exports = {
7783
extensions: ['.js', '.ts']
7884
},
7985
plugins: [
86+
new webpack.NormalModuleReplacementPlugin(
87+
FIRESTORE_PLATFORM_RE,
88+
resource => {
89+
resource.request = resource.request.replace(
90+
FIRESTORE_PLATFORM_RE,
91+
'$1/platform/browser/$2.ts'
92+
);
93+
}
94+
),
8095
new webpack.EnvironmentPlugin([
8196
'RTDB_EMULATOR_PORT',
8297
'RTDB_EMULATOR_NAMESPACE'

0 commit comments

Comments
 (0)