Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/firebase/firebase-js-sdk
Browse files Browse the repository at this point in the history
…into tomandersen/revertTextChangeFrom6526
  • Loading branch information
tom-andersen committed Oct 13, 2023
2 parents a594155 + 8283a55 commit 8669742
Show file tree
Hide file tree
Showing 47 changed files with 127 additions and 73 deletions.
6 changes: 0 additions & 6 deletions .changeset/beige-oranges-eat.md

This file was deleted.

6 changes: 0 additions & 6 deletions .changeset/flat-cups-agree.md

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/test-changed-firestore-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
if: github.event_name == 'pull_request'
run: |
cd packages/firestore
terraform apply -var-file=../../config/project.json -auto-approve
terraform apply -var-file=../../config/project.json -auto-approve &> /dev/null
continue-on-error: true
- name: Set up Node (16)
uses: actions/setup-node@v3
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,4 @@ toc/
.terraform/*
.terraform.lock.hcl
*.tfstate
*.tfstate.*
*.tfstate.*
4 changes: 2 additions & 2 deletions integration/compat-interop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"test:debug": "karma start --browsers Chrome --auto-watch"
},
"dependencies": {
"@firebase/app": "0.9.19",
"@firebase/app-compat": "0.2.19",
"@firebase/app": "0.9.20",
"@firebase/app-compat": "0.2.20",
"@firebase/analytics": "0.10.0",
"@firebase/analytics-compat": "0.2.6",
"@firebase/auth": "1.3.0",
Expand Down
2 changes: 1 addition & 1 deletion integration/firebase/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"test:ci": "node ../../scripts/run_tests_in_ci.js -s test"
},
"devDependencies": {
"firebase": "10.4.0",
"firebase": "10.5.0",
"@types/chai": "4.3.5",
"@types/mocha": "9.1.1",
"chai": "4.3.7",
Expand Down
1 change: 1 addition & 0 deletions integration/firestore/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ function copyTests() {
.src(
[
testBase + '/integration/api/*.ts',
testBase + '/integration/util/composite_index_test_helper.ts',
testBase + '/integration/util/events_accumulator.ts',
testBase + '/integration/util/helpers.ts',
testBase + '/integration/util/settings.ts',
Expand Down
4 changes: 2 additions & 2 deletions integration/firestore/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"test:memory:debug": "yarn build:memory; karma start --auto-watch --browsers Chrome"
},
"dependencies": {
"@firebase/app": "0.9.19",
"@firebase/firestore": "4.2.0"
"@firebase/app": "0.9.20",
"@firebase/firestore": "4.3.0"
},
"devDependencies": {
"@types/mocha": "9.1.1",
Expand Down
2 changes: 1 addition & 1 deletion integration/messaging/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"test:manual": "mocha --exit"
},
"devDependencies": {
"firebase": "10.4.0",
"firebase": "10.5.0",
"chai": "4.3.7",
"chromedriver": "114.0.2",
"express": "4.18.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/analytics-compat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"@firebase/app-compat": "0.x"
},
"devDependencies": {
"@firebase/app-compat": "0.2.19",
"@firebase/app-compat": "0.2.20",
"rollup": "2.79.1",
"@rollup/plugin-json": "4.1.0",
"rollup-plugin-typescript2": "0.31.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/analytics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
},
"license": "Apache-2.0",
"devDependencies": {
"@firebase/app": "0.9.19",
"@firebase/app": "0.9.20",
"rollup": "2.79.1",
"@rollup/plugin-commonjs": "21.1.0",
"@rollup/plugin-json": "4.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/app-check-compat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
},
"license": "Apache-2.0",
"devDependencies": {
"@firebase/app-compat": "0.2.19",
"@firebase/app-compat": "0.2.20",
"rollup": "2.79.1",
"@rollup/plugin-commonjs": "21.1.0",
"@rollup/plugin-json": "4.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/app-check/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
},
"license": "Apache-2.0",
"devDependencies": {
"@firebase/app": "0.9.19",
"@firebase/app": "0.9.20",
"rollup": "2.79.1",
"@rollup/plugin-commonjs": "21.1.0",
"@rollup/plugin-json": "4.1.0",
Expand Down
7 changes: 7 additions & 0 deletions packages/app-compat/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @firebase/app-compat

## 0.2.20

### Patch Changes

- Updated dependencies []:
- @firebase/app@0.9.20

## 0.2.19

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/app-compat/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@firebase/app-compat",
"version": "0.2.19",
"version": "0.2.20",
"description": "The primary entrypoint to the Firebase JS SDK",
"author": "Firebase <[email protected]> (https://firebase.google.com/)",
"main": "dist/index.cjs.js",
Expand Down Expand Up @@ -40,7 +40,7 @@
},
"license": "Apache-2.0",
"dependencies": {
"@firebase/app": "0.9.19",
"@firebase/app": "0.9.20",
"@firebase/util": "1.9.3",
"@firebase/logger": "0.4.0",
"@firebase/component": "0.6.4",
Expand Down
6 changes: 6 additions & 0 deletions packages/app/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @firebase/app

## 0.9.20

### Patch Changes

- Update SDK_VERSION.

## 0.9.19

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@firebase/app",
"version": "0.9.19",
"version": "0.9.20",
"description": "The primary entrypoint to the Firebase JS SDK",
"author": "Firebase <[email protected]> (https://firebase.google.com/)",
"main": "dist/index.cjs.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/auth-compat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
},
"license": "Apache-2.0",
"devDependencies": {
"@firebase/app-compat": "0.2.19",
"@firebase/app-compat": "0.2.20",
"@rollup/plugin-json": "4.1.0",
"rollup": "2.79.1",
"rollup-plugin-replace": "2.2.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
},
"license": "Apache-2.0",
"devDependencies": {
"@firebase/app": "0.9.19",
"@firebase/app": "0.9.20",
"@rollup/plugin-json": "4.1.0",
"@rollup/plugin-strip": "2.1.0",
"@types/express": "4.17.17",
Expand Down
2 changes: 1 addition & 1 deletion packages/database-compat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"tslib": "^2.1.0"
},
"devDependencies": {
"@firebase/app-compat": "0.2.19",
"@firebase/app-compat": "0.2.20",
"typescript": "4.7.4"
},
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion packages/database/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"tslib": "^2.1.0"
},
"devDependencies": {
"@firebase/app": "0.9.19",
"@firebase/app": "0.9.20",
"rollup": "2.79.1",
"rollup-plugin-typescript2": "0.31.2",
"typescript": "4.7.4"
Expand Down
16 changes: 16 additions & 0 deletions packages/firebase/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# firebase

## 10.5.0

### Minor Changes

- [`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.

- [`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

### Patch Changes

- Updated dependencies [[`02e2518ca`](https://github.com/firebase/firebase-js-sdk/commit/02e2518cabce16f47e4485c4c5a2a499e4d96e0c), [`cca47353c`](https://github.com/firebase/firebase-js-sdk/commit/cca47353c9db1e16fa512f909525dd34920db1ba)]:
- @firebase/firestore@4.3.0
- @firebase/app@0.9.20
- @firebase/firestore-compat@0.3.19
- @firebase/app-compat@0.2.20

## 10.4.0

### Minor Changes
Expand Down
10 changes: 5 additions & 5 deletions packages/firebase/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "firebase",
"version": "10.4.0",
"version": "10.5.0",
"description": "Firebase JavaScript library for web and Node.js",
"author": "Firebase <[email protected]> (https://firebase.google.com/)",
"license": "Apache-2.0",
Expand Down Expand Up @@ -362,15 +362,15 @@
"test:ci": "echo 'No test suite for firebase wrapper'"
},
"dependencies": {
"@firebase/app": "0.9.19",
"@firebase/app-compat": "0.2.19",
"@firebase/app": "0.9.20",
"@firebase/app-compat": "0.2.20",
"@firebase/app-types": "0.9.0",
"@firebase/auth": "1.3.0",
"@firebase/auth-compat": "0.4.6",
"@firebase/database": "1.0.1",
"@firebase/database-compat": "1.0.1",
"@firebase/firestore": "4.2.0",
"@firebase/firestore-compat": "0.3.18",
"@firebase/firestore": "4.3.0",
"@firebase/firestore-compat": "0.3.19",
"@firebase/functions": "0.10.0",
"@firebase/functions-compat": "0.3.5",
"@firebase/installations": "0.6.4",
Expand Down
7 changes: 7 additions & 0 deletions packages/firestore-compat/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @firebase/firestore-compat

## 0.3.19

### Patch Changes

- Updated dependencies [[`02e2518ca`](https://github.com/firebase/firebase-js-sdk/commit/02e2518cabce16f47e4485c4c5a2a499e4d96e0c), [`cca47353c`](https://github.com/firebase/firebase-js-sdk/commit/cca47353c9db1e16fa512f909525dd34920db1ba)]:
- @firebase/firestore@4.3.0

## 0.3.18

### Patch Changes
Expand Down
6 changes: 3 additions & 3 deletions packages/firestore-compat/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@firebase/firestore-compat",
"version": "0.3.18",
"version": "0.3.19",
"description": "The Cloud Firestore component of the Firebase JS SDK.",
"author": "Firebase <[email protected]> (https://firebase.google.com/)",
"main": "dist/index.node.cjs.js",
Expand Down Expand Up @@ -48,13 +48,13 @@
},
"dependencies": {
"@firebase/component": "0.6.4",
"@firebase/firestore": "4.2.0",
"@firebase/firestore": "4.3.0",
"@firebase/util": "1.9.3",
"@firebase/firestore-types": "3.0.0",
"tslib": "^2.1.0"
},
"devDependencies": {
"@firebase/app-compat": "0.2.19",
"@firebase/app-compat": "0.2.20",
"@types/eslint": "7.29.0",
"rollup": "2.79.1",
"rollup-plugin-sourcemaps": "0.6.3",
Expand Down
8 changes: 8 additions & 0 deletions packages/firestore/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# @firebase/firestore

## 4.3.0

### Minor Changes

- [`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.

- [`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

## 4.2.0

### Minor Changes
Expand Down
6 changes: 3 additions & 3 deletions packages/firestore/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@firebase/firestore",
"version": "4.2.0",
"version": "4.3.0",
"engines": {
"node": ">=10.10.0"
},
Expand Down Expand Up @@ -109,8 +109,8 @@
"@firebase/app": "0.x"
},
"devDependencies": {
"@firebase/app": "0.9.19",
"@firebase/app-compat": "0.2.19",
"@firebase/app": "0.9.20",
"@firebase/app-compat": "0.2.20",
"@firebase/auth": "1.3.0",
"@rollup/plugin-alias": "3.1.9",
"@rollup/plugin-json": "4.1.0",
Expand Down
1 change: 1 addition & 0 deletions packages/firestore/src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ export { FieldPath as _FieldPath } from './model/path';
export type { ResourcePath as _ResourcePath } from './model/path';
export { ByteString as _ByteString } from './util/byte_string';
export { logWarn as _logWarn } from './util/log';
export { AutoId as _AutoId } from './util/misc';
export type {
AuthTokenFactory,
FirstPartyCredentialsSettings
Expand Down
6 changes: 6 additions & 0 deletions packages/firestore/src/util/misc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ export interface Indexable {
[k: string]: unknown;
}

/**
* A utility class for generating unique alphanumeric IDs of a specified length.
*
* @internal
* Exported internally for testing purposes.
*/
export class AutoId {
static newId(): string {
// Alphanumeric characters
Expand Down
18 changes: 18 additions & 0 deletions packages/firestore/test/integration/api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,21 @@ put in test/integration/api_internal instead.
The line "import * as firebaseExport from '../util/firebase_export';" is
replaced via the gulpfile in 'integration/firestore' and should not be
modified.


## Testing composite index query against production

### Setting Up the Environment:
1. Create a `project.json` file in the `firebase-js-sdk/config` directory. This file should contain your target Firebase project's configuration.
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`.
3. Navigate to the `firebase-js-sdk/packages/firestore` directory, run:
```
terraform init
terraform apply -var-file=../../config/project.json -auto-approve
```
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.


### Adding new composite index query tests
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.
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.
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,10 @@ import { apiDescribe } from '../util/helpers';
* and setting test documents and running queries with ease, ensuring proper data
* isolation and query construction.
*
* Please remember to update the main index configuration file (firestore_index_config.tf)
* with any new composite indexes needed for the tests. This ensures synchronization with
* other testing environments, including CI. You can generate the required index link by
* clicking on the Firebase console link in the error message while running tests locally.
* To get started, please refer to the instructions provided in the README file. This will guide you
* through setting up your local testing environment and updating the Terraform configuration with
* any new composite indexes required for your testing scenarios.
*/

apiDescribe('Composite Index Queries', persistence => {
// OR Query tests only run when the SDK's local cache is configured to use
// LRU garbage collection (rather than eager garbage collection) because
Expand Down
Loading

0 comments on commit 8669742

Please sign in to comment.