Skip to content

Commit 5d388e7

Browse files
committed
Merge remote-tracking branch 'origin/master' into fz/emulator-release
2 parents 4256098 + 79df09b commit 5d388e7

File tree

361 files changed

+16626
-7642
lines changed

Some content is hidden

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

361 files changed

+16626
-7642
lines changed

.gitattributes

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1+
# Source files
2+
# ============
3+
*.md text eol=lf
4+
15
*.json linguist-language=JSON-with-Comments

.github/CODEOWNERS

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
# - @lahirumaramba
1717
# - @hsubox76
1818
# - @allspain
19+
# - @dwyfrequency
1920

2021

2122
# ===========================================================
@@ -32,12 +33,12 @@
3233

3334

3435
# These owners will be the default owners for everything in the repo.
35-
* @allspain @hsubox76 @firebase/jssdk-global-approvers
36+
* @dwyfrequency @hsubox76 @firebase/jssdk-global-approvers
3637

3738
# Database Code
38-
packages/database @schmidt-sebastian @jsdt @firebase/jssdk-global-approvers
39-
packages/database-compat @schmidt-sebastian @jsdt @firebase/jssdk-global-approvers
40-
packages/database-types @schmidt-sebastian @jsdt @firebase/jssdk-global-approvers
39+
packages/database @maneesht @jsdt @firebase/jssdk-global-approvers
40+
packages/database-compat @maneesht @jsdt @firebase/jssdk-global-approvers
41+
packages/database-types @maneesht @jsdt @firebase/jssdk-global-approvers
4142

4243
# Firestore Code
4344
packages/firestore @firebase/firestore-js-team @firebase/jssdk-global-approvers
@@ -47,9 +48,9 @@ packages/firestore-types @firebase/firestore-js-team @firebase/jssdk-global-app
4748
integration/firestore @firebase/firestore-js-team @firebase/jssdk-global-approvers
4849

4950
# Storage Code
50-
packages/storage @schmidt-sebastian @firebase/jssdk-global-approvers
51-
packages/storage-compat @schmidt-sebastian @firebase/jssdk-global-approvers
52-
packages/storage-types @schmidt-sebastian @firebase/jssdk-global-approvers
51+
packages/storage @maneesht @tonyjhuang @firebase/jssdk-global-approvers
52+
packages/storage-compat @maneesht @tonyjhuang @firebase/jssdk-global-approvers
53+
packages/storage-types @maneesht @tonyjhuang @firebase/jssdk-global-approvers
5354

5455
# Messaging Code
5556
packages/messaging @zwu52 @firebase/jssdk-global-approvers

.github/workflows/assign-tech-writers.yml

Lines changed: 0 additions & 15 deletions
This file was deleted.

.github/workflows/check-changeset.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
name: Check Changeset
22

3-
on: pull_request
3+
on:
4+
pull_request:
5+
branches-ignore:
6+
- release
47

58
env:
69
GITHUB_PULL_REQUEST_HEAD_SHA: ${{ github.event.pull_request.head.sha }}

.github/workflows/check-pkg-paths.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Test Package Paths
2+
3+
on: pull_request
4+
5+
jobs:
6+
test:
7+
name: Test Package Paths
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- name: Checkout Repo
12+
uses: actions/checkout@master
13+
with:
14+
# This makes Actions fetch all Git history so run-changed script can diff properly.
15+
fetch-depth: 0
16+
- name: Set up Node (14)
17+
uses: actions/setup-node@v2
18+
with:
19+
node-version: 14.x
20+
- name: Yarn install
21+
run: yarn
22+
- name: Yarn build
23+
run: yarn build
24+
- name: Swap in public typings
25+
run: yarn release:prepare
26+
- name: Check paths
27+
run: yarn ts-node scripts/ci-test/check-paths.ts

.github/workflows/e2e-test.yml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,8 @@ name: E2E Smoke Tests
22

33
# Allows REST trigger. Currently triggered by release-cli script during a staging run.
44
on:
5-
workflow_dispatch:
6-
inputs:
7-
versionOrTag:
8-
description: 'release version or tag'
9-
required: true
10-
default: 'next'
5+
repository_dispatch:
6+
types: [staging-tests]
117

128
jobs:
139
test:
@@ -21,10 +17,10 @@ jobs:
2117
steps:
2218
- name: Checkout Repo
2319
uses: actions/checkout@master
24-
- name: Set up Node (12)
20+
- name: Set up Node (14)
2521
uses: actions/setup-node@v2
2622
with:
27-
node-version: 12.x
23+
node-version: 14.x
2824
- name: install Chrome stable
2925
run: |
3026
sudo apt-get update
@@ -39,8 +35,8 @@ jobs:
3935
echo "export const config = $PROJECT_CONFIG; export const testAccount = $TEST_ACCOUNT" > firebase-config.js
4036
- name: Yarn install
4137
run: |
42-
echo "Installing firebase@${{ github.event.inputs.versionOrTag }}"
43-
yarn add firebase@${{ github.event.inputs.versionOrTag }}
38+
echo "Installing firebase@${{ github.event.client_payload.versionOrTag }}"
39+
yarn add firebase@${{ github.event.client_payload.versionOrTag }}
4440
yarn
4541
- name: Deploy "callTest" cloud function
4642
run: |
@@ -65,6 +61,7 @@ jobs:
6561
env:
6662
WEBHOOK_URL: ${{ secrets.JSCORE_CHAT_WEBHOOK_URL }}
6763
RELEASE_TRACKER_URL: ${{ secrets.RELEASE_TRACKER_URL }}
64+
VERSION_OR_TAG: ${{ github.event.client_payload.versionOrTag }}
6865
# run in root
6966
working-directory: '.'
7067
- name: Tests failed
@@ -73,5 +70,6 @@ jobs:
7370
env:
7471
WEBHOOK_URL: ${{ secrets.JSCORE_CHAT_WEBHOOK_URL }}
7572
RELEASE_TRACKER_URL: ${{ secrets.RELEASE_TRACKER_URL }}
73+
VERSION_OR_TAG: ${{ github.event.client_payload.versionOrTag }}
7674
# run in root
7775
working-directory: '.'

.github/workflows/health-metrics-pull-request.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
name: Health Metrics
22

3-
on: [push, pull_request]
3+
on:
4+
push:
5+
branches: ['**']
6+
pull_request:
47

58
env:
69
GITHUB_PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }}

.github/workflows/label-doc-changes.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,9 @@ jobs:
3333
if: ${{steps.check-doc-changes.outputs.DOC_CHANGED == 'true'}}
3434
with:
3535
labels: doc-changes
36-
github_token: ${{ secrets.OSS_BOT_GITHUB_TOKEN }}
36+
github_token: ${{ github.token }}
37+
- name: assign techwriters to PR
38+
if: ${{steps.check-doc-changes.outputs.DOC_CHANGED == 'true'}}
39+
uses: kentaro-m/[email protected]
40+
with:
41+
configuration-path: ".github/auto_assign.yml"
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Merge Release Into Master
2+
3+
on: workflow_dispatch
4+
5+
jobs:
6+
merge_to_master:
7+
runs-on: ubuntu-latest
8+
# Allow GITHUB_TOKEN to have write permissions
9+
permissions:
10+
contents: write
11+
steps:
12+
- name: Checkout Release Branch
13+
uses: actions/checkout@master
14+
with:
15+
ref: release
16+
- name: Get release version
17+
id: get-version
18+
run: |
19+
export VERSION_SCRIPT="const pkg = require('./packages/firebase/package.json'); console.log(pkg.version);"
20+
export VERSION=`node -e "${VERSION_SCRIPT}"`
21+
echo "::set-output name=RELEASE_VERSION::$VERSION"
22+
- name: Echo version in shell
23+
run: |
24+
echo "Merging release ${{ steps.get-version.outputs.RELEASE_VERSION }}"
25+
- name: Merge to master
26+
uses: actions/github-script@v6
27+
with:
28+
github-token: ${{ secrets.GITHUB_TOKEN }}
29+
script: |
30+
github.rest.repos.merge({
31+
owner: context.repo.owner,
32+
repo: context.repo.repo,
33+
base: 'master',
34+
head: 'release',
35+
commit_message: 'Release ${{ steps.get-version.outputs.RELEASE_VERSION }}'
36+
})

.github/workflows/release-log.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
pull_request:
55
branches:
66
- release
7-
- v8-releasebranch
7+
- '*-releasebranch'
88

99
jobs:
1010
release:

.github/workflows/release.yml renamed to .github/workflows/release-pr.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
1-
name: Release
1+
name: Create Release PR
22

3-
on: push
3+
on:
4+
push:
5+
branches:
6+
- release
7+
- '*-releasebranch'
48

59
jobs:
610
release:
7-
if: github.ref == 'refs/heads/release' || endsWith(github.ref, '-releasebranch')
8-
name: Release
11+
name: Create Release PR
912
runs-on: ubuntu-latest
13+
if: ${{ !startsWith(github.event.head_commit.message, 'Version Packages (#') }}
1014
steps:
1115
- name: Checkout Repo
1216
uses: actions/checkout@master
@@ -22,6 +26,8 @@ jobs:
2226
- name: Install Dependencies
2327
run: yarn
2428

29+
# Ensures a new @firebase/app is published with every release.
30+
# This keeps the SDK_VERSION variable up to date.
2531
- name: Add a changeset for @firebase/app
2632
# pull master so changeset can diff against it
2733
run: |

.github/workflows/release-prod.yml

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
name: Production Release
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
release-branch:
7+
description: 'Release branch'
8+
type: string
9+
default: 'release'
10+
required: true
11+
12+
jobs:
13+
deploy:
14+
name: Production Release
15+
runs-on: ubuntu-latest
16+
# Allow GITHUB_TOKEN to have write permissions
17+
permissions:
18+
contents: write
19+
20+
steps:
21+
- name: Set up Node (14)
22+
uses: actions/setup-node@v2
23+
with:
24+
node-version: 14.x
25+
- name: Checkout release branch (with history)
26+
uses: actions/checkout@master
27+
with:
28+
# Release script requires git history and tags.
29+
fetch-depth: 0
30+
ref: ${{ github.event.inputs.release-branch }}
31+
token: ${{ secrets.OSS_BOT_GITHUB_TOKEN }}
32+
- name: Yarn install
33+
run: yarn
34+
- name: Publish to NPM
35+
# --skipTests No need to run tests
36+
# --skipReinstall Yarn install has already been run
37+
# --ignoreUnstaged Adding the @firebase/app changeset file means
38+
# there's unstaged changes. Ignore.
39+
# TODO: Make these flags defaults in the release script.
40+
run: yarn release --releaseType Production --ci --skipTests --skipReinstall --ignoreUnstaged
41+
env:
42+
NPM_TOKEN_ANALYTICS: ${{secrets.NPM_TOKEN_ANALYTICS}}
43+
NPM_TOKEN_ANALYTICS_INTEROP_TYPES: ${{secrets.NPM_TOKEN_ANALYTICS_INTEROP_TYPES}}
44+
NPM_TOKEN_ANALYTICS_TYPES: ${{secrets.NPM_TOKEN_ANALYTICS_TYPES}}
45+
NPM_TOKEN_APP: ${{secrets.NPM_TOKEN_APP}}
46+
NPM_TOKEN_APP_TYPES: ${{secrets.NPM_TOKEN_APP_TYPES}}
47+
NPM_TOKEN_APP_CHECK: ${{secrets.NPM_TOKEN_APP_CHECK}}
48+
NPM_TOKEN_APP_CHECK_INTEROP_TYPES: ${{secrets.NPM_TOKEN_APP_CHECK_INTEROP_TYPES}}
49+
NPM_TOKEN_APP_CHECK_TYPES: ${{secrets.NPM_TOKEN_APP_CHECK_TYPES}}
50+
NPM_TOKEN_AUTH: ${{secrets.NPM_TOKEN_AUTH}}
51+
NPM_TOKEN_AUTH_INTEROP_TYPES: ${{secrets.NPM_TOKEN_AUTH_INTEROP_TYPES}}
52+
NPM_TOKEN_AUTH_TYPES: ${{secrets.NPM_TOKEN_AUTH_TYPES}}
53+
NPM_TOKEN_COMPONENT: ${{secrets.NPM_TOKEN_COMPONENT}}
54+
NPM_TOKEN_DATABASE: ${{secrets.NPM_TOKEN_DATABASE}}
55+
NPM_TOKEN_DATABASE_TYPES: ${{secrets.NPM_TOKEN_DATABASE_TYPES}}
56+
NPM_TOKEN_FIRESTORE: ${{secrets.NPM_TOKEN_FIRESTORE}}
57+
NPM_TOKEN_FIRESTORE_TYPES: ${{secrets.NPM_TOKEN_FIRESTORE_TYPES}}
58+
NPM_TOKEN_FUNCTIONS: ${{secrets.NPM_TOKEN_FUNCTIONS}}
59+
NPM_TOKEN_FUNCTIONS_TYPES: ${{secrets.NPM_TOKEN_FUNCTIONS_TYPES}}
60+
NPM_TOKEN_INSTALLATIONS: ${{secrets.NPM_TOKEN_INSTALLATIONS}}
61+
NPM_TOKEN_INSTALLATIONS_TYPES: ${{secrets.NPM_TOKEN_INSTALLATIONS_TYPES}}
62+
NPM_TOKEN_LOGGER: ${{secrets.NPM_TOKEN_LOGGER}}
63+
NPM_TOKEN_MESSAGING: ${{secrets.NPM_TOKEN_MESSAGING}}
64+
NPM_TOKEN_MESSAGING_TYPES: ${{secrets.NPM_TOKEN_MESSAGING_TYPES}}
65+
NPM_TOKEN_PERFORMANCE: ${{secrets.NPM_TOKEN_PERFORMANCE}}
66+
NPM_TOKEN_PERFORMANCE_TYPES: ${{secrets.NPM_TOKEN_PERFORMANCE_TYPES}}
67+
NPM_TOKEN_POLYFILL: ${{secrets.NPM_TOKEN_POLYFILL}}
68+
NPM_TOKEN_REMOTE_CONFIG: ${{secrets.NPM_TOKEN_REMOTE_CONFIG}}
69+
NPM_TOKEN_REMOTE_CONFIG_TYPES: ${{secrets.NPM_TOKEN_REMOTE_CONFIG_TYPES}}
70+
NPM_TOKEN_RULES_UNIT_TESTING: ${{secrets.NPM_TOKEN_RULES_UNIT_TESTING}}
71+
NPM_TOKEN_STORAGE: ${{secrets.NPM_TOKEN_STORAGE}}
72+
NPM_TOKEN_STORAGE_TYPES: ${{secrets.NPM_TOKEN_STORAGE_TYPES}}
73+
NPM_TOKEN_TESTING: ${{secrets.NPM_TOKEN_TESTING}}
74+
NPM_TOKEN_UTIL: ${{secrets.NPM_TOKEN_UTIL}}
75+
NPM_TOKEN_WEBCHANNEL_WRAPPER: ${{secrets.NPM_TOKEN_WEBCHANNEL_WRAPPER}}
76+
NPM_TOKEN_FIREBASE: ${{secrets.NPM_TOKEN_FIREBASE}}
77+
NPM_TOKEN_APP_COMPAT: ${{ secrets.NPM_TOKEN_APP_COMPAT }}
78+
NPM_TOKEN_INSTALLATIONS_COMPAT: ${{ secrets.NPM_TOKEN_INSTALLATIONS_COMPAT }}
79+
NPM_TOKEN_ANALYTICS_COMPAT: ${{ secrets.NPM_TOKEN_ANALYTICS_COMPAT }}
80+
NPM_TOKEN_AUTH_COMPAT: ${{ secrets.NPM_TOKEN_AUTH_COMPAT }}
81+
NPM_TOKEN_MESSAGING_INTEROP_TYPES: ${{ secrets.NPM_TOKEN_MESSAGING_INTEROP_TYPES }}
82+
NPM_TOKEN_FUNCTIONS_COMPAT: ${{ secrets.NPM_TOKEN_FUNCTIONS_COMPAT }}
83+
NPM_TOKEN_MESSAGING_COMPAT: ${{ secrets.NPM_TOKEN_MESSAGING_COMPAT }}
84+
NPM_TOKEN_PERFORMANCE_COMPAT: ${{ secrets.NPM_TOKEN_PERFORMANCE_COMPAT }}
85+
NPM_TOKEN_REMOTE_CONFIG_COMPAT: ${{ secrets.NPM_TOKEN_REMOTE_CONFIG_COMPAT }}
86+
NPM_TOKEN_DATABASE_COMPAT: ${{ secrets.NPM_TOKEN_DATABASE_COMPAT }}
87+
NPM_TOKEN_FIRESTORE_COMPAT: ${{ secrets.NPM_TOKEN_FIRESTORE_COMPAT }}
88+
NPM_TOKEN_STORAGE_COMPAT: ${{ secrets.NPM_TOKEN_STORAGE_COMPAT }}
89+
NPM_TOKEN_APP_CHECK_COMPAT: ${{ secrets.NPM_TOKEN_APP_CHECK_COMPAT }}
90+
NPM_TOKEN_API_DOCUMENTER: ${{ secrets.NPM_TOKEN_API_DOCUMENTER }}
91+
CI: true
92+
- name: Get release version
93+
id: get-version
94+
# In production, there is only one version number
95+
run: |
96+
VERSION_SCRIPT="const pkg = require('./packages/firebase/package.json'); console.log(pkg.version);"
97+
VERSION=`node -e "${VERSION_SCRIPT}"`
98+
echo "::set-output name=BASE_VERSION::$VERSION"
99+
- name: Echo version in shell
100+
run: |
101+
echo "Base version: ${{ steps.get-version.outputs.BASE_VERSION }}"
102+
- name: Log to release tracker
103+
# Sends release information to cloud functions endpoint of release tracker.
104+
run: |
105+
DATE=$(date +'%m/%d/%Y')
106+
BASE_VERSION=${{ steps.get-version.outputs.BASE_VERSION }}
107+
RELEASE_TRACKER_URL=${{ secrets.RELEASE_TRACKER_URL }}
108+
curl -X POST -H "Content-Type:application/json" \
109+
-d "{\"version\":\"$BASE_VERSION\",\"date\":\"$DATE\"}" \
110+
$RELEASE_TRACKER_URL/logProduction

0 commit comments

Comments
 (0)