Skip to content

Commit b90abcf

Browse files
committed
Merge branch 'master' into yifany/size
2 parents 6266328 + cbc191d commit b90abcf

File tree

165 files changed

+15833
-2946
lines changed

Some content is hidden

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

165 files changed

+15833
-2946
lines changed

.github/workflows/cross-browser-test.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
name: Cross-Browser Test Flow
22

33
on:
4-
pull_request:
4+
push:
55
branches:
66
- master
7-
types:
8-
- closed
97

108
jobs:
119
cross-browser-test:
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Health Metrics Test
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
health-metrics-test:
7+
name: Health Metrics Test
8+
runs-on: ubuntu-latest
9+
env:
10+
METRICS_SERVICE_URL: ${{ secrets.METRICS_SERVICE_URL }}
11+
GITHUB_PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }}
12+
GITHUB_PULL_REQUEST_BASE_SHA: ${{ github.event.pull_request.base.sha }}
13+
steps:
14+
- uses: actions/checkout@v2
15+
- uses: actions/setup-node@v1
16+
with:
17+
node-version: 10.x
18+
- uses: GoogleCloudPlatform/github-actions/setup-gcloud@master
19+
with:
20+
service_account_key: ${{ secrets.GCP_SA_KEY }}
21+
- run: cp config/ci.config.json config/project.json
22+
- run: yarn install
23+
- run: yarn build
24+
25+
- name: Run health-metrics/binary-size test
26+
run: yarn size-report
27+
28+
# TODO(yifany): Enable startup times testing on CI.

.github/workflows/test-all.yml

Lines changed: 37 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
1-
name: Run All Tests
1+
name: Test All Packages
22

3-
on:
4-
pull_request:
5-
branches:
6-
- master
7-
types:
8-
- closed
9-
schedule:
10-
- cron: '0 6,18 * * *'
3+
on: push
114

125
jobs:
136
test:
@@ -43,7 +36,7 @@ jobs:
4336
deploy:
4437
name: Canary Deploy
4538
runs-on: ubuntu-latest
46-
if: github.event.pull_request.merged
39+
if: github.ref == 'refs/heads/master'
4740
needs: test
4841

4942
steps:
@@ -55,14 +48,41 @@ jobs:
5548
uses: actions/setup-node@v1
5649
with:
5750
node-version: 10.x
58-
registry-url: 'https://registry.npmjs.org'
5951
- name: Yarn install
6052
run: yarn
61-
- name: yarn build
62-
run: yarn build
6353
- name: Deploy canary
64-
run: |
65-
npm config set //registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN
66-
yarn release --canary
54+
run: yarn release --canary
6755
env:
68-
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
56+
NPM_TOKEN_ANALYTICS: ${{secrets.NPM_TOKEN_ANALYTICS}}
57+
NPM_TOKEN_ANALYTICS_INTEROP_TYPES: ${{secrets.NPM_TOKEN_ANALYTICS_INTEROP_TYPES}}
58+
NPM_TOKEN_ANALYTICS_TYPES: ${{secrets.NPM_TOKEN_ANALYTICS_TYPES}}
59+
NPM_TOKEN_APP: ${{secrets.NPM_TOKEN_APP}}
60+
NPM_TOKEN_APP_TYPES: ${{secrets.NPM_TOKEN_APP_TYPES}}
61+
NPM_TOKEN_AUTH: ${{secrets.NPM_TOKEN_AUTH}}
62+
NPM_TOKEN_AUTH_INTEROP_TYPES: ${{secrets.NPM_TOKEN_AUTH_INTEROP_TYPES}}
63+
NPM_TOKEN_AUTH_TYPES: ${{secrets.NPM_TOKEN_AUTH_TYPES}}
64+
NPM_TOKEN_COMPONENT: ${{secrets.NPM_TOKEN_COMPONENT}}
65+
NPM_TOKEN_DATABASE: ${{secrets.NPM_TOKEN_DATABASE}}
66+
NPM_TOKEN_DATABASE_TYPES: ${{secrets.NPM_TOKEN_DATABASE_TYPES}}
67+
NPM_TOKEN_FIRESTORE: ${{secrets.NPM_TOKEN_FIRESTORE}}
68+
NPM_TOKEN_FIRESTORE_TYPES: ${{secrets.NPM_TOKEN_FIRESTORE_TYPES}}
69+
NPM_TOKEN_FUNCTIONS: ${{secrets.NPM_TOKEN_FUNCTIONS}}
70+
NPM_TOKEN_FUNCTIONS_TYPES: ${{secrets.NPM_TOKEN_FUNCTIONS_TYPES}}
71+
NPM_TOKEN_INSTALLATIONS: ${{secrets.NPM_TOKEN_INSTALLATIONS}}
72+
NPM_TOKEN_INSTALLATIONS_TYPES: ${{secrets.NPM_TOKEN_INSTALLATIONS_TYPES}}
73+
NPM_TOKEN_LOGGER: ${{secrets.NPM_TOKEN_LOGGER}}
74+
NPM_TOKEN_MESSAGING: ${{secrets.NPM_TOKEN_MESSAGING}}
75+
NPM_TOKEN_MESSAGING_TYPES: ${{secrets.NPM_TOKEN_MESSAGING_TYPES}}
76+
NPM_TOKEN_PERFORMANCE: ${{secrets.NPM_TOKEN_PERFORMANCE}}
77+
NPM_TOKEN_PERFORMANCE_TYPES: ${{secrets.NPM_TOKEN_PERFORMANCE_TYPES}}
78+
NPM_TOKEN_POLYFILL: ${{secrets.NPM_TOKEN_POLYFILL}}
79+
NPM_TOKEN_REMOTE_CONFIG: ${{secrets.NPM_TOKEN_REMOTE_CONFIG}}
80+
NPM_TOKEN_REMOTE_CONFIG_TYPES: ${{secrets.NPM_TOKEN_REMOTE_CONFIG_TYPES}}
81+
NPM_TOKEN_STORAGE: ${{secrets.NPM_TOKEN_STORAGE}}
82+
NPM_TOKEN_STORAGE_TYPES: ${{secrets.NPM_TOKEN_STORAGE_TYPES}}
83+
NPM_TOKEN_TESTING: ${{secrets.NPM_TOKEN_TESTING}}
84+
NPM_TOKEN_UTIL: ${{secrets.NPM_TOKEN_UTIL}}
85+
NPM_TOKEN_WEBCHANNEL_WRAPPER: ${{secrets.NPM_TOKEN_WEBCHANNEL_WRAPPER}}
86+
NPM_TOKEN_FIREBASE: ${{secrets.NPM_TOKEN_FIREBASE}}
87+
NPM_TOKEN_RXFIRE: ${{secrets.NPM_TOKEN_RXFIRE}}
88+
CI: true

.github/workflows/test-changed.yml

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
name: Push/PR
1+
name: Test Modified Packages
22

3-
on: [push, pull_request]
3+
on: pull_request
44

55
jobs:
66
test:
@@ -28,27 +28,3 @@ jobs:
2828
run: yarn build
2929
- name: Run tests on changed packages
3030
run: xvfb-run yarn test:changed
31-
32-
health-metrics-test:
33-
name: Health Metrics Test
34-
runs-on: ubuntu-latest
35-
env:
36-
METRICS_SERVICE_URL: ${{ secrets.METRICS_SERVICE_URL }}
37-
GITHUB_PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }}
38-
GITHUB_PULL_REQUEST_BASE_SHA: ${{ github.event.pull_request.base.sha }}
39-
steps:
40-
- uses: actions/checkout@v2
41-
- uses: actions/setup-node@v1
42-
with:
43-
node-version: 10.x
44-
- uses: GoogleCloudPlatform/github-actions/setup-gcloud@master
45-
with:
46-
service_account_key: ${{ secrets.GCP_SA_KEY }}
47-
- run: cp config/ci.config.json config/project.json
48-
- run: yarn install
49-
- run: yarn build
50-
51-
- name: Run health-metrics/binary-size test
52-
run: yarn size-report
53-
54-
# TODO(yifany): Enable startup times testing on CI.

config/functions/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "Cloud Functions for Firebase",
44
"dependencies": {
55
"cors": "2.8.5",
6-
"firebase-admin": "8.9.0",
6+
"firebase-admin": "8.10.0",
77
"firebase-functions": "3.3.0"
88
},
99
"private": true,

integration/browserify/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,21 @@
77
"test": "karma start --single-run"
88
},
99
"dependencies": {
10-
"firebase": "7.9.3"
10+
"firebase": "7.12.0"
1111
},
1212
"devDependencies": {
13-
"@babel/core": "7.7.7",
14-
"@babel/preset-env": "7.7.7",
13+
"@babel/core": "7.8.7",
14+
"@babel/preset-env": "7.8.7",
1515
"browserify": "16.5.0",
1616
"chai": "4.2.0",
1717
"karma": "4.4.1",
1818
"karma-babel-preprocessor": "8.0.1",
1919
"karma-chrome-launcher": "3.1.0",
20-
"karma-firefox-launcher": "1.2.0",
20+
"karma-firefox-launcher": "1.3.0",
2121
"karma-mocha": "1.3.0",
2222
"karma-sauce-launcher": "1.2.0",
2323
"karma-spec-reporter": "0.0.32",
24-
"mkdirp": "0.5.1",
25-
"mocha": "7.0.1"
24+
"mkdirp": "0.5.3",
25+
"mocha": "7.1.0"
2626
}
2727
}

integration/firebase-typings/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
"test": "tsc"
77
},
88
"dependencies": {
9-
"firebase": "7.9.3"
9+
"firebase": "7.12.0"
1010
},
1111
"devDependencies": {
12-
"typescript": "3.8.2"
12+
"typescript": "3.8.3"
1313
}
1414
}

integration/firestore/gulpfile.js

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ function clean() {
2727
return del(['temp/**/*', 'dist/**/*']);
2828
}
2929

30+
function isPersistenceEnabled() {
31+
return process.env.INCLUDE_FIRESTORE_PERSISTENCE !== 'false';
32+
}
33+
3034
function copyTests() {
3135
/**
3236
* NOTE: We intentionally don't copy src/ files (to make sure we are only
@@ -37,7 +41,9 @@ function copyTests() {
3741
const firebaseAppSdk = 'firebase/app/dist/index.esm.js';
3842
const firebaseFirestoreSdk = resolve(
3943
__dirname,
40-
'../../packages/firestore/dist/index.esm.js'
44+
isPersistenceEnabled()
45+
? '../../packages/firestore/dist/index.esm.js'
46+
: '../../packages/firestore/dist/index.memory.esm.js'
4147
);
4248
return gulp
4349
.src(
@@ -63,7 +69,14 @@ function copyTests() {
6369
*/
6470
/import\s+firebase\s+from\s+('|")[^\1]+firebase_export\1;?/,
6571
`import firebase from '${firebaseAppSdk}';
66-
import '${firebaseFirestoreSdk}';`
72+
import '${firebaseFirestoreSdk}';
73+
74+
if (typeof process === 'undefined') {
75+
process = { env: { INCLUDE_FIRESTORE_PERSISTENCE: '${isPersistenceEnabled()}' } } as any;
76+
} else {
77+
process.env.INCLUDE_FIRESTORE_PERSISTENCE = '${isPersistenceEnabled()}';
78+
}
79+
`
6780
)
6881
)
6982
.pipe(

integration/firestore/package.json

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,29 @@
33
"version": "1.0.1",
44
"private": true,
55
"scripts": {
6-
"build": "(cd ../../ ; yarn build) ; gulp compile-tests",
7-
"pretest:manual": "yarn build",
8-
"pretest:debug": "yarn build",
9-
"test": "echo 'Automated tests temporarily disabled, run `yarn test:manual` to execute these tests'",
10-
"test:manual": "karma start --single-run",
11-
"test:debug": "karma start --auto-watch --browsers Chrome"
6+
"build:deps": "cd ../../packages/firestore ; yarn build",
7+
"build:persistence": "INCLUDE_FIRESTORE_PERSISTENCE=true gulp compile-tests",
8+
"build:memory": "INCLUDE_FIRESTORE_PERSISTENCE=false gulp compile-tests",
9+
"test": "yarn build:memory; karma start --single-run; yarn build:persistence; karma start --single-run;",
10+
"test:persistence": " yarn build:persistence; karma start --single-run",
11+
"test:memory": "yarn build:memory; karma start --single-run",
12+
"test:debug:persistence": "yarn build:deps; yarn build:persistence; karma start --auto-watch --browsers Chrome",
13+
"test:debug:memory": "yarn build:deps; yarn build:memory; karma start --single-run"
1214
},
1315
"devDependencies": {
14-
"@types/mocha": "7.0.1",
16+
"@types/mocha": "7.0.2",
1517
"gulp": "4.0.2",
1618
"gulp-filter": "5.1.0",
1719
"gulp-replace": "1.0.0",
1820
"karma": "4.4.1",
1921
"karma-chrome-launcher": "3.1.0",
20-
"karma-firefox-launcher": "1.2.0",
22+
"karma-firefox-launcher": "1.3.0",
2123
"karma-mocha": "1.3.0",
2224
"karma-spec-reporter": "0.0.32",
23-
"mocha": "7.0.1",
25+
"mocha": "7.1.0",
2426
"ts-loader": "6.2.1",
25-
"typescript": "3.8.2",
26-
"webpack": "4.41.5",
27+
"typescript": "3.8.3",
28+
"webpack": "4.42.0",
2729
"webpack-stream": "5.2.1"
2830
}
2931
}

integration/messaging/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@
88
"test:manual": "mocha --exit"
99
},
1010
"dependencies": {
11-
"firebase": "7.9.3"
11+
"firebase": "7.12.0"
1212
},
1313
"devDependencies": {
1414
"chai": "4.2.0",
1515
"chromedriver": "80.0.1",
1616
"express": "4.17.1",
1717
"geckodriver": "1.19.1",
18-
"mocha": "7.0.1",
18+
"mocha": "7.1.0",
1919
"node-fetch": "2.6.0",
2020
"selenium-assistant": "6.0.0"
2121
}

integration/typescript/package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,24 @@
66
"test": "karma start --single-run"
77
},
88
"dependencies": {
9-
"firebase": "7.9.3"
9+
"firebase": "7.12.0"
1010
},
1111
"devDependencies": {
12-
"@babel/core": "7.7.7",
13-
"@babel/preset-env": "7.7.7",
14-
"@types/chai": "4.2.7",
15-
"@types/mocha": "7.0.1",
12+
"@babel/core": "7.8.7",
13+
"@babel/preset-env": "7.8.7",
14+
"@types/chai": "4.2.11",
15+
"@types/mocha": "7.0.2",
1616
"chai": "4.2.0",
1717
"karma": "4.4.1",
1818
"karma-babel-preprocessor": "8.0.1",
1919
"karma-chrome-launcher": "3.1.0",
20-
"karma-firefox-launcher": "1.2.0",
20+
"karma-firefox-launcher": "1.3.0",
2121
"karma-mocha": "1.3.0",
2222
"karma-sauce-launcher": "1.2.0",
2323
"karma-spec-reporter": "0.0.32",
24-
"karma-typescript": "4.1.1",
25-
"mocha": "7.0.1",
24+
"karma-typescript": "5.0.0",
25+
"mocha": "7.1.0",
2626
"npm-run-all": "4.1.5",
27-
"typescript": "3.8.2"
27+
"typescript": "3.8.3"
2828
}
2929
}

integration/webpack/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,21 @@
77
"test": "karma start --single-run"
88
},
99
"dependencies": {
10-
"firebase": "7.9.3"
10+
"firebase": "7.12.0"
1111
},
1212
"devDependencies": {
13-
"@babel/core": "7.7.7",
14-
"@babel/preset-env": "7.7.7",
13+
"@babel/core": "7.8.7",
14+
"@babel/preset-env": "7.8.7",
1515
"chai": "4.2.0",
1616
"karma": "4.4.1",
1717
"karma-babel-preprocessor": "8.0.1",
1818
"karma-chrome-launcher": "3.1.0",
19-
"karma-firefox-launcher": "1.2.0",
19+
"karma-firefox-launcher": "1.3.0",
2020
"karma-mocha": "1.3.0",
2121
"karma-sauce-launcher": "1.2.0",
2222
"karma-spec-reporter": "0.0.32",
23-
"mocha": "7.0.1",
24-
"webpack": "4.41.5",
25-
"webpack-cli": "3.3.10"
23+
"mocha": "7.1.0",
24+
"webpack": "4.42.0",
25+
"webpack-cli": "3.3.11"
2626
}
2727
}

0 commit comments

Comments
 (0)