Skip to content

Commit f46a7d2

Browse files
Merge master into release
2 parents 07cf0f1 + 4559c51 commit f46a7d2

File tree

107 files changed

+5043
-2274
lines changed

Some content is hidden

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

107 files changed

+5043
-2274
lines changed

.changeset/cool-elephants-leave.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@firebase/auth": patch
3+
---
4+
5+
Add missing field to `firebase` claim in token result typing

.changeset/eighty-bobcats-compete.md

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

.changeset/polite-fireants-mate.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@firebase/auth-compat': patch
3+
---
4+
5+
Fix auth scheme reconition in capacitor env

.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/workflows/assign-tech-writers.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ jobs:
1010

1111
steps:
1212
- name: assign techwriters to PR
13-
uses: kentaro-m/[email protected].0
13+
uses: kentaro-m/[email protected].1
1414
with:
1515
configuration-path: ".github/auto_assign.yml"

.github/workflows/e2e-test.yml

Lines changed: 4 additions & 8 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:
@@ -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: |

.github/workflows/merge-release-branch.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,28 @@ jobs:
99
permissions:
1010
contents: write
1111
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 }}"
1225
- name: Merge to master
1326
uses: actions/github-script@v6
1427
with:
1528
github-token: ${{ secrets.GITHUB_TOKEN }}
1629
script: |
17-
github.repos.merge({
30+
github.rest.repos.merge({
1831
owner: context.repo.owner,
1932
repo: context.repo.repo,
2033
base: 'master',
21-
head: 'release'
34+
head: 'release',
35+
commit_message: 'Release ${{ steps.get-version.outputs.RELEASE_VERSION }}'
2236
})

.github/workflows/release-staging.yml

Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
name: Staging Release
2+
3+
on: workflow_dispatch
4+
5+
jobs:
6+
deploy:
7+
name: Staging Release
8+
runs-on: ubuntu-latest
9+
# Allow GITHUB_TOKEN to have write permissions
10+
permissions:
11+
contents: write
12+
13+
steps:
14+
- name: Set up Node (14)
15+
uses: actions/setup-node@v2
16+
with:
17+
node-version: 14.x
18+
- name: Merge master into release
19+
uses: actions/github-script@v6
20+
with:
21+
github-token: ${{ secrets.GITHUB_TOKEN }}
22+
script: |
23+
github.rest.repos.merge({
24+
owner: context.repo.owner,
25+
repo: context.repo.repo,
26+
base: 'release',
27+
head: 'master'
28+
})
29+
- name: Checkout release branch (with history)
30+
uses: actions/checkout@master
31+
with:
32+
# Release script requires git history and tags.
33+
fetch-depth: 0
34+
ref: release
35+
- name: Yarn install
36+
run: yarn
37+
# Ensures a new @firebase/app is published with every release.
38+
# This keeps the SDK_VERSION variable up to date.
39+
- name: Add a changeset for @firebase/app
40+
# pull master so changeset can diff against it
41+
run: |
42+
git pull -f --no-rebase origin master:master
43+
yarn ts-node-script scripts/ci/add_changeset.ts
44+
- name: Create Release Pull Request
45+
uses: changesets/action@v1
46+
env:
47+
GITHUB_TOKEN: ${{ secrets.OSS_BOT_GITHUB_TOKEN }}
48+
- name: Publish to NPM
49+
# --skipTests No need to run tests
50+
# --skipReinstall Yarn install has already been run
51+
# --ignoreUnstaged Adding the @firebase/app changeset file means
52+
# there's unstaged changes. Ignore.
53+
# TODO: Make these flags defaults in the release script.
54+
run: yarn release --releaseType staging --skipTests --skipReinstall --ignoreUnstaged
55+
env:
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_APP_CHECK: ${{secrets.NPM_TOKEN_APP_CHECK}}
62+
NPM_TOKEN_APP_CHECK_INTEROP_TYPES: ${{secrets.NPM_TOKEN_APP_CHECK_INTEROP_TYPES}}
63+
NPM_TOKEN_APP_CHECK_TYPES: ${{secrets.NPM_TOKEN_APP_CHECK_TYPES}}
64+
NPM_TOKEN_AUTH: ${{secrets.NPM_TOKEN_AUTH}}
65+
NPM_TOKEN_AUTH_INTEROP_TYPES: ${{secrets.NPM_TOKEN_AUTH_INTEROP_TYPES}}
66+
NPM_TOKEN_AUTH_TYPES: ${{secrets.NPM_TOKEN_AUTH_TYPES}}
67+
NPM_TOKEN_COMPONENT: ${{secrets.NPM_TOKEN_COMPONENT}}
68+
NPM_TOKEN_DATABASE: ${{secrets.NPM_TOKEN_DATABASE}}
69+
NPM_TOKEN_DATABASE_TYPES: ${{secrets.NPM_TOKEN_DATABASE_TYPES}}
70+
NPM_TOKEN_FIRESTORE: ${{secrets.NPM_TOKEN_FIRESTORE}}
71+
NPM_TOKEN_FIRESTORE_TYPES: ${{secrets.NPM_TOKEN_FIRESTORE_TYPES}}
72+
NPM_TOKEN_FUNCTIONS: ${{secrets.NPM_TOKEN_FUNCTIONS}}
73+
NPM_TOKEN_FUNCTIONS_TYPES: ${{secrets.NPM_TOKEN_FUNCTIONS_TYPES}}
74+
NPM_TOKEN_INSTALLATIONS: ${{secrets.NPM_TOKEN_INSTALLATIONS}}
75+
NPM_TOKEN_INSTALLATIONS_TYPES: ${{secrets.NPM_TOKEN_INSTALLATIONS_TYPES}}
76+
NPM_TOKEN_LOGGER: ${{secrets.NPM_TOKEN_LOGGER}}
77+
NPM_TOKEN_MESSAGING: ${{secrets.NPM_TOKEN_MESSAGING}}
78+
NPM_TOKEN_MESSAGING_TYPES: ${{secrets.NPM_TOKEN_MESSAGING_TYPES}}
79+
NPM_TOKEN_PERFORMANCE: ${{secrets.NPM_TOKEN_PERFORMANCE}}
80+
NPM_TOKEN_PERFORMANCE_TYPES: ${{secrets.NPM_TOKEN_PERFORMANCE_TYPES}}
81+
NPM_TOKEN_POLYFILL: ${{secrets.NPM_TOKEN_POLYFILL}}
82+
NPM_TOKEN_REMOTE_CONFIG: ${{secrets.NPM_TOKEN_REMOTE_CONFIG}}
83+
NPM_TOKEN_REMOTE_CONFIG_TYPES: ${{secrets.NPM_TOKEN_REMOTE_CONFIG_TYPES}}
84+
NPM_TOKEN_RULES_UNIT_TESTING: ${{secrets.NPM_TOKEN_RULES_UNIT_TESTING}}
85+
NPM_TOKEN_STORAGE: ${{secrets.NPM_TOKEN_STORAGE}}
86+
NPM_TOKEN_STORAGE_TYPES: ${{secrets.NPM_TOKEN_STORAGE_TYPES}}
87+
NPM_TOKEN_TESTING: ${{secrets.NPM_TOKEN_TESTING}}
88+
NPM_TOKEN_UTIL: ${{secrets.NPM_TOKEN_UTIL}}
89+
NPM_TOKEN_WEBCHANNEL_WRAPPER: ${{secrets.NPM_TOKEN_WEBCHANNEL_WRAPPER}}
90+
NPM_TOKEN_FIREBASE: ${{secrets.NPM_TOKEN_FIREBASE}}
91+
NPM_TOKEN_APP_COMPAT: ${{ secrets.NPM_TOKEN_APP_COMPAT }}
92+
NPM_TOKEN_INSTALLATIONS_COMPAT: ${{ secrets.NPM_TOKEN_INSTALLATIONS_COMPAT }}
93+
NPM_TOKEN_ANALYTICS_COMPAT: ${{ secrets.NPM_TOKEN_ANALYTICS_COMPAT }}
94+
NPM_TOKEN_AUTH_COMPAT: ${{ secrets.NPM_TOKEN_AUTH_COMPAT }}
95+
NPM_TOKEN_MESSAGING_INTEROP_TYPES: ${{ secrets.NPM_TOKEN_MESSAGING_INTEROP_TYPES }}
96+
NPM_TOKEN_FUNCTIONS_COMPAT: ${{ secrets.NPM_TOKEN_FUNCTIONS_COMPAT }}
97+
NPM_TOKEN_MESSAGING_COMPAT: ${{ secrets.NPM_TOKEN_MESSAGING_COMPAT }}
98+
NPM_TOKEN_PERFORMANCE_COMPAT: ${{ secrets.NPM_TOKEN_PERFORMANCE_COMPAT }}
99+
NPM_TOKEN_REMOTE_CONFIG_COMPAT: ${{ secrets.NPM_TOKEN_REMOTE_CONFIG_COMPAT }}
100+
NPM_TOKEN_DATABASE_COMPAT: ${{ secrets.NPM_TOKEN_DATABASE_COMPAT }}
101+
NPM_TOKEN_FIRESTORE_COMPAT: ${{ secrets.NPM_TOKEN_FIRESTORE_COMPAT }}
102+
NPM_TOKEN_STORAGE_COMPAT: ${{ secrets.NPM_TOKEN_STORAGE_COMPAT }}
103+
NPM_TOKEN_APP_CHECK_COMPAT: ${{ secrets.NPM_TOKEN_APP_CHECK_COMPAT }}
104+
NPM_TOKEN_API_DOCUMENTER: ${{ secrets.NPM_TOKEN_API_DOCUMENTER }}
105+
CI: true
106+
- name: Get release version
107+
id: get-version
108+
# STAGING_VERSION = version with staging hash, e.g. 1.2.3-20430523
109+
# BASE_VERSION = version without staging hash, e.g. 1.2.3
110+
run: |
111+
VERSION_SCRIPT="const pkg = require('./packages/firebase/package.json'); console.log(pkg.version);"
112+
VERSION=`node -e "${VERSION_SCRIPT}"`
113+
echo "::set-output name=STAGING_VERSION::$VERSION"
114+
BASE_VERSION=$(echo ${{ steps.get-version.outputs.STAGING_VERSION }} | cut -d "-" -f 1)
115+
echo "::set-output name=BASE_VERSION::$BASE_VERSION"
116+
- name: Echo version in shell
117+
run: |
118+
echo "Staging release ${{ steps.get-version.outputs.STAGING_VERSION }}"
119+
- name: Launch E2E tests workflow
120+
# Trigger e2e-test.yml
121+
run: |
122+
OSS_BOT_GITHUB_TOKEN=${{ secrets.OSS_BOT_GITHUB_TOKEN }}
123+
VERSION_OR_TAG=${{ steps.get-version.outputs.STAGING_VERSION }}
124+
curl -X POST \
125+
-H "Content-Type:application/json" \
126+
-H "Accept:application/vnd.github.v3+json" \
127+
-H "Authorization:Bearer $OSS_BOT_GITHUB_TOKEN" \
128+
-d "{\"event_type\":\"staging-tests\", \"client_payload\":{\"versionOrTag\":\"$VERSION_OR_TAG\"}}" \
129+
https://api.github.com/repos/firebase/firebase-js-sdk/dispatches
130+
- name: Log to release tracker
131+
# Sends release information to cloud functions endpoint of release tracker.
132+
run: |
133+
DATE=$(date +'%m/%d/%Y')
134+
BASE_VERSION=${{ steps.get-version.outputs.BASE_VERSION }}
135+
STAGING_VERSION=${{ steps.get-version.outputs.STAGING_VERSION }}
136+
OPERATOR=${{ github.actor }}
137+
RELEASE_TRACKER_URL=${{ secrets.RELEASE_TRACKER_URL }}
138+
curl -X POST -H "Content-Type:application/json" \
139+
-d "{\"version\":\"$BASE_VERSION\",\"tag\":\"$STAGING_VERSION\",\"date\":\"$DATE\",\"operator\":\"$OPERATOR\"}" \
140+
$RELEASE_TRACKER_URL/logStaging

common/api-review/analytics.api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ export interface Promotion {
388388
// @public
389389
export function setAnalyticsCollectionEnabled(analyticsInstance: Analytics, enabled: boolean): void;
390390

391-
// @public
391+
// @public @deprecated
392392
export function setCurrentScreen(analyticsInstance: Analytics, screenName: string, options?: AnalyticsCallOptions): void;
393393

394394
// @public

common/api-review/auth.api.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -544,6 +544,7 @@ export interface ParsedToken {
544544
'firebase'?: {
545545
'sign_in_provider'?: string;
546546
'sign_in_second_factor'?: string;
547+
'identities'?: Record<string, string>;
547548
};
548549
'iat'?: string;
549550
'sub'?: string;

config/functions/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
"description": "Cloud Functions for Firebase",
44
"dependencies": {
55
"cors": "2.8.5",
6-
"firebase-admin": "10.1.0",
7-
"firebase-functions": "3.20.0"
6+
"firebase-admin": "10.2.0",
7+
"firebase-functions": "3.21.0"
88
},
99
"private": true,
1010
"engines": {

e2e/package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,25 +16,25 @@
1616
"author": "",
1717
"license": "ISC",
1818
"dependencies": {
19-
"firebase": "9.0.2"
19+
"firebase": "9.8.1"
2020
},
2121
"devDependencies": {
22-
"@babel/core": "7.14.6",
23-
"@babel/preset-env": "7.14.4",
24-
"@types/chai": "4.2.18",
22+
"@babel/core": "7.17.10",
23+
"@babel/preset-env": "7.17.10",
24+
"@types/chai": "4.3.1",
2525
"@types/mocha": "9.1.1",
26-
"babel-loader": "8.0.5",
26+
"babel-loader": "8.2.5",
2727
"chai": "4.3.6",
28-
"karma": "6.3.16",
28+
"karma": "6.3.19",
2929
"karma-chrome-launcher": "3.1.1",
3030
"karma-mocha": "2.0.1",
3131
"karma-spec-reporter": "0.0.34",
3232
"karma-typescript": "5.5.3",
3333
"karma-typescript-es6-transform": "5.5.3",
3434
"mocha": "9.2.2",
3535
"typescript": "4.3.4",
36-
"webpack": "5.41.1",
36+
"webpack": "5.72.1",
3737
"webpack-cli": "4.9.2",
38-
"webpack-dev-server": "4.7.3"
38+
"webpack-dev-server": "4.9.0"
3939
}
4040
}

0 commit comments

Comments
 (0)