Skip to content

Commit cd9ccb9

Browse files
Merge master into release
2 parents 05d06a8 + 991fa27 commit cd9ccb9

File tree

166 files changed

+3089
-1860
lines changed

Some content is hidden

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

166 files changed

+3089
-1860
lines changed

.changeset/cold-carpets-sing.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@firebase/firestore": patch
3+
---
4+
5+
Fixed leak of grpc-js resources on terminate.

.changeset/good-seals-promise.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@firebase/app': patch
3+
---
4+
5+
Catch possible error in Safari browsers.

.changeset/itchy-chicken-cry.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
---

.changeset/long-rats-walk.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
---

.changeset/quick-peas-guess.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
---

.changeset/shaggy-garlics-leave.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@firebase/firestore": patch
3+
---
4+
5+
Support special characters in query paths sent to `getCountFromServer(...)`, `getCount(...)` (lite API), and `getDocs(...)` (lite API).

.changeset/witty-comics-rule.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'firebase': patch
3+
'@firebase/firestore': patch
4+
---
5+
6+
Tweak the automatic index creation parameters to use more optimal values for the platform/browser detected at runtime.

.changeset/yellow-houses-happen.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+
Update the `isEqual` function for arrayUnion, arrayRemove and increment.

.github/CODEOWNERS

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ packages/messaging-interop-types @zwu52 @firebase/jssdk-global-approvers
3434
integration/messaging @zwu52 @firebase/jssdk-global-approvers
3535

3636
# Auth Code
37-
packages/auth @lisajian @prameshj @renkelvin @sam-gc @firebase/jssdk-global-approvers
38-
packages/auth-compat @lisajian @prameshj @renkelvin @sam-gc @firebase/jssdk-global-approvers
39-
packages/auth-types @lisajian @prameshj @renkelvin @sam-gc @firebase/jssdk-global-approvers
40-
packages/auth-interop-types @lisajian @prameshj @renkelvin @sam-gc @firebase/jssdk-global-approvers
37+
packages/auth @lisajian @Xiaoshouzi-gh @renkelvin @sam-gc @firebase/jssdk-global-approvers
38+
packages/auth-compat @lisajian @Xiaoshouzi-gh @renkelvin @sam-gc @firebase/jssdk-global-approvers
39+
packages/auth-types @lisajian @Xiaoshouzi-gh @renkelvin @sam-gc @firebase/jssdk-global-approvers
40+
packages/auth-interop-types @lisajian @Xiaoshouzi-gh @renkelvin @sam-gc @firebase/jssdk-global-approvers
4141

4242
# Testing Code
4343
packages/rules-unit-testing @avolkovi @sam-gc @yuchenshi @firebase/jssdk-global-approvers

.github/workflows/deploy-config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ jobs:
3434
with:
3535
# This makes Actions fetch all Git history so run-changed script can diff properly.
3636
fetch-depth: 0
37-
- name: Set up node (16)
37+
- name: Set up node (18)
3838
uses: actions/setup-node@v3
3939
with:
40-
node-version: 16.x
40+
node-version: 18.x
4141
- name: Yarn install
4242
run: yarn
4343
- name: Deploy project config if needed

.github/workflows/e2e-test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ jobs:
3636
steps:
3737
- name: Checkout Repo
3838
uses: actions/checkout@master
39-
- name: Set up Node (16)
39+
- name: Set up Node (18)
4040
uses: actions/setup-node@master
4141
with:
42-
node-version: 16.x
42+
node-version: 18.x
4343
- name: install Chrome stable
4444
run: |
4545
sudo apt-get update
@@ -60,7 +60,7 @@ jobs:
6060
pushd functions
6161
npm install
6262
popd
63-
npx firebase-tools deploy --only functions:callTest --project jscore-sandbox-141b5 --token $FIREBASE_CLI_TOKEN
63+
npx firebase-tools@13.0.2 deploy --only functions:callTest --project jscore-sandbox-141b5 --token $FIREBASE_CLI_TOKEN
6464
working-directory: ./config
6565
env:
6666
FIREBASE_CLI_TOKEN: ${{ secrets.FIREBASE_CLI_TOKEN }}

.github/workflows/test-all.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ env:
2525
# the beahvior to use the new URLs.
2626
CHROMEDRIVER_CDNURL: https://googlechromelabs.github.io/
2727
CHROMEDRIVER_CDNBINARIESURL: https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/
28+
CHROME_VALIDATED_VERSION: linux-120.0.6099.71
29+
CHROME_VERSION_MISMATCH_MESSAGE: "The Chrome version doesn't match the previously validated version. Consider updating CHROME_VALIDATED_VERSION in the GitHub workflow if tests pass."
2830
artifactRetentionDays: 14
2931
# Bump Node memory limit
3032
NODE_OPTIONS: "--max_old_space_size=4096"
@@ -115,6 +117,15 @@ jobs:
115117
- name: install Chrome stable
116118
run: |
117119
npx @puppeteer/browsers install chrome@stable
120+
chromeVersionString=$(ls chrome)
121+
if [ "$CHROME_VALIDATED_VERSION" != "$chromeVersionString" ]; then
122+
echo "::warning ::The Chrome version doesn't match the previously validated version. Consider updating CHROME_VALIDATED_VERSION in the GitHub workflow if tests pass."
123+
echo "::warning ::Previously validated version: ${CHROME_VALIDATED_VERSION} vs. Installed version: $chromeVersionString"
124+
echo "CHROME_VERSION_NOTES=$CHROME_VERSION_MISMATCH_MESSAGE" >> "$GITHUB_ENV"
125+
fi
126+
- name: Test Evn TEMP
127+
run: |
128+
echo $CHROME_VERSION_NOTES=$CHROME_VERSION_MISMATCH_MESSAGE
118129
- name: Download build archive
119130
uses: actions/download-artifact@v3
120131
with:

.github/workflows/test-changed-auth.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
name: Test Auth
1616

17-
on: pull_request
17+
on: [push, pull_request]
1818

1919
env:
2020
# make chromedriver detect installed Chrome version and download the corresponding driver
@@ -23,20 +23,34 @@ env:
2323
# the beahvior to use the new URLs.
2424
CHROMEDRIVER_CDNURL: https://googlechromelabs.github.io/
2525
CHROMEDRIVER_CDNBINARIESURL: https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/
26+
CHROME_VALIDATED_VERSION: linux-120.0.6099.71
2627
# Bump Node memory limit
2728
NODE_OPTIONS: "--max_old_space_size=4096"
2829

2930
jobs:
3031
test-chrome:
3132
name: Test Auth on Chrome and Node If Changed
3233
runs-on: ubuntu-latest
33-
3434
steps:
3535
# install Chrome first, so the correct version of webdriver can be installed by chromedriver
3636
# when setting up the repo
37+
#
38+
# Note: we only need to check the chrome version change in one job as the warning annotation
39+
# is appended to the entire workflow results, not just this job's results.
3740
- name: install Chrome stable
41+
env:
42+
CHROME_VERSION_MISMATCH_MESSAGE: "The Chrome version doesn't match the previously validated version. Consider updating CHROME_VALIDATED_VERSION in the GitHub workflow if tests pass."
3843
run: |
3944
npx @puppeteer/browsers install chrome@stable
45+
chromeVersionString=$(ls chrome)
46+
if [ "$CHROME_VALIDATED_VERSION" != "$chromeVersionString" ]; then
47+
echo "::warning ::The Chrome version doesn't match the previously validated version. Consider updating CHROME_VALIDATED_VERSION in the GitHub workflow if tests pass."
48+
echo "::warning ::Previously validated version: ${CHROME_VALIDATED_VERSION} vs. Installed version: $chromeVersionString"
49+
echo "CHROME_VERSION_NOTES=$CHROME_VERSION_MISMATCH_MESSAGE" >> "$GITHUB_ENV"
50+
fi
51+
- name: Test Evn TEMP
52+
run: |
53+
echo $CHROME_VERSION_NOTES=$CHROME_VERSION_MISMATCH_MESSAGE
4054
- name: Checkout Repo
4155
uses: actions/checkout@master
4256
with:

.github/workflows/test-changed-firestore.yml

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@
1414

1515
name: Test Firestore
1616

17-
on: pull_request
17+
on:
18+
workflow_dispatch:
19+
pull_request:
1820

1921
env:
2022
artifactRetentionDays: 14
@@ -131,6 +133,40 @@ jobs:
131133
env:
132134
EXPERIMENTAL_MODE: true
133135

136+
test-firestore-nightly-with-chrome:
137+
name: Test Nightly Firestore with Chrome
138+
strategy:
139+
matrix:
140+
test-name: ["test:browser:nightly"]
141+
runs-on: ubuntu-latest
142+
needs: build
143+
if: ${{ github.event_name != 'pull_request' }}
144+
steps:
145+
- name: Set up Node (16)
146+
uses: actions/setup-node@v3
147+
with:
148+
node-version: 16.x
149+
- name: install Chrome stable
150+
run: |
151+
sudo apt-get update
152+
sudo apt-get install google-chrome-stable
153+
- name: Download build archive
154+
uses: actions/download-artifact@v3
155+
with:
156+
name: build.tar.gz
157+
- name: Unzip build artifact
158+
run: tar xf build.tar.gz
159+
- name: Test setup against nightly Firestore
160+
env:
161+
INTEG_TESTS_GOOGLE_SERVICES: ${{ secrets.FIRESTORE_SDK_NIGHTLY_PROJECT_JSON }}
162+
run: |
163+
echo $INTEG_TESTS_GOOGLE_SERVICES > config/project.json
164+
- name: Run tests
165+
run: cd packages/firestore && yarn run ${{ matrix.test-name }}
166+
env:
167+
EXPERIMENTAL_MODE: true
168+
169+
134170
compat-test-firefox:
135171
name: Test Firestore Compatible on Firefox
136172
# Whatever version of Firefox comes with 22.04 is causing Firefox

CONTRIBUTING.md

Lines changed: 8 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -221,49 +221,25 @@ formatting guidelines. In your local build environment, please run the code form
221221
by executing the command `yarn format`. Once the code is formatted, commit the changes and push your
222222
branch. The push should cause the CI to re-check your PR's changes.
223223

224-
### Generating Documentation HTML Files
224+
# Generating Documentation HTML Files
225225

226226
If the Doc Change Check fails in your PR, it indicates that the documentation has not been generated
227-
correctly for the changes. In your local build environment, please run `yarn docgen devsite` to
228-
generate the documentation locally. Once the documentation has been generated, commit the changes
229-
and push your branch. The push should cause the CI to re-check your PR's changes.
230-
231-
In order to generate the HTML documentation files locally, go to the root of this repo, and run:
232-
233-
```
234-
yarn install
235-
yarn docgen
236-
```
237-
238-
This will generate both js and node (client) reference docs. To just generate js
239-
docs, replace the last line with:
227+
correctly for the changes. In your local build environment, please run the following commands in the
228+
root directory to generate the documentation locally:
240229

241230
```
242-
yarn docgen:js
231+
yarn
232+
yarn docgen devsite
243233
```
244234

245-
To just generate node docs, replace the last line with:
246-
247-
```
248-
yarn docgen:node
249-
```
250-
251-
Files will be written to `scripts/docgen/html` - js docs will go into the `/js`
252-
subdirectory and node docs into the `/node` subdirectory.
235+
This will generate reference docs in `docs-devsite/`. Commit and push the generated
236+
documentation changes to GitHub following the [PR submission guidelines](#submit). Your push
237+
to the remote repository should force any failing documentation checks to execute again.
253238

254239
**NOTE:** These files are formatted to be inserted into Google's documentation site, which adds some
255240
styling and navigation, so the raw files will be missing navigation elements and may not look
256241
polished. However, it should be enough to preview the content.
257242
258-
This process will generate warnings for files that are generated but not listed in the `toc.yaml`,
259-
or files that are in the `toc.yaml` but were not generated (which means something is missing in
260-
`index.d.ts`). If this happens during the JS documentation generation, it probably means either the
261-
`toc.yaml` or `index.d.ts` is incorrect. But in the Node process, some generated files not being
262-
found in `toc.yaml` are to be expected, since Node documentation is a subset of the full JS
263-
documentation.
264-
265-
Follow the [PR submission guidelines](#submit) above to submit any documentation changes.
266-
267243
[archive]: https://github.com/firebase/firebase-js-sdk/issues?utf8=%E2%9C%93&q=is%3Aissue
268244
[file-an-issue]: https://github.com/firebase/firebase-js-sdk/issues/new
269245
[firebase-google-group]: https://groups.google.com/forum/#!forum/firebase-talk

config/firebase.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,8 @@
55
"firestore": {
66
"rules": "firestore.rules",
77
"indexes": "firestore.indexes.json"
8+
},
9+
"functions": {
10+
"runtime": "nodejs18"
811
}
912
}

0 commit comments

Comments
 (0)