Skip to content

Commit a2a817b

Browse files
committed
Merge branch 'main' of github.com:firebase/firebase-js-sdk into markduckworth/fetch-streams-multi-byte-fix
2 parents 1088ee0 + 629919e commit a2a817b

File tree

437 files changed

+5051
-2523
lines changed

Some content is hidden

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

437 files changed

+5051
-2523
lines changed

.changeset/config.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"commit": false,
88
"linked": [],
99
"access": "public",
10-
"baseBranch": "master",
10+
"baseBranch": "main",
1111
"updateInternalDependencies": "patch",
1212
"ignore": [
1313
"firebase-namespace-integration-test",

.changeset/empty-windows-push.md

-5
This file was deleted.

.changeset/khaki-numbers-nail.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@firebase/auth': patch
3+
'@firebase/util': minor
4+
---
5+
6+
Suppress the use of the `fetch` parameter `referrerPolicy` within Auth for `fetch` requests originating from Cloudflare Workers. Clouldflare Worker environments do not support this parameter and throw when it's used.

.changeset/warm-oranges-itch.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@firebase/firestore': patch
3+
---
4+
5+
Fix an issue with metadata `fromCache` defaulting to `true` when listening to cache in multi-tabs.

.changeset/wet-hotels-greet.md

-5
This file was deleted.

.editorconfig

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ root = true
1111
end_of_line = lf
1212
insert_final_newline = true
1313

14-
# Javascript and Typescript look like Google-style
14+
# JavaScript and TypeScript look like Google-style
1515
[*.{js,json,ts}]
1616
charset = utf-8
1717
indent_style = space

.github/ISSUE_TEMPLATE/bug_report_v2.yaml

+23-16
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2023 Google LLC
1+
# Copyright 2024 Google LLC
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -21,8 +21,8 @@ body:
2121
id: before-you-start
2222
attributes:
2323
value: |
24-
*[READ THIS]:* to evaluate if you are in the right place?
25-
- For issues or feature requests related to __the code in this repository__, file a Github issue.
24+
*[READ THIS]:* Are you in the right place?
25+
- For issues or feature requests related to __the code in this repository__, file a GitHub issue.
2626
- If this is a __feature request__, make sure the issue title starts with "FR:".
2727
- For general technical questions, post a question on [StackOverflow](http://stackoverflow.com/) with the firebase tag.
2828
- For general Firebase discussion, use the [firebase-talk](https://groups.google.com/forum/#!forum/firebase-talk) google group.
@@ -31,31 +31,31 @@ body:
3131
id: operating-system
3232
attributes:
3333
label: Operating System
34-
description: Describe your operating system
35-
placeholder: ex. iOS 16.4
34+
description: Describe the operating system(s) where you are experiencing the issue.
35+
placeholder: ex. iOS 16.4, macOS Ventura 13.4, Windows 11
3636
validations:
3737
required: true
3838
- type: input
39-
id: browser-version
39+
id: environment
4040
attributes:
41-
label: Browser Version
42-
description: Describe your browser version
43-
placeholder: ex. Safari/604.1
41+
label: Environment (if applicable)
42+
description: Describe the environment where you are experiencing the issue. This could include the browser and its version, Node.js version, or any other relevant environment details.
43+
placeholder: ex. Chrome 115, Node.js v18.16.0, React Native
4444
validations:
4545
required: true
4646
- type: input
4747
id: firebase-sdk-version
4848
attributes:
4949
label: Firebase SDK Version
50-
description: Describe your Firebase SDK Version
50+
description: The Firebase JS SDK version you're using.
5151
placeholder: ex. 9.16.0
5252
validations:
5353
required: true
5454
- type: dropdown
5555
id: firebase-sdk-products
5656
attributes:
57-
label: 'Firebase SDK Product:'
58-
description: Which Firebase Products are used in your app?
57+
label: Firebase SDK Product(s)
58+
description: Select the Firebase product(s) relevant to your issue. You can select multiple options in the dropdown.
5959
multiple: true
6060
options:
6161
- Analytics
@@ -77,16 +77,21 @@ body:
7777
- type: textarea
7878
id: project-tooling
7979
attributes:
80-
label: Describe your project's tooling
80+
label: Project Tooling
8181
description: Describe the tooling your app is built with
8282
placeholder: React app with Webpack and Jest
8383
validations:
8484
required: true
8585
- type: textarea
8686
id: describe-your-problem
8787
attributes:
88-
label: Describe the problem
89-
description: Describe what you were trying to do and what occurred
88+
label: Detailed Problem Description
89+
description: |
90+
Please provide a clear and concise description of the problem. Include:
91+
- What you were trying to achieve.
92+
- What actually happened.
93+
- Any error messages or unexpected behavior you observed.
94+
- Relevant log snippets or console output (if available).
9095
placeholder: |
9196
What were you trying to accomplish? What happened? This should include a background description, log/console output, etc.
9297
validations:
@@ -95,6 +100,8 @@ body:
95100
id: reproduce-code
96101
attributes:
97102
label: Steps and code to reproduce issue
98-
description: Please provide a description of how to replicate your issue. Copy and paste any relevant code here to reproduce the problem or links to code to reproduce it.
103+
description: |
104+
If possible, provide a minimal, self-contained code snippet or steps that consistently reproduce the issue.
105+
This will significantly aid in debugging.
99106
validations:
100107
required: true

.github/workflows/canary-deploy.yml

+3-6
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ name: Canary Deploy
1717
on:
1818
push:
1919
branches:
20-
- master
20+
- main
2121
workflow_dispatch:
2222

2323
jobs:
@@ -27,7 +27,7 @@ jobs:
2727

2828
steps:
2929
- name: Checkout Repo
30-
uses: actions/checkout@master
30+
uses: actions/checkout@v4
3131
with:
3232
# Canary release script requires git history and tags.
3333
fetch-depth: 0
@@ -62,18 +62,15 @@ jobs:
6262
NPM_TOKEN_INSTALLATIONS_TYPES: ${{secrets.NPM_TOKEN_INSTALLATIONS_TYPES}}
6363
NPM_TOKEN_LOGGER: ${{secrets.NPM_TOKEN_LOGGER}}
6464
NPM_TOKEN_MESSAGING: ${{secrets.NPM_TOKEN_MESSAGING}}
65-
NPM_TOKEN_MESSAGING_TYPES: ${{secrets.NPM_TOKEN_MESSAGING_TYPES}}
6665
NPM_TOKEN_PERFORMANCE: ${{secrets.NPM_TOKEN_PERFORMANCE}}
6766
NPM_TOKEN_PERFORMANCE_TYPES: ${{secrets.NPM_TOKEN_PERFORMANCE_TYPES}}
68-
NPM_TOKEN_POLYFILL: ${{secrets.NPM_TOKEN_POLYFILL}}
6967
NPM_TOKEN_REMOTE_CONFIG: ${{secrets.NPM_TOKEN_REMOTE_CONFIG}}
7068
NPM_TOKEN_REMOTE_CONFIG_TYPES: ${{secrets.NPM_TOKEN_REMOTE_CONFIG_TYPES}}
7169
NPM_TOKEN_RULES_UNIT_TESTING: ${{secrets.NPM_TOKEN_RULES_UNIT_TESTING}}
7270
NPM_TOKEN_STORAGE: ${{secrets.NPM_TOKEN_STORAGE}}
7371
NPM_TOKEN_STORAGE_TYPES: ${{secrets.NPM_TOKEN_STORAGE_TYPES}}
74-
NPM_TOKEN_TESTING: ${{secrets.NPM_TOKEN_TESTING}}
7572
NPM_TOKEN_UTIL: ${{secrets.NPM_TOKEN_UTIL}}
76-
NPM_TOKEN_VERTEXAI: ${{secrets.NPM_TOKEN_VERTEXAI}}
73+
NPM_TOKEN_VERTEXAI_PREVIEW: ${{secrets.NPM_TOKEN_VERTEXAI_PREVIEW}}
7774
NPM_TOKEN_WEBCHANNEL_WRAPPER: ${{secrets.NPM_TOKEN_WEBCHANNEL_WRAPPER}}
7875
NPM_TOKEN_FIREBASE: ${{secrets.NPM_TOKEN_FIREBASE}}
7976
NPM_TOKEN_APP_COMPAT: ${{ secrets.NPM_TOKEN_APP_COMPAT }}

.github/workflows/check-changeset.yml

+10-10
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ name: Check Changeset
1717
on:
1818
pull_request:
1919
branches:
20-
- master
20+
- main
2121

2222
env:
2323
GITHUB_PULL_REQUEST_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
@@ -30,7 +30,7 @@ jobs:
3030

3131
steps:
3232
- name: Checkout Repo
33-
uses: actions/checkout@master
33+
uses: actions/checkout@v4
3434
with:
3535
# This makes Actions fetch all Git history so check_changeset script can diff properly.
3636
fetch-depth: 0
@@ -41,9 +41,9 @@ jobs:
4141
- name: Yarn install
4242
run: yarn
4343
- name: Run changeset script
44-
# pull master so changeset can diff against it
44+
# pull main so changeset can diff against it
4545
run: |
46-
git pull -f --no-rebase origin master:master
46+
git pull -f --no-rebase origin main:main
4747
yarn ts-node-script scripts/ci/check_changeset.ts
4848
id: check-changeset
4949
- name: Print changeset checker output
@@ -54,31 +54,31 @@ jobs:
5454
- name: Print blocking failure status
5555
run: echo "${{steps.check-changeset.outputs.BLOCKING_FAILURE}}"
5656
- name: Find Comment
57-
uses: peter-evans/find-comment@v1
57+
uses: peter-evans/find-comment@v3
5858
id: fc
5959
with:
6060
issue-number: ${{github.event.number}}
6161
body-includes: Changeset File Check
6262
- name: Create comment (missing packages)
6363
if: ${{!steps.fc.outputs.comment-id && steps.check-changeset.outputs.CHANGESET_ERROR_MESSAGE}}
64-
uses: peter-evans/create-or-update-comment@v1
64+
uses: peter-evans/create-or-update-comment@v4
6565
with:
6666
issue-number: ${{github.event.number}}
6767
body: |
6868
### Changeset File Check :warning:
6969
${{steps.check-changeset.outputs.CHANGESET_ERROR_MESSAGE}}
7070
- name: Update comment (missing packages)
71-
if: ${{steps.fc.outputs.comment-id}}
72-
uses: peter-evans/create-or-update-comment@v1
71+
if: ${{steps.fc.outputs.comment-id && steps.check-changeset.outputs.CHANGESET_ERROR_MESSAGE}}
72+
uses: peter-evans/create-or-update-comment@v4
7373
with:
74-
comment-id: ${{steps.fc.outputs.comment-id}} && steps.check-changeset.outputs.CHANGESET_ERROR_MESSAGE}}
74+
comment-id: ${{steps.fc.outputs.comment-id}}
7575
edit-mode: replace
7676
body: |
7777
### Changeset File Check :warning:
7878
${{steps.check-changeset.outputs.CHANGESET_ERROR_MESSAGE}}
7979
- name: Update comment (no missing packages)
8080
if: ${{steps.fc.outputs.comment-id && !steps.check-changeset.outputs.CHANGESET_ERROR_MESSAGE}}
81-
uses: peter-evans/create-or-update-comment@v1
81+
uses: peter-evans/create-or-update-comment@v4
8282
with:
8383
comment-id: ${{steps.fc.outputs.comment-id}}
8484
edit-mode: replace

.github/workflows/check-docs.yml

+11-6
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
name: Doc Change Check (Run "yarn docgen devsite" if this fails)
15+
name: Doc Change Check (Run "yarn docgen:all" if this fails)
1616

1717
on: pull_request
1818

@@ -23,7 +23,7 @@ jobs:
2323

2424
steps:
2525
- name: Checkout Repo
26-
uses: actions/checkout@master
26+
uses: actions/checkout@v4
2727
with:
2828
# get all history for the diff
2929
fetch-depth: 0
@@ -33,10 +33,15 @@ jobs:
3333
node-version: 20.x
3434
- name: Yarn install
3535
run: yarn
36-
- name: Run doc generation (devsite docs)
37-
run: yarn docgen devsite
36+
- name: Run doc generation
37+
run: yarn docgen:all
3838
- name: Check for changes in docs-devsite dir (fail if so)
39-
run: git diff --exit-code docs-devsite
39+
run: |
40+
if [[ -n "$(git status docs-devsite --porcelain)" ]]; then
41+
echo "Unstaged changes detected:"
42+
git status -s
43+
exit 1
44+
fi
4045
- name: Reference documentation needs to be updated. See message below.
4146
if: ${{ failure() }}
42-
run: echo "Changes in this PR affect the reference docs. Run \`yarn docgen devsite\` locally to regenerate docs and add them to this PR."
47+
run: echo "Changes in this PR affect the reference docs. Run \`yarn docgen:all\` locally to regenerate docs and add them to this PR."

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323

2424
steps:
2525
- name: Checkout Repo
26-
uses: actions/checkout@master
26+
uses: actions/checkout@v4
2727
with:
2828
# This makes Actions fetch all Git history so run-changed script can diff properly.
2929
fetch-depth: 0
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Copyright 2024 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
name: Check Vertex AI Responses
16+
17+
on: pull_request
18+
19+
jobs:
20+
check-version:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v4
24+
- name: Clone mock responses
25+
run: scripts/update_vertexai_responses.sh
26+
- name: Find cloned and latest versions
27+
run: |
28+
CLONED=$(git describe --tags)
29+
LATEST=$(git tag --sort=v:refname | tail -n1)
30+
echo "cloned_tag=$CLONED" >> $GITHUB_ENV
31+
echo "latest_tag=$LATEST" >> $GITHUB_ENV
32+
working-directory: packages/vertexai/test-utils/vertexai-sdk-test-data
33+
- name: Find comment from previous run if exists
34+
uses: peter-evans/find-comment@3eae4d37986fb5a8592848f6a574fdf654e61f9e
35+
id: fc
36+
with:
37+
issue-number: ${{github.event.number}}
38+
body-includes: Vertex AI Mock Responses Check
39+
- name: Comment on PR if newer version is available
40+
if: ${{env.cloned_tag != env.latest_tag && !steps.fc.outputs.comment-id}}
41+
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043
42+
with:
43+
issue-number: ${{github.event.number}}
44+
body: >
45+
### Vertex AI Mock Responses Check :warning:
46+
47+
A newer major version of the mock responses for Vertex AI unit tests is available.
48+
[update_vertexai_responses.sh](https://github.com/firebase/firebase-js-sdk/blob/main/scripts/update_vertexai_responses.sh)
49+
should be updated to clone the latest version of the responses: `${{env.latest_tag}}`
50+
- name: Delete comment when version gets updated
51+
if: ${{env.cloned_tag == env.latest_tag && steps.fc.outputs.comment-id}}
52+
uses: detomarco/delete-comment@850734dd44d8b15fef55b45252613b903ceb06f0
53+
with:
54+
comment-id: ${{ steps.fc.outputs.comment-id }}

.github/workflows/deploy-config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131

3232
steps:
3333
- name: Checkout Repo
34-
uses: actions/checkout@master
34+
uses: actions/checkout@v4
3535
with:
3636
# This makes Actions fetch all Git history so run-changed script can diff properly.
3737
fetch-depth: 0

.github/workflows/e2e-test.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535

3636
steps:
3737
- name: Checkout Repo
38-
uses: actions/checkout@master
38+
uses: actions/checkout@v4
3939
- name: Set up Node (20)
4040
uses: actions/setup-node@master
4141
with:

.github/workflows/format.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727

2828
steps:
2929
- name: Checkout Repo
30-
uses: actions/checkout@master
30+
uses: actions/checkout@v4
3131
with:
3232
# get all history for the diff
3333
fetch-depth: 0

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
- uses: 'google-github-actions/auth@v0'
4646
with:
4747
credentials_json: '${{ secrets.GCP_SA_KEY }}'
48-
- uses: google-github-actions/setup-gcloud@v0
48+
- uses: google-github-actions/setup-gcloud@v2
4949
- run: yarn install
5050
- run: yarn build
5151
- name: Run health-metrics/binary-size test
@@ -62,7 +62,7 @@ jobs:
6262
- uses: 'google-github-actions/auth@v0'
6363
with:
6464
credentials_json: '${{ secrets.GCP_SA_KEY }}'
65-
- uses: google-github-actions/setup-gcloud@v0
65+
- uses: google-github-actions/setup-gcloud@v2
6666
- run: yarn install
6767
- run: yarn build
6868
- name: Run health-metrics/modular-exports-binary-size test

.github/workflows/health-metrics-release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
- uses: 'google-github-actions/auth@v0'
2727
with:
2828
credentials_json: '${{ secrets.GCP_SA_KEY }}'
29-
- uses: google-github-actions/setup-gcloud@v0
29+
- uses: google-github-actions/setup-gcloud@v2
3030
- uses: FirebaseExtended/github-actions/health-metrics/release-diffing@master
3131
with:
3232
repo: ${{ github.repository }}

0 commit comments

Comments
 (0)