Skip to content

Commit 494f8c4

Browse files
Merge
2 parents 5e615d8 + 3d43b00 commit 494f8c4

File tree

40 files changed

+526
-155
lines changed

40 files changed

+526
-155
lines changed

.changeset/firebsae-messaging.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
---
3+
4+
Update testing policy. Since this is neither a major nor minor update use an empty changeset.

.changeset/perfect-carpets-chew.md

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

.changeset/poor-eggs-bow.md

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

.changeset/popular-beds-yell.md

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

.changeset/popular-beds-yell2.md

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

.changeset/quiet-coats-type.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'firebase': minor
3+
'@firebase/firestore': minor
4+
'@firebase/firestore-types': minor
5+
---
6+
7+
Added support for `set()` with merge options when using `FirestoreDataConverter`.

.changeset/twelve-pets-joke.md

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

.github/workflows/changesets.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ jobs:
1212
steps:
1313
- name: Checkout Repo
1414
uses: actions/checkout@master
15+
with:
16+
## fetch all history for all branches and tags, so we can compare with master
17+
fetch-depth: 0
1518

1619
- name: Setup Node.js 12.x
1720
uses: actions/setup-node@master
@@ -22,4 +25,4 @@ jobs:
2225
run: yarn
2326

2427
- name: Check if any Changeset file exists
25-
run: yarn changeset status --since=master
28+
run: yarn changeset status --since=origin/master

CONTRIBUTING.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,40 @@ Before you start working on a larger contribution, you should get in touch with
9797
```
9898

9999
* In GitHub, send a pull request to `firebase-js-sdk:master`.
100+
* Add changeset. See [Adding changeset to PR](#adding-changeset-to-pr)
100101
* All pull requests must be reviewed by a member of the Firebase JS SDK team, who will merge it when/if they feel it is good to go.
101102

102103
That's it! Thank you for your contribution!
103104
105+
#### Adding changeset to PR
106+
Every PR that would trigger a release should include a changeset file. To make
107+
this process easy, a message will be sent to every PR with a link that you can
108+
click to add changeset files in the Github UI directly.
109+
[Example message](https://github.com/firebase/firebase-js-sdk/pull/3284#issuecomment-649718617).
110+
111+
#### What to include in the changset file
112+
113+
You should include the version bump for your package as well as the description
114+
for the change. Valid version bump types are `patch`, `minor` and `major`.
115+
Please always include the `firebase` package with the same version bump type as
116+
your package. This is to ensure that the version of the `firebase` package will
117+
be bumped correctly. For example,
118+
119+
```
120+
---
121+
"@firebase/storage": minor
122+
"firebase": minor
123+
---
124+
125+
This is a test.
126+
```
127+
128+
#### Multiple changeset files
129+
130+
If your PR touches multiple SDKs or addresses multiple issues that require
131+
different version bump or different description, you can create multiple
132+
changeset files in the PR.
133+
104134
## <a name="docs"></a> Updating Documentation
105135
106136
Reference docs for the Firebase [JS SDK](https://firebase.google.com/docs/reference/js/) and [Node (client) SDK](https://firebase.google.com/docs/reference/node/) are generated by [Typedoc](https://typedoc.org/).

integration/browserify/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"test:ci": "node ../../scripts/run_tests_in_ci.js"
99
},
1010
"devDependencies": {
11-
"firebase": "7.15.4",
11+
"firebase": "7.15.5",
1212
"@babel/core": "7.9.6",
1313
"@babel/preset-env": "7.9.6",
1414
"browserify": "16.5.1",

integration/firebase-typings/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"
88
},
99
"devDependencies": {
10-
"firebase": "7.15.4",
10+
"firebase": "7.15.5",
1111
"typescript": "3.8.3"
1212
}
1313
}

integration/messaging/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"test:manual": "mocha --exit"
99
},
1010
"devDependencies": {
11-
"firebase": "7.15.4",
11+
"firebase": "7.15.5",
1212
"chai": "4.2.0",
1313
"chromedriver": "^83.0.0",
1414
"express": "4.17.1",

integration/typescript/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"
88
},
99
"devDependencies": {
10-
"firebase": "7.15.4",
10+
"firebase": "7.15.5",
1111
"@babel/core": "7.9.6",
1212
"@babel/preset-env": "7.9.6",
1313
"@types/chai": "4.2.11",

integration/webpack/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"test:ci": "node ../../scripts/run_tests_in_ci.js"
99
},
1010
"devDependencies": {
11-
"firebase": "7.15.4",
11+
"firebase": "7.15.5",
1212
"@babel/core": "7.9.6",
1313
"@babel/preset-env": "7.9.6",
1414
"chai": "4.2.0",

packages-exp/app-exp/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@
3333
},
3434
"dependencies": {
3535
"@firebase/app-types-exp": "0.0.800",
36-
"@firebase/util": "0.2.49",
36+
"@firebase/util": "0.2.50",
3737
"@firebase/logger": "0.2.5",
38-
"@firebase/component": "0.1.14",
38+
"@firebase/component": "0.1.15",
3939
"tslib": "^1.11.1"
4040
},
4141
"license": "Apache-2.0",

packages-exp/functions-exp/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@
5151
},
5252
"typings": "dist/index.d.ts",
5353
"dependencies": {
54-
"@firebase/component": "0.1.14",
54+
"@firebase/component": "0.1.15",
5555
"@firebase/functions-types-exp": "0.0.800",
56-
"@firebase/messaging": "0.6.18",
56+
"@firebase/messaging": "0.6.19",
5757
"@firebase/messaging-types": "0.4.5",
58-
"@firebase/util": "0.2.49",
58+
"@firebase/util": "0.2.50",
5959
"isomorphic-fetch": "2.2.1",
6060
"tslib": "1.11.1"
6161
},
@@ -65,4 +65,4 @@
6565
],
6666
"reportDir": "./coverage/node"
6767
}
68-
}
68+
}

packages/analytics/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@firebase/analytics",
3-
"version": "0.3.7",
3+
"version": "0.3.8",
44
"description": "A analytics package for new firebase packages",
55
"author": "Firebase <[email protected]> (https://firebase.google.com/)",
66
"main": "dist/index.cjs.js",
@@ -27,10 +27,10 @@
2727
},
2828
"dependencies": {
2929
"@firebase/analytics-types": "0.3.1",
30-
"@firebase/installations": "0.4.12",
30+
"@firebase/installations": "0.4.13",
3131
"@firebase/logger": "0.2.5",
32-
"@firebase/util": "0.2.49",
33-
"@firebase/component": "0.1.14",
32+
"@firebase/util": "0.2.50",
33+
"@firebase/component": "0.1.15",
3434
"tslib": "^1.11.1"
3535
},
3636
"license": "Apache-2.0",

packages/app/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@firebase/app",
3-
"version": "0.6.6",
3+
"version": "0.6.7",
44
"description": "The primary entrypoint to the Firebase JS SDK",
55
"author": "Firebase <[email protected]> (https://firebase.google.com/)",
66
"main": "dist/index.node.cjs.js",
@@ -30,9 +30,9 @@
3030
"license": "Apache-2.0",
3131
"dependencies": {
3232
"@firebase/app-types": "0.6.1",
33-
"@firebase/util": "0.2.49",
33+
"@firebase/util": "0.2.50",
3434
"@firebase/logger": "0.2.5",
35-
"@firebase/component": "0.1.14",
35+
"@firebase/component": "0.1.15",
3636
"tslib": "^1.11.1",
3737
"dom-storage": "2.1.0",
3838
"xmlhttprequest": "1.8.0"

packages/component/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@firebase/component",
3-
"version": "0.1.14",
3+
"version": "0.1.15",
44
"description": "Firebase Component Platform",
55
"author": "Firebase <[email protected]> (https://firebase.google.com/)",
66
"main": "dist/index.cjs.js",
@@ -24,7 +24,7 @@
2424
"prepare": "yarn build"
2525
},
2626
"dependencies": {
27-
"@firebase/util": "0.2.49",
27+
"@firebase/util": "0.2.50",
2828
"tslib": "^1.11.1"
2929
},
3030
"license": "Apache-2.0",

packages/database/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@firebase/database",
3-
"version": "0.6.5",
3+
"version": "0.6.6",
44
"description": "",
55
"author": "Firebase <[email protected]> (https://firebase.google.com/)",
66
"main": "dist/index.node.cjs.js",
@@ -29,14 +29,14 @@
2929
"dependencies": {
3030
"@firebase/database-types": "0.5.1",
3131
"@firebase/logger": "0.2.5",
32-
"@firebase/util": "0.2.49",
33-
"@firebase/component": "0.1.14",
32+
"@firebase/util": "0.2.50",
33+
"@firebase/component": "0.1.15",
3434
"@firebase/auth-interop-types": "0.1.5",
3535
"faye-websocket": "0.11.3",
3636
"tslib": "^1.11.1"
3737
},
3838
"devDependencies": {
39-
"@firebase/app": "0.6.6",
39+
"@firebase/app": "0.6.7",
4040
"@firebase/app-types": "0.6.1",
4141
"rollup": "2.7.6",
4242
"rollup-plugin-typescript2": "0.27.0",

packages/firebase/index.d.ts

Lines changed: 41 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7859,9 +7859,11 @@ declare namespace firebase.firestore {
78597859
/**
78607860
* Called by the Firestore SDK to convert a custom model object of type T
78617861
* into a plain Javascript object (suitable for writing directly to the
7862-
* Firestore database).
7862+
* Firestore database). To use `set()` with `merge` and `mergeFields`,
7863+
* `toFirestore()` must be defined with `Partial<T>`.
78637864
*/
78647865
toFirestore(modelObject: T): DocumentData;
7866+
toFirestore(modelObject: Partial<T>, options: SetOptions): DocumentData;
78657867

78667868
/**
78677869
* Called by the Firestore SDK to convert Firestore data into an object of
@@ -8310,10 +8312,21 @@ declare namespace firebase.firestore {
83108312
*/
83118313
set<T>(
83128314
documentRef: DocumentReference<T>,
8313-
data: T,
8314-
options?: SetOptions
8315+
data: Partial<T>,
8316+
options: SetOptions
83158317
): Transaction;
83168318

8319+
/**
8320+
* Writes to the document referred to by the provided `DocumentReference`.
8321+
* If the document does not exist yet, it will be created. If you pass
8322+
* `SetOptions`, the provided data can be merged into the existing document.
8323+
*
8324+
* @param documentRef A reference to the document to be set.
8325+
* @param data An object of the fields and values for the document.
8326+
* @return This `Transaction` instance. Used for chaining method calls.
8327+
*/
8328+
set<T>(documentRef: DocumentReference<T>, data: T): Transaction;
8329+
83178330
/**
83188331
* Updates fields in the document referred to by the provided
83198332
* `DocumentReference`. The update will fail if applied to a document that
@@ -8384,10 +8397,21 @@ declare namespace firebase.firestore {
83848397
*/
83858398
set<T>(
83868399
documentRef: DocumentReference<T>,
8387-
data: T,
8388-
options?: SetOptions
8400+
data: Partial<T>,
8401+
options: SetOptions
83898402
): WriteBatch;
83908403

8404+
/**
8405+
* Writes to the document referred to by the provided `DocumentReference`.
8406+
* If the document does not exist yet, it will be created. If you pass
8407+
* `SetOptions`, the provided data can be merged into the existing document.
8408+
*
8409+
* @param documentRef A reference to the document to be set.
8410+
* @param data An object of the fields and values for the document.
8411+
* @return This `WriteBatch` instance. Used for chaining method calls.
8412+
*/
8413+
set<T>(documentRef: DocumentReference<T>, data: T): WriteBatch;
8414+
83918415
/**
83928416
* Updates fields in the document referred to by the provided
83938417
* `DocumentReference`. The update will fail if applied to a document that
@@ -8566,7 +8590,18 @@ declare namespace firebase.firestore {
85668590
* @return A Promise resolved once the data has been successfully written
85678591
* to the backend (Note that it won't resolve while you're offline).
85688592
*/
8569-
set(data: T, options?: SetOptions): Promise<void>;
8593+
set(data: Partial<T>, options: SetOptions): Promise<void>;
8594+
8595+
/**
8596+
* Writes to the document referred to by this `DocumentReference`. If the
8597+
* document does not yet exist, it will be created. If you pass
8598+
* `SetOptions`, the provided data can be merged into an existing document.
8599+
*
8600+
* @param data A map of the fields and values for the document.
8601+
* @return A Promise resolved once the data has been successfully written
8602+
* to the backend (Note that it won't resolve while you're offline).
8603+
*/
8604+
set(data: T): Promise<void>;
85708605

85718606
/**
85728607
* Updates fields in the document referred to by this `DocumentReference`.

packages/firebase/package.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "firebase",
3-
"version": "7.15.4",
3+
"version": "7.15.5",
44
"description": "Firebase JavaScript library for web and Node.js",
55
"author": "Firebase <[email protected]> (https://firebase.google.com/)",
66
"license": "Apache-2.0",
@@ -45,20 +45,20 @@
4545
"module": "dist/index.esm.js",
4646
"react-native": "dist/index.rn.cjs.js",
4747
"dependencies": {
48-
"@firebase/app": "0.6.6",
48+
"@firebase/app": "0.6.7",
4949
"@firebase/app-types": "0.6.1",
5050
"@firebase/auth": "0.14.7",
51-
"@firebase/database": "0.6.5",
52-
"@firebase/firestore": "1.15.4",
53-
"@firebase/functions": "0.4.46",
54-
"@firebase/installations": "0.4.12",
55-
"@firebase/messaging": "0.6.18",
51+
"@firebase/database": "0.6.6",
52+
"@firebase/firestore": "1.15.5",
53+
"@firebase/functions": "0.4.47",
54+
"@firebase/installations": "0.4.13",
55+
"@firebase/messaging": "0.6.19",
5656
"@firebase/polyfill": "0.3.36",
57-
"@firebase/storage": "0.3.36",
58-
"@firebase/performance": "0.3.7",
59-
"@firebase/remote-config": "0.1.23",
60-
"@firebase/analytics": "0.3.7",
61-
"@firebase/util": "0.2.49"
57+
"@firebase/storage": "0.3.37",
58+
"@firebase/performance": "0.3.8",
59+
"@firebase/remote-config": "0.1.24",
60+
"@firebase/analytics": "0.3.8",
61+
"@firebase/util": "0.2.50"
6262
},
6363
"devDependencies": {
6464
"rollup": "2.7.6",

0 commit comments

Comments
 (0)