fix(bundles): correct RxJS mapping in rollup config for umd/es5 bundles

This commit is contained in:
Igor Minar 2016-08-30 12:13:38 -07:00 committed by Victor Berchet
parent 71ae2c4525
commit 174c016104
19 changed files with 34 additions and 102 deletions

View File

@ -7,9 +7,7 @@ export default {
globals: {
'@angular/core': 'ng.core',
'@angular/common': 'ng.common',
'rxjs/Subject': 'Rx',
'rxjs/observable/PromiseObservable': 'Rx', // this is wrong, but this stuff has changed in rxjs b.6 so we need to fix it when we update.
'rxjs/operator/toPromise': 'Rx.Observable.prototype',
'rxjs/Observable': 'Rx'
'rxjs/Observable': 'Rx',
'rxjs/Subject': 'Rx'
}
}

View File

@ -6,9 +6,7 @@ export default {
moduleName: 'ng.common',
globals: {
'@angular/core': 'ng.core',
'rxjs/Subject': 'Rx',
'rxjs/observable/PromiseObservable': 'Rx', // this is wrong, but this stuff has changed in rxjs b.6 so we need to fix it when we update.
'rxjs/operator/toPromise': 'Rx.Observable.prototype',
'rxjs/Observable': 'Rx'
'rxjs/Observable': 'Rx',
'rxjs/Subject': 'Rx'
}
}

View File

@ -8,9 +8,7 @@ export default {
'@angular/core': 'ng.core',
'@angular/core/testing': 'ng.core.testing',
'@angular/compiler': 'ng.compiler',
'rxjs/Subject': 'Rx',
'rxjs/observable/PromiseObservable': 'Rx', // this is wrong, but this stuff has changed in rxjs b.6 so we need to fix it when we update.
'rxjs/operator/toPromise': 'Rx.Observable.prototype',
'rxjs/Observable': 'Rx'
'rxjs/Observable': 'Rx',
'rxjs/Subject': 'Rx'
}
}

View File

@ -6,10 +6,8 @@ export default {
moduleName: 'ng.compiler',
globals: {
'@angular/core': 'ng.core',
'rxjs/Subject': 'Rx',
'rxjs/observable/PromiseObservable': 'Rx', // this is wrong, but this stuff has changed in rxjs b.6 so we need to fix it when we update.
'rxjs/operator/toPromise': 'Rx.Observable.prototype',
'rxjs/Observable': 'Rx'
'rxjs/Observable': 'Rx',
'rxjs/Subject': 'Rx'
},
plugins: [
// nodeResolve({ jsnext: true, main: true }),

View File

@ -6,10 +6,8 @@ export default {
moduleName: 'ng.core.testing',
globals: {
'@angular/core': 'ng.core',
'rxjs/Subject': 'Rx',
'rxjs/observable/PromiseObservable': 'Rx', // this is wrong, but this stuff has changed in rxjs b.6 so we need to fix it when we update.
'rxjs/operator/toPromise': 'Rx.Observable.prototype',
'rxjs/Observable': 'Rx'
'rxjs/Observable': 'Rx',
'rxjs/Subject': 'Rx'
}
}

View File

@ -5,10 +5,8 @@ export default {
format: 'umd',
moduleName: 'ng.core',
globals: {
'rxjs/Subject': 'Rx',
'rxjs/observable/PromiseObservable': 'Rx', // this is wrong, but this stuff has changed in rxjs b.6 so we need to fix it when we update.
'rxjs/operator/toPromise': 'Rx.Observable.prototype',
'rxjs/Observable': 'Rx'
'rxjs/Observable': 'Rx',
'rxjs/Subject': 'Rx'
}
}

View File

@ -8,9 +8,9 @@ export default {
'@angular/core': 'ng.core',
'@angular/common': 'ng.common',
'@angular/compiler': 'ng.compiler',
'rxjs/Observable': 'Rx',
'rxjs/Subject': 'Rx',
'rxjs/observable/PromiseObservable': 'Rx', // this is wrong, but this stuff has changed in rxjs b.6 so we need to fix it when we update.
'rxjs/operator/toPromise': 'Rx.Observable.prototype',
'rxjs/Observable': 'Rx'
'rxjs/observable/fromPromise': 'Rx.Observable',
'rxjs/operator/toPromise': 'Rx.Observable.prototype'
}
}

View File

@ -6,7 +6,7 @@
* found in the LICENSE file at https://angular.io/license
*/
import {PromiseObservable} from 'rxjs/observable/PromiseObservable';
import {fromPromise} from 'rxjs/observable/fromPromise';
import {composeAsyncValidators, composeValidators} from './directives/shared';
import {AsyncValidatorFn, ValidatorFn} from './directives/validators';
@ -63,7 +63,7 @@ function _find(control: AbstractControl, path: Array<string|number>| string, del
}
function toObservable(r: any): Observable<any> {
return isPromise(r) ? PromiseObservable.create(r) : r;
return isPromise(r) ? fromPromise(r) : r;
}
function coerceToValidator(validator: ValidatorFn | ValidatorFn[]): ValidatorFn {

View File

@ -9,11 +9,9 @@ export default {
'@angular/compiler': 'ng.compiler',
'@angular/platform-browser': 'ng.platformBrowser',
'@angular/http': 'ng.http',
'rxjs/Subject': 'Rx',
'rxjs/ReplaySubject': 'Rx',
'rxjs/Observable': 'Rx',
'rxjs/observable/PromiseObservable': 'Rx', // this is wrong, but this stuff has changed in rxjs b.6 so we need to fix it when we update.
'rxjs/operator/toPromise': 'Rx.Observable.prototype',
'rxjs/operator/take': 'Rx.Observable.prototype',
'rxjs/ReplaySubject': 'Rx',
'rxjs/Subject': 'Rx',
'rxjs/operator/take': 'Rx.Observable.prototype'
}
}

View File

@ -8,9 +8,7 @@ export default {
'@angular/core': 'ng.core',
'@angular/compiler': 'ng.compiler',
'@angular/platform-browser': 'ng.platformBrowser',
'rxjs/Subject': 'Rx',
'rxjs/observable/PromiseObservable': 'Rx', // this is wrong, but this stuff has changed in rxjs b.6 so we need to fix it when we update.
'rxjs/operator/toPromise': 'Rx.Observable.prototype',
'rxjs/Observable': 'Rx'
'rxjs/Observable': 'Rx',
'rxjs/Subject': 'Rx'
}
}

View File

@ -11,10 +11,6 @@ export default {
'@angular/compiler/testing': 'ng.compiler.testing',
'@angular/platform-browser': 'ng.platformBrowser',
'@angular/platform-browser/testing': 'ng.platformBrowser.testing',
'@angular/platform-browser-dynamic': 'ng.platformBrowserDynamic',
'rxjs/Subject': 'Rx',
'rxjs/observable/PromiseObservable': 'Rx', // this is wrong, but this stuff has changed in rxjs b.6 so we need to fix it when we update.
'rxjs/operator/toPromise': 'Rx.Observable.prototype',
'rxjs/Observable': 'Rx'
'@angular/platform-browser-dynamic': 'ng.platformBrowserDynamic'
}
}

View File

@ -7,10 +7,6 @@ export default {
'@angular/core': 'ng.core',
'@angular/common': 'ng.common',
'@angular/compiler': 'ng.compiler',
'@angular/platform-browser': 'ng.platformBrowser',
'rxjs/Subject': 'Rx',
'rxjs/observable/PromiseObservable': 'Rx', // this is wrong, but this stuff has changed in rxjs b.6 so we need to fix it when we update.
'rxjs/operator/toPromise': 'Rx.Observable.prototype',
'rxjs/Observable': 'Rx'
'@angular/platform-browser': 'ng.platformBrowser'
}
}

View File

@ -7,10 +7,6 @@ export default {
globals: {
'@angular/core': 'ng.core',
'@angular/common': 'ng.common',
'@angular/platform-browser': 'ng.platformBrowser',
'rxjs/Subject': 'Rx',
'rxjs/observable/PromiseObservable': 'Rx', // this is wrong, but this stuff has changed in rxjs b.6 so we need to fix it when we update.
'rxjs/operator/toPromise': 'Rx.Observable.prototype',
'rxjs/Observable': 'Rx'
'@angular/platform-browser': 'ng.platformBrowser'
}
}

View File

@ -6,10 +6,6 @@ export default {
moduleName: 'ng.platformBrowser',
globals: {
'@angular/core': 'ng.core',
'@angular/common': 'ng.common',
'rxjs/Subject': 'Rx',
'rxjs/observable/PromiseObservable': 'Rx', // this is wrong, but this stuff has changed in rxjs b.6 so we need to fix it when we update.
'rxjs/operator/toPromise': 'Rx.Observable.prototype',
'rxjs/Observable': 'Rx'
'@angular/common': 'ng.common'
}
}

View File

@ -11,10 +11,6 @@ export default {
'@angular/compiler/testing': 'ng.compiler.testing',
'@angular/platform-browser': 'ng.platformBrowser',
'@angular/platform-server': 'ng.platformServer',
'@angular/platform-browser-dynamic/testing': 'ng.platformBrowserDynamic.testing',
'rxjs/Subject': 'Rx',
'rxjs/observable/PromiseObservable': 'Rx', // this is wrong, but this stuff has changed in rxjs b.6 so we need to fix it when we update.
'rxjs/operator/toPromise': 'Rx.Observable.prototype',
'rxjs/Observable': 'Rx'
'@angular/platform-browser-dynamic/testing': 'ng.platformBrowserDynamic.testing'
}
}

View File

@ -8,10 +8,6 @@ export default {
'@angular/core': 'ng.core',
'@angular/common': 'ng.common',
'@angular/compiler': 'ng.compiler',
'@angular/platform-browser': 'ng.platformBrowser',
'rxjs/Subject': 'Rx',
'rxjs/observable/PromiseObservable': 'Rx', // this is wrong, but this stuff has changed in rxjs b.6 so we need to fix it when we update.
'rxjs/operator/toPromise': 'Rx.Observable.prototype',
'rxjs/Observable': 'Rx'
'@angular/platform-browser': 'ng.platformBrowser'
}
}

View File

@ -8,10 +8,7 @@ export default {
'@angular/common': 'ng.common',
'@angular/compiler': 'ng.compiler',
'@angular/platform-browser': 'ng.platformBrowser',
'@angular/platform-webworker': 'ng.platformWebworker',
'rxjs/Subject': 'Rx',
'rxjs/observable/PromiseObservable': 'Rx', // this is wrong, but this stuff has changed in rxjs b.6 so we need to fix it when we update.
'rxjs/operator/toPromise': 'Rx.Observable.prototype',
'rxjs/Observable': 'Rx'
'@angular/platform-browser-dynamic': 'ng.platformBrowserDynamic',
'@angular/platform-webworker': 'ng.platformWebworker'
}
}

View File

@ -8,9 +8,7 @@ export default {
'@angular/core': 'ng.core',
'@angular/common': 'ng.common',
'@angular/platform-browser': 'ng.platformBrowser',
'rxjs/Subject': 'Rx',
'rxjs/observable/PromiseObservable': 'Rx', // this is wrong, but this stuff has changed in rxjs b.6 so we need to fix it when we update.
'rxjs/operator/toPromise': 'Rx.Observable.prototype',
'rxjs/Observable': 'Rx'
'rxjs/Observable': 'Rx',
'rxjs/Subject': 'Rx'
}
}

View File

@ -6,31 +6,8 @@ export default {
globals: {
'@angular/core': 'ng.core',
'@angular/common': 'ng.common',
'@angular/compiler': 'ng.compiler',
'@angular/common/testing': 'ng.common.testing',
'@angular/platform-browser': 'ng.platformBrowser',
'@angular/platform-browser-dynamic': 'ng.platformBrowserDynamic',
'rxjs/Observable': 'Rx',
'rxjs/Subject': 'Rx',
'rxjs/BehaviorSubject': 'Rx',
'rxjs/Observer': 'Rx',
'rxjs/Subscription': 'Rx',
'rxjs/observable/PromiseObservable': 'Rx', // this is wrong, but this stuff has changed in rxjs b.6 so we need to fix it when we update.
'rxjs/add/operator/map': 'Rx.Observable.prototype',
'rxjs/add/operator/mergeAll': 'Rx.Observable.prototype',
'rxjs/add/operator/concatAll': 'Rx.Observable.prototype',
'rxjs/add/operator/mergeMap': 'Rx.Observable.prototype',
'rxjs/add/operator/reduce': 'Rx.Observable.prototype',
'rxjs/add/operator/every': 'Rx.Observable.prototype',
'rxjs/add/operator/first': 'Rx.Observable.prototype',
'rxjs/add/operator/catch': 'Rx.Observable.prototype',
'rxjs/add/operator/last': 'Rx.Observable.prototype',
'rxjs/add/operator/toPromise': 'Rx.Observable.prototype',
'rxjs/observable/from': 'Rx.Observable',
'rxjs/observable/fromPromise': 'Rx.Observable',
'rxjs/observable/forkJoin': 'Rx.Observable',
'rxjs/observable/of': 'Rx.Observable',
'rxjs/util/EmptyError': 'Rx.EmptyError'
'@angular/router': 'ng.router'
}
}