Skip to content

Commit 83740c0

Browse files
committed
Merge branch 'master' of github.com:firebase/firebase-js-sdk into markduckworth/sum-avg
2 parents db4b8e9 + 9874614 commit 83740c0

File tree

146 files changed

+3031
-1098
lines changed

Some content is hidden

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

146 files changed

+3031
-1098
lines changed

.changeset/nervous-ads-pretend.md

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

.changeset/pretty-carrots-kneel.md

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

.changeset/quick-radios-obey.md

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

.changeset/stupid-swans-fix.md

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

.changeset/tricky-ravens-stare.md

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

.changeset/wild-frogs-play.md

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

.changeset/wild-geckos-fetch.md

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

.changeset/young-hornets-rescue.md

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

.github/CODEOWNERS

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ packages/messaging-interop-types @zwu52 @firebase/jssdk-global-approvers
5959
integration/messaging @zwu52 @firebase/jssdk-global-approvers
6060

6161
# Auth Code
62-
packages/auth @avolkovi @lisajian @sam-gc @yuchenshi @firebase/jssdk-global-approvers
63-
packages/auth-compat @avolkovi @lisajian @sam-gc @yuchenshi @firebase/jssdk-global-approvers
64-
packages/auth-types @avolkovi @lisajian @sam-gc @yuchenshi @firebase/jssdk-global-approvers
65-
packages/auth-interop-types @avolkovi @lisajian @sam-gc @yuchenshi @firebase/jssdk-global-approvers
62+
packages/auth @lisajian @prameshj @renkelvin @sam-gc @firebase/jssdk-global-approvers
63+
packages/auth-compat @lisajian @prameshj @renkelvin @sam-gc @firebase/jssdk-global-approvers
64+
packages/auth-types @lisajian @prameshj @renkelvin @sam-gc @firebase/jssdk-global-approvers
65+
packages/auth-interop-types @lisajian @prameshj @renkelvin @sam-gc @firebase/jssdk-global-approvers
6666

6767
# Testing Code
6868
packages/rules-unit-testing @avolkovi @sam-gc @yuchenshi @firebase/jssdk-global-approvers

.github/workflows/e2e-test.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ jobs:
4747
working-directory: ./config
4848
env:
4949
FIREBASE_CLI_TOKEN: ${{ secrets.FIREBASE_CLI_TOKEN }}
50+
- name: Do modular build
51+
run: yarn build:modular
52+
- name: Do compat build
53+
run: yarn build:compat
5054
- name: Run modular tests
5155
env:
5256
APP_CHECK_DEBUG_TOKEN: ${{ secrets.APP_CHECK_DEBUG_TOKEN }}

.github/workflows/merge-release-branch.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
run: |
1919
export VERSION_SCRIPT="const pkg = require('./packages/firebase/package.json'); console.log(pkg.version);"
2020
export VERSION=`node -e "${VERSION_SCRIPT}"`
21-
echo "::set-output name=RELEASE_VERSION::$VERSION"
21+
echo "RELEASE_VERSION=$VERSION" >> $GITHUB_OUTPUT
2222
- name: Echo version in shell
2323
run: |
2424
echo "Merging release ${{ steps.get-version.outputs.RELEASE_VERSION }}"

.github/workflows/release-prod.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ jobs:
9595
run: |
9696
VERSION_SCRIPT="const pkg = require('./packages/firebase/package.json'); console.log(pkg.version);"
9797
VERSION=`node -e "${VERSION_SCRIPT}"`
98-
echo "::set-output name=BASE_VERSION::$VERSION"
98+
echo "BASE_VERSION=$VERSION" >> $GITHUB_OUTPUT
9999
- name: Echo version in shell
100100
run: |
101101
echo "Base version: ${{ steps.get-version.outputs.BASE_VERSION }}"

.github/workflows/release-staging.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,9 @@ jobs:
114114
run: |
115115
VERSION_SCRIPT="const pkg = require('./packages/firebase/package.json'); console.log(pkg.version);"
116116
VERSION=`node -e "${VERSION_SCRIPT}"`
117-
echo "::set-output name=STAGING_VERSION::$VERSION"
117+
echo "STAGING_VERSION=$VERSION" >> $GITHUB_OUTPUT
118118
BASE_VERSION=$(echo $VERSION | cut -d "-" -f 1)
119-
echo "::set-output name=BASE_VERSION::$BASE_VERSION"
119+
echo "BASE_VERSION=$BASE_VERSION" >> $GITHUB_OUTPUT
120120
- name: Echo versions in shell
121121
run: |
122122
echo "Staging release ${{ steps.get-version.outputs.STAGING_VERSION }}"

.vscode/launch.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,7 @@
7373
"--exit"
7474
],
7575
"env": {
76-
"FIRESTORE_EMULATOR_PORT" : "8080",
77-
"FIRESTORE_EMULATOR_PROJECT_ID" : "test-emulator"
76+
"FIRESTORE_TARGET_BACKEND" : "emulator",
7877
},
7978
"sourceMaps": true,
8079
"protocol": "inspector"
@@ -95,8 +94,7 @@
9594
],
9695
"env": {
9796
"USE_MOCK_PERSISTENCE": "YES",
98-
"FIRESTORE_EMULATOR_PORT" : "8080",
99-
"FIRESTORE_EMULATOR_PROJECT_ID" : "test-emulator"
97+
"FIRESTORE_TARGET_BACKEND" : "emulator",
10098
},
10199
"sourceMaps": true,
102100
"protocol": "inspector"

common/api-review/storage.api.md

Lines changed: 70 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -134,13 +134,11 @@ export function getStorage(app?: FirebaseApp, bucketUrl?: string): FirebaseStora
134134
// @public
135135
export function getStream(ref: StorageReference, maxDownloadSizeBytes?: number): NodeJS.ReadableStream;
136136

137-
// Warning: (ae-forgotten-export) The symbol "StorageError" needs to be exported by the entry point index.d.ts
138-
//
139137
// @internal (undocumented)
140-
export function _invalidArgument(message: string): StorageError_2;
138+
export function _invalidArgument(message: string): StorageError;
141139

142140
// @internal (undocumented)
143-
export function _invalidRootOperation(name: string): StorageError_2;
141+
export function _invalidRootOperation(name: string): StorageError;
144142

145143
// @public
146144
export function list(ref: StorageReference, options?: ListOptions): Promise<ListResult>;
@@ -217,8 +215,71 @@ export interface SettableMetadata {
217215
}
218216

219217
// @public
220-
export interface StorageError extends FirebaseError {
221-
serverResponse: string | null;
218+
export class StorageError extends FirebaseError {
219+
constructor(code: StorageErrorCode, message: string, status_?: number);
220+
_codeEquals(code: StorageErrorCode): boolean;
221+
customData: {
222+
serverResponse: string | null;
223+
};
224+
get serverResponse(): null | string;
225+
set serverResponse(serverResponse: string | null);
226+
// (undocumented)
227+
get status(): number;
228+
set status(status: number);
229+
}
230+
231+
// @public
232+
export enum StorageErrorCode {
233+
// (undocumented)
234+
APP_DELETED = "app-deleted",
235+
// (undocumented)
236+
BUCKET_NOT_FOUND = "bucket-not-found",
237+
// (undocumented)
238+
CANCELED = "canceled",
239+
// (undocumented)
240+
CANNOT_SLICE_BLOB = "cannot-slice-blob",
241+
// (undocumented)
242+
INTERNAL_ERROR = "internal-error",
243+
// (undocumented)
244+
INVALID_ARGUMENT = "invalid-argument",
245+
// (undocumented)
246+
INVALID_ARGUMENT_COUNT = "invalid-argument-count",
247+
// (undocumented)
248+
INVALID_CHECKSUM = "invalid-checksum",
249+
// (undocumented)
250+
INVALID_DEFAULT_BUCKET = "invalid-default-bucket",
251+
// (undocumented)
252+
INVALID_EVENT_NAME = "invalid-event-name",
253+
// (undocumented)
254+
INVALID_FORMAT = "invalid-format",
255+
// (undocumented)
256+
INVALID_ROOT_OPERATION = "invalid-root-operation",
257+
// (undocumented)
258+
INVALID_URL = "invalid-url",
259+
// (undocumented)
260+
NO_DEFAULT_BUCKET = "no-default-bucket",
261+
// (undocumented)
262+
NO_DOWNLOAD_URL = "no-download-url",
263+
// (undocumented)
264+
OBJECT_NOT_FOUND = "object-not-found",
265+
// (undocumented)
266+
PROJECT_NOT_FOUND = "project-not-found",
267+
// (undocumented)
268+
QUOTA_EXCEEDED = "quota-exceeded",
269+
// (undocumented)
270+
RETRY_LIMIT_EXCEEDED = "retry-limit-exceeded",
271+
// (undocumented)
272+
SERVER_FILE_WRONG_SIZE = "server-file-wrong-size",
273+
// (undocumented)
274+
UNAUTHENTICATED = "unauthenticated",
275+
// (undocumented)
276+
UNAUTHORIZED = "unauthorized",
277+
// (undocumented)
278+
UNAUTHORIZED_APP = "unauthorized-app",
279+
// (undocumented)
280+
UNKNOWN = "unknown",
281+
// (undocumented)
282+
UNSUPPORTED_ENVIRONMENT = "unsupported-environment"
222283
}
223284

224285
// @public
@@ -318,20 +379,20 @@ export class _UploadTask {
318379
constructor(ref: _Reference, blob: _FbsBlob, metadata?: Metadata | null);
319380
_blob: _FbsBlob;
320381
cancel(): boolean;
321-
catch<T>(onRejected: (p1: StorageError_2) => T | Promise<T>): Promise<T>;
382+
catch<T>(onRejected: (p1: StorageError) => T | Promise<T>): Promise<T>;
322383
// (undocumented)
323384
isExponentialBackoffExpired(): boolean;
324385
// Warning: (ae-forgotten-export) The symbol "Metadata" needs to be exported by the entry point index.d.ts
325386
_metadata: Metadata | null;
326387
// Warning: (ae-forgotten-export) The symbol "Unsubscribe" needs to be exported by the entry point index.d.ts
327388
// Warning: (ae-forgotten-export) The symbol "Subscribe" needs to be exported by the entry point index.d.ts
328-
on(type: _TaskEvent, nextOrObserver?: StorageObserver<UploadTaskSnapshot> | null | ((snapshot: UploadTaskSnapshot) => unknown), error?: ((a: StorageError_2) => unknown) | null, completed?: CompleteFn | null): Unsubscribe_2 | Subscribe_2<UploadTaskSnapshot>;
389+
on(type: _TaskEvent, nextOrObserver?: StorageObserver<UploadTaskSnapshot> | null | ((snapshot: UploadTaskSnapshot) => unknown), error?: ((a: StorageError) => unknown) | null, completed?: CompleteFn | null): Unsubscribe_2 | Subscribe_2<UploadTaskSnapshot>;
329390
pause(): boolean;
330391
resume(): boolean;
331392
get snapshot(): UploadTaskSnapshot;
332393
// Warning: (ae-forgotten-export) The symbol "InternalTaskState" needs to be exported by the entry point index.d.ts
333394
_state: InternalTaskState;
334-
then<U>(onFulfilled?: ((value: UploadTaskSnapshot) => U | Promise<U>) | null, onRejected?: ((error: StorageError_2) => U | Promise<U>) | null): Promise<U>;
395+
then<U>(onFulfilled?: ((value: UploadTaskSnapshot) => U | Promise<U>) | null, onRejected?: ((error: StorageError) => U | Promise<U>) | null): Promise<U>;
335396
_transferred: number;
336397
}
337398

e2e/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
build/*.js
2+
build/*.map
23
firebase-config.js
34
context.html

e2e/karma.conf.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,6 @@ module.exports = function (config) {
5757
resolve: {
5858
directories: ['./node_modules'],
5959
alias: {
60-
'@firebase/messaging/sw':
61-
'node_modules/@firebase/messaging/dist/index.sw.esm2017.js',
6260
'idb': 'node_modules/idb/build/index.js'
6361
}
6462
},

e2e/package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111
"watch": "webpack --watch",
1212
"build": "webpack",
1313
"start:modular": "webpack serve --config-name modular",
14-
"start:compat": "webpack serve --config-name compat"
14+
"start:compat": "webpack serve --config-name compat",
15+
"build:modular": "webpack --config-name modular",
16+
"build:compat": "webpack --config-name compat"
1517
},
1618
"author": "",
1719
"license": "ISC",
@@ -32,7 +34,7 @@
3234
"karma-typescript": "5.5.3",
3335
"karma-typescript-es6-transform": "5.5.3",
3436
"mocha": "9.2.2",
35-
"typescript": "4.3.4",
37+
"typescript": "4.7.4",
3638
"webpack": "5.75.0",
3739
"webpack-cli": "4.10.0",
3840
"webpack-dev-server": "4.10.0"

e2e/webpack.config.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,6 @@ module.exports = [
4949
}
5050
]
5151
},
52-
resolve: {
53-
mainFields: ['browser', 'module', 'main']
54-
},
5552
stats: {
5653
colors: true
5754
},
@@ -88,9 +85,6 @@ module.exports = [
8885
}
8986
]
9087
},
91-
resolve: {
92-
mainFields: ['browser', 'module', 'main']
93-
},
9488
stats: {
9589
colors: true
9690
},

0 commit comments

Comments
 (0)