Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(core): Upgrade to exp #2770

Merged
merged 59 commits into from
Aug 19, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
6297299
feat(core): Upgrade to exp
davideast Mar 9, 2021
110c264
feat(analytics): Add Analytics
davideast Mar 9, 2021
aa62620
feat(auth): Add Auth
davideast Mar 9, 2021
ac07108
feat(auth-guard): Add Auth Guard
davideast Mar 9, 2021
4761ba1
feat(database): Add Database
davideast Mar 9, 2021
58fced7
feat(firestore): Add Firestore
davideast Mar 10, 2021
6376d97
feat(functions): Add Functions
davideast Mar 10, 2021
8fce342
feat(messaging): Add Messaging
davideast Mar 10, 2021
daa4c25
feat(performance): Add Performance
davideast Mar 10, 2021
36fb698
feat(rc) Add Remote Config
davideast Mar 11, 2021
13f945e
feat(storage): Add Storage
davideast Mar 11, 2021
c85d200
chore(build): Fix build script and Analytics services
davideast Mar 11, 2021
1868406
Adding compat packages
jamesdaniels Apr 21, 2021
3f4761b
Update actions
jamesdaniels Apr 21, 2021
ee9aac1
Expirimenting with a new configuration style and adding a non-compat …
jamesdaniels Apr 22, 2021
adda7a0
More cleanup
jamesdaniels Apr 22, 2021
fcfc5ec
New DI pattern
jamesdaniels Apr 23, 2021
cd11b58
Nuking the tests for now
jamesdaniels Apr 23, 2021
cd5f171
Upgrade ng deps
jamesdaniels Apr 23, 2021
25e48ca
Getting jasmine working again, cleaning up tests
jamesdaniels Apr 23, 2021
6d4a022
partial compilation mode and updating sample-compat
jamesdaniels Apr 23, 2021
f947321
Adding Firefox and Safari tests, doubt Safari will work in actions
jamesdaniels Apr 23, 2021
fadc178
Trying SafariNative launcher
jamesdaniels Apr 23, 2021
b72a87b
Placeholders for sub-package, reexport rxfire/*
jamesdaniels May 3, 2021
f4ca651
Zone wrapping rxfire exports
jamesdaniels May 17, 2021
59b5934
Getting README rolling
jamesdaniels May 18, 2021
a857610
Don't wait on tests to publish, their red right now
jamesdaniels May 18, 2021
f572bc9
Getting things updated, new DI API
jamesdaniels Jul 26, 2021
343dbde
Cleaning things up
jamesdaniels Jul 27, 2021
d72623d
Bump rxfire and don't init by default
jamesdaniels Jul 27, 2021
1233a1c
Firestore/lite
jamesdaniels Jul 28, 2021
3e5518e
Starting on upgrade guide
jamesdaniels Jul 28, 2021
96fdd27
Trying different syntax
jamesdaniels Jul 28, 2021
fb4f667
Internet says this is right but breaking my preview
jamesdaniels Jul 28, 2021
50cae6c
Try this
jamesdaniels Jul 28, 2021
1c0e1de
How does this look on Github?
jamesdaniels Jul 28, 2021
294b3ea
Getting the table rolling
jamesdaniels Jul 28, 2021
301dc5b
Updating to beta.8
jamesdaniels Aug 4, 2021
6445e29
Wrapping the JS SDK
jamesdaniels Aug 12, 2021
6fb0f6d
Cleanup, upgrade schematic
jamesdaniels Aug 16, 2021
32f57c2
Expose the schematic in the public-api
jamesdaniels Aug 16, 2021
d3a9af2
Public_api
jamesdaniels Aug 16, 2021
1062278
Find and replace on upgrade
jamesdaniels Aug 16, 2021
674ff68
Find and replace on upgrade
jamesdaniels Aug 16, 2021
52247a6
Doc changes
jamesdaniels Aug 16, 2021
ec33419
Fix the reexport types and cleanup
jamesdaniels Aug 17, 2021
6218ba2
Clean up the upgrade schematic a bit
jamesdaniels Aug 17, 2021
ec312e3
Rework the import alias regex
jamesdaniels Aug 17, 2021
c5d4d1f
Adding rxfire to the schematic install
jamesdaniels Aug 17, 2021
2a3bd2a
Write the new content
jamesdaniels Aug 17, 2021
5c5c40e
Merged master
jamesdaniels Aug 19, 2021
7d256b0
Bump husky
jamesdaniels Aug 19, 2021
24c29e3
Lost this fix in the merge conflict
jamesdaniels Aug 19, 2021
fb95678
Spec wasnt pulling from compat
jamesdaniels Aug 19, 2021
c9bbe78
Paths wrong in the spec too
jamesdaniels Aug 19, 2021
591edeb
New scheduler
jamesdaniels Aug 19, 2021
f676c41
Import path
jamesdaniels Aug 19, 2021
bdddf69
Readd ɵkeepUnstableUntilFirstFactory for specs
jamesdaniels Aug 19, 2021
4431934
Next ref, req tests, drop safari
jamesdaniels Aug 19, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
feat(core): Upgrade to exp
  • Loading branch information
davideast authored Mar 9, 2021
commit 6297299f0b68743c637cc2d9a1a5d20450f6386c
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"@angular/platform-browser": "^9.0.0 || ^10.0.0 || ^11.0.0",
"@angular/platform-browser-dynamic": "^9.0.0 || ^10.0.0 || ^11.0.0",
"@angular/router": "^9.0.0 || ^10.0.0 || ^11.0.0",
"firebase": "^7.0 || ^8.0",
"firebase": "^0.900.15",
"firebase-admin": "^8.10.0",
"firebase-functions": "^3.6.0",
"firebase-tools": "^8.0.0",
Expand Down
8 changes: 4 additions & 4 deletions src/core/angularfire2.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ import { AngularFireModule, FirebaseApp, ɵAngularFireSchedulers, ɵkeepUnstable
import { Observable, of, Subject } from 'rxjs';
import { COMMON_CONFIG } from '../test-config';
import { BrowserModule } from '@angular/platform-browser';
import firebase from 'firebase/app';
import { Reference } from 'firebase/database';
import { tap } from 'rxjs/operators';
import { TestScheduler } from 'rxjs/testing';
import { rando } from '../firestore/utils.spec';

describe('angularfire', () => {
let app: FirebaseApp;
let rootRef: firebase.database.Reference;
let questionsRef: firebase.database.Reference;
let listOfQuestionsRef: firebase.database.Reference;
let rootRef: Reference;
let questionsRef: Reference;
let listOfQuestionsRef: Reference;
let defaultPlatform: PlatformRef;
let appName: string;

Expand Down
39 changes: 24 additions & 15 deletions src/core/firebase.app.module.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
import {
Inject, InjectionToken, isDevMode, ModuleWithProviders, NgModule, NgZone, Optional, PLATFORM_ID, VERSION as NG_VERSION, Version
} from '@angular/core';
import firebase from 'firebase/app';
import { FirebaseApp as FirebaseAppType, getApps, initializeApp, registerVersion } from 'firebase/app';
import { Analytics } from 'firebase/analytics';
import { Database } from 'firebase/database';
import { Auth } from 'firebase/auth';
import { FirebaseMessaging } from 'firebase/messaging';
import { FirebasePerformance } from 'firebase/performance';
import { StorageService } from 'firebase/storage';
import { FirebaseFirestore } from 'firebase/firestore';
import { Functions } from 'firebase/functions';
import { RemoteConfig } from 'firebase/remote-config';

// INVESTIGATE Public types don't expose FirebaseOptions or FirebaseAppConfig, is this the case anylonger?
export interface FirebaseOptions {
Expand All @@ -17,19 +26,19 @@ export const FIREBASE_APP_NAME = new InjectionToken<string | FirebaseAppConfig |

// Have to implement as we need to return a class from the provider, we should consider exporting
// this in the firebase/app types as this is our highest risk of breaks
export class FirebaseApp implements Partial<firebase.app.App> {
export class FirebaseApp implements Partial<FirebaseAppType> {
name: string;
options: {};
analytics: () => firebase.analytics.Analytics;
auth: () => firebase.auth.Auth;
database: (databaseURL?: string) => firebase.database.Database;
messaging: () => firebase.messaging.Messaging;
performance: () => firebase.performance.Performance;
storage: (storageBucket?: string) => firebase.storage.Storage;
analytics: () => Analytics;
auth: () => Auth;
database: (databaseURL?: string) => Database;
messaging: () => FirebaseMessaging;
performance: () => FirebasePerformance;
storage: (storageBucket?: string) => StorageService;
delete: () => Promise<void>;
firestore: () => firebase.firestore.Firestore;
functions: (region?: string) => firebase.functions.Functions;
remoteConfig: () => firebase.remoteConfig.RemoteConfig;
firestore: () => FirebaseFirestore;
functions: (region?: string) => Functions;
remoteConfig: () => RemoteConfig;
}

export const VERSION = new Version('ANGULARFIRE2_VERSION');
Expand All @@ -39,10 +48,10 @@ export function ɵfirebaseAppFactory(options: FirebaseOptions, zone: NgZone, nam
const config = typeof nameOrConfig === 'object' && nameOrConfig || {};
config.name = config.name || name;
// Added any due to some inconsistency between @firebase/app and firebase types
const existingApp = firebase.apps.filter(app => app && app.name === config.name)[0] as any;
const existingApp = getApps().filter(app => app && app.name === config.name)[0] as any;
// We support FirebaseConfig, initializeApp's public type only accepts string; need to cast as any
// Could be solved with https://github.com/firebase/firebase-js-sdk/pull/1206
const app = (existingApp || zone.runOutsideAngular(() => firebase.initializeApp(options, config as any))) as FirebaseApp;
const app = (existingApp || zone.runOutsideAngular(() => initializeApp(options, config as any))) as FirebaseApp;
try {
if (JSON.stringify(options) !== JSON.stringify(app.options)) {
const hmr = !!(module as any).hot;
Expand Down Expand Up @@ -115,7 +124,7 @@ export class AngularFireModule {

// tslint:disable-next-line:ban-types
constructor(@Inject(PLATFORM_ID) platformId: Object) {
firebase.registerVersion('angularfire', VERSION.full, platformId.toString());
firebase.registerVersion('angular', NG_VERSION.full);
registerVersion('angularfire', VERSION.full, platformId.toString());
registerVersion('angular', NG_VERSION.full);
}
}
3 changes: 3 additions & 0 deletions tslint.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
"curly": true,
"directive-class-suffix": true,
"no-shadowed-variable": false,
"no-trailing-whitespace": {
"severity": "warn"
},
"directive-selector": [
true,
"attribute",
Expand Down
Loading