diff --git a/docs/auth/getting-started.md b/docs/auth/getting-started.md index f0a5938a4..7f92c862d 100644 --- a/docs/auth/getting-started.md +++ b/docs/auth/getting-started.md @@ -11,7 +11,7 @@ the Firebase docs for more information on what methods are available.](https://f ```ts import { Component } from '@angular/core'; import { AngularFireAuth } from 'angularfire2/auth'; -import { firebase } from '@firebase/app'; +import { auth } from 'firebase/app'; @Component({ selector: 'app-root', @@ -30,7 +30,7 @@ export class AppComponent { constructor(public afAuth: AngularFireAuth) { } login() { - this.afAuth.auth.signInWithPopup(new firebase.auth.GoogleAuthProvider()); + this.afAuth.auth.signInWithPopup(new auth.GoogleAuthProvider()); } logout() { this.afAuth.auth.signOut(); diff --git a/karma.conf.js b/karma.conf.js index 4c1d6c748..b07723d38 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -25,7 +25,12 @@ module.exports = function(config) { ...getAngularFiles(['core','common','compiler','platform-browser','platform-browser-dynamic']), 'karma-test-shim.js', - 'node_modules/firebase/firebase.js', + 'node_modules/firebase/firebase-app.js', + 'node_modules/firebase/firebase-auth.js', + 'node_modules/firebase/firebase-database.js', + 'node_modules/firebase/firebase-firestore.js', + 'node_modules/firebase/firebase-functions.js', + 'node_modules/firebase/firebase-storage.js', 'dist/packages-dist/bundles/core.umd.{js,map}', 'dist/packages-dist/bundles/auth.umd.{js,map}', 'dist/packages-dist/bundles/database.umd.{js,map}', diff --git a/package.json b/package.json index 1e404177e..e56097fe4 100644 --- a/package.json +++ b/package.json @@ -34,19 +34,7 @@ "@angular/core": "^6.0.0", "@angular/platform-browser": "^6.0.0", "@angular/platform-browser-dynamic": "^6.0.0", - "@firebase/app": "^0.3.1", - "@firebase/app-types": "^0.3.1", - "@firebase/auth": "^0.5.2", - "@firebase/auth-types": "^0.3.2", - "@firebase/database": "^0.3.1", - "@firebase/database-types": "^0.3.1", - "@firebase/firestore": "^0.5.2", - "@firebase/firestore-types": "^0.4.1", - "@firebase/functions": "^0.2.2", - "@firebase/functions-types": "^0.1.2", - "@firebase/messaging-types": "^0.2.2", - "@firebase/storage": "^0.2.2", - "@firebase/storage-types": "^0.2.2", + "firebase": "^5.0.3", "bufferutil": "^3.0.3", "rxjs": "^6.0.0", "utf-8-validate": "^4.0.0", @@ -63,7 +51,6 @@ "conventional-changelog-cli": "^1.2.0", "es6-module-loader": "^0.17.10", "es6-shim": "^0.35.0", - "firebase": "^5.0.2", "fs-extra": "^4.0.0", "gulp": "^3.9.0", "gulp-jasmine": "^2.2.1", diff --git a/src/auth/auth.module.ts b/src/auth/auth.module.ts index 052f6c0e8..657394c72 100644 --- a/src/auth/auth.module.ts +++ b/src/auth/auth.module.ts @@ -1,6 +1,7 @@ import { NgModule } from '@angular/core'; import { AngularFireAuth } from './auth'; -import '@firebase/auth'; + +import 'firebase/auth'; @NgModule({ providers: [ AngularFireAuth ] diff --git a/src/auth/auth.spec.ts b/src/auth/auth.spec.ts index 891b1e2b8..542293eb4 100644 --- a/src/auth/auth.spec.ts +++ b/src/auth/auth.spec.ts @@ -1,4 +1,4 @@ -import { User } from '@firebase/auth-types'; +import { User } from 'firebase/app'; import { ReflectiveInjector, Provider } from '@angular/core'; import { Observable, Subject } from 'rxjs' import { TestBed, inject } from '@angular/core/testing'; diff --git a/src/auth/auth.ts b/src/auth/auth.ts index 41d4a1c35..bcc46a5d1 100644 --- a/src/auth/auth.ts +++ b/src/auth/auth.ts @@ -1,11 +1,11 @@ -import { FirebaseAuth, User, IdTokenResult } from '@firebase/auth-types'; -import { FirebaseOptions, FirebaseAppConfig } from '@firebase/app-types'; import { Injectable, Inject, Optional, NgZone, PLATFORM_ID } from '@angular/core'; import { Observable, of, from } from 'rxjs'; import { switchMap } from 'rxjs/operators'; +import { FirebaseAppConfig, FirebaseOptions } from 'angularfire2'; -import { FirebaseOptionsToken, FirebaseNameOrConfigToken, _firebaseAppFactory, FirebaseZoneScheduler } from 'angularfire2'; +import { User, auth } from 'firebase/app'; +import { FirebaseAuth, FirebaseOptionsToken, FirebaseNameOrConfigToken, _firebaseAppFactory, FirebaseZoneScheduler } from 'angularfire2'; @Injectable() export class AngularFireAuth { @@ -35,7 +35,7 @@ export class AngularFireAuth { * helper properties for getting different data associated with the token as well as all the decoded payload claims * (or null). */ - public readonly idTokenResult: Observable; + public readonly idTokenResult: Observable; constructor( @Inject(FirebaseOptionsToken) options:FirebaseOptions, diff --git a/src/auth/package.json b/src/auth/package.json index e331f77a6..481fa17a0 100644 --- a/src/auth/package.json +++ b/src/auth/package.json @@ -22,8 +22,7 @@ "@angular/core": "ANGULAR_VERSION", "@angular/platform-browser": "ANGULAR_VERSION", "@angular/platform-browser-dynamic": "ANGULAR_VERSION", - "@firebase/app": "FIREBASE_APP_VERSION", - "@firebase/auth": "FIREBASE_AUTH_VERSION", + "firebase": "FIREBASE_VERSION", "rxjs": "RXJS_VERSION", "zone.js": "ZONEJS_VERSION" }, diff --git a/src/core/angularfire2.spec.ts b/src/core/angularfire2.spec.ts index 96c9728dd..80da241e3 100644 --- a/src/core/angularfire2.spec.ts +++ b/src/core/angularfire2.spec.ts @@ -1,18 +1,18 @@ -import { Reference } from '@firebase/database-types'; import { TestBed, inject, withModule, async } from '@angular/core/testing'; import { ReflectiveInjector, Provider, PlatformRef, NgModule, Compiler, ApplicationRef, CompilerFactory } from '@angular/core'; import { FirebaseApp, AngularFireModule } from 'angularfire2'; import { Subscription } from 'rxjs'; import { COMMON_CONFIG } from './test-config'; import { BrowserModule } from '@angular/platform-browser'; +import { database } from 'firebase/app'; describe('angularfire', () => { let subscription:Subscription; let app: FirebaseApp; - let rootRef: Reference; - let questionsRef: Reference; - let listOfQuestionsRef: Reference; + let rootRef: database.Reference; + let questionsRef: database.Reference; + let listOfQuestionsRef: database.Reference; let defaultPlatform: PlatformRef; const APP_NAME = 'super-awesome-test-firebase-app-name'; diff --git a/src/core/angularfire2.ts b/src/core/angularfire2.ts index 6a665a6e9..2e0bf9c88 100644 --- a/src/core/angularfire2.ts +++ b/src/core/angularfire2.ts @@ -3,12 +3,6 @@ import { isPlatformServer } from '@angular/common'; import { Observable, Subscription, queueScheduler as queue } from 'rxjs'; import { first } from 'rxjs/operators'; -import { firebase } from '@firebase/app'; -import { FirebaseApp, FirebaseOptions, FirebaseAppConfig } from '@firebase/app-types'; - -export const FirebaseOptionsToken = new InjectionToken('angularfire2.app.options'); -export const FirebaseNameOrConfigToken = new InjectionToken('angularfire2.app.nameOrConfig') - // Put in database.ts when we drop database-depreciated export const RealtimeDatabaseURL = new InjectionToken('angularfire2.realtimeDatabaseURL'); diff --git a/src/core/firebase.app.module.ts b/src/core/firebase.app.module.ts index 265fe0d88..45f7145bf 100644 --- a/src/core/firebase.app.module.ts +++ b/src/core/firebase.app.module.ts @@ -1,22 +1,28 @@ import { InjectionToken, NgZone, NgModule, Optional } from '@angular/core'; +import { app, auth, apps, database, firestore, functions, initializeApp, messaging, storage } from 'firebase/app'; -import { FirebaseOptionsToken, FirebaseNameOrConfigToken } from './angularfire2'; +// Public types don't expose FirebaseOptions or FirebaseAppConfig +export type FirebaseOptions = {[key:string]: any}; +export type FirebaseAppConfig = {[key:string]: any}; -import firebase from '@firebase/app'; -import { FirebaseApp as _FirebaseApp, FirebaseOptions, FirebaseAppConfig } from '@firebase/app-types'; -import { FirebaseAuth } from '@firebase/auth-types'; -import { FirebaseDatabase } from '@firebase/database-types'; -import { FirebaseMessaging } from '@firebase/messaging-types'; -import { FirebaseStorage } from '@firebase/storage-types'; -import { FirebaseFirestore } from '@firebase/firestore-types'; -import { FirebaseFunctions } from '@firebase/functions-types'; +export const FirebaseOptionsToken = new InjectionToken('angularfire2.app.options'); +export const FirebaseNameOrConfigToken = new InjectionToken('angularfire2.app.nameOrConfig') -export class FirebaseApp implements _FirebaseApp { +export type FirebaseDatabase = database.Database; +export type FirebaseAuth = auth.Auth; +export type FirebaseMessaging = messaging.Messaging; +export type FirebaseStorage = storage.Storage; +export type FirebaseFirestore = firestore.Firestore; +export type FirebaseFunctions = functions.Functions; + +export class FirebaseApp implements app.App { name: string; - automaticDataCollectionEnabled: boolean; options: {}; auth: () => FirebaseAuth; + // app.App database() doesn't take a databaseURL arg in the public types? database: (databaseURL?: string) => FirebaseDatabase; + // automaticDataCollectionEnabled is now private? _automaticDataCollectionEnabled? + // automaticDataCollectionEnabled: true, messaging: () => FirebaseMessaging; storage: (storageBucket?: string) => FirebaseStorage; delete: () => Promise; @@ -28,8 +34,9 @@ export function _firebaseAppFactory(options: FirebaseOptions, nameOrConfig?: str const name = typeof nameOrConfig === 'string' && nameOrConfig || '[DEFAULT]'; const config = typeof nameOrConfig === 'object' && nameOrConfig || {}; config.name = config.name || name; - const existingApp = firebase.apps.filter(app => app.name === config.name)[0]; - return (existingApp || firebase.initializeApp(options, config)) as FirebaseApp; + const existingApp = apps.filter(app => app && app.name === config.name)[0]; + // We support FirebaseConfig, initializeApp's public type only accepts string; need to cast as any + return (existingApp || (initializeApp as any)(options, config)) as FirebaseApp; } const FirebaseAppProvider = { diff --git a/src/core/package.json b/src/core/package.json index 5b7be59a6..68835c85b 100644 --- a/src/core/package.json +++ b/src/core/package.json @@ -21,7 +21,7 @@ "@angular/core": "ANGULAR_VERSION", "@angular/platform-browser": "ANGULAR_VERSION", "@angular/platform-browser-dynamic": "ANGULAR_VERSION", - "@firebase/app": "FIREBASE_APP_VERSION", + "firebase": "FIREBASE_VERSION", "rxjs": "RXJS_VERSION", "zone.js": "ZONEJS_VERSION" }, diff --git a/src/database-deprecated/database.module.ts b/src/database-deprecated/database.module.ts index 58aa66767..c53440e44 100644 --- a/src/database-deprecated/database.module.ts +++ b/src/database-deprecated/database.module.ts @@ -1,6 +1,6 @@ import { NgModule } from '@angular/core'; import { AngularFireDatabase } from './database'; -import '@firebase/database'; +import 'firebase/database'; @NgModule({ providers: [ AngularFireDatabase ] diff --git a/src/database-deprecated/database.ts b/src/database-deprecated/database.ts index 05e64acb4..d4ba4919b 100644 --- a/src/database-deprecated/database.ts +++ b/src/database-deprecated/database.ts @@ -1,4 +1,3 @@ -import { FirebaseDatabase } from '@firebase/database-types'; import { Inject, Injectable, Optional, NgZone } from '@angular/core'; import { FirebaseListFactory } from './firebase_list_factory'; import { FirebaseListObservable } from './firebase_list_observable'; @@ -6,8 +5,7 @@ import { FirebaseListFactoryOpts, FirebaseObjectFactoryOpts, PathReference } fro import { FirebaseObjectFactory } from './firebase_object_factory'; import { FirebaseObjectObservable } from './firebase_object_observable'; import * as utils from './utils'; -import { FirebaseOptions, FirebaseAppConfig } from '@firebase/app-types'; -import { FirebaseOptionsToken, FirebaseNameOrConfigToken, RealtimeDatabaseURL, _firebaseAppFactory } from 'angularfire2'; +import { FirebaseDatabase, FirebaseOptions, FirebaseAppConfig, FirebaseOptionsToken, FirebaseNameOrConfigToken, RealtimeDatabaseURL, _firebaseAppFactory } from 'angularfire2'; @Injectable() export class AngularFireDatabase { diff --git a/src/database-deprecated/firebase_list_factory.ts b/src/database-deprecated/firebase_list_factory.ts index 9b7ac6975..e9047f373 100644 --- a/src/database-deprecated/firebase_list_factory.ts +++ b/src/database-deprecated/firebase_list_factory.ts @@ -1,5 +1,4 @@ import { NgZone } from '@angular/core'; -import * as database from '@firebase/database-types'; import { FirebaseZoneScheduler } from 'angularfire2'; import * as utils from './utils'; import { AFUnwrappedDataSnapshot } from './interfaces'; @@ -7,7 +6,7 @@ import { FirebaseListObservable } from './firebase_list_observable'; import { Observer } from 'rxjs'; import { observeOn, switchMap, map } from 'rxjs/operators'; import { observeQuery } from './query_observable'; -import { Query, FirebaseListFactoryOpts, DatabaseReference, DatabaseQuery, DatabaseSnapshot } from './interfaces'; +import { Reference, Query, FirebaseListFactoryOpts, DatabaseReference, DatabaseQuery, DatabaseSnapshot } from './interfaces'; export function FirebaseListFactory ( ref: DatabaseReference, @@ -90,7 +89,7 @@ export function FirebaseListFactory ( } return queried; - }), (queryRef: database.Reference, ix: number) => { + }), (queryRef: Reference, ix: number) => { return firebaseListObservable(queryRef, { preserveSnapshot }); }) .subscribe(subscriber); @@ -106,7 +105,7 @@ export function FirebaseListFactory ( * asynchonous. It creates a initial array from a promise of ref.once('value'), and then starts * listening to child events. When the initial array is loaded, the observable starts emitting values. */ -function firebaseListObservable(ref: database.Reference | DatabaseQuery, {preserveSnapshot}: FirebaseListFactoryOpts = {}): FirebaseListObservable { +function firebaseListObservable(ref: Reference | DatabaseQuery, {preserveSnapshot}: FirebaseListFactoryOpts = {}): FirebaseListObservable { const toValue = preserveSnapshot ? (snapshot => snapshot) : utils.unwrapMapFn; const toKey = preserveSnapshot ? (value => value.key) : (value => value.$key); diff --git a/src/database-deprecated/firebase_list_observable.spec.ts b/src/database-deprecated/firebase_list_observable.spec.ts index 29b32fa48..0ff28d7a4 100644 --- a/src/database-deprecated/firebase_list_observable.spec.ts +++ b/src/database-deprecated/firebase_list_observable.spec.ts @@ -1,10 +1,9 @@ import { FirebaseApp, FirebaseAppConfig, AngularFireModule} from 'angularfire2'; import { AngularFireDatabase, AngularFireDatabaseModule, FirebaseListObservable, FirebaseObjectFactory } from 'angularfire2/database-deprecated'; -import { Observer } from 'rxjs/Observer'; -import { map } from 'rxjs/operator/map'; -import { FirebaseApp as FBApp } from '@firebase/app-types'; -import { DataSnapshot, Reference } from '@firebase/database-types'; +import { Observer } from 'rxjs'; +import { map } from 'rxjs/operators'; import { unwrapMapFn } from './utils'; +import { DataSnapshot, Reference } from './interfaces'; import { TestBed, inject } from '@angular/core/testing'; import { COMMON_CONFIG } from './test-config'; @@ -12,7 +11,7 @@ import { COMMON_CONFIG } from './test-config'; describe('FirebaseListObservable', () => { let O: FirebaseListObservable; let ref: Reference; - let app: FBApp; + let app: FirebaseApp; let db: AngularFireDatabase; beforeEach(() => { @@ -22,7 +21,7 @@ describe('FirebaseListObservable', () => { AngularFireDatabaseModule ] }); - inject([FirebaseApp, AngularFireDatabase], (_app: FBApp, _db: AngularFireDatabase) => { + inject([FirebaseApp, AngularFireDatabase], (_app: FirebaseApp, _db: AngularFireDatabase) => { app = _app; db = _db; ref = app.database().ref(); diff --git a/src/database-deprecated/firebase_list_observable.ts b/src/database-deprecated/firebase_list_observable.ts index 342d32a45..d771c2d65 100644 --- a/src/database-deprecated/firebase_list_observable.ts +++ b/src/database-deprecated/firebase_list_observable.ts @@ -1,7 +1,6 @@ import { Observable, Operator, Subscriber, Subscription } from 'rxjs'; -import { Reference, DataSnapshot, ThenableReference } from '@firebase/database-types'; import * as utils from './utils'; -import { AFUnwrappedDataSnapshot, FirebaseOperationCases, QueryReference, DatabaseSnapshot, DatabaseReference } from './interfaces'; +import { Reference, DataSnapshot, ThenableReference, AFUnwrappedDataSnapshot, FirebaseOperationCases, QueryReference, DatabaseSnapshot, DatabaseReference } from './interfaces'; export type FirebaseOperation = string | Reference | DataSnapshot | AFUnwrappedDataSnapshot; diff --git a/src/database-deprecated/firebase_object_factory.spec.ts b/src/database-deprecated/firebase_object_factory.spec.ts index cf056d688..95e834a9d 100644 --- a/src/database-deprecated/firebase_object_factory.spec.ts +++ b/src/database-deprecated/firebase_object_factory.spec.ts @@ -1,10 +1,9 @@ -import { FirebaseApp as FBApp } from '@firebase/app-types'; -import { Reference } from '@firebase/database-types'; import { Subscription } from 'rxjs'; import { FirebaseApp, FirebaseAppConfig, AngularFireModule } from 'angularfire2'; import { AngularFireDatabase, AngularFireDatabaseModule, FirebaseObjectObservable, FirebaseObjectFactory } from 'angularfire2/database-deprecated'; import { TestBed, inject } from '@angular/core/testing'; import { COMMON_CONFIG } from './test-config'; +import { Reference } from './interfaces' describe('FirebaseObjectFactory', () => { let i = 0; @@ -12,7 +11,7 @@ describe('FirebaseObjectFactory', () => { let observable: FirebaseObjectObservable; let subscription: Subscription; let nextSpy: jasmine.Spy; - let app: FBApp; + let app: FirebaseApp; let db: AngularFireDatabase; beforeEach(() => { diff --git a/src/database-deprecated/firebase_object_factory.ts b/src/database-deprecated/firebase_object_factory.ts index f6c1ab856..1b76586c2 100644 --- a/src/database-deprecated/firebase_object_factory.ts +++ b/src/database-deprecated/firebase_object_factory.ts @@ -3,9 +3,8 @@ import { FirebaseObjectObservable } from './firebase_object_observable'; import { FirebaseZoneScheduler } from 'angularfire2'; import { Observer } from 'rxjs'; import { observeOn } from 'rxjs/operators'; -import { DataSnapshot } from '@firebase/database-types'; import * as utils from './utils'; -import { FirebaseObjectFactoryOpts, DatabaseReference } from './interfaces'; +import { DataSnapshot, FirebaseObjectFactoryOpts, DatabaseReference } from './interfaces'; export function FirebaseObjectFactory ( ref: DatabaseReference, diff --git a/src/database-deprecated/firebase_object_observable.spec.ts b/src/database-deprecated/firebase_object_observable.spec.ts index cd33163ce..24267251e 100644 --- a/src/database-deprecated/firebase_object_observable.spec.ts +++ b/src/database-deprecated/firebase_object_observable.spec.ts @@ -2,16 +2,15 @@ import { TestBed, inject } from '@angular/core/testing'; import { FirebaseApp, FirebaseAppConfig, AngularFireModule } from 'angularfire2'; import { COMMON_CONFIG } from './test-config'; import { AngularFireDatabase, AngularFireDatabaseModule, FirebaseObjectObservable } from 'angularfire2/database-deprecated'; -import { Observer } from 'rxjs/Observer'; -import { map } from 'rxjs/operator/map'; -import { FirebaseApp as FBApp } from '@firebase/app-types'; -import { Reference } from '@firebase/database-types'; +import { Observer } from 'rxjs'; +import { map } from 'rxjs/operators'; +import { Reference } from './interfaces'; describe('FirebaseObjectObservable', () => { let O: FirebaseObjectObservable; let ref: Reference; - let app: FBApp; + let app: FirebaseApp; let db: AngularFireDatabase; beforeEach(() => { @@ -21,7 +20,7 @@ describe('FirebaseObjectObservable', () => { AngularFireDatabaseModule ] }); - inject([FirebaseApp, AngularFireDatabase], (_app: FBApp, _db: AngularFireDatabase) => { + inject([FirebaseApp, AngularFireDatabase], (_app: FirebaseApp, _db: AngularFireDatabase) => { app = _app; db = _db; ref = app.database().ref(); diff --git a/src/database-deprecated/firebase_object_observable.ts b/src/database-deprecated/firebase_object_observable.ts index 9ba400dec..eaad39eb7 100644 --- a/src/database-deprecated/firebase_object_observable.ts +++ b/src/database-deprecated/firebase_object_observable.ts @@ -1,5 +1,6 @@ import { Observable, Operator, Subscriber, Subscription } from 'rxjs'; -import { Reference } from '@firebase/database-types'; +import { Reference } from './interfaces'; +import { database } from 'firebase/app'; export class FirebaseObjectObservable extends Observable { constructor(subscribe?: (subscriber: Subscriber) => Subscription | Function | void, public $ref?:Reference) { diff --git a/src/database-deprecated/interfaces.ts b/src/database-deprecated/interfaces.ts index ff803a42b..cda58bfc4 100644 --- a/src/database-deprecated/interfaces.ts +++ b/src/database-deprecated/interfaces.ts @@ -1,5 +1,9 @@ import { Observable } from 'rxjs'; -import { Reference, DataSnapshot, Query } from '@firebase/database-types'; +import { database } from 'firebase/app'; + +export type Reference = database.Reference; +export type DataSnapshot = database.DataSnapshot; +export type ThenableReference = database.ThenableReference; export interface FirebaseOperationCases { stringCase: () => Promise; @@ -83,6 +87,6 @@ export type Primitive = number | string | boolean; export type DatabaseSnapshot = DataSnapshot; export type DatabaseReference = Reference; -export type DatabaseQuery = Query; +export type DatabaseQuery = database.Query; export type QueryReference = DatabaseReference | DatabaseQuery; export type PathReference = QueryReference | string; diff --git a/src/database-deprecated/package.json b/src/database-deprecated/package.json index 60966c1f2..7a0b8df58 100644 --- a/src/database-deprecated/package.json +++ b/src/database-deprecated/package.json @@ -22,8 +22,7 @@ "@angular/core": "ANGULAR_VERSION", "@angular/platform-browser": "ANGULAR_VERSION", "@angular/platform-browser-dynamic": "ANGULAR_VERSION", - "@firebase/app": "FIREBASE_APP_VERSION", - "@firebase/database": "FIREBASE_DATABASE_VERSION", + "firebase": "FIREBASE_VERSION", "rxjs": "RXJS_VERSION", "zone.js": "ZONEJS_VERSION" }, diff --git a/src/database-deprecated/utils.ts b/src/database-deprecated/utils.ts index 965bcc4c5..455deff07 100644 --- a/src/database-deprecated/utils.ts +++ b/src/database-deprecated/utils.ts @@ -1,6 +1,6 @@ -import { DataSnapshot, FirebaseDatabase } from '@firebase/database-types'; import { Subscription, Scheduler, queueScheduler as queue } from 'rxjs'; -import { AFUnwrappedDataSnapshot, PathReference, DatabaseReference } from './interfaces'; +import { DataSnapshot, AFUnwrappedDataSnapshot, PathReference, DatabaseReference } from './interfaces'; +import { FirebaseDatabase } from 'angularfire2'; const REGEX_ABSOLUTE_URL = /^[a-z]+:\/\/.*/; diff --git a/src/database/database.module.ts b/src/database/database.module.ts index 58aa66767..80765f9ba 100644 --- a/src/database/database.module.ts +++ b/src/database/database.module.ts @@ -1,6 +1,7 @@ import { NgModule } from '@angular/core'; import { AngularFireDatabase } from './database'; -import '@firebase/database'; + +import 'firebase/database'; @NgModule({ providers: [ AngularFireDatabase ] diff --git a/src/database/database.ts b/src/database/database.ts index 940d87be4..c154cb82b 100644 --- a/src/database/database.ts +++ b/src/database/database.ts @@ -1,12 +1,10 @@ import { Injectable, Inject, Optional, NgZone, PLATFORM_ID } from '@angular/core'; -import { FirebaseDatabase } from '@firebase/database-types'; -import { PathReference, DatabaseQuery, DatabaseReference, DatabaseSnapshot, ChildEvent, ListenEvent, QueryFn, AngularFireList, AngularFireObject } from './interfaces'; +import { DatabaseQuery, PathReference, DatabaseSnapshot, ChildEvent, ListenEvent, QueryFn, AngularFireList, AngularFireObject } from './interfaces'; import { getRef } from './utils'; import { InjectionToken } from '@angular/core'; -import { FirebaseOptions, FirebaseAppConfig } from '@firebase/app-types'; import { createListReference } from './list/create-reference'; import { createObjectReference } from './object/create-reference'; -import { FirebaseOptionsToken, FirebaseNameOrConfigToken, RealtimeDatabaseURL, _firebaseAppFactory, FirebaseZoneScheduler } from 'angularfire2'; +import { FirebaseDatabase, FirebaseOptions, FirebaseAppConfig, FirebaseOptionsToken, FirebaseNameOrConfigToken, RealtimeDatabaseURL, _firebaseAppFactory, FirebaseZoneScheduler } from 'angularfire2'; @Injectable() export class AngularFireDatabase { @@ -49,8 +47,6 @@ export class AngularFireDatabase { export { PathReference, - DatabaseQuery, - DatabaseReference, DatabaseSnapshot, ChildEvent, ListenEvent, diff --git a/src/database/interfaces.ts b/src/database/interfaces.ts index 8af22e1ed..d278ffcbb 100644 --- a/src/database/interfaces.ts +++ b/src/database/interfaces.ts @@ -1,7 +1,7 @@ -import { Reference, DataSnapshot, ThenableReference, Query } from '@firebase/database-types'; import { Observable } from 'rxjs'; +import { database } from 'firebase/app'; -export type FirebaseOperation = string | Reference | DataSnapshot; +export type FirebaseOperation = string | database.Reference | database.DataSnapshot; export interface AngularFireList { query: DatabaseQuery; @@ -11,7 +11,7 @@ export interface AngularFireList { auditTrail(events?: ChildEvent[]): Observable[]>; update(item: FirebaseOperation, data: T): Promise; set(item: FirebaseOperation, data: T): Promise; - push(data: T): ThenableReference; + push(data: T): database.ThenableReference; remove(item?: FirebaseOperation): Promise; } @@ -49,13 +49,13 @@ export type SnapshotAction = AngularFireAction>; export type Primitive = number | string | boolean; -export interface DatabaseSnapshotExists extends DataSnapshot { +export interface DatabaseSnapshotExists extends database.DataSnapshot { exists(): true; val(): T; forEach(action: (a: DatabaseSnapshot) => boolean): boolean; } -export interface DatabaseSnapshotDoesNotExist extends DataSnapshot { +export interface DatabaseSnapshotDoesNotExist extends database.DataSnapshot { exists(): false; val(): null; forEach(action: (a: DatabaseSnapshot) => boolean): boolean; @@ -63,7 +63,8 @@ export interface DatabaseSnapshotDoesNotExist extends DataSnapshot { export type DatabaseSnapshot = DatabaseSnapshotExists | DatabaseSnapshotDoesNotExist; -export type DatabaseReference = Reference; -export type DatabaseQuery = Query; +export type DatabaseReference = database.Reference; +export type DatabaseQuery = database.Query; +export type DataSnapshot = database.DataSnapshot; export type QueryReference = DatabaseReference | DatabaseQuery; export type PathReference = QueryReference | string; diff --git a/src/database/list/audit-trail.spec.ts b/src/database/list/audit-trail.spec.ts index 1e847065e..c865aeb4c 100644 --- a/src/database/list/audit-trail.spec.ts +++ b/src/database/list/audit-trail.spec.ts @@ -1,4 +1,4 @@ -import { Reference } from '@firebase/database-types'; +import { DatabaseReference } from '../interfaces'; import { FirebaseApp, AngularFireModule } from 'angularfire2'; import { AngularFireDatabase, AngularFireDatabaseModule, auditTrail, ChildEvent } from 'angularfire2/database'; import { TestBed, inject } from '@angular/core/testing'; @@ -12,7 +12,7 @@ const FIREBASE_APP_NAME = rando(); describe('auditTrail', () => { let app: FirebaseApp; let db: AngularFireDatabase; - let createRef: (path: string) => Reference; + let createRef: (path: string) => DatabaseReference; let batch = {}; const items = [{ name: 'zero' }, { name: 'one' }, { name: 'two' }].map((item, i) => ( { key: i.toString(), ...item } )); Object.keys(items).forEach(function (key, i) { diff --git a/src/database/list/audit-trail.ts b/src/database/list/audit-trail.ts index e49bc6cbc..a9d41903a 100644 --- a/src/database/list/audit-trail.ts +++ b/src/database/list/audit-trail.ts @@ -1,7 +1,6 @@ -import { DatabaseQuery, ChildEvent, DatabaseSnapshot, AngularFireAction, SnapshotAction } from '../interfaces'; +import { DataSnapshot, DatabaseQuery, ChildEvent, DatabaseSnapshot, AngularFireAction, SnapshotAction } from '../interfaces'; import { stateChanges } from './state-changes'; import { Observable } from 'rxjs'; -import { DataSnapshot } from '@firebase/database-types'; import { fromRef } from '../observable/fromRef'; import { AngularFireDatabase } from '../database'; diff --git a/src/database/list/changes.spec.ts b/src/database/list/changes.spec.ts index 58116ebac..4628127a5 100644 --- a/src/database/list/changes.spec.ts +++ b/src/database/list/changes.spec.ts @@ -1,4 +1,4 @@ -import { Reference } from '@firebase/database-types'; +import { Reference } from 'firebase/database-types'; import { FirebaseApp, AngularFireModule } from 'angularfire2'; import { AngularFireDatabase, AngularFireDatabaseModule, listChanges } from 'angularfire2/database'; import { TestBed, inject } from '@angular/core/testing'; diff --git a/src/database/list/remove.ts b/src/database/list/remove.ts index fd46a4a68..7c87af3ed 100644 --- a/src/database/list/remove.ts +++ b/src/database/list/remove.ts @@ -1,7 +1,7 @@ -import { DatabaseReference, FirebaseOperation, DatabaseSnapshot } from '../interfaces'; +import { DatabaseReference, DataSnapshot, FirebaseOperation, DatabaseSnapshot } from '../interfaces'; import { checkOperationCases } from '../utils'; import { createDataOperationMethod } from './data-operation'; -import { DataSnapshot, Reference } from '@firebase/database-types'; +import { database } from 'firebase/app'; // TODO(davideast): Find out why TS thinks this returns firebase.Primise // instead of Promise. diff --git a/src/database/list/snapshot-changes.spec.ts b/src/database/list/snapshot-changes.spec.ts index 9705816bd..bf431672f 100644 --- a/src/database/list/snapshot-changes.spec.ts +++ b/src/database/list/snapshot-changes.spec.ts @@ -1,4 +1,4 @@ -import { Reference } from '@firebase/database-types'; +import { Reference } from 'firebase/database-types'; import { FirebaseApp, AngularFireModule } from 'angularfire2'; import { AngularFireDatabase, AngularFireDatabaseModule, snapshotChanges, ChildEvent } from 'angularfire2/database'; import { TestBed, inject } from '@angular/core/testing'; diff --git a/src/database/list/state-changes.spec.ts b/src/database/list/state-changes.spec.ts index d42e0a4ca..ce36064b6 100644 --- a/src/database/list/state-changes.spec.ts +++ b/src/database/list/state-changes.spec.ts @@ -1,4 +1,4 @@ -import { Reference } from '@firebase/database-types'; +import { Reference } from 'firebase/database-types'; import { FirebaseApp, AngularFireModule } from 'angularfire2'; import { AngularFireDatabase, AngularFireDatabaseModule, stateChanges, ChildEvent } from 'angularfire2/database'; import { TestBed, inject } from '@angular/core/testing'; diff --git a/src/database/observable/fromRef.spec.ts b/src/database/observable/fromRef.spec.ts index c12815c1d..5d58a6ea7 100644 --- a/src/database/observable/fromRef.spec.ts +++ b/src/database/observable/fromRef.spec.ts @@ -1,4 +1,4 @@ -import { Reference } from '@firebase/database-types'; +import { DatabaseReference } from '../interfaces'; import { FirebaseApp, AngularFireModule } from 'angularfire2'; import { AngularFireDatabase, AngularFireDatabaseModule, fromRef } from 'angularfire2/database'; import { TestBed, inject } from '@angular/core/testing'; @@ -11,7 +11,7 @@ const FIREBASE_APP_NAME = rando(); describe('fromRef', () => { let app: FirebaseApp; - let ref: (path: string) => Reference; + let ref: (path: string) => DatabaseReference; let batch = {}; const items = [{ name: 'one' }, { name: 'two' }, { name: 'three' }].map(item => ( { key: rando(), ...item } )); Object.keys(items).forEach(function (key) { diff --git a/src/database/package.json b/src/database/package.json index 752a7ae61..a78e9212f 100644 --- a/src/database/package.json +++ b/src/database/package.json @@ -22,8 +22,7 @@ "@angular/core": "ANGULAR_VERSION", "@angular/platform-browser": "ANGULAR_VERSION", "@angular/platform-browser-dynamic": "ANGULAR_VERSION", - "@firebase/app": "FIREBASE_APP_VERSION", - "@firebase/database": "FIREBASE_DATABASE_VERSION", + "firebase": "FIREBASE_VERSION", "rxjs": "RXJS_VERSION", "zone.js": "ZONEJS_VERSION" }, diff --git a/src/database/utils.ts b/src/database/utils.ts index b40e50fe4..43aa49243 100644 --- a/src/database/utils.ts +++ b/src/database/utils.ts @@ -1,6 +1,6 @@ import { Subscription, Scheduler } from 'rxjs'; import { PathReference, DatabaseReference, FirebaseOperation, FirebaseOperationCases } from './interfaces'; -import { FirebaseDatabase } from '@firebase/database-types'; +import { FirebaseDatabase } from 'angularfire2'; export function isString(value: any): boolean { return typeof value === 'string'; diff --git a/src/firestore/collection/changes.ts b/src/firestore/collection/changes.ts index 321bdf9e7..dfa415bd0 100644 --- a/src/firestore/collection/changes.ts +++ b/src/firestore/collection/changes.ts @@ -1,9 +1,8 @@ import { fromCollectionRef } from '../observable/fromRef'; -import { Query, DocumentChangeType, DocumentChange } from '@firebase/firestore-types'; import { Observable } from 'rxjs'; import { map, filter, scan } from 'rxjs/operators'; -import { DocumentChangeAction, Action } from '../interfaces'; +import { Query, DocumentChangeType, DocumentChange, DocumentChangeAction, Action } from '../interfaces'; /** * Return a stream of document changes on a query. These results are not in sort order but in @@ -37,7 +36,7 @@ export function sortedChanges(query: Query, events: DocumentChangeType[]): Ob * @param changes * @param events */ -export function combineChanges(current: DocumentChange[], changes: DocumentChange[], events: DocumentChangeType[]) { +export function combineChanges(current: DocumentChange[], changes: DocumentChange[], events: DocumentChangeType[]) { changes.forEach(change => { // skip unwanted change types if(events.indexOf(change.type) > -1) { @@ -52,7 +51,7 @@ export function combineChanges(current: DocumentChange[], changes: DocumentChang * @param combined * @param change */ -export function combineChange(combined: DocumentChange[], change: DocumentChange): DocumentChange[] { +export function combineChange(combined: DocumentChange[], change: DocumentChange): DocumentChange[] { switch(change.type) { case 'added': if (combined[change.newIndex] && combined[change.newIndex].doc.id == change.doc.id) { diff --git a/src/firestore/collection/collection.spec.ts b/src/firestore/collection/collection.spec.ts index 1b9fea45e..4e4605402 100644 --- a/src/firestore/collection/collection.spec.ts +++ b/src/firestore/collection/collection.spec.ts @@ -4,8 +4,6 @@ import { AngularFirestoreModule } from '../firestore.module'; import { AngularFirestoreDocument } from '../document/document'; import { AngularFirestoreCollection } from './collection'; import { QueryFn } from '../interfaces'; - -import { FirebaseApp as FBApp } from '@firebase/app-types'; import { Observable, BehaviorSubject, Subscription } from 'rxjs'; import { skip, take, switchMap } from 'rxjs/operators'; @@ -24,7 +22,7 @@ async function collectionHarness(afs: AngularFirestore, items: number, queryFn?: } describe('AngularFirestoreCollection', () => { - let app: FBApp; + let app: FirebaseApp; let afs: AngularFirestore; let sub: Subscription; @@ -35,7 +33,7 @@ describe('AngularFirestoreCollection', () => { AngularFirestoreModule.enablePersistence() ] }); - inject([FirebaseApp, AngularFirestore], (_app: FBApp, _afs: AngularFirestore) => { + inject([FirebaseApp, AngularFirestore], (_app: FirebaseApp, _afs: AngularFirestore) => { app = _app; afs = _afs; })(); diff --git a/src/firestore/collection/collection.ts b/src/firestore/collection/collection.ts index 621475fff..6513c12cd 100644 --- a/src/firestore/collection/collection.ts +++ b/src/firestore/collection/collection.ts @@ -1,11 +1,10 @@ -import { DocumentChangeType, CollectionReference, Query, DocumentReference, DocumentData } from '@firebase/firestore-types'; import { Observable, Subscriber } from 'rxjs'; import { fromCollectionRef } from '../observable/fromRef'; import { map, filter, scan } from 'rxjs/operators'; import { Injectable } from '@angular/core'; -import { QueryFn, AssociatedReference, DocumentChangeAction, DocumentChange } from '../interfaces'; +import { DocumentChangeType, CollectionReference, Query, DocumentReference, DocumentData, QueryFn, AssociatedReference, DocumentChangeAction, DocumentChange } from '../interfaces'; import { docChanges, sortedChanges } from './changes'; import { AngularFirestoreDocument } from '../document/document'; import { AngularFirestore } from '../firestore'; diff --git a/src/firestore/document/document.spec.ts b/src/firestore/document/document.spec.ts index 6be193e13..276f4c645 100644 --- a/src/firestore/document/document.spec.ts +++ b/src/firestore/document/document.spec.ts @@ -2,8 +2,6 @@ import { FirebaseApp, AngularFireModule } from 'angularfire2'; import { AngularFirestore } from '../firestore'; import { AngularFirestoreModule } from '../firestore.module'; import { AngularFirestoreDocument } from '../document/document'; - -import { FirebaseApp as FBApp } from '@firebase/app-types'; import { Observable, Subscription } from 'rxjs'; import { take } from 'rxjs/operators'; @@ -13,7 +11,7 @@ import { COMMON_CONFIG } from '../test-config'; import { Stock, randomName, FAKE_STOCK_DATA } from '../utils.spec'; describe('AngularFirestoreDocument', () => { - let app: FBApp; + let app: FirebaseApp; let afs: AngularFirestore; let sub: Subscription; @@ -24,7 +22,7 @@ describe('AngularFirestoreDocument', () => { AngularFirestoreModule.enablePersistence() ] }); - inject([FirebaseApp, AngularFirestore], (_app: FBApp, _afs: AngularFirestore) => { + inject([FirebaseApp, AngularFirestore], (_app: FirebaseApp, _afs: AngularFirestore) => { app = _app; afs = _afs; })(); diff --git a/src/firestore/document/document.ts b/src/firestore/document/document.ts index 9ff9b6b56..39d554b05 100644 --- a/src/firestore/document/document.ts +++ b/src/firestore/document/document.ts @@ -1,6 +1,5 @@ -import { DocumentReference, SetOptions, DocumentData } from '@firebase/firestore-types'; import { Observable, Subscriber } from 'rxjs'; -import { QueryFn, AssociatedReference, Action, DocumentSnapshot } from '../interfaces'; +import { DocumentReference, SetOptions, DocumentData, QueryFn, AssociatedReference, Action, DocumentSnapshot } from '../interfaces'; import { fromDocRef } from '../observable/fromRef'; import { map } from 'rxjs/operators'; diff --git a/src/firestore/firestore.module.ts b/src/firestore/firestore.module.ts index 2a3a90248..7056c277a 100644 --- a/src/firestore/firestore.module.ts +++ b/src/firestore/firestore.module.ts @@ -1,6 +1,7 @@ import { InjectionToken, ModuleWithProviders, NgModule } from '@angular/core'; import { AngularFirestore, EnablePersistenceToken } from './firestore'; -import '@firebase/firestore'; + +import 'firebase/firestore'; @NgModule({ providers: [ AngularFirestore ] diff --git a/src/firestore/firestore.ts b/src/firestore/firestore.ts index 1d34584bc..0d7fed7e1 100644 --- a/src/firestore/firestore.ts +++ b/src/firestore/firestore.ts @@ -1,15 +1,14 @@ import { InjectionToken, NgZone, PLATFORM_ID, Injectable, Inject, Optional } from '@angular/core'; -import { FirebaseFirestore, CollectionReference, DocumentReference, Settings } from '@firebase/firestore-types'; import { Observable, Subscriber, of, from } from 'rxjs'; import { map, catchError } from 'rxjs/operators'; -import { FirebaseOptions, FirebaseAppConfig } from '@firebase/app-types'; +import { firestore } from 'firebase/app'; -import { QueryFn, AssociatedReference } from './interfaces'; +import { Settings, CollectionReference, DocumentReference, QueryFn, AssociatedReference } from './interfaces'; import { AngularFirestoreDocument } from './document/document'; import { AngularFirestoreCollection } from './collection/collection'; -import { FirebaseOptionsToken, FirebaseNameOrConfigToken, _firebaseAppFactory, FirebaseZoneScheduler } from 'angularfire2'; +import { FirebaseFirestore, FirebaseOptions, FirebaseAppConfig, FirebaseOptionsToken, FirebaseNameOrConfigToken, _firebaseAppFactory, FirebaseZoneScheduler } from 'angularfire2'; /** * The value of this token determines whether or not the firestore will have persistance enabled diff --git a/src/firestore/interfaces.ts b/src/firestore/interfaces.ts index 4506aede8..0c6e174a9 100644 --- a/src/firestore/interfaces.ts +++ b/src/firestore/interfaces.ts @@ -1,12 +1,24 @@ import { Subscriber } from 'rxjs'; -import { DocumentChangeType, QuerySnapshot as _QuerySnapshot, FieldPath, DocumentSnapshot as _DocumentSnapshot, SnapshotOptions, QueryDocumentSnapshot as _QueryDocumentSnapshot, DocumentChange as _DocumentChange, CollectionReference, Query } from '@firebase/firestore-types'; +import { firestore } from 'firebase/app'; -export interface DocumentSnapshotExists extends _DocumentSnapshot { +export type Settings = firestore.Settings; +export type CollectionReference = firestore.CollectionReference; +export type DocumentReference = firestore.DocumentReference; + +export type DocumentChangeType = firestore.DocumentChangeType; +export type SnapshotOptions = firestore.SnapshotOptions; +export type FieldPath = firestore.FieldPath; +export type Query = firestore.Query; + +export type SetOptions = firestore.SetOptions; +export type DocumentData = firestore.DocumentData; + +export interface DocumentSnapshotExists extends firestore.DocumentSnapshot { readonly exists: true; data(options?: SnapshotOptions): T; } -export interface DocumentSnapshotDoesNotExist extends _DocumentSnapshot { +export interface DocumentSnapshotDoesNotExist extends firestore.DocumentSnapshot { readonly exists: false; data(options?: SnapshotOptions): undefined; get(fieldPath: string | FieldPath, options?: SnapshotOptions): undefined; @@ -14,15 +26,15 @@ export interface DocumentSnapshotDoesNotExist extends _DocumentSnapshot { export type DocumentSnapshot = DocumentSnapshotExists | DocumentSnapshotDoesNotExist; -export interface QueryDocumentSnapshot extends _QueryDocumentSnapshot { +export interface QueryDocumentSnapshot extends firestore.QueryDocumentSnapshot { data(options?: SnapshotOptions): T; } -export interface QuerySnapshot extends _QuerySnapshot { +export interface QuerySnapshot extends firestore.QuerySnapshot { readonly docs: QueryDocumentSnapshot[]; } -export interface DocumentChange extends _DocumentChange { +export interface DocumentChange extends firestore.DocumentChange { readonly doc: QueryDocumentSnapshot; } diff --git a/src/firestore/observable/fromRef.ts b/src/firestore/observable/fromRef.ts index 5f3e0d8f9..4c3f0aed7 100644 --- a/src/firestore/observable/fromRef.ts +++ b/src/firestore/observable/fromRef.ts @@ -1,6 +1,5 @@ -import { DocumentReference, Query } from '@firebase/firestore-types'; import { Observable, Subscriber } from 'rxjs'; -import { Action, Reference, DocumentSnapshot, QuerySnapshot } from '../interfaces'; +import { DocumentReference, Query, Action, Reference, DocumentSnapshot, QuerySnapshot } from '../interfaces'; import { map, share } from 'rxjs/operators'; function _fromRef(ref: Reference): Observable { diff --git a/src/firestore/package.json b/src/firestore/package.json index 5ed6993a0..a0234d269 100644 --- a/src/firestore/package.json +++ b/src/firestore/package.json @@ -22,8 +22,7 @@ "@angular/core": "ANGULAR_VERSION", "@angular/platform-browser": "ANGULAR_VERSION", "@angular/platform-browser-dynamic": "ANGULAR_VERSION", - "@firebase/app": "FIREBASE_APP_VERSION", - "@firebase/firestore": "FIREBASE_FIRESTORE_VERSION", + "firebase": "FIREBASE_VERSION", "rxjs": "RXJS_VERSION", "zone.js": "ZONEJS_VERSION" }, diff --git a/src/firestore/utils.spec.ts b/src/firestore/utils.spec.ts index 93e9368df..fdf044865 100644 --- a/src/firestore/utils.spec.ts +++ b/src/firestore/utils.spec.ts @@ -1,4 +1,4 @@ -import { FirebaseFirestore, CollectionReference } from '@firebase/firestore-types'; +import { FirebaseFirestore, CollectionReference } from 'firebase/firestore-types'; import { AngularFirestoreCollection } from './collection/collection'; export interface Stock { diff --git a/src/functions/functions.module.ts b/src/functions/functions.module.ts index 0809e29f6..7fabbd91f 100644 --- a/src/functions/functions.module.ts +++ b/src/functions/functions.module.ts @@ -1,6 +1,6 @@ import { NgModule } from '@angular/core'; import { AngularFireFunctions } from './functions'; -import '@firebase/functions' +import 'firebase/functions' @NgModule({ providers: [ AngularFireFunctions ] diff --git a/src/functions/functions.ts b/src/functions/functions.ts index 41bc0dda8..20aefcb3a 100644 --- a/src/functions/functions.ts +++ b/src/functions/functions.ts @@ -1,10 +1,10 @@ -import { FirebaseFunctions } from '@firebase/functions-types'; -import { FirebaseOptions, FirebaseAppConfig } from '@firebase/app-types'; import { Injectable, Inject, Optional, NgZone, PLATFORM_ID } from '@angular/core'; import { Observable, from } from 'rxjs'; import { map } from 'rxjs/operators'; -import { FirebaseOptionsToken, FirebaseNameOrConfigToken, _firebaseAppFactory, FirebaseZoneScheduler } from 'angularfire2'; +import { FirebaseOptions, FirebaseAppConfig } from 'angularfire2'; + +import { FirebaseFunctions, FirebaseOptionsToken, FirebaseNameOrConfigToken, _firebaseAppFactory, FirebaseZoneScheduler } from 'angularfire2'; @Injectable() export class AngularFireFunctions { diff --git a/src/functions/package.json b/src/functions/package.json index 62b3386ae..23a99d64b 100644 --- a/src/functions/package.json +++ b/src/functions/package.json @@ -22,8 +22,7 @@ "@angular/core": "ANGULAR_VERSION", "@angular/platform-browser": "ANGULAR_VERSION", "@angular/platform-browser-dynamic": "ANGULAR_VERSION", - "@firebase/app": "FIREBASE_APP_VERSION", - "@firebase/functions": "FIREBASE_FUNCTIONS_VERSION", + "firebase": "FIREBASE_VERSION", "rxjs": "RXJS_VERSION", "zone.js": "ZONEJS_VERSION" }, diff --git a/src/storage/interfaces.ts b/src/storage/interfaces.ts new file mode 100644 index 000000000..c46200066 --- /dev/null +++ b/src/storage/interfaces.ts @@ -0,0 +1,9 @@ +import { storage } from 'firebase/app'; + +export type UploadTask = storage.UploadTask; +export type UploadTaskSnapshot = storage.UploadTaskSnapshot; +export type UploadMetadata = storage.UploadMetadata; + +export type SettableMetadata = storage.SettableMetadata; +export type Reference = storage.Reference; +export type StringFormat = storage.StringFormat; \ No newline at end of file diff --git a/src/storage/observable/fromTask.ts b/src/storage/observable/fromTask.ts index d6daef310..0aac5f2e6 100644 --- a/src/storage/observable/fromTask.ts +++ b/src/storage/observable/fromTask.ts @@ -1,5 +1,6 @@ -import { UploadTask, UploadTaskSnapshot } from '@firebase/storage-types'; import { Observable } from 'rxjs'; +import { UploadTask, UploadTaskSnapshot } from '../interfaces'; +import { storage } from 'firebase/app'; export function fromTask(task: UploadTask) { return new Observable(subscriber => { diff --git a/src/storage/package.json b/src/storage/package.json index 394f9eeba..59187a236 100644 --- a/src/storage/package.json +++ b/src/storage/package.json @@ -22,8 +22,7 @@ "@angular/core": "ANGULAR_VERSION", "@angular/platform-browser": "ANGULAR_VERSION", "@angular/platform-browser-dynamic": "ANGULAR_VERSION", - "@firebase/app": "FIREBASE_APP_VERSION", - "@firebase/storage": "FIREBASE_STORAGE_VERSION", + "firebase": "FIREBASE_VERSION", "rxjs": "RXJS_VERSION", "zone.js": "ZONEJS_VERSION" }, diff --git a/src/storage/ref.ts b/src/storage/ref.ts index 6f026e533..9cef6855d 100644 --- a/src/storage/ref.ts +++ b/src/storage/ref.ts @@ -1,4 +1,4 @@ -import { SettableMetadata, UploadMetadata, Reference, StringFormat } from '@firebase/storage-types'; +import { SettableMetadata, UploadMetadata, Reference, StringFormat } from './interfaces'; import { createUploadTask, AngularFireUploadTask } from './task'; import { Observable, from } from 'rxjs'; import { FirebaseZoneScheduler } from 'angularfire2'; diff --git a/src/storage/storage.module.ts b/src/storage/storage.module.ts index 9dc469ad0..e1d167b32 100644 --- a/src/storage/storage.module.ts +++ b/src/storage/storage.module.ts @@ -1,6 +1,6 @@ import { NgModule, InjectionToken } from '@angular/core'; import { AngularFireStorage, StorageBucket } from './storage'; -import '@firebase/storage'; +import 'firebase/storage'; @NgModule({ providers: [ AngularFireStorage ] diff --git a/src/storage/storage.ts b/src/storage/storage.ts index 5435bf62a..211b49bce 100644 --- a/src/storage/storage.ts +++ b/src/storage/storage.ts @@ -1,10 +1,10 @@ import { Injectable, Inject, Optional, InjectionToken, NgZone, PLATFORM_ID } from '@angular/core'; -import { FirebaseStorage, UploadMetadata } from '@firebase/storage-types'; import { createStorageRef, AngularFireStorageReference } from './ref'; import { createUploadTask, AngularFireUploadTask } from './task'; import { Observable } from 'rxjs'; -import { FirebaseOptionsToken, FirebaseNameOrConfigToken, FirebaseZoneScheduler, _firebaseAppFactory } from 'angularfire2'; -import { FirebaseOptions, FirebaseAppConfig } from '@firebase/app-types'; +import { FirebaseStorage, FirebaseOptions, FirebaseAppConfig, FirebaseOptionsToken, FirebaseNameOrConfigToken, FirebaseZoneScheduler, _firebaseAppFactory } from 'angularfire2'; + +import { UploadMetadata } from './interfaces'; export const StorageBucket = new InjectionToken('angularfire2.storageBucket'); diff --git a/src/storage/task.ts b/src/storage/task.ts index 95558515b..edeeed644 100644 --- a/src/storage/task.ts +++ b/src/storage/task.ts @@ -1,4 +1,4 @@ -import { UploadTaskSnapshot, UploadTask } from '@firebase/storage-types'; +import { UploadTaskSnapshot, UploadTask } from './interfaces'; import { fromTask } from './observable/fromTask'; import { Observable, from } from 'rxjs'; import { map, filter } from 'rxjs/operators'; diff --git a/test/typings-test/package.sample.json b/test/typings-test/package.sample.json index dfcae6307..efbf7183d 100644 --- a/test/typings-test/package.sample.json +++ b/test/typings-test/package.sample.json @@ -4,7 +4,7 @@ "private": true, "dependencies": { "angularfire2": "file:{{ANGULARFIRE_VERSION}}", - "@firebase/app": "{{FIREBASE_APP_VERSION}}", + "firebase": "{{FIREBASE_VERSION}}", "@angular/common": "{{ANGULAR_VERSION}}", "@angular/compiler": "{{ANGULAR_VERSION}}", "@angular/core": "{{ANGULAR_VERSION}}", diff --git a/tools/build.js b/tools/build.js index 9d77b0e62..ce8069736 100644 --- a/tools/build.js +++ b/tools/build.js @@ -13,35 +13,29 @@ const GLOBALS = { 'rxjs': 'rxjs', 'rxjs/operators': 'rxjs.operators', '@angular/common': 'ng.common', - '@angular/compiler': 'ng.compiler', '@angular/core': 'ng.core', '@angular/core/testing': 'ng.core.testing', '@angular/platform-browser': 'ng.platformBrowser', - '@firebase/app': 'firebase', - '@firebase/auth': 'firebase', - '@firebase/database': 'firebase', - '@firebase/firestore': 'firebase', - '@firebase/functions': 'firebase', - '@firebase/storage': 'firebase', + 'firebase': 'firebase', + 'firebase/app': 'firebase', + 'firebase/auth': 'firebase', + 'firebase/database': 'firebase', + 'firebase/firestore': 'firebase', + 'firebase/functions': 'firebase', + 'firebase/storage': 'firebase', 'angularfire2': 'angularfire2', 'angularfire2/auth': 'angularfire2.auth', 'angularfire2/database': 'angularfire2.database', 'angularfire2/database-deprecated': 'angularfire2.database_deprecated', 'angularfire2/firestore': 'angularfire2.firestore', 'angularfire2/functions': 'angularfire2.functions', - 'angularfire2/storage': 'angularfire2.storage', - 'zone.js': 'Zone' + 'angularfire2/storage': 'angularfire2.storage' }; // Map of dependency versions across all packages const VERSIONS = { ANGULAR_VERSION: pkg.dependencies['@angular/core'], - FIREBASE_APP_VERSION: pkg.dependencies['@firebase/app'], - FIREBASE_AUTH_VERSION: pkg.dependencies['@firebase/auth'], - FIREBASE_DATABASE_VERSION: pkg.dependencies['@firebase/database'], - FIREBASE_FIRESTORE_VERSION: pkg.dependencies['@firebase/firestore'], - FIREBASE_FUNCTIONS_VERSION: pkg.dependencies['@firebase/functions'], - FIREBASE_STORAGE_VERSION: pkg.dependencies['@firebase/storage'], + FIREBASE_VERSION: pkg.dependencies['firebase'], RXJS_VERSION: pkg.dependencies['rxjs'], ZONEJS_VERSION: pkg.dependencies['zone.js'], ANGULARFIRE2_VERSION: pkg.version, @@ -94,16 +88,6 @@ const DEST_PKG_PATHS = { storage: `${process.cwd()}/dist/packages-dist/storage/package.json` }; -const FIREBASE_FEATURE_MODULES = { - app: `${process.cwd()}/node_modules/@firebase/app/dist/esm/index.js`, - auth: `${process.cwd()}/node_modules/@firebase/auth/dist/auth.js`, - database: `${process.cwd()}/node_modules/@firebase/database/dist/esm/index.js`, - firestore: `${process.cwd()}/node_modules/@firebase/firestore/dist/esm/index.js`, - functions: `${process.cwd()}/node_modules/@firebase/functions/dist/esm/index.js`, - storage: `${process.cwd()}/node_modules/@firebase/storage/dist/esm/index.js`, - util: `${process.cwd()}/node_modules/@firebase/util/dist/esm/index.js`, -}; - // Constants for running typescript commands const TSC = 'node_modules/.bin/tsc'; const NGC = 'node_modules/.bin/ngc'; diff --git a/tools/run-typings-test.js b/tools/run-typings-test.js index 96a5d0a23..a9f43b035 100644 --- a/tools/run-typings-test.js +++ b/tools/run-typings-test.js @@ -29,7 +29,7 @@ ncp(pathToTestSrcFolder, pathToTestFolder, () => { fs.writeFileSync(`${pathToTestFolder}/package.json`, JSON.stringify(samplePackage, null, 2) .replace('{{ANGULARFIRE_VERSION}}', path.resolve(__dirname, '../dist/packages-dist')) - .replace('{{FIREBASE_APP_VERSION}}', rootPackage.dependencies['@firebase/app']) + .replace('{{FIREBASE_VERSION}}', rootPackage.dependencies['firebase']) .replace('{{RXJS_VERSION}}', rootPackage.dependencies.rxjs) .replace('{{ZONE_VERSION}}', rootPackage.dependencies['zone.js']) .replace('{{TYPESCRIPT_VERSION}}', rootPackage.devDependencies.typescript) diff --git a/yarn.lock b/yarn.lock index 3d8b4d445..9632397c0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -49,65 +49,65 @@ tslib "^1.9.0" xhr2 "^0.1.4" -"@firebase/app-types@0.3.1", "@firebase/app-types@^0.3.1": +"@firebase/app-types@0.3.1": version "0.3.1" resolved "https://registry.yarnpkg.com/@firebase/app-types/-/app-types-0.3.1.tgz#df4e79c38f759e606a421e866cecb7da4577b606" -"@firebase/app@0.3.1", "@firebase/app@^0.3.1": - version "0.3.1" - resolved "https://registry.yarnpkg.com/@firebase/app/-/app-0.3.1.tgz#282a217bc904fd5168e43c3e2d30e6658ceca278" +"@firebase/app@0.3.2": + version "0.3.2" + resolved "https://registry.yarnpkg.com/@firebase/app/-/app-0.3.2.tgz#863a5558ee796e55ce90bd9bef8ee66ef6a96e6f" dependencies: "@firebase/app-types" "0.3.1" - "@firebase/util" "0.2.0" + "@firebase/util" "0.2.1" dom-storage "2.1.0" tslib "1.9.0" xmlhttprequest "1.8.0" -"@firebase/auth-types@0.3.2", "@firebase/auth-types@^0.3.2": +"@firebase/auth-types@0.3.2": version "0.3.2" resolved "https://registry.yarnpkg.com/@firebase/auth-types/-/auth-types-0.3.2.tgz#fc636084eb82cb098e4e76efc5fffd315e22abdd" -"@firebase/auth@0.5.2", "@firebase/auth@^0.5.2": +"@firebase/auth@0.5.2": version "0.5.2" resolved "https://registry.yarnpkg.com/@firebase/auth/-/auth-0.5.2.tgz#f4d7b699e21523b412f5af21a5507f44625d056c" dependencies: "@firebase/auth-types" "0.3.2" -"@firebase/database-types@0.3.1", "@firebase/database-types@^0.3.1": +"@firebase/database-types@0.3.1": version "0.3.1" resolved "https://registry.yarnpkg.com/@firebase/database-types/-/database-types-0.3.1.tgz#4a15423f3b2cb3bed111f5a353c5c1bb2e2787ba" -"@firebase/database@0.3.1", "@firebase/database@^0.3.1": - version "0.3.1" - resolved "https://registry.yarnpkg.com/@firebase/database/-/database-0.3.1.tgz#1ca0797b8e9a243d383d31b1873373b84a2048b9" +"@firebase/database@0.3.2": + version "0.3.2" + resolved "https://registry.yarnpkg.com/@firebase/database/-/database-0.3.2.tgz#cb0dce2c46a18f1af7496fe71b3b617e1f4fd63f" dependencies: "@firebase/database-types" "0.3.1" "@firebase/logger" "0.1.1" - "@firebase/util" "0.2.0" + "@firebase/util" "0.2.1" faye-websocket "0.11.1" tslib "1.9.0" -"@firebase/firestore-types@0.4.1", "@firebase/firestore-types@^0.4.1": - version "0.4.1" - resolved "https://registry.yarnpkg.com/@firebase/firestore-types/-/firestore-types-0.4.1.tgz#9a96dff26f0537b13ff119b5e7ab4bddad2068d1" +"@firebase/firestore-types@0.4.2": + version "0.4.2" + resolved "https://registry.yarnpkg.com/@firebase/firestore-types/-/firestore-types-0.4.2.tgz#6b5b25063b48a283923a15a36a2df7a513e186f8" -"@firebase/firestore@0.5.2", "@firebase/firestore@^0.5.2": - version "0.5.2" - resolved "https://registry.yarnpkg.com/@firebase/firestore/-/firestore-0.5.2.tgz#92dcbc604e41d97d371e115280f917dbdeaab21a" +"@firebase/firestore@0.5.3": + version "0.5.3" + resolved "https://registry.yarnpkg.com/@firebase/firestore/-/firestore-0.5.3.tgz#cb6fbbb9200f55ceac42c012db3679a7d75c0b52" dependencies: - "@firebase/firestore-types" "0.4.1" + "@firebase/firestore-types" "0.4.2" "@firebase/logger" "0.1.1" "@firebase/webchannel-wrapper" "0.2.8" - grpc "1.10.1" + grpc "1.11.3" tslib "1.9.0" -"@firebase/functions-types@0.1.2", "@firebase/functions-types@^0.1.2": +"@firebase/functions-types@0.1.2": version "0.1.2" resolved "https://registry.yarnpkg.com/@firebase/functions-types/-/functions-types-0.1.2.tgz#f291b2945218a97d9ab0e20f2fdec2cef6f90f94" -"@firebase/functions@0.2.2", "@firebase/functions@^0.2.2": - version "0.2.2" - resolved "https://registry.yarnpkg.com/@firebase/functions/-/functions-0.2.2.tgz#fd919deede5ec48870ecf751e4300066fc9424dc" +"@firebase/functions@0.2.3": + version "0.2.3" + resolved "https://registry.yarnpkg.com/@firebase/functions/-/functions-0.2.3.tgz#2baa6c718b7cbf7ef31032c0aacb2c0bf1ccd837" dependencies: "@firebase/functions-types" "0.1.2" "@firebase/messaging-types" "0.2.2" @@ -117,40 +117,40 @@ version "0.1.1" resolved "https://registry.yarnpkg.com/@firebase/logger/-/logger-0.1.1.tgz#af5df54253286993f4b367c3dabe569c848860d3" -"@firebase/messaging-types@0.2.2", "@firebase/messaging-types@^0.2.2": +"@firebase/messaging-types@0.2.2": version "0.2.2" resolved "https://registry.yarnpkg.com/@firebase/messaging-types/-/messaging-types-0.2.2.tgz#7d97abb87b599445f09df0085cbd89e9405984c6" -"@firebase/messaging@0.3.2": - version "0.3.2" - resolved "https://registry.yarnpkg.com/@firebase/messaging/-/messaging-0.3.2.tgz#4851b41773deb890f6919a67270d3fd34863756b" +"@firebase/messaging@0.3.3": + version "0.3.3" + resolved "https://registry.yarnpkg.com/@firebase/messaging/-/messaging-0.3.3.tgz#4f8813fac30d9107ad4972e1c36da571fb5c5dd8" dependencies: "@firebase/messaging-types" "0.2.2" - "@firebase/util" "0.2.0" + "@firebase/util" "0.2.1" tslib "1.9.0" -"@firebase/polyfill@0.3.1": - version "0.3.1" - resolved "https://registry.yarnpkg.com/@firebase/polyfill/-/polyfill-0.3.1.tgz#9835cc9b7a1369a92e38a95f96e42d0ee71f18fe" +"@firebase/polyfill@0.3.2": + version "0.3.2" + resolved "https://registry.yarnpkg.com/@firebase/polyfill/-/polyfill-0.3.2.tgz#d125f80be4c1decd951e68c63c18fb1f6ea7a021" dependencies: core-js "2.5.5" promise-polyfill "7.1.2" whatwg-fetch "2.0.4" -"@firebase/storage-types@0.2.2", "@firebase/storage-types@^0.2.2": +"@firebase/storage-types@0.2.2": version "0.2.2" resolved "https://registry.yarnpkg.com/@firebase/storage-types/-/storage-types-0.2.2.tgz#14b56a3b61005e72dfd9ac3ec6bcb160bc3736d3" -"@firebase/storage@0.2.2", "@firebase/storage@^0.2.2": +"@firebase/storage@0.2.2": version "0.2.2" resolved "https://registry.yarnpkg.com/@firebase/storage/-/storage-0.2.2.tgz#97a90e41b008f6c3b6193e7fed1f4afd3cfda8b4" dependencies: "@firebase/storage-types" "0.2.2" tslib "1.9.0" -"@firebase/util@0.2.0": - version "0.2.0" - resolved "https://registry.yarnpkg.com/@firebase/util/-/util-0.2.0.tgz#b9e176703deda671b823522759f88f8356aaf624" +"@firebase/util@0.2.1": + version "0.2.1" + resolved "https://registry.yarnpkg.com/@firebase/util/-/util-0.2.1.tgz#b59a2fbf14fce21401cbebf776a3e0260b591380" dependencies: tslib "1.9.0" @@ -700,12 +700,6 @@ blob@0.0.4: version "0.0.4" resolved "https://registry.yarnpkg.com/blob/-/blob-0.0.4.tgz#bcf13052ca54463f30f9fc7e95b9a47630a94921" -block-stream@*: - version "0.0.9" - resolved "https://registry.yarnpkg.com/block-stream/-/block-stream-0.0.9.tgz#13ebfe778a03205cfe03751481ebb4b3300c126a" - dependencies: - inherits "~2.0.0" - bluebird@2.9.6: version "2.9.6" resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-2.9.6.tgz#1fc3a6b1685267dc121b5ec89b32ce069d81ab7d" @@ -1906,17 +1900,17 @@ fined@^1.0.1: object.pick "^1.2.0" parse-filepath "^1.0.1" -firebase@^5.0.2: - version "5.0.2" - resolved "https://registry.yarnpkg.com/firebase/-/firebase-5.0.2.tgz#5c0d647acc10552d15169e5f8482413aff1264cb" +firebase@^5.0.3: + version "5.0.3" + resolved "https://registry.yarnpkg.com/firebase/-/firebase-5.0.3.tgz#b3e9334022cd90567d398b31f49fb67f0489e271" dependencies: - "@firebase/app" "0.3.1" + "@firebase/app" "0.3.2" "@firebase/auth" "0.5.2" - "@firebase/database" "0.3.1" - "@firebase/firestore" "0.5.2" - "@firebase/functions" "0.2.2" - "@firebase/messaging" "0.3.2" - "@firebase/polyfill" "0.3.1" + "@firebase/database" "0.3.2" + "@firebase/firestore" "0.5.3" + "@firebase/functions" "0.2.3" + "@firebase/messaging" "0.3.3" + "@firebase/polyfill" "0.3.2" "@firebase/storage" "0.2.2" first-chunk-stream@^1.0.0: @@ -2032,23 +2026,6 @@ fsevents@^1.0.0: nan "^2.9.2" node-pre-gyp "^0.9.0" -fstream-ignore@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/fstream-ignore/-/fstream-ignore-1.0.5.tgz#9c31dae34767018fe1d249b24dada67d092da105" - dependencies: - fstream "^1.0.0" - inherits "2" - minimatch "^3.0.0" - -fstream@^1.0.0, fstream@^1.0.10, fstream@^1.0.2: - version "1.0.11" - resolved "https://registry.yarnpkg.com/fstream/-/fstream-1.0.11.tgz#5c1fb1f117477114f0632a0eb4b71b3cb0fd3171" - dependencies: - graceful-fs "^4.1.2" - inherits "~2.0.0" - mkdirp ">=0.5 0" - rimraf "2" - ftp@~0.3.10: version "0.3.10" resolved "https://registry.yarnpkg.com/ftp/-/ftp-0.3.10.tgz#9197d861ad8142f3e63d5a83bfe4c59f7330885d" @@ -2318,13 +2295,13 @@ graceful-fs@~1.2.0: version "1.0.1" resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725" -grpc@1.10.1: - version "1.10.1" - resolved "https://registry.yarnpkg.com/grpc/-/grpc-1.10.1.tgz#90691404aeb769a98784924d08e8fd07c920b2da" +grpc@1.11.3: + version "1.11.3" + resolved "https://registry.yarnpkg.com/grpc/-/grpc-1.11.3.tgz#46093bb17702b9fc1b099789695e6f47d6487129" dependencies: lodash "^4.15.0" - nan "^2.10.0" - node-pre-gyp "0.7.0" + nan "^2.0.0" + node-pre-gyp "^0.10.0" protobufjs "^5.0.0" gulp-jasmine@^2.2.1: @@ -2729,7 +2706,7 @@ inherits@1: version "1.0.2" resolved "https://registry.yarnpkg.com/inherits/-/inherits-1.0.2.tgz#ca4309dadee6b54cc0b8d247e8d7c7a0975bdc9b" -inherits@2, inherits@2.0.3, inherits@^2.0.1, inherits@~2.0.0, inherits@~2.0.1, inherits@~2.0.3: +inherits@2, inherits@2.0.3, inherits@^2.0.1, inherits@~2.0.1, inherits@~2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" @@ -3690,7 +3667,7 @@ mixin-deep@^1.2.0: for-in "^1.0.2" is-extendable "^1.0.1" -mkdirp@0.5.x, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1: +mkdirp@0.5.x, mkdirp@^0.5.0, mkdirp@^0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" dependencies: @@ -3718,7 +3695,7 @@ multipipe@^0.1.2: dependencies: duplexer2 "0.0.2" -nan@^2.0.5, nan@^2.10.0, nan@^2.9.2, nan@~2.10.0: +nan@^2.0.0, nan@^2.0.5, nan@^2.9.2, nan@~2.10.0: version "2.10.0" resolved "https://registry.yarnpkg.com/nan/-/nan-2.10.0.tgz#96d0cd610ebd58d4b4de9cc0c6828cda99c7548f" @@ -3784,20 +3761,20 @@ node-fetch@^1.0.1: encoding "^0.1.11" is-stream "^1.0.1" -node-pre-gyp@0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.7.0.tgz#55aeffbaed93b50d0a4657d469198cd80ac9df36" +node-pre-gyp@^0.10.0: + version "0.10.0" + resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.10.0.tgz#6e4ef5bb5c5203c6552448828c852c40111aac46" dependencies: detect-libc "^1.0.2" mkdirp "^0.5.1" + needle "^2.2.0" nopt "^4.0.1" + npm-packlist "^1.1.6" npmlog "^4.0.2" rc "^1.1.7" - request "2.83.0" rimraf "^2.6.1" semver "^5.3.0" - tar "^2.2.1" - tar-pack "^3.4.0" + tar "^4" node-pre-gyp@^0.9.0: version "0.9.1" @@ -3986,7 +3963,7 @@ on-finished@~2.3.0: dependencies: ee-first "1.1.1" -once@^1.3.0, once@^1.3.1, once@^1.3.3, once@^1.4.0: +once@^1.3.0, once@^1.3.1, once@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" dependencies: @@ -4471,7 +4448,7 @@ readable-stream@1.1.x, "readable-stream@1.x >=1.1.9", readable-stream@~1.1.9: isarray "0.0.1" string_decoder "~0.10.x" -readable-stream@2, readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.4, readable-stream@^2.0.5, readable-stream@^2.0.6, readable-stream@^2.1.4, readable-stream@^2.1.5, readable-stream@^2.3.0, readable-stream@^2.3.5: +readable-stream@2, readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.4, readable-stream@^2.0.5, readable-stream@^2.0.6, readable-stream@^2.1.5, readable-stream@^2.3.0, readable-stream@^2.3.5: version "2.3.6" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf" dependencies: @@ -4625,33 +4602,6 @@ request@2.75.x: tough-cookie "~2.3.0" tunnel-agent "~0.4.1" -request@2.83.0: - version "2.83.0" - resolved "https://registry.yarnpkg.com/request/-/request-2.83.0.tgz#ca0b65da02ed62935887808e6f510381034e3356" - dependencies: - aws-sign2 "~0.7.0" - aws4 "^1.6.0" - caseless "~0.12.0" - combined-stream "~1.0.5" - extend "~3.0.1" - forever-agent "~0.6.1" - form-data "~2.3.1" - har-validator "~5.0.3" - hawk "~6.0.2" - http-signature "~1.2.0" - is-typedarray "~1.0.0" - isstream "~0.1.2" - json-stringify-safe "~5.0.1" - mime-types "~2.1.17" - oauth-sign "~0.8.2" - performance-now "^2.1.0" - qs "~6.5.1" - safe-buffer "^5.1.1" - stringstream "~0.0.5" - tough-cookie "~2.3.3" - tunnel-agent "^0.6.0" - uuid "^3.1.0" - request@^2.0.0, request@^2.74.0: version "2.85.0" resolved "https://registry.yarnpkg.com/request/-/request-2.85.0.tgz#5a03615a47c61420b3eb99b7dba204f83603e1fa" @@ -4742,7 +4692,7 @@ right-align@^0.1.1: dependencies: align-text "^0.1.1" -rimraf@2, rimraf@^2.2.8, rimraf@^2.5.1, rimraf@^2.5.4, rimraf@^2.6.0, rimraf@^2.6.1: +rimraf@^2.2.8, rimraf@^2.5.4, rimraf@^2.6.0, rimraf@^2.6.1: version "2.6.2" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36" dependencies: @@ -5307,19 +5257,6 @@ tar-fs@^1.13.0: pump "^1.0.0" tar-stream "^1.1.2" -tar-pack@^3.4.0: - version "3.4.1" - resolved "https://registry.yarnpkg.com/tar-pack/-/tar-pack-3.4.1.tgz#e1dbc03a9b9d3ba07e896ad027317eb679a10a1f" - dependencies: - debug "^2.2.0" - fstream "^1.0.10" - fstream-ignore "^1.0.5" - once "^1.3.3" - readable-stream "^2.1.4" - rimraf "^2.5.1" - tar "^2.2.1" - uid-number "^0.0.6" - tar-stream@^1.1.2: version "1.6.0" resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-1.6.0.tgz#a50efaa7b17760b82c27b3cae4a301a8254a5715" @@ -5332,14 +5269,6 @@ tar-stream@^1.1.2: to-buffer "^1.1.0" xtend "^4.0.0" -tar@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/tar/-/tar-2.2.1.tgz#8e4d2a256c0e2185c6b18ad694aec968b83cb1d1" - dependencies: - block-stream "*" - fstream "^1.0.2" - inherits "2" - tar@^4: version "4.4.2" resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.2.tgz#60685211ba46b38847b1ae7ee1a24d744a2cd462" @@ -5572,10 +5501,6 @@ uglify-to-browserify@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" -uid-number@^0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/uid-number/-/uid-number-0.0.6.tgz#0ea10e8035e8eb5b8e4449f06da1c730663baa81" - ultron@1.0.x: version "1.0.2" resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.0.2.tgz#ace116ab557cd197386a4e88f4685378c8b2e4fa"