Skip to content

Commit 459eb41

Browse files
committed
Merge branch 'v11' into ch-vertex-endpoint
2 parents 92cff92 + 097bd67 commit 459eb41

File tree

138 files changed

+1182
-792
lines changed

Some content is hidden

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

138 files changed

+1182
-792
lines changed

.changeset/dull-nails-kneel.md

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

.changeset/large-snakes-march.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'firebase': major
3+
'@firebase/vertexai': major
4+
---
5+
6+
Release VertexAI in Firebase for general availability.

.changeset/perfect-weeks-care.md

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

.changeset/plenty-beers-decide.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
'@firebase/rules-unit-testing': patch
3+
'@firebase/firestore-compat': patch
4+
'@firebase/functions-compat': patch
5+
'@firebase/storage-compat': patch
6+
'@firebase/auth-compat': patch
7+
'@firebase/firestore': patch
8+
'@firebase/functions': patch
9+
'@firebase/storage': patch
10+
'@firebase/auth': patch
11+
---
12+
13+
Removed dependency on undici and node-fetch in our node bundles, replacing them with the native fetch implementation.

.changeset/sharp-dingos-admire.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+
Re-enable useFetchStreams with the latest WebChannel implementation. This reduces the memory usage of WebChannel.

.changeset/sixty-cycles-scream.md

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

.changeset/slimy-cups-promise.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@firebase/functions-compat': patch
3+
'@firebase/functions': patch
4+
---
5+
6+
Remove node bundle from the functions SDK as the node-specific fetch code has been removed in favor of using native fetch throughout the SDK.

.changeset/small-geckos-mix.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+
Refactor Firestore client instantiation. This prepares for future features that require client to restart.

.github/workflows/canary-deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ jobs:
7070
NPM_TOKEN_STORAGE: ${{secrets.NPM_TOKEN_STORAGE}}
7171
NPM_TOKEN_STORAGE_TYPES: ${{secrets.NPM_TOKEN_STORAGE_TYPES}}
7272
NPM_TOKEN_UTIL: ${{secrets.NPM_TOKEN_UTIL}}
73-
NPM_TOKEN_VERTEXAI_PREVIEW: ${{secrets.NPM_TOKEN_VERTEXAI_PREVIEW}}
73+
NPM_TOKEN_VERTEXAI: ${{secrets.NPM_TOKEN_VERTEXAI}}
7474
NPM_TOKEN_WEBCHANNEL_WRAPPER: ${{secrets.NPM_TOKEN_WEBCHANNEL_WRAPPER}}
7575
NPM_TOKEN_FIREBASE: ${{secrets.NPM_TOKEN_FIREBASE}}
7676
NPM_TOKEN_APP_COMPAT: ${{ secrets.NPM_TOKEN_APP_COMPAT }}

.github/workflows/prerelease-manual-deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ jobs:
7373
NPM_TOKEN_STORAGE: ${{secrets.NPM_TOKEN_STORAGE}}
7474
NPM_TOKEN_STORAGE_TYPES: ${{secrets.NPM_TOKEN_STORAGE_TYPES}}
7575
NPM_TOKEN_UTIL: ${{secrets.NPM_TOKEN_UTIL}}
76-
NPM_TOKEN_VERTEXAI_PREVIEW: ${{secrets.NPM_TOKEN_VERTEXAI_PREVIEW}}
76+
NPM_TOKEN_VERTEXAI: ${{secrets.NPM_TOKEN_VERTEXAI}}
7777
NPM_TOKEN_WEBCHANNEL_WRAPPER: ${{secrets.NPM_TOKEN_WEBCHANNEL_WRAPPER}}
7878
NPM_TOKEN_FIREBASE: ${{secrets.NPM_TOKEN_FIREBASE}}
7979
NPM_TOKEN_APP_COMPAT: ${{ secrets.NPM_TOKEN_APP_COMPAT }}

.github/workflows/release-prod.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ jobs:
8383
NPM_TOKEN_STORAGE: ${{secrets.NPM_TOKEN_STORAGE}}
8484
NPM_TOKEN_STORAGE_TYPES: ${{secrets.NPM_TOKEN_STORAGE_TYPES}}
8585
NPM_TOKEN_UTIL: ${{secrets.NPM_TOKEN_UTIL}}
86-
NPM_TOKEN_VERTEXAI_PREVIEW: ${{secrets.NPM_TOKEN_VERTEXAI_PREVIEW}}
86+
NPM_TOKEN_VERTEXAI: ${{secrets.NPM_TOKEN_VERTEXAI}}
8787
NPM_TOKEN_WEBCHANNEL_WRAPPER: ${{secrets.NPM_TOKEN_WEBCHANNEL_WRAPPER}}
8888
NPM_TOKEN_FIREBASE: ${{secrets.NPM_TOKEN_FIREBASE}}
8989
NPM_TOKEN_APP_COMPAT: ${{ secrets.NPM_TOKEN_APP_COMPAT }}

.github/workflows/release-staging.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ jobs:
109109
NPM_TOKEN_STORAGE: ${{secrets.NPM_TOKEN_STORAGE}}
110110
NPM_TOKEN_STORAGE_TYPES: ${{secrets.NPM_TOKEN_STORAGE_TYPES}}
111111
NPM_TOKEN_UTIL: ${{secrets.NPM_TOKEN_UTIL}}
112-
NPM_TOKEN_VERTEXAI_PREVIEW: ${{secrets.NPM_TOKEN_VERTEXAI_PREVIEW}}
112+
NPM_TOKEN_VERTEXAI: ${{secrets.NPM_TOKEN_VERTEXAI}}
113113
NPM_TOKEN_WEBCHANNEL_WRAPPER: ${{secrets.NPM_TOKEN_WEBCHANNEL_WRAPPER}}
114114
NPM_TOKEN_FIREBASE: ${{secrets.NPM_TOKEN_FIREBASE}}
115115
NPM_TOKEN_APP_COMPAT: ${{ secrets.NPM_TOKEN_APP_COMPAT }}

.github/workflows/test-all.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ jobs:
9292
- name: Run unit tests
9393
# Ignore auth and firestore since they're handled in their own separate jobs.
9494
run: |
95-
xvfb-run yarn lerna run --ignore '{firebase-messaging-integration-test,@firebase/auth*,@firebase/firestore*,firebase-firestore-integration-test}' --concurrency 4 test:ci
95+
xvfb-run yarn lerna run --ignore '{firebase-messaging-integration-test,@firebase/auth*,@firebase/firestore*,firebase-firestore-integration-test}' test:ci
9696
node scripts/print_test_logs.js
9797
env:
9898
FIREBASE_TOKEN: ${{ secrets.FIREBASE_CLI_TOKEN }}
@@ -142,7 +142,7 @@ jobs:
142142
run: echo "FIREBASE_CI_TEST_START_TIME=$(date +%s)" >> $GITHUB_ENV
143143
- name: Run unit tests
144144
run: |
145-
xvfb-run yarn lerna run --concurrency 4 test:ci --scope '@firebase/auth*'
145+
xvfb-run yarn lerna run test:ci --scope '@firebase/auth*'
146146
node scripts/print_test_logs.js
147147
env:
148148
FIREBASE_TOKEN: ${{ secrets.FIREBASE_CLI_TOKEN }}
@@ -182,7 +182,7 @@ jobs:
182182
run: echo "FIREBASE_CI_TEST_START_TIME=$(date +%s)" >> $GITHUB_ENV
183183
- name: Run unit tests
184184
run: |
185-
xvfb-run yarn lerna run --concurrency 4 test:ci --scope '@firebase/firestore*'
185+
xvfb-run yarn lerna run test:ci --scope '@firebase/firestore*'
186186
node scripts/print_test_logs.js
187187
env:
188188
FIREBASE_TOKEN: ${{ secrets.FIREBASE_CLI_TOKEN }}

common/api-review/util.api.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,11 @@ export function isBrowser(): boolean;
264264
// @public (undocumented)
265265
export function isBrowserExtension(): boolean;
266266

267+
// Warning: (ae-missing-release-tag) "isCloudflareWorker" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
268+
//
269+
// @public
270+
export function isCloudflareWorker(): boolean;
271+
267272
// Warning: (ae-missing-release-tag) "isElectron" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
268273
//
269274
// @public

common/api-review/vertexai-preview.api.md renamed to common/api-review/vertexai.api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## API Report File for "@firebase/vertexai-preview"
1+
## API Report File for "@firebase/vertexai"
22

33
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
44

config/karma.base.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ const config = {
6666

6767
webpackMiddleware: { quiet: true, stats: { colors: true } },
6868

69-
singleRun: false,
69+
// Exit with an exit code of 0 if any of the tests fail.
70+
singleRun: true,
7071

7172
client: {
7273
mocha: {

docs-devsite/app-check.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Firebase App Check does not work in a Node.js environment using `ReCaptchaV3Prov
2222
| [initializeAppCheck(app, options)](./app-check.md#initializeappcheck_5548dfc) | Activate App Check for the given app. Can be called only once per app. |
2323
| <b>function(appCheckInstance, ...)</b> |
2424
| [getLimitedUseToken(appCheckInstance)](./app-check.md#getlimitedusetoken_53ef5e3) | Requests a Firebase App Check token. This method should be used only if you need to authorize requests to a non-Firebase backend.<!-- -->Returns limited-use tokens that are intended for use with your non-Firebase backend endpoints that are protected with <a href="https://firebase.google.com/docs/app-check/custom-resource-backend#replay-protection"> Replay Protection</a>. This method does not affect the token generation behavior of the \#getAppCheckToken() method. |
25-
| [getToken(appCheckInstance, forceRefresh)](./app-check.md#gettoken_39fc1b3) | Get the current App Check token. Attaches to the most recent in-flight request if one is present. Returns null if no token is present and no token requests are in-flight. |
25+
| [getToken(appCheckInstance, forceRefresh)](./app-check.md#gettoken_39fc1b3) | Get the current App Check token. If <code>forceRefresh</code> is false, this function first checks for a valid token in memory, then local persistence (IndexedDB). If not found, or if <code>forceRefresh</code> is true, it makes a request to the App Check endpoint for a fresh token. That request attaches to the most recent in-flight request if one is present. |
2626
| [onTokenChanged(appCheckInstance, observer)](./app-check.md#ontokenchanged_9761e16) | Registers a listener to changes in the token state. There can be more than one listener registered at the same time for one or more App Check instances. The listeners call back on the UI thread whenever the current token associated with this App Check instance changes. |
2727
| [onTokenChanged(appCheckInstance, onNext, onError, onCompletion)](./app-check.md#ontokenchanged_8ef80a7) | Registers a listener to changes in the token state. There can be more than one listener registered at the same time for one or more App Check instances. The listeners call back on the UI thread whenever the current token associated with this App Check instance changes. |
2828
| [setTokenAutoRefreshEnabled(appCheckInstance, isTokenAutoRefreshEnabled)](./app-check.md#settokenautorefreshenabled_057a76c) | Set whether App Check will automatically refresh tokens as needed. |
@@ -102,7 +102,7 @@ The limited use token.
102102

103103
### getToken(appCheckInstance, forceRefresh) {:#gettoken_39fc1b3}
104104

105-
Get the current App Check token. Attaches to the most recent in-flight request if one is present. Returns null if no token is present and no token requests are in-flight.
105+
Get the current App Check token. If `forceRefresh` is false, this function first checks for a valid token in memory, then local persistence (IndexedDB). If not found, or if `forceRefresh` is true, it makes a request to the App Check endpoint for a fresh token. That request attaches to the most recent in-flight request if one is present.
106106

107107
<b>Signature:</b>
108108

integration/compat-interop/package.json

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,25 @@
33
"private": true,
44
"version": "0.1.0",
55
"scripts": {
6-
"test": "karma start --single-run",
6+
"test": "karma start",
77
"test:ci": "node ../../scripts/run_tests_in_ci.js -s test",
88
"test:debug": "karma start --browsers Chrome --auto-watch"
99
},
1010
"dependencies": {
11-
"@firebase/app": "0.10.9",
12-
"@firebase/app-compat": "0.2.39",
13-
"@firebase/analytics": "0.10.7",
14-
"@firebase/analytics-compat": "0.2.13",
15-
"@firebase/auth": "1.7.7",
16-
"@firebase/auth-compat": "0.5.12",
17-
"@firebase/functions": "0.11.6",
18-
"@firebase/functions-compat": "0.3.12",
19-
"@firebase/messaging": "0.12.10",
20-
"@firebase/messaging-compat": "0.2.10",
21-
"@firebase/performance": "0.6.8",
22-
"@firebase/performance-compat": "0.2.8",
23-
"@firebase/remote-config": "0.4.8",
24-
"@firebase/remote-config-compat": "0.2.8"
11+
"@firebase/app": "0.10.11",
12+
"@firebase/app-compat": "0.2.41",
13+
"@firebase/analytics": "0.10.8",
14+
"@firebase/analytics-compat": "0.2.14",
15+
"@firebase/auth": "1.7.9",
16+
"@firebase/auth-compat": "0.5.14",
17+
"@firebase/functions": "0.11.8",
18+
"@firebase/functions-compat": "0.3.14",
19+
"@firebase/messaging": "0.12.11",
20+
"@firebase/messaging-compat": "0.2.11",
21+
"@firebase/performance": "0.6.9",
22+
"@firebase/performance-compat": "0.2.9",
23+
"@firebase/remote-config": "0.4.9",
24+
"@firebase/remote-config-compat": "0.2.9"
2525
},
2626
"devDependencies": {
2727
"typescript": "4.7.4"

integration/firebase/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
"private": true,
44
"version": "0.2.1",
55
"scripts": {
6-
"test": "karma start --single-run",
6+
"test": "karma start",
77
"test:ci": "node ../../scripts/run_tests_in_ci.js -s test"
88
},
99
"devDependencies": {
10-
"firebase": "10.13.0",
10+
"firebase": "10.13.2",
1111
"@types/chai": "4.3.14",
1212
"@types/mocha": "9.1.1",
1313
"chai": "4.4.1",

integration/firestore/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@
66
"build:deps": "lerna run --scope @firebase/'{app,firestore}' --include-dependencies build",
77
"build:persistence": "INCLUDE_FIRESTORE_PERSISTENCE=true gulp compile-tests",
88
"build:memory": "INCLUDE_FIRESTORE_PERSISTENCE=false gulp compile-tests",
9-
"karma:singlerun": "karma start --single-run",
9+
"karma:singlerun": "karma start",
1010
"prettier": "prettier --write '*.js' '*.ts'",
11-
"test:persistence": " yarn build:persistence; karma start --single-run",
11+
"test:persistence": " yarn build:persistence; karma start",
1212
"test:persistence:debug": "yarn build:persistence; karma start --auto-watch --browsers Chrome",
13-
"test:memory": "yarn build:memory; karma start --single-run",
13+
"test:memory": "yarn build:memory; karma start",
1414
"test:memory:debug": "yarn build:memory; karma start --auto-watch --browsers Chrome"
1515
},
1616
"dependencies": {
17-
"@firebase/app": "0.10.9",
18-
"@firebase/firestore": "4.7.0"
17+
"@firebase/app": "0.10.11",
18+
"@firebase/firestore": "4.7.2"
1919
},
2020
"devDependencies": {
2121
"@types/mocha": "9.1.1",

integration/messaging/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,12 @@
99
"test:manual": "mocha --exit"
1010
},
1111
"devDependencies": {
12-
"firebase": "10.13.0",
12+
"firebase": "10.13.2",
1313
"chai": "4.4.1",
1414
"chromedriver": "119.0.1",
1515
"express": "4.19.2",
1616
"geckodriver": "2.0.4",
1717
"mocha": "9.2.2",
18-
"undici": "6.19.7",
1918
"selenium-assistant": "6.1.1"
2019
},
2120
"engines": {

integration/messaging/test/utils/sendMessage.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
* limitations under the License.
1616
*/
1717

18-
const undici = require('undici');
1918
const FCM_SEND_ENDPOINT = 'https://fcm.googleapis.com/fcm/send';
2019
// Rotatable fcm server key. It's generally a bad idea to expose server keys. The reason is to
2120
// simplify testing process (no need to implement server side decryption of git secret). The
@@ -28,7 +27,7 @@ module.exports = async payload => {
2827
'Requesting to send an FCM message with payload: ' + JSON.stringify(payload)
2928
);
3029

31-
const response = await undici.fetch(FCM_SEND_ENDPOINT, {
30+
const response = await fetch(FCM_SEND_ENDPOINT, {
3231
method: 'POST',
3332
body: JSON.stringify(payload),
3433
headers: {

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@
3030
"repl": "node tools/repl.js",
3131
"release": "ts-node-script scripts/release/cli.ts",
3232
"pretest": "node tools/pretest.js",
33-
"test": "lerna run --ignore firebase-messaging-integration-test --concurrency 4 --stream test",
34-
"test:ci": "lerna run --ignore firebase-messaging-integration-test --concurrency 4 test:ci",
33+
"test": "lerna run --ignore firebase-messaging-integration-test --stream test",
34+
"test:ci": "lerna run --ignore firebase-messaging-integration-test test:ci",
3535
"pretest:coverage": "mkdirp coverage",
3636
"ci:coverage": "lcov-result-merger 'packages/**/lcov.info' 'lcov-all.info'",
3737
"test:coverage": "lcov-result-merger 'packages/**/lcov.info' | coveralls",
@@ -156,7 +156,6 @@
156156
"tslint": "6.1.3",
157157
"typedoc": "0.16.11",
158158
"typescript": "4.7.4",
159-
"undici": "6.19.7",
160159
"watch": "1.0.2",
161160
"webpack": "5.76.0",
162161
"yargs": "17.7.2"

packages/analytics-compat/CHANGELOG.md

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

3+
## 0.2.14
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [[`16d62d4fa`](https://github.com/firebase/firebase-js-sdk/commit/16d62d4fa16faddb8cb676c0af3f29b8a5824741)]:
8+
- @firebase/util@1.10.0
9+
- @firebase/analytics@0.10.8
10+
- @firebase/component@0.6.9
11+
312
## 0.2.13
413

514
### Patch Changes

packages/analytics-compat/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@firebase/analytics-compat",
3-
"version": "0.2.13",
3+
"version": "0.2.14",
44
"description": "",
55
"author": "Firebase <[email protected]> (https://firebase.google.com/)",
66
"main": "dist/index.cjs.js",
@@ -24,7 +24,7 @@
2424
"@firebase/app-compat": "0.x"
2525
},
2626
"devDependencies": {
27-
"@firebase/app-compat": "0.2.39",
27+
"@firebase/app-compat": "0.2.41",
2828
"rollup": "2.79.1",
2929
"@rollup/plugin-json": "4.1.0",
3030
"rollup-plugin-typescript2": "0.31.2",
@@ -47,17 +47,17 @@
4747
"dev": "rollup -c -w",
4848
"test": "run-p --npm-path npm lint test:browser",
4949
"test:ci": "node ../../scripts/run_tests_in_ci.js -s test:browser",
50-
"test:browser": "karma start --single-run",
50+
"test:browser": "karma start",
5151
"test:browser:debug": "karma start --browsers=Chrome --auto-watch",
5252
"trusted-type-check": "tsec -p tsconfig.json --noEmit",
5353
"add-compat-overloads": "ts-node-script ../../scripts/build/create-overloads.ts -i ../analytics/dist/analytics-public.d.ts -o dist/src/index.d.ts -a -r Analytics:FirebaseAnalytics -r FirebaseApp:FirebaseAppCompat --moduleToEnhance @firebase/analytics"
5454
},
5555
"typings": "dist/src/index.d.ts",
5656
"dependencies": {
57-
"@firebase/component": "0.6.8",
58-
"@firebase/analytics": "0.10.7",
57+
"@firebase/component": "0.6.9",
58+
"@firebase/analytics": "0.10.8",
5959
"@firebase/analytics-types": "0.8.2",
60-
"@firebase/util": "1.9.7",
60+
"@firebase/util": "1.10.0",
6161
"tslib": "^2.1.0"
6262
},
6363
"nyc": {

packages/analytics/CHANGELOG.md

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

3+
## 0.10.8
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [[`16d62d4fa`](https://github.com/firebase/firebase-js-sdk/commit/16d62d4fa16faddb8cb676c0af3f29b8a5824741)]:
8+
- @firebase/util@1.10.0
9+
- @firebase/component@0.6.9
10+
- @firebase/installations@0.6.9
11+
312
## 0.10.7
413

514
### Patch Changes

0 commit comments

Comments
 (0)