Skip to content

Commit 5b719a8

Browse files
committed
2 parents d058ba4 + 26767cd commit 5b719a8

File tree

117 files changed

+20999
-2309
lines changed

Some content is hidden

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

117 files changed

+20999
-2309
lines changed

.changeset/brave-lies-crash.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
"@firebase/analytics": patch
3+
"@firebase/app": patch
4+
"@firebase/auth": patch
5+
"@firebase/component": patch
6+
"@firebase/database": patch
7+
"firebase": patch
8+
"@firebase/firestore": patch
9+
"@firebase/functions": patch
10+
"@firebase/installations": patch
11+
"@firebase/logger": patch
12+
"@firebase/messaging": patch
13+
"@firebase/performance": patch
14+
---
15+
16+
Update dependency typescript to v3.9.5

.changeset/chilled-beers-chew.md

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

.changeset/few-snails-walk.md

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

.changeset/four-melons-laugh.md

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

.changeset/many-lamps-bake.md

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

.changeset/nice-seas-type.md

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

.changeset/odd-roses-smile.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
3+
---
4+
5+
use secret group for .changeset so people don't get spammed by notification

.changeset/plenty-maps-brush.md

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

.changeset/rotten-hats-fry.md

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

.changeset/seven-crabs-join.md

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

.changeset/shy-forks-speak.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"firebase": minor
3+
"@firebase/firestore": minor
4+
---
5+
6+
Re-adding the ReactNative bundle, which allows Firestore to be used without `btoa`/`atob` Polyfills.

.changeset/tall-glasses-move.md

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

.changeset/tender-hounds-breathe.md

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

.changeset/thin-ligers-fold.md

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

.changeset/tough-bananas-attend.md

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

.changeset/tough-donkeys-hope.md

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

.changeset/tough-rings-bake.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/messaging': patch
4+
---
5+
6+
Added support for `onMessage` so the internal callback can work with [Subscriber](https://rxjs.dev/api/index/class/Subscriber)

.changeset/twelve-spiders-return.md

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

.changeset/two-weeks-thank.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
3+
---
4+
5+
Update dependency eslint to v7

.changeset/warm-suns-dream.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
---
3+
4+
Make exp release script work again

.changeset/yellow-lamps-greet.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
3+
---
4+
5+
Update dependency firebase-tools to v8

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,4 +85,4 @@ packages/firebase/index.d.ts @egilmorez @firebase/jssdk-global-approvers
8585
scripts/docgen/content-sources/ @egilmorez @firebase/jssdk-global-approvers
8686

8787
# Changeset
88-
.changeset @egilmorez @erikeldridge @alikn @zijianjoy @andirayo @avolkovi @samhorlbeck @scottcrossen @yuchenshi @zwu52 @firebase/firestore-js-team @firebase/jssdk-global-approvers
88+
.changeset @firebase/jssdk-changeset-approvers @firebase/firestore-js-team @firebase/jssdk-global-approvers

integration/firebase-typings/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
},
99
"devDependencies": {
1010
"firebase": "7.15.5",
11-
"typescript": "3.8.3"
11+
"typescript": "3.9.5"
1212
}
1313
}

integration/firestore/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"karma-spec-reporter": "0.0.32",
2626
"mocha": "7.1.2",
2727
"ts-loader": "6.2.2",
28-
"typescript": "3.8.3",
28+
"typescript": "3.9.5",
2929
"webpack": "4.43.0",
3030
"webpack-stream": "5.2.1"
3131
}

integration/messaging/test/test-send.js

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ const sendMessage = require('./utils/sendMessage');
2121
const retrieveToken = require('./utils/retrieveToken');
2222
const seleniumAssistant = require('selenium-assistant');
2323
const getReceivedBackgroundMessages = require('./utils/getReceivedBackgroundMessages');
24+
const getReceivedForegroundMessages = require('./utils/getReceivedForegroundMessages');
2425
const openNewTab = require('./utils/openNewTab');
2526
const createPermittedWebDriver = require('./utils/createPermittedWebDriver');
2627

@@ -35,6 +36,8 @@ const FIELD_NOTIFICATION = 'notification';
3536
// 4 minutes. The fact that the flow includes making a request to the Send Service, storing/retrieving form indexedDb asynchronously makes these test units to have a execution time variance. Therefore, allowing these units to have a longer time to work is crucial.
3637
const TIMEOUT_BACKGROUND_MESSAGE_TEST_UNIT_MILLISECONDS = 240000;
3738

39+
const TIMEOUT_FOREGROUND_MESSAGE_TEST_UNIT_MILLISECONDS = 120000;
40+
3841
// 1 minute. Wait for object store to be created and received message to be stored in idb. This waiting time MUST be longer than the wait time for adding to db in the sw.
3942
const WAIT_TIME_BEFORE_RETRIEVING_BACKGROUND_MESSAGES_MILLISECONDS = 60000;
4043

@@ -124,6 +127,115 @@ describe('Starting Integration Test > Sending and Receiving ', function() {
124127
);
125128
});
126129
});
130+
131+
it('Foreground app can receive a {} empty message in onMessage', async function() {
132+
this.timeout(TIMEOUT_FOREGROUND_MESSAGE_TEST_UNIT_MILLISECONDS);
133+
134+
await seleniumAssistant.killWebDriver(globalWebDriver);
135+
136+
globalWebDriver = createPermittedWebDriver(
137+
/* browser= */ assistantBrowser.getId()
138+
);
139+
140+
await globalWebDriver.get(
141+
`${testServer.serverAddress}/${TEST_DOMAIN}/`
142+
);
143+
144+
let token = await retrieveToken(globalWebDriver);
145+
checkSendResponse(
146+
await sendMessage({
147+
to: token
148+
})
149+
);
150+
151+
await checkMessageReceived(
152+
await getReceivedForegroundMessages(globalWebDriver),
153+
/* expectedNotificationPayload= */ null,
154+
/* expectedDataPayload= */ null
155+
);
156+
});
157+
158+
it('Foreground app can receive a {"notification"} message in onMessage', async function() {
159+
this.timeout(TIMEOUT_FOREGROUND_MESSAGE_TEST_UNIT_MILLISECONDS);
160+
161+
await seleniumAssistant.killWebDriver(globalWebDriver);
162+
163+
globalWebDriver = createPermittedWebDriver(
164+
/* browser= */ assistantBrowser.getId()
165+
);
166+
167+
await globalWebDriver.get(
168+
`${testServer.serverAddress}/${TEST_DOMAIN}/`
169+
);
170+
171+
checkSendResponse(
172+
await sendMessage({
173+
to: await retrieveToken(globalWebDriver),
174+
notification: getTestNotificationPayload()
175+
})
176+
);
177+
178+
await checkMessageReceived(
179+
await getReceivedForegroundMessages(globalWebDriver),
180+
/* expectedNotificationPayload= */ getTestNotificationPayload(),
181+
/* expectedDataPayload= */ null
182+
);
183+
});
184+
185+
it('Foreground app can receive a {"data"} message in onMessage', async function() {
186+
this.timeout(TIMEOUT_FOREGROUND_MESSAGE_TEST_UNIT_MILLISECONDS);
187+
188+
await seleniumAssistant.killWebDriver(globalWebDriver);
189+
190+
globalWebDriver = createPermittedWebDriver(
191+
/* browser= */ assistantBrowser.getId()
192+
);
193+
194+
await globalWebDriver.get(
195+
`${testServer.serverAddress}/${TEST_DOMAIN}/`
196+
);
197+
198+
checkSendResponse(
199+
await sendMessage({
200+
to: await retrieveToken(globalWebDriver),
201+
data: getTestDataPayload()
202+
})
203+
);
204+
205+
await checkMessageReceived(
206+
await getReceivedForegroundMessages(globalWebDriver),
207+
/* expectedNotificationPayload= */ null,
208+
/* expectedDataPayload= */ getTestDataPayload()
209+
);
210+
});
211+
212+
it('Foreground app can receive a {"notification", "data"} message in onMessage', async function() {
213+
this.timeout(TIMEOUT_FOREGROUND_MESSAGE_TEST_UNIT_MILLISECONDS);
214+
215+
await seleniumAssistant.killWebDriver(globalWebDriver);
216+
217+
globalWebDriver = createPermittedWebDriver(
218+
/* browser= */ assistantBrowser.getId()
219+
);
220+
221+
await globalWebDriver.get(
222+
`${testServer.serverAddress}/${TEST_DOMAIN}/`
223+
);
224+
225+
checkSendResponse(
226+
await sendMessage({
227+
to: await retrieveToken(globalWebDriver),
228+
data: getTestDataPayload(),
229+
notification: getTestNotificationPayload()
230+
})
231+
);
232+
233+
await checkMessageReceived(
234+
await getReceivedForegroundMessages(globalWebDriver),
235+
/* expectedNotificationPayload= */ getTestNotificationPayload(),
236+
/* expectedDataPayload= */ getTestDataPayload()
237+
);
238+
});
127239
});
128240
});
129241
});

integration/typescript/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@
2323
"karma-typescript": "5.0.2",
2424
"mocha": "7.1.2",
2525
"npm-run-all": "4.1.5",
26-
"typescript": "3.8.3"
26+
"typescript": "3.9.5"
2727
}
2828
}

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"build": "lerna run --scope @firebase/* --scope firebase --scope rxfire build",
2626
"build:exp": "lerna run --scope @firebase/*-exp --scope firebase-exp build",
2727
"build:release": "lerna run --scope @firebase/* --scope firebase --ignore @firebase/*-exp --ignore firebase-exp prepare",
28-
"build:exp:release": "lerna run --scope @firebase/*-exp --scope firebase-exp prepare && yarn --cwd packages-exp/app-exp typings:public",
28+
"build:exp:release": "yarn --cwd packages/app build:deps && lerna run --scope @firebase/*-exp --scope firebase-exp prepare && yarn --cwd packages-exp/app-exp typings:public",
2929
"link:packages": "lerna exec --scope @firebase/* --scope firebase --scope rxfire -- yarn link",
3030
"stage:packages": "./scripts/prepublish.sh",
3131
"repl": "node tools/repl.js",
@@ -89,12 +89,12 @@
8989
"coveralls": "3.1.0",
9090
"del": "5.1.0",
9191
"dependency-graph": "0.9.0",
92-
"eslint": "6.8.0",
92+
"eslint": "7.3.1",
9393
"eslint-plugin-import": "2.20.2",
9494
"express": "4.17.1",
9595
"find-free-port": "2.0.0",
9696
"firebase-functions": "3.6.1",
97-
"firebase-tools": "7.16.2",
97+
"firebase-tools": "8.4.3",
9898
"git-rev-sync": "2.0.0",
9999
"glob": "7.1.6",
100100
"http-server": "0.12.3",
@@ -141,7 +141,7 @@
141141
"ts-node": "8.10.1",
142142
"tslint": "6.1.2",
143143
"typedoc": "0.16.11",
144-
"typescript": "3.8.3",
144+
"typescript": "3.9.5",
145145
"watch": "1.0.2",
146146
"webpack": "4.43.0",
147147
"yargs": "15.3.1"

packages-exp/app-exp/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@
2323
"test:browser": "karma start --single-run",
2424
"test:node": "TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha src/**/*.test.ts --config ../../config/mocharc.node.js",
2525
"type-check": "tsc -p . --noEmit",
26-
"prepare": "rollup -c rollup.config.release.js",
26+
"prepare": "rollup -c rollup.config.release.js && yarn api-report",
2727
"api-report": "api-extractor run --local --verbose",
2828
"predoc": "node ../../scripts/exp/remove-exp.js temp",
2929
"doc": "api-documenter markdown --input temp --output docs",
3030
"build:doc": "yarn build && yarn doc",
31-
"typings:public": "node ./use_public_typings.js --public",
32-
"typings:internal": "node ./use_public_typings.js"
31+
"typings:public": "node ./use_typings.js --public",
32+
"typings:internal": "node ./use_typings.js"
3333
},
3434
"dependencies": {
3535
"@firebase/app-types-exp": "0.0.800",
@@ -44,7 +44,7 @@
4444
"rollup-plugin-json": "4.0.0",
4545
"rollup-plugin-replace": "2.2.0",
4646
"rollup-plugin-typescript2": "0.27.0",
47-
"typescript": "3.8.3"
47+
"typescript": "3.9.5"
4848
},
4949
"repository": {
5050
"directory": "packages-exp/app-exp",

packages-exp/app-types-exp/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@
2626
"url": "https://github.com/firebase/firebase-js-sdk/issues"
2727
},
2828
"devDependencies": {
29-
"typescript": "3.8.3"
29+
"typescript": "3.9.5"
3030
}
3131
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/**
2+
* @license
3+
* Copyright 2020 Google LLC
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
export * from '@firebase/functions-exp';
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/**
2+
* @license
3+
* Copyright 2020 Google LLC
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
export * from '@firebase/functions-exp';
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"name": "firebase-exp/functions",
3+
"main": "dist/index.cjs.js",
4+
"browser": "dist/index.esm.js",
5+
"module": "dist/index.esm.js",
6+
"typings": "dist/functions/index.d.ts"
7+
}

0 commit comments

Comments
 (0)