Skip to content

Commit 0c881a9

Browse files
Fei v9 main firestore (#5319)
* compile firestore * update typings path * compile firestore compat * lint compat * make test work * get most tests work * build * remove special paths * update firestore-compat pkg json * fix merge issues * Simplify bundles * Prettier * Fix Bundle compile * Fix build * address comments * console build * Fix all tests * Prettier * fix merge issues * fix typo * update paths * app-exp * fix lint * correct path * fix * fix compat lint * fix firestore integration * fix workflow * update dep * Always block on Auth (#5340) * Always block on Auth * Don't block on token if already recevied * fix lint * build firestore * remove memory only tests * fix firebase integration tests * enable more build and tests * add firestore-compat to firebase dep * fix auth compat class * enable auth test * auth package doc * Update API reports Co-authored-by: Sebastian Schmidt <[email protected]> Co-authored-by: Feiyang1 <[email protected]>
1 parent 238e52a commit 0c881a9

File tree

157 files changed

+3772
-4378
lines changed

Some content is hidden

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

157 files changed

+3772
-4378
lines changed

common/api-review/auth.api.md

Lines changed: 824 additions & 826 deletions
Large diffs are not rendered by default.

common/api-review/firestore-lite.api.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
```ts
66

77
import { EmulatorMockTokenOptions } from '@firebase/util';
8-
import { FirebaseApp } from '@firebase/app-exp';
8+
import { FirebaseApp } from '@firebase/app';
99
import { LogLevelString as LogLevel } from '@firebase/logger';
1010

1111
// @public
@@ -104,6 +104,8 @@ export class DocumentSnapshot<T = DocumentData> {
104104
get ref(): DocumentReference<T>;
105105
}
106106

107+
export { EmulatorMockTokenOptions }
108+
107109
// @public
108110
export function endAt(snapshot: DocumentSnapshot<unknown>): QueryConstraint;
109111

common/api-review/firestore.api.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
```ts
66

77
import { EmulatorMockTokenOptions } from '@firebase/util';
8-
import { FirebaseApp } from '@firebase/app-exp';
8+
import { FirebaseApp } from '@firebase/app';
99
import { LogLevelString as LogLevel } from '@firebase/logger';
1010

1111
// @public
@@ -125,6 +125,8 @@ export class DocumentSnapshot<T = DocumentData> {
125125
get ref(): DocumentReference<T>;
126126
}
127127

128+
export { EmulatorMockTokenOptions }
129+
128130
// @public
129131
export function enableIndexedDbPersistence(firestore: Firestore, persistenceSettings?: PersistenceSettings): Promise<void>;
130132

integration/firebase/test/namespaceDefinition.json

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,6 @@
5555
"removeApp": {
5656
"__type": "function"
5757
},
58-
"components": {
59-
"__type": "Map"
60-
},
6158
"ErrorFactory": {
6259
"__type": "function"
6360
},
@@ -223,16 +220,10 @@
223220
"onMessage": {
224221
"__type": "function"
225222
},
226-
"onTokenRefresh": {
227-
"__type": "function"
228-
},
229-
"requestPermission": {
230-
"__type": "function"
231-
},
232223
"deleteToken": {
233224
"__type": "function"
234225
},
235-
"setBackgroundMessageHandler": {
226+
"onBackgroundMessage": {
236227
"__type": "function"
237228
}
238229
}

integration/firestore/firebase_export.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,8 @@
1515
* limitations under the License.
1616
*/
1717

18-
import firebase from '@firebase/app';
19-
import '@firebase/firestore';
20-
import '@firebase/firestore/bundle';
18+
import firebase from '@firebase/app-compat';
19+
import '@firebase/firestore-compat';
2120
import { FirebaseApp } from '@firebase/app-types';
2221
import { Settings, FirebaseFirestore } from '@firebase/firestore-types';
2322

integration/firestore/firebase_export_memory.ts

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

integration/firestore/gulpfile.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,7 @@ function copyTests() {
6363
*/
6464
/import\s+\* as firebaseExport\s+from\s+('|")[^\1]+firebase_export\1;?/,
6565
`import * as firebaseExport from '${resolve(
66-
__dirname,
67-
isPersistenceEnabled()
68-
? './firebase_export'
69-
: './firebase_export_memory'
66+
__dirname, './firebase_export'
7067
)}';
7168
7269
if (typeof process === 'undefined') {

integration/firestore/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
},
1616
"devDependencies": {
1717
"@firebase/app": "0.6.30",
18-
"@firebase/firestore": "2.4.0",
18+
"@firebase/firestore-compat": "0.0.900",
1919
"@types/mocha": "8.2.3",
2020
"gulp": "4.0.2",
2121
"gulp-filter": "7.0.0",

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@
2222
],
2323
"scripts": {
2424
"dev": "lerna run --parallel --scope @firebase/* --scope firebase dev",
25-
"build": "lerna run --scope @firebase/* --scope firebase --ignore @firebase/rules-unit-testing --ignore @firebase/firestore build",
25+
"build": "lerna run --scope @firebase/* --scope firebase --ignore @firebase/rules-unit-testing build",
2626
"build:changed": "ts-node-script scripts/ci-test/build_changed.ts",
2727
"release:prepare": "lerna run --scope @firebase/* add-compat-overloads && lerna run --scope @firebase/* typings:public",
2828
"link:packages": "lerna exec --scope @firebase/* --scope firebase -- yarn link",
2929
"stage:packages": "./scripts/prepublish.sh",
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-repo-scripts-prune-dts --ignore @firebase/rules-unit-testing --ignore @firebase/auth --ignore @firebase/firestore --ignore @firebase/database-compat --ignore firebase-firestore-integration-test --ignore firebase-messaging-integration-test --ignore firebase-namespace-integration-test --concurrency 4 --stream test",
33+
"test": "lerna run --ignore firebase-repo-scripts-prune-dts --ignore @firebase/rules-unit-testing --ignore @firebase/database-compat --ignore firebase-messaging-integration-test --concurrency 4 --stream test",
3434
"test:ci": "lerna run --concurrency 4 test:ci",
3535
"pretest:coverage": "mkdirp coverage",
3636
"ci:coverage": "lcov-result-merger 'packages/**/lcov.info' 'lcov-all.info'",

packages/auth-compat/index.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ import {
2424
ComponentType,
2525
InstantiationMode
2626
} from '@firebase/component';
27+
import { FirebaseError } from '@firebase/util';
2728

2829
import * as types from '@firebase/auth-types';
2930
import { name, version } from './package.json';
3031
import { Auth } from './src/auth';
31-
import { Persistence } from './src/persistence';
3232
import { PhoneAuthProvider as CompatAuthProvider } from './src/phone_auth_provider';
3333
import { RecaptchaVerifier as CompatRecaptchaVerifier } from './src/recaptcha_verifier';
3434

@@ -106,11 +106,9 @@ function registerAuthCompat(instance: _FirebaseNamespace): void {
106106
PhoneMultiFactorGenerator: impl.PhoneMultiFactorGenerator,
107107
RecaptchaVerifier: CompatRecaptchaVerifier,
108108
TwitterAuthProvider: impl.TwitterAuthProvider,
109-
Auth: {
110-
Persistence
111-
},
112-
AuthCredential: impl.AuthCredential
113-
// 'Error': fireauth.AuthError
109+
Auth,
110+
AuthCredential: impl.AuthCredential,
111+
Error: FirebaseError
114112
})
115113
.setInstantiationMode(InstantiationMode.LAZY)
116114
.setMultipleInstances(false)

0 commit comments

Comments
 (0)