Skip to content

Commit 091e573

Browse files
Merge master into release
2 parents 7272e7b + 1076551 commit 091e573

Some content is hidden

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

56 files changed

+1397
-633
lines changed

.changeset/calm-pugs-leave.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+
Prevent core app from throwing if IndexedDB heartbeat functions throw.

.changeset/five-yaks-travel.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+
Add internal implementation of setIndexConfiguration

.changeset/honest-waves-brake.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+
Expose client side indexing feature with `setIndexConfiguration`.

.changeset/kind-pots-admire.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@firebase/database': patch
3+
'@firebase/database-compat': patch
4+
'@firebase/database-types': patch
5+
---
6+
7+
Updated type of action parameter for DataSnapshot#forEach

.github/workflows/check-changeset.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
name: Check Changeset
22

3-
on: pull_request
3+
on:
4+
pull_request:
5+
branches-ignore:
6+
- release
47

58
env:
69
GITHUB_PULL_REQUEST_HEAD_SHA: ${{ github.event.pull_request.head.sha }}

.github/workflows/release-prod.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
name: Production Release
22

3-
on: workflow_dispatch
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
release-branch:
7+
description: 'Release branch'
8+
type: string
9+
default: 'release'
10+
required: true
411

512
jobs:
613
deploy:
@@ -20,7 +27,7 @@ jobs:
2027
with:
2128
# Release script requires git history and tags.
2229
fetch-depth: 0
23-
ref: release
30+
ref: ${{ github.event.inputs.release-branch }}
2431
token: ${{ secrets.OSS_BOT_GITHUB_TOKEN }}
2532
- name: Yarn install
2633
run: yarn

.github/workflows/test-changed.yml

Lines changed: 55 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,61 @@ name: Test Modified Packages
33
on: pull_request
44

55
jobs:
6-
test:
7-
name: Test Packages With Changed Files
6+
test-chrome:
7+
name: Test Packages With Changed Files in Chrome and Node
88
runs-on: ubuntu-latest
99

1010
steps:
11-
- name: Checkout Repo
12-
uses: actions/checkout@master
13-
with:
14-
# This makes Actions fetch all Git history so run-changed script can diff properly.
15-
fetch-depth: 0
16-
- name: Set up Node (14)
17-
uses: actions/setup-node@v2
18-
with:
19-
node-version: 14.x
20-
- name: install Chrome stable
21-
run: |
22-
sudo apt-get update
23-
sudo apt-get install google-chrome-stable
24-
- name: Bump Node memory limit
25-
run: echo "NODE_OPTIONS=--max_old_space_size=4096" >> $GITHUB_ENV
26-
- name: Test setup and yarn install
27-
run: |
28-
cp config/ci.config.json config/project.json
29-
yarn
30-
- name: build
31-
run: yarn build:changed core
32-
- name: Run tests on changed packages
33-
run: xvfb-run yarn test:changed core
11+
- name: Checkout Repo
12+
uses: actions/checkout@master
13+
with:
14+
# This makes Actions fetch all Git history so run-changed script can diff properly.
15+
fetch-depth: 0
16+
- name: Set up Node (14)
17+
uses: actions/setup-node@v2
18+
with:
19+
node-version: 14.x
20+
- name: install Chrome stable
21+
run: |
22+
sudo apt-get update
23+
sudo apt-get install google-chrome-stable
24+
- name: Bump Node memory limit
25+
run: echo "NODE_OPTIONS=--max_old_space_size=4096" >> $GITHUB_ENV
26+
- name: Test setup and yarn install
27+
run: |
28+
cp config/ci.config.json config/project.json
29+
yarn
30+
- name: build
31+
run: yarn build:changed core
32+
- name: Run tests on changed packages
33+
run: xvfb-run yarn test:changed core
34+
35+
test-firefox:
36+
name: Test Packages With Changed Files in Firefox
37+
runs-on: ubuntu-latest
38+
39+
steps:
40+
- name: Checkout Repo
41+
uses: actions/checkout@master
42+
with:
43+
fetch-depth: 0
44+
- name: Set up Node (14)
45+
uses: actions/setup-node@v2
46+
with:
47+
node-version: 14.x
48+
- name: install Firefox stable
49+
run: |
50+
sudo apt-get update
51+
sudo apt-get install firefox
52+
- name: Bump Node memory limit
53+
run: echo "NODE_OPTIONS=--max_old_space_size=4096" >> $GITHUB_ENV
54+
- name: Test setup and yarn install
55+
run: |
56+
cp config/ci.config.json config/project.json
57+
yarn
58+
- name: build
59+
run: yarn build:changed core
60+
- name: Run tests on changed packages
61+
run: xvfb-run yarn test:changed core
62+
env:
63+
BROWSERS: 'Firefox'

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,4 +93,5 @@ tsdoc-metadata.json
9393

9494
# generated html docs
9595
docs-*/
96-
docs/
96+
docs/
97+
toc/

common/api-review/database.api.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ export class DataSnapshot {
3333
child(path: string): DataSnapshot;
3434
exists(): boolean;
3535
exportVal(): any;
36-
forEach(action: (child: DataSnapshot) => boolean | void): boolean;
36+
forEach(action: (child: DataSnapshot & {
37+
key: string;
38+
}) => boolean | void): boolean;
3739
hasChild(path: string): boolean;
3840
hasChildren(): boolean;
3941
get key(): string | null;

common/api-review/firestore.api.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,30 @@ export function getFirestore(app?: FirebaseApp): Firestore;
233233
// @public
234234
export function increment(n: number): FieldValue;
235235

236+
// @public
237+
export interface Index {
238+
// (undocumented)
239+
[key: string]: unknown;
240+
readonly collectionGroup: string;
241+
readonly fields?: IndexField[];
242+
}
243+
244+
// @public
245+
export interface IndexConfiguration {
246+
// (undocumented)
247+
[key: string]: unknown;
248+
readonly indexes?: Index[];
249+
}
250+
251+
// @public
252+
export interface IndexField {
253+
// (undocumented)
254+
[key: string]: unknown;
255+
readonly arrayConfig?: 'CONTAINS';
256+
readonly fieldPath: string;
257+
readonly order?: 'ASCENDING' | 'DESCENDING';
258+
}
259+
236260
// @public
237261
export function initializeFirestore(app: FirebaseApp, settings: FirestoreSettings): Firestore;
238262

@@ -396,6 +420,12 @@ export function setDoc<T>(reference: DocumentReference<T>, data: WithFieldValue<
396420
// @public
397421
export function setDoc<T>(reference: DocumentReference<T>, data: PartialWithFieldValue<T>, options: SetOptions): Promise<void>;
398422

423+
// @public
424+
export function setIndexConfiguration(firestore: Firestore, configuration: IndexConfiguration): Promise<void>;
425+
426+
// @public
427+
export function setIndexConfiguration(firestore: Firestore, json: string): Promise<void>;
428+
399429
// @public
400430
export function setLogLevel(logLevel: LogLevel): void;
401431

0 commit comments

Comments
 (0)