Skip to content

Commit d441861

Browse files
committed
Merge branch 'main' of github.com:firebase/firebase-js-sdk into markduckworth/error-codes
2 parents 39cf218 + 933ba9d commit d441861

File tree

930 files changed

+50697
-22106
lines changed

Some content is hidden

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

930 files changed

+50697
-22106
lines changed

.changeset/config.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,9 @@
77
"commit": false,
88
"linked": [],
99
"access": "public",
10-
"baseBranch": "master",
10+
"baseBranch": "main",
1111
"updateInternalDependencies": "patch",
1212
"ignore": [
13-
"firebase-namespace-integration-test",
1413
"firebase-firestore-integration-test",
1514
"firebase-messaging-integration-test",
1615
"firebase-compat-interop-test",

.changeset/slow-students-fry.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@firebase/firestore': patch
3+
'firebase': patch
4+
---
5+
6+
Fix issue where Firestore would produce `undefined` for document snapshot data if using IndexedDB persistence and "clear site data" (or equivalent) button was pressed in the web browser.

.editorconfig

Lines changed: 1 addition & 1 deletion
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/CODEOWNERS

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ packages/database @maneesht @aashishpatil-g @firebase/jssdk-global-approvers
1515
packages/database-compat @maneesht @aashishpatil-g @firebase/jssdk-global-approvers
1616
packages/database-types @maneesht @aashishpatil-g @firebase/jssdk-global-approvers
1717

18+
# Data Connect Code
19+
packages/data-connect @maneesht @aashishpatil-g @firebase/jssdk-global-approvers
20+
1821
# Firestore Code
1922
packages/firestore @firebase/firestore-js-team @firebase/jssdk-global-approvers
2023
packages/firestore-compat @firebase/firestore-js-team @firebase/jssdk-global-approvers
@@ -34,10 +37,10 @@ packages/messaging-interop-types @zwu52 @firebase/jssdk-global-approvers
3437
integration/messaging @zwu52 @firebase/jssdk-global-approvers
3538

3639
# Auth Code
37-
packages/auth @lisajian @Xiaoshouzi-gh @sam-gc @firebase/jssdk-global-approvers
38-
packages/auth-compat @lisajian @Xiaoshouzi-gh @sam-gc @firebase/jssdk-global-approvers
39-
packages/auth-types @lisajian @Xiaoshouzi-gh @sam-gc @firebase/jssdk-global-approvers
40-
packages/auth-interop-types @lisajian @Xiaoshouzi-gh @sam-gc @firebase/jssdk-global-approvers
40+
packages/auth @lisajian @Xiaoshouzi-gh @sam-gc @pashanka @mansisampat @nhienlam @firebase/jssdk-global-approvers
41+
packages/auth-compat @lisajian @Xiaoshouzi-gh @sam-gc @pashanka @mansisampat @nhienlam @firebase/jssdk-global-approvers
42+
packages/auth-types @lisajian @Xiaoshouzi-gh @sam-gc @pashanka @mansisampat @nhienlam @firebase/jssdk-global-approvers
43+
packages/auth-interop-types @lisajian @Xiaoshouzi-gh @sam-gc @pashanka @mansisampat @nhienlam @firebase/jssdk-global-approvers
4144

4245
# Testing Code
4346
packages/rules-unit-testing @avolkovi @sam-gc @yuchenshi @firebase/jssdk-global-approvers
@@ -48,9 +51,9 @@ packages/installations-compat @avolkovi @yoyomyo @firebase/jssdk-global-approver
4851
packages/installations-types @avolkovi @yoyomyo @firebase/jssdk-global-approvers
4952

5053
# Performance Code
51-
packages/performance @jposuna @firebase/jssdk-global-approvers
52-
packages/performance-compat @jposuna @firebase/jssdk-global-approvers
53-
packages/performance-types @jposuna @firebase/jssdk-global-approvers
54+
packages/performance @visumickey @firebase/jssdk-global-approvers
55+
packages/performance-compat @visumickey @firebase/jssdk-global-approvers
56+
packages/performance-types @visumickey @firebase/jssdk-global-approvers
5457

5558
# Analytics Code
5659
packages/analytics @hsubox76 @firebase/jssdk-global-approvers
@@ -69,7 +72,7 @@ packages/app-check-types @hsubox76 @firebase/jssdk-global-approvers
6972
packages/app-check-interop-types @hsubox76 @firebase/jssdk-global-approvers
7073

7174
# Documentation Changes
72-
packages/firebase/index.d.ts @egilmorez @firebase/jssdk-global-approvers
75+
packages/firebase/compat/index.d.ts @egilmorez @firebase/jssdk-global-approvers
7376
scripts/docgen/content-sources/ @egilmorez @firebase/jssdk-global-approvers
7477
docs-devsite/ @firebase/firebase-techwriters
7578

.github/ISSUE_TEMPLATE/bug_report_v2.yaml

Lines changed: 24 additions & 16 deletions
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,38 +31,39 @@ 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
6262
- AppCheck
6363
- Auth
6464
- Component
6565
- Database
66+
- DataConnect
6667
- Firestore
6768
- Functions
6869
- Installations
@@ -77,16 +78,21 @@ body:
7778
- type: textarea
7879
id: project-tooling
7980
attributes:
80-
label: Describe your project's tooling
81+
label: Project Tooling
8182
description: Describe the tooling your app is built with
8283
placeholder: React app with Webpack and Jest
8384
validations:
8485
required: true
8586
- type: textarea
8687
id: describe-your-problem
8788
attributes:
88-
label: Describe the problem
89-
description: Describe what you were trying to do and what occurred
89+
label: Detailed Problem Description
90+
description: |
91+
Please provide a clear and concise description of the problem. Include:
92+
- What you were trying to achieve.
93+
- What actually happened.
94+
- Any error messages or unexpected behavior you observed.
95+
- Relevant log snippets or console output (if available).
9096
placeholder: |
9197
What were you trying to accomplish? What happened? This should include a background description, log/console output, etc.
9298
validations:
@@ -95,6 +101,8 @@ body:
95101
id: reproduce-code
96102
attributes:
97103
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.
104+
description: |
105+
If possible, provide a minimal, self-contained code snippet or steps that consistently reproduce the issue.
106+
This will significantly aid in debugging.
99107
validations:
100108
required: true

.github/workflows/canary-deploy.yml

Lines changed: 5 additions & 8 deletions
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,14 +27,14 @@ 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
3434
- name: Set up Node (20)
35-
uses: actions/setup-node@v3
35+
uses: actions/setup-node@v4
3636
with:
37-
node-version: 20.x
37+
node-version: 22.10.0
3838
- name: Yarn install
3939
run: yarn
4040
- name: Deploy canary
@@ -52,6 +52,7 @@ jobs:
5252
NPM_TOKEN_AUTH_INTEROP_TYPES: ${{secrets.NPM_TOKEN_AUTH_INTEROP_TYPES}}
5353
NPM_TOKEN_AUTH_TYPES: ${{secrets.NPM_TOKEN_AUTH_TYPES}}
5454
NPM_TOKEN_COMPONENT: ${{secrets.NPM_TOKEN_COMPONENT}}
55+
NPM_TOKEN_DATA_CONNECT: ${{secrets.NPM_TOKEN_DATA_CONNECT}}
5556
NPM_TOKEN_DATABASE: ${{secrets.NPM_TOKEN_DATABASE}}
5657
NPM_TOKEN_DATABASE_TYPES: ${{secrets.NPM_TOKEN_DATABASE_TYPES}}
5758
NPM_TOKEN_FIRESTORE: ${{secrets.NPM_TOKEN_FIRESTORE}}
@@ -62,19 +63,15 @@ jobs:
6263
NPM_TOKEN_INSTALLATIONS_TYPES: ${{secrets.NPM_TOKEN_INSTALLATIONS_TYPES}}
6364
NPM_TOKEN_LOGGER: ${{secrets.NPM_TOKEN_LOGGER}}
6465
NPM_TOKEN_MESSAGING: ${{secrets.NPM_TOKEN_MESSAGING}}
65-
NPM_TOKEN_MESSAGING_TYPES: ${{secrets.NPM_TOKEN_MESSAGING_TYPES}}
6666
NPM_TOKEN_PERFORMANCE: ${{secrets.NPM_TOKEN_PERFORMANCE}}
6767
NPM_TOKEN_PERFORMANCE_TYPES: ${{secrets.NPM_TOKEN_PERFORMANCE_TYPES}}
68-
NPM_TOKEN_POLYFILL: ${{secrets.NPM_TOKEN_POLYFILL}}
6968
NPM_TOKEN_REMOTE_CONFIG: ${{secrets.NPM_TOKEN_REMOTE_CONFIG}}
7069
NPM_TOKEN_REMOTE_CONFIG_TYPES: ${{secrets.NPM_TOKEN_REMOTE_CONFIG_TYPES}}
7170
NPM_TOKEN_RULES_UNIT_TESTING: ${{secrets.NPM_TOKEN_RULES_UNIT_TESTING}}
7271
NPM_TOKEN_STORAGE: ${{secrets.NPM_TOKEN_STORAGE}}
7372
NPM_TOKEN_STORAGE_TYPES: ${{secrets.NPM_TOKEN_STORAGE_TYPES}}
74-
NPM_TOKEN_TESTING: ${{secrets.NPM_TOKEN_TESTING}}
7573
NPM_TOKEN_UTIL: ${{secrets.NPM_TOKEN_UTIL}}
7674
NPM_TOKEN_VERTEXAI: ${{secrets.NPM_TOKEN_VERTEXAI}}
77-
NPM_TOKEN_VERTEXAI_PREVIEW: ${{secrets.NPM_TOKEN_VERTEXAI_PREVIEW}}
7875
NPM_TOKEN_WEBCHANNEL_WRAPPER: ${{secrets.NPM_TOKEN_WEBCHANNEL_WRAPPER}}
7976
NPM_TOKEN_FIREBASE: ${{secrets.NPM_TOKEN_FIREBASE}}
8077
NPM_TOKEN_APP_COMPAT: ${{ secrets.NPM_TOKEN_APP_COMPAT }}

.github/workflows/check-changeset.yml

Lines changed: 20 additions & 13 deletions
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 }}
@@ -28,22 +28,25 @@ jobs:
2828
name: Check changeset vs changed files
2929
runs-on: ubuntu-latest
3030

31+
permissions:
32+
pull-requests: write
33+
3134
steps:
3235
- name: Checkout Repo
33-
uses: actions/checkout@master
36+
uses: actions/checkout@v4
3437
with:
3538
# This makes Actions fetch all Git history so check_changeset script can diff properly.
3639
fetch-depth: 0
3740
- name: Set up Node (20)
38-
uses: actions/setup-node@v3
41+
uses: actions/setup-node@v4
3942
with:
40-
node-version: 20.x
43+
node-version: 22.10.0
4144
- name: Yarn install
4245
run: yarn
4346
- name: Run changeset script
44-
# pull master so changeset can diff against it
47+
# pull main so changeset can diff against it
4548
run: |
46-
git pull -f --no-rebase origin master:master
49+
git pull -f --no-rebase origin main:main
4750
yarn ts-node-script scripts/ci/check_changeset.ts
4851
id: check-changeset
4952
- name: Print changeset checker output
@@ -54,31 +57,35 @@ jobs:
5457
- name: Print blocking failure status
5558
run: echo "${{steps.check-changeset.outputs.BLOCKING_FAILURE}}"
5659
- name: Find Comment
57-
uses: peter-evans/find-comment@v1
60+
# This commit represents v3.1.0
61+
uses: peter-evans/find-comment@3eae4d37986fb5a8592848f6a574fdf654e61f9e
5862
id: fc
5963
with:
6064
issue-number: ${{github.event.number}}
6165
body-includes: Changeset File Check
6266
- name: Create comment (missing packages)
6367
if: ${{!steps.fc.outputs.comment-id && steps.check-changeset.outputs.CHANGESET_ERROR_MESSAGE}}
64-
uses: peter-evans/create-or-update-comment@v1
68+
# This commit represents v4.0.0
69+
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043
6570
with:
6671
issue-number: ${{github.event.number}}
6772
body: |
6873
### Changeset File Check :warning:
6974
${{steps.check-changeset.outputs.CHANGESET_ERROR_MESSAGE}}
7075
- name: Update comment (missing packages)
71-
if: ${{steps.fc.outputs.comment-id}}
72-
uses: peter-evans/create-or-update-comment@v1
76+
if: ${{steps.fc.outputs.comment-id && steps.check-changeset.outputs.CHANGESET_ERROR_MESSAGE}}
77+
# This commit represents v4.0.0
78+
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043
7379
with:
74-
comment-id: ${{steps.fc.outputs.comment-id}} && steps.check-changeset.outputs.CHANGESET_ERROR_MESSAGE}}
80+
comment-id: ${{steps.fc.outputs.comment-id}}
7581
edit-mode: replace
7682
body: |
7783
### Changeset File Check :warning:
7884
${{steps.check-changeset.outputs.CHANGESET_ERROR_MESSAGE}}
7985
- name: Update comment (no missing packages)
8086
if: ${{steps.fc.outputs.comment-id && !steps.check-changeset.outputs.CHANGESET_ERROR_MESSAGE}}
81-
uses: peter-evans/create-or-update-comment@v1
87+
# This commit represents v4.0.0
88+
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043
8289
with:
8390
comment-id: ${{steps.fc.outputs.comment-id}}
8491
edit-mode: replace
@@ -89,4 +96,4 @@ jobs:
8996
# Don't want it to throw before editing the comment.
9097
- name: Fail if checker script logged a blocking failure
9198
if: ${{steps.check-changeset.outputs.BLOCKING_FAILURE == 'true'}}
92-
run: exit 1
99+
run: exit 1

.github/workflows/check-docs.yml

Lines changed: 31 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -22,21 +22,34 @@ jobs:
2222
runs-on: ubuntu-latest
2323

2424
steps:
25-
- name: Checkout Repo
26-
uses: actions/checkout@master
27-
with:
28-
# get all history for the diff
29-
fetch-depth: 0
30-
- name: Set up Node (20)
31-
uses: actions/setup-node@v3
32-
with:
33-
node-version: 20.x
34-
- name: Yarn install
35-
run: yarn
36-
- name: Run doc generation
37-
run: yarn docgen:all
38-
- name: Check for changes in docs-devsite dir (fail if so)
39-
run: git diff --exit-code docs-devsite
40-
- name: Reference documentation needs to be updated. See message below.
41-
if: ${{ failure() }}
42-
run: echo "Changes in this PR affect the reference docs. Run \`yarn docgen:all\` locally to regenerate docs and add them to this PR."
25+
- name: Checkout Repo
26+
uses: actions/checkout@v4
27+
with:
28+
# get all history for the diff
29+
fetch-depth: 0
30+
- name: Set up Node (20)
31+
uses: actions/setup-node@v4
32+
with:
33+
node-version: 22.10.0
34+
- name: Yarn install
35+
run: yarn
36+
- name: Run doc generation
37+
run: yarn docgen:all
38+
# Fail first if there are docs-devsite changes since running yarn docgen:all
39+
# will also regenerate any API report changes.
40+
- name: Check for changes in docs-devsite dir (fail if so)
41+
run: |
42+
if [[ -n "$(git status docs-devsite --porcelain)" ]]; then
43+
echo "Unstaged changes detected in docs-devsite/:"
44+
git status -s
45+
echo "Changes in this PR affect the reference docs or API reports. Run \`yarn docgen:all\` locally to regenerate the changed files and add them to this PR."
46+
exit 1
47+
fi
48+
- name: Check for changes in common/api-review dir (fail if so)
49+
run: |
50+
if [[ -n "$(git status common/api-review --porcelain)" ]]; then
51+
echo "Unstaged changes detected in api-report(s):"
52+
git status -s
53+
echo "Changes in this PR affect the API reports. Run \`yarn build\` locally to regenerate the API reports and add them to this PR."
54+
exit 1
55+
fi

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ 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
3030
- name: Set up Node (20)
31-
uses: actions/setup-node@v3
31+
uses: actions/setup-node@v4
3232
with:
33-
node-version: 20.x
33+
node-version: 22.10.0
3434
- name: Yarn install
3535
run: yarn
3636
- name: Yarn build

0 commit comments

Comments
 (0)