Skip to content

Commit 8669742

Browse files
committed
Merge branch 'master' of https://github.com/firebase/firebase-js-sdk into tomandersen/revertTextChangeFrom6526
2 parents a594155 + 8283a55 commit 8669742

File tree

47 files changed

+127
-73
lines changed

Some content is hidden

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

47 files changed

+127
-73
lines changed

.changeset/beige-oranges-eat.md

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

.changeset/flat-cups-agree.md

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

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
if: github.event_name == 'pull_request'
3030
run: |
3131
cd packages/firestore
32-
terraform apply -var-file=../../config/project.json -auto-approve
32+
terraform apply -var-file=../../config/project.json -auto-approve &> /dev/null
3333
continue-on-error: true
3434
- name: Set up Node (16)
3535
uses: actions/setup-node@v3

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,4 +97,4 @@ toc/
9797
.terraform/*
9898
.terraform.lock.hcl
9999
*.tfstate
100-
*.tfstate.*
100+
*.tfstate.*

integration/compat-interop/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
"test:debug": "karma start --browsers Chrome --auto-watch"
99
},
1010
"dependencies": {
11-
"@firebase/app": "0.9.19",
12-
"@firebase/app-compat": "0.2.19",
11+
"@firebase/app": "0.9.20",
12+
"@firebase/app-compat": "0.2.20",
1313
"@firebase/analytics": "0.10.0",
1414
"@firebase/analytics-compat": "0.2.6",
1515
"@firebase/auth": "1.3.0",

integration/firebase/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"test:ci": "node ../../scripts/run_tests_in_ci.js -s test"
88
},
99
"devDependencies": {
10-
"firebase": "10.4.0",
10+
"firebase": "10.5.0",
1111
"@types/chai": "4.3.5",
1212
"@types/mocha": "9.1.1",
1313
"chai": "4.3.7",

integration/firestore/gulpfile.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ function copyTests() {
4242
.src(
4343
[
4444
testBase + '/integration/api/*.ts',
45+
testBase + '/integration/util/composite_index_test_helper.ts',
4546
testBase + '/integration/util/events_accumulator.ts',
4647
testBase + '/integration/util/helpers.ts',
4748
testBase + '/integration/util/settings.ts',

integration/firestore/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
"test:memory:debug": "yarn build:memory; karma start --auto-watch --browsers Chrome"
1515
},
1616
"dependencies": {
17-
"@firebase/app": "0.9.19",
18-
"@firebase/firestore": "4.2.0"
17+
"@firebase/app": "0.9.20",
18+
"@firebase/firestore": "4.3.0"
1919
},
2020
"devDependencies": {
2121
"@types/mocha": "9.1.1",

integration/messaging/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"test:manual": "mocha --exit"
1010
},
1111
"devDependencies": {
12-
"firebase": "10.4.0",
12+
"firebase": "10.5.0",
1313
"chai": "4.3.7",
1414
"chromedriver": "114.0.2",
1515
"express": "4.18.2",

packages/analytics-compat/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"@firebase/app-compat": "0.x"
2525
},
2626
"devDependencies": {
27-
"@firebase/app-compat": "0.2.19",
27+
"@firebase/app-compat": "0.2.20",
2828
"rollup": "2.79.1",
2929
"@rollup/plugin-json": "4.1.0",
3030
"rollup-plugin-typescript2": "0.31.2",

packages/analytics/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
},
4949
"license": "Apache-2.0",
5050
"devDependencies": {
51-
"@firebase/app": "0.9.19",
51+
"@firebase/app": "0.9.20",
5252
"rollup": "2.79.1",
5353
"@rollup/plugin-commonjs": "21.1.0",
5454
"@rollup/plugin-json": "4.1.0",

packages/app-check-compat/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
},
4545
"license": "Apache-2.0",
4646
"devDependencies": {
47-
"@firebase/app-compat": "0.2.19",
47+
"@firebase/app-compat": "0.2.20",
4848
"rollup": "2.79.1",
4949
"@rollup/plugin-commonjs": "21.1.0",
5050
"@rollup/plugin-json": "4.1.0",

packages/app-check/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
},
4646
"license": "Apache-2.0",
4747
"devDependencies": {
48-
"@firebase/app": "0.9.19",
48+
"@firebase/app": "0.9.20",
4949
"rollup": "2.79.1",
5050
"@rollup/plugin-commonjs": "21.1.0",
5151
"@rollup/plugin-json": "4.1.0",

packages/app-compat/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# @firebase/app-compat
22

3+
## 0.2.20
4+
5+
### Patch Changes
6+
7+
- Updated dependencies []:
8+
- @firebase/app@0.9.20
9+
310
## 0.2.19
411

512
### Patch Changes

packages/app-compat/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@firebase/app-compat",
3-
"version": "0.2.19",
3+
"version": "0.2.20",
44
"description": "The primary entrypoint to the Firebase JS SDK",
55
"author": "Firebase <[email protected]> (https://firebase.google.com/)",
66
"main": "dist/index.cjs.js",
@@ -40,7 +40,7 @@
4040
},
4141
"license": "Apache-2.0",
4242
"dependencies": {
43-
"@firebase/app": "0.9.19",
43+
"@firebase/app": "0.9.20",
4444
"@firebase/util": "1.9.3",
4545
"@firebase/logger": "0.4.0",
4646
"@firebase/component": "0.6.4",

packages/app/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# @firebase/app
22

3+
## 0.9.20
4+
5+
### Patch Changes
6+
7+
- Update SDK_VERSION.
8+
39
## 0.9.19
410

511
### Patch Changes

packages/app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@firebase/app",
3-
"version": "0.9.19",
3+
"version": "0.9.20",
44
"description": "The primary entrypoint to the Firebase JS SDK",
55
"author": "Firebase <[email protected]> (https://firebase.google.com/)",
66
"main": "dist/index.cjs.js",

packages/auth-compat/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
},
6060
"license": "Apache-2.0",
6161
"devDependencies": {
62-
"@firebase/app-compat": "0.2.19",
62+
"@firebase/app-compat": "0.2.20",
6363
"@rollup/plugin-json": "4.1.0",
6464
"rollup": "2.79.1",
6565
"rollup-plugin-replace": "2.2.0",

packages/auth/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@
120120
},
121121
"license": "Apache-2.0",
122122
"devDependencies": {
123-
"@firebase/app": "0.9.19",
123+
"@firebase/app": "0.9.20",
124124
"@rollup/plugin-json": "4.1.0",
125125
"@rollup/plugin-strip": "2.1.0",
126126
"@types/express": "4.17.17",

packages/database-compat/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
"tslib": "^2.1.0"
5959
},
6060
"devDependencies": {
61-
"@firebase/app-compat": "0.2.19",
61+
"@firebase/app-compat": "0.2.20",
6262
"typescript": "4.7.4"
6363
},
6464
"repository": {

packages/database/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
"tslib": "^2.1.0"
5858
},
5959
"devDependencies": {
60-
"@firebase/app": "0.9.19",
60+
"@firebase/app": "0.9.20",
6161
"rollup": "2.79.1",
6262
"rollup-plugin-typescript2": "0.31.2",
6363
"typescript": "4.7.4"

packages/firebase/CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
# firebase
22

3+
## 10.5.0
4+
5+
### Minor Changes
6+
7+
- [`02e2518ca`](https://github.com/firebase/firebase-js-sdk/commit/02e2518cabce16f47e4485c4c5a2a499e4d96e0c) [#7502](https://github.com/firebase/firebase-js-sdk/pull/7502) - Support sum and average aggregations.
8+
9+
- [`cca47353c`](https://github.com/firebase/firebase-js-sdk/commit/cca47353c9db1e16fa512f909525dd34920db1ba) [#7441](https://github.com/firebase/firebase-js-sdk/pull/7441) - Added a default template type parameter to withConverter() functions to improve backwards compatibility with the v9 SDK
10+
11+
### Patch Changes
12+
13+
- Updated dependencies [[`02e2518ca`](https://github.com/firebase/firebase-js-sdk/commit/02e2518cabce16f47e4485c4c5a2a499e4d96e0c), [`cca47353c`](https://github.com/firebase/firebase-js-sdk/commit/cca47353c9db1e16fa512f909525dd34920db1ba)]:
14+
- @firebase/firestore@4.3.0
15+
- @firebase/app@0.9.20
16+
- @firebase/firestore-compat@0.3.19
17+
- @firebase/app-compat@0.2.20
18+
319
## 10.4.0
420

521
### Minor Changes

packages/firebase/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "firebase",
3-
"version": "10.4.0",
3+
"version": "10.5.0",
44
"description": "Firebase JavaScript library for web and Node.js",
55
"author": "Firebase <[email protected]> (https://firebase.google.com/)",
66
"license": "Apache-2.0",
@@ -362,15 +362,15 @@
362362
"test:ci": "echo 'No test suite for firebase wrapper'"
363363
},
364364
"dependencies": {
365-
"@firebase/app": "0.9.19",
366-
"@firebase/app-compat": "0.2.19",
365+
"@firebase/app": "0.9.20",
366+
"@firebase/app-compat": "0.2.20",
367367
"@firebase/app-types": "0.9.0",
368368
"@firebase/auth": "1.3.0",
369369
"@firebase/auth-compat": "0.4.6",
370370
"@firebase/database": "1.0.1",
371371
"@firebase/database-compat": "1.0.1",
372-
"@firebase/firestore": "4.2.0",
373-
"@firebase/firestore-compat": "0.3.18",
372+
"@firebase/firestore": "4.3.0",
373+
"@firebase/firestore-compat": "0.3.19",
374374
"@firebase/functions": "0.10.0",
375375
"@firebase/functions-compat": "0.3.5",
376376
"@firebase/installations": "0.6.4",

packages/firestore-compat/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# @firebase/firestore-compat
22

3+
## 0.3.19
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [[`02e2518ca`](https://github.com/firebase/firebase-js-sdk/commit/02e2518cabce16f47e4485c4c5a2a499e4d96e0c), [`cca47353c`](https://github.com/firebase/firebase-js-sdk/commit/cca47353c9db1e16fa512f909525dd34920db1ba)]:
8+
- @firebase/firestore@4.3.0
9+
310
## 0.3.18
411

512
### Patch Changes

packages/firestore-compat/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@firebase/firestore-compat",
3-
"version": "0.3.18",
3+
"version": "0.3.19",
44
"description": "The Cloud Firestore component of the Firebase JS SDK.",
55
"author": "Firebase <[email protected]> (https://firebase.google.com/)",
66
"main": "dist/index.node.cjs.js",
@@ -48,13 +48,13 @@
4848
},
4949
"dependencies": {
5050
"@firebase/component": "0.6.4",
51-
"@firebase/firestore": "4.2.0",
51+
"@firebase/firestore": "4.3.0",
5252
"@firebase/util": "1.9.3",
5353
"@firebase/firestore-types": "3.0.0",
5454
"tslib": "^2.1.0"
5555
},
5656
"devDependencies": {
57-
"@firebase/app-compat": "0.2.19",
57+
"@firebase/app-compat": "0.2.20",
5858
"@types/eslint": "7.29.0",
5959
"rollup": "2.79.1",
6060
"rollup-plugin-sourcemaps": "0.6.3",

packages/firestore/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# @firebase/firestore
22

3+
## 4.3.0
4+
5+
### Minor Changes
6+
7+
- [`02e2518ca`](https://github.com/firebase/firebase-js-sdk/commit/02e2518cabce16f47e4485c4c5a2a499e4d96e0c) [#7502](https://github.com/firebase/firebase-js-sdk/pull/7502) - Support sum and average aggregations.
8+
9+
- [`cca47353c`](https://github.com/firebase/firebase-js-sdk/commit/cca47353c9db1e16fa512f909525dd34920db1ba) [#7441](https://github.com/firebase/firebase-js-sdk/pull/7441) - Added a default template type parameter to withConverter() functions to improve backwards compatibility with the v9 SDK
10+
311
## 4.2.0
412

513
### Minor Changes

packages/firestore/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@firebase/firestore",
3-
"version": "4.2.0",
3+
"version": "4.3.0",
44
"engines": {
55
"node": ">=10.10.0"
66
},
@@ -109,8 +109,8 @@
109109
"@firebase/app": "0.x"
110110
},
111111
"devDependencies": {
112-
"@firebase/app": "0.9.19",
113-
"@firebase/app-compat": "0.2.19",
112+
"@firebase/app": "0.9.20",
113+
"@firebase/app-compat": "0.2.20",
114114
"@firebase/auth": "1.3.0",
115115
"@rollup/plugin-alias": "3.1.9",
116116
"@rollup/plugin-json": "4.1.0",

packages/firestore/src/api.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ export { FieldPath as _FieldPath } from './model/path';
225225
export type { ResourcePath as _ResourcePath } from './model/path';
226226
export { ByteString as _ByteString } from './util/byte_string';
227227
export { logWarn as _logWarn } from './util/log';
228+
export { AutoId as _AutoId } from './util/misc';
228229
export type {
229230
AuthTokenFactory,
230231
FirstPartyCredentialsSettings

packages/firestore/src/util/misc.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ export interface Indexable {
2424
[k: string]: unknown;
2525
}
2626

27+
/**
28+
* A utility class for generating unique alphanumeric IDs of a specified length.
29+
*
30+
* @internal
31+
* Exported internally for testing purposes.
32+
*/
2733
export class AutoId {
2834
static newId(): string {
2935
// Alphanumeric characters

packages/firestore/test/integration/api/README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,21 @@ put in test/integration/api_internal instead.
99
The line "import * as firebaseExport from '../util/firebase_export';" is
1010
replaced via the gulpfile in 'integration/firestore' and should not be
1111
modified.
12+
13+
14+
## Testing composite index query against production
15+
16+
### Setting Up the Environment:
17+
1. Create a `project.json` file in the `firebase-js-sdk/config` directory. This file should contain your target Firebase project's configuration.
18+
2. If not already logged in, authenticate with your Google Cloud Platform (GCP) account using `gcloud auth application-default login`. You can check your logged-in accounts by running `gcloud auth list`.
19+
3. Navigate to the `firebase-js-sdk/packages/firestore` directory, run:
20+
```
21+
terraform init
22+
terraform apply -var-file=../../config/project.json -auto-approve
23+
```
24+
Note: If the index creation encounters issues, such as concurrent operations, consider running the index creation process again. Error messages indicating that indexes have already been created can be safely disregarded.
25+
26+
27+
### Adding new composite index query tests
28+
1. To create a new composite index for local development, click on the provided link in the test error message, which will direct you to the Firebase Console.
29+
2. Add the newly created composite index to the `firestore_index_config.tf` file. The "__name__" field is not required to be explicitly added to the file, as the index creation will auto complete it on behalf.

packages/firestore/test/integration/api/composite_index_query.test.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,10 @@ import { apiDescribe } from '../util/helpers';
3333
* and setting test documents and running queries with ease, ensuring proper data
3434
* isolation and query construction.
3535
*
36-
* Please remember to update the main index configuration file (firestore_index_config.tf)
37-
* with any new composite indexes needed for the tests. This ensures synchronization with
38-
* other testing environments, including CI. You can generate the required index link by
39-
* clicking on the Firebase console link in the error message while running tests locally.
36+
* To get started, please refer to the instructions provided in the README file. This will guide you
37+
* through setting up your local testing environment and updating the Terraform configuration with
38+
* any new composite indexes required for your testing scenarios.
4039
*/
41-
4240
apiDescribe('Composite Index Queries', persistence => {
4341
// OR Query tests only run when the SDK's local cache is configured to use
4442
// LRU garbage collection (rather than eager garbage collection) because

0 commit comments

Comments
 (0)