From 6c72b36d01bd6d5ef9d09fed7397b59aeec4f15b Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Thu, 9 Mar 2017 21:03:20 +0100 Subject: [PATCH] fix: remove deprecated forRoot functions * In beta.2 the `forRoot` calls have been deprecated, and it was stated that those will be removed in the next release (https://goo.gl/2yFPFc) --- src/demo-app/demo-app-module.ts | 2 +- src/e2e-app/e2e-app-module.ts | 2 +- src/lib/autocomplete/autocomplete.spec.ts | 2 +- src/lib/autocomplete/index.ts | 14 +- src/lib/button-toggle/button-toggle.spec.ts | 2 +- src/lib/button-toggle/index.ts | 12 +- src/lib/button/button.spec.ts | 2 +- src/lib/button/index.ts | 12 +- src/lib/card/index.ts | 12 +- src/lib/checkbox/checkbox.spec.ts | 2 +- src/lib/checkbox/index.ts | 12 +- src/lib/chips/chip-list.spec.ts | 2 +- src/lib/chips/chip.spec.ts | 2 +- src/lib/chips/index.ts | 12 +- src/lib/core/a11y/index.ts | 12 +- .../core/compatibility/compatibility.spec.ts | 6 +- src/lib/core/compatibility/compatibility.ts | 7 - src/lib/core/core.ts | 12 +- .../core/observe-content/observe-content.ts | 11 +- src/lib/core/option/option.ts | 10 +- .../core/overlay/overlay-directives.spec.ts | 2 +- src/lib/core/overlay/overlay-directives.ts | 11 +- src/lib/core/overlay/overlay.spec.ts | 2 +- .../overlay/scroll/scroll-dispatcher.spec.ts | 2 +- src/lib/core/platform/index.ts | 12 +- src/lib/core/portal/portal-directives.ts | 11 +- src/lib/core/portal/portal.spec.ts | 2 +- src/lib/core/projection/projection.spec.ts | 88 +++++++ src/lib/core/projection/projection.ts | 86 +++++++ src/lib/core/ripple/index.ts | 12 +- src/lib/core/rtl/dir.ts | 11 +- src/lib/dialog/dialog.spec.ts | 4 +- src/lib/dialog/index.ts | 12 +- src/lib/grid-list/grid-list.spec.ts | 2 +- src/lib/grid-list/index.ts | 12 +- src/lib/icon/icon.spec.ts | 2 +- src/lib/icon/index.ts | 12 +- src/lib/input/index.ts | 12 +- src/lib/input/input-container.spec.ts | 4 +- src/lib/list/index.ts | 12 +- src/lib/list/list.spec.ts | 2 +- src/lib/menu/index.ts | 12 +- src/lib/menu/menu.spec.ts | 2 +- src/lib/module.ts | 49 +--- src/lib/progress-bar/index.ts | 12 +- src/lib/progress-bar/progress-bar.spec.ts | 2 +- src/lib/progress-spinner/index.ts | 12 +- .../progress-spinner/progress-spinner.spec.ts | 2 +- src/lib/radio/index.ts | 12 +- src/lib/radio/radio.spec.ts | 2 +- src/lib/select/index.ts | 12 +- src/lib/select/select.spec.ts | 2 +- src/lib/sidenav/index.ts | 12 +- src/lib/sidenav/sidenav.spec.ts | 2 +- src/lib/slide-toggle/index.ts | 12 +- src/lib/slide-toggle/slide-toggle.spec.ts | 2 +- src/lib/slider/index.ts | 12 +- src/lib/snack-bar/index.ts | 12 +- src/lib/snack-bar/snack-bar.spec.ts | 4 +- src/lib/tabs/index.ts | 12 +- src/lib/tabs/tab-group.spec.ts | 2 +- src/lib/tabs/tab-nav-bar/tab-nav-bar.spec.ts | 2 +- src/lib/toolbar/index.ts | 12 +- src/lib/toolbar/toolbar.spec.ts | 2 +- src/lib/tooltip/index.ts | 12 +- src/lib/tooltip/tooltip.spec.ts | 2 +- yarn.lock | 214 +++++++++--------- 67 files changed, 373 insertions(+), 521 deletions(-) create mode 100644 src/lib/core/projection/projection.spec.ts create mode 100644 src/lib/core/projection/projection.ts diff --git a/src/demo-app/demo-app-module.ts b/src/demo-app/demo-app-module.ts index 4dfe2f347bb8..147e60e055d8 100644 --- a/src/demo-app/demo-app-module.ts +++ b/src/demo-app/demo-app-module.ts @@ -50,7 +50,7 @@ import {StyleDemo} from './style/style-demo'; HttpModule, ReactiveFormsModule, RouterModule.forRoot(DEMO_APP_ROUTES), - MaterialModule.forRoot(), + MaterialModule, MdSelectionModule, ], declarations: [ diff --git a/src/e2e-app/e2e-app-module.ts b/src/e2e-app/e2e-app-module.ts index 091698206b8f..1a24db524021 100644 --- a/src/e2e-app/e2e-app-module.ts +++ b/src/e2e-app/e2e-app-module.ts @@ -22,7 +22,7 @@ import {SlideToggleE2E} from './slide-toggle/slide-toggle-e2e'; imports: [ BrowserModule, RouterModule.forRoot(E2E_APP_ROUTES), - MaterialModule.forRoot(), + MaterialModule, ], declarations: [ E2EApp, diff --git a/src/lib/autocomplete/autocomplete.spec.ts b/src/lib/autocomplete/autocomplete.spec.ts index 7118f73ae3cb..7956ca3ba2c5 100644 --- a/src/lib/autocomplete/autocomplete.spec.ts +++ b/src/lib/autocomplete/autocomplete.spec.ts @@ -27,7 +27,7 @@ describe('MdAutocomplete', () => { dir = 'ltr'; TestBed.configureTestingModule({ imports: [ - MdAutocompleteModule.forRoot(), MdInputModule.forRoot(), FormsModule, ReactiveFormsModule + MdAutocompleteModule, MdInputModule, FormsModule, ReactiveFormsModule ], declarations: [ SimpleAutocomplete, diff --git a/src/lib/autocomplete/index.ts b/src/lib/autocomplete/index.ts index 7694e665ebbc..215acd171152 100644 --- a/src/lib/autocomplete/index.ts +++ b/src/lib/autocomplete/index.ts @@ -1,6 +1,6 @@ -import {ModuleWithProviders, NgModule} from '@angular/core'; +import {NgModule} from '@angular/core'; -import {MdOptionModule, OverlayModule, OVERLAY_PROVIDERS, CompatibilityModule} from '../core'; +import {MdOptionModule, OverlayModule, CompatibilityModule} from '../core'; import {CommonModule} from '@angular/common'; import {MdAutocomplete} from './autocomplete'; import {MdAutocompleteTrigger} from './autocomplete-trigger'; @@ -10,15 +10,7 @@ import {MdAutocompleteTrigger} from './autocomplete-trigger'; exports: [MdAutocomplete, MdOptionModule, MdAutocompleteTrigger, CompatibilityModule], declarations: [MdAutocomplete, MdAutocompleteTrigger], }) -export class MdAutocompleteModule { - /** @deprecated */ - static forRoot(): ModuleWithProviders { - return { - ngModule: MdAutocompleteModule, - providers: [OVERLAY_PROVIDERS] - }; - } -} +export class MdAutocompleteModule {} export * from './autocomplete'; diff --git a/src/lib/button-toggle/button-toggle.spec.ts b/src/lib/button-toggle/button-toggle.spec.ts index 6050dd4449a9..bacc36ceb91a 100644 --- a/src/lib/button-toggle/button-toggle.spec.ts +++ b/src/lib/button-toggle/button-toggle.spec.ts @@ -21,7 +21,7 @@ describe('MdButtonToggle', () => { beforeEach(async(() => { TestBed.configureTestingModule({ - imports: [MdButtonToggleModule.forRoot(), FormsModule, ReactiveFormsModule], + imports: [MdButtonToggleModule, FormsModule, ReactiveFormsModule], declarations: [ ButtonTogglesInsideButtonToggleGroup, ButtonToggleGroupWithNgModel, diff --git a/src/lib/button-toggle/index.ts b/src/lib/button-toggle/index.ts index a2967210997c..0405b82672f7 100644 --- a/src/lib/button-toggle/index.ts +++ b/src/lib/button-toggle/index.ts @@ -1,4 +1,4 @@ -import {NgModule, ModuleWithProviders} from '@angular/core'; +import {NgModule} from '@angular/core'; import {FormsModule} from '@angular/forms'; import {MdButtonToggleGroup, MdButtonToggleGroupMultiple, MdButtonToggle} from './button-toggle'; import { @@ -19,15 +19,7 @@ import { declarations: [MdButtonToggleGroup, MdButtonToggleGroupMultiple, MdButtonToggle], providers: [UNIQUE_SELECTION_DISPATCHER_PROVIDER, FocusOriginMonitor] }) -export class MdButtonToggleModule { - /** @deprecated */ - static forRoot(): ModuleWithProviders { - return { - ngModule: MdButtonToggleModule, - providers: [] - }; - } -} +export class MdButtonToggleModule {} export * from './button-toggle'; diff --git a/src/lib/button/button.spec.ts b/src/lib/button/button.spec.ts index d010953f47db..d1a8329750f9 100644 --- a/src/lib/button/button.spec.ts +++ b/src/lib/button/button.spec.ts @@ -10,7 +10,7 @@ describe('MdButton', () => { beforeEach(async(() => { TestBed.configureTestingModule({ - imports: [MdButtonModule.forRoot()], + imports: [MdButtonModule], declarations: [TestApp], providers: [ {provide: ViewportRuler, useClass: FakeViewportRuler}, diff --git a/src/lib/button/index.ts b/src/lib/button/index.ts index 4d7ddd16408b..c68c88bddd43 100644 --- a/src/lib/button/index.ts +++ b/src/lib/button/index.ts @@ -1,4 +1,4 @@ -import {ModuleWithProviders, NgModule} from '@angular/core'; +import {NgModule} from '@angular/core'; import {CommonModule} from '@angular/common'; import {CompatibilityModule, MdRippleModule, StyleModule} from '../core'; import { @@ -42,12 +42,4 @@ export * from './button'; MdMiniFabCssMatStyler, ], }) -export class MdButtonModule { - /** @deprecated */ - static forRoot(): ModuleWithProviders { - return { - ngModule: MdButtonModule, - providers: [] - }; - } -} +export class MdButtonModule {} diff --git a/src/lib/card/index.ts b/src/lib/card/index.ts index 1b6a7934ce3e..f938d51bfaca 100644 --- a/src/lib/card/index.ts +++ b/src/lib/card/index.ts @@ -1,4 +1,4 @@ -import {NgModule, ModuleWithProviders} from '@angular/core'; +import {NgModule} from '@angular/core'; import {CompatibilityModule} from '../core'; import { MdCard, @@ -43,15 +43,7 @@ import { MdCardXlImage, MdCardAvatar, ], }) -export class MdCardModule { - /** @deprecated */ - static forRoot(): ModuleWithProviders { - return { - ngModule: MdCardModule, - providers: [] - }; - } -} +export class MdCardModule {} export * from './card'; diff --git a/src/lib/checkbox/checkbox.spec.ts b/src/lib/checkbox/checkbox.spec.ts index 4f75c88051b0..74c087a07e3f 100644 --- a/src/lib/checkbox/checkbox.spec.ts +++ b/src/lib/checkbox/checkbox.spec.ts @@ -32,7 +32,7 @@ describe('MdCheckbox', () => { beforeEach(async(() => { TestBed.configureTestingModule({ - imports: [MdCheckboxModule.forRoot(), FormsModule, ReactiveFormsModule], + imports: [MdCheckboxModule, FormsModule, ReactiveFormsModule], declarations: [ SingleCheckbox, CheckboxWithFormDirectives, diff --git a/src/lib/checkbox/index.ts b/src/lib/checkbox/index.ts index f468d3a5560c..7c9fb81f8ef7 100644 --- a/src/lib/checkbox/index.ts +++ b/src/lib/checkbox/index.ts @@ -1,4 +1,4 @@ -import {NgModule, ModuleWithProviders} from '@angular/core'; +import {NgModule} from '@angular/core'; import {CommonModule} from '@angular/common'; import {MdRippleModule, CompatibilityModule, FocusOriginMonitor} from '../core'; import {MdCheckbox} from './checkbox'; @@ -10,15 +10,7 @@ import {MdCheckbox} from './checkbox'; declarations: [MdCheckbox], providers: [FocusOriginMonitor] }) -export class MdCheckboxModule { - /** @deprecated */ - static forRoot(): ModuleWithProviders { - return { - ngModule: MdCheckboxModule, - providers: [] - }; - } -} +export class MdCheckboxModule {} export * from './checkbox'; diff --git a/src/lib/chips/chip-list.spec.ts b/src/lib/chips/chip-list.spec.ts index 8651ab41eb2d..0d2407c495ba 100644 --- a/src/lib/chips/chip-list.spec.ts +++ b/src/lib/chips/chip-list.spec.ts @@ -25,7 +25,7 @@ describe('MdChipList', () => { beforeEach(async(() => { TestBed.configureTestingModule({ - imports: [MdChipsModule.forRoot()], + imports: [MdChipsModule], declarations: [ StaticChipList ] diff --git a/src/lib/chips/chip.spec.ts b/src/lib/chips/chip.spec.ts index c780f74a1f71..8ed9bc736ee4 100644 --- a/src/lib/chips/chip.spec.ts +++ b/src/lib/chips/chip.spec.ts @@ -12,7 +12,7 @@ describe('Chips', () => { beforeEach(async(() => { TestBed.configureTestingModule({ - imports: [MdChipsModule.forRoot()], + imports: [MdChipsModule], declarations: [ BasicChip, SingleChip ] diff --git a/src/lib/chips/index.ts b/src/lib/chips/index.ts index 6b6d4e4e3192..22024f795f18 100644 --- a/src/lib/chips/index.ts +++ b/src/lib/chips/index.ts @@ -1,4 +1,4 @@ -import {NgModule, ModuleWithProviders} from '@angular/core'; +import {NgModule} from '@angular/core'; import {MdChipList} from './chip-list'; import {MdChip} from './chip'; @@ -8,15 +8,7 @@ import {MdChip} from './chip'; exports: [MdChipList, MdChip], declarations: [MdChipList, MdChip] }) -export class MdChipsModule { - /** @deprecated */ - static forRoot(): ModuleWithProviders { - return { - ngModule: MdChipsModule, - providers: [] - }; - } -} +export class MdChipsModule {} export * from './chip-list'; diff --git a/src/lib/core/a11y/index.ts b/src/lib/core/a11y/index.ts index e222f173311b..feab38419638 100644 --- a/src/lib/core/a11y/index.ts +++ b/src/lib/core/a11y/index.ts @@ -1,4 +1,4 @@ -import {NgModule, ModuleWithProviders} from '@angular/core'; +import {NgModule} from '@angular/core'; import {FocusTrapDirective, FocusTrapDeprecatedDirective, FocusTrapFactory} from './focus-trap'; import {LIVE_ANNOUNCER_PROVIDER} from './live-announcer'; import {InteractivityChecker} from './interactivity-checker'; @@ -11,12 +11,4 @@ import {PlatformModule} from '../platform/index'; exports: [FocusTrapDirective, FocusTrapDeprecatedDirective], providers: [InteractivityChecker, FocusTrapFactory, LIVE_ANNOUNCER_PROVIDER] }) -export class A11yModule { - /** @deprecated */ - static forRoot(): ModuleWithProviders { - return { - ngModule: A11yModule, - providers: [], - }; - } -} +export class A11yModule {} diff --git a/src/lib/core/compatibility/compatibility.spec.ts b/src/lib/core/compatibility/compatibility.spec.ts index 479ee3b13bf0..424bfcbcb7d0 100644 --- a/src/lib/core/compatibility/compatibility.spec.ts +++ b/src/lib/core/compatibility/compatibility.spec.ts @@ -24,7 +24,7 @@ describe('Style compatibility', () => { TestBed.configureTestingModule({ // Specifically do *not* directly import the DefaultStyleCompatibilityModeModule // to ensure that it is the default behavior. - imports: [MdCheckboxModule.forRoot()], + imports: [MdCheckboxModule], declarations: [ComponentWithMdCheckbox, ComponentWithMatCheckbox], }); @@ -41,7 +41,7 @@ describe('Style compatibility', () => { describe('in no-conflict mode', () => { beforeEach(async(() => { TestBed.configureTestingModule({ - imports: [MdCheckboxModule.forRoot(), NoConflictStyleCompatibilityMode], + imports: [MdCheckboxModule, NoConflictStyleCompatibilityMode], declarations: [ComponentWithMdCheckbox, ComponentWithMatCheckbox], }); @@ -89,7 +89,7 @@ class ComponentWithMatCheckbox { } @NgModule({ - imports: [MdCheckboxModule.forRoot()], + imports: [MdCheckboxModule], exports: [ComponentWithMdCheckbox, ComponentWithMatCheckbox], declarations: [ComponentWithMdCheckbox, ComponentWithMatCheckbox], }) diff --git a/src/lib/core/compatibility/compatibility.ts b/src/lib/core/compatibility/compatibility.ts index 7bb8ee9eea1d..5840d6d2ad9d 100644 --- a/src/lib/core/compatibility/compatibility.ts +++ b/src/lib/core/compatibility/compatibility.ts @@ -1,6 +1,5 @@ import { NgModule, - ModuleWithProviders, Directive, OpaqueToken, Inject, @@ -163,12 +162,6 @@ export class MdPrefixRejector { exports: [MatPrefixRejector, MdPrefixRejector], }) export class CompatibilityModule { - static forRoot(): ModuleWithProviders { - return { - ngModule: CompatibilityModule, - providers: [], - }; - } constructor(@Optional() @Inject(DOCUMENT) document: any) { if (isDevMode() && typeof document && !document.doctype) { diff --git a/src/lib/core/core.ts b/src/lib/core/core.ts index 04814c0de02a..eae84579a185 100644 --- a/src/lib/core/core.ts +++ b/src/lib/core/core.ts @@ -1,4 +1,4 @@ -import {NgModule, ModuleWithProviders} from '@angular/core'; +import {NgModule} from '@angular/core'; import {MdLineModule} from './line/line'; import {RtlModule} from './rtl/dir'; import {ObserveContentModule} from './observe-content/observe-content'; @@ -147,12 +147,4 @@ export {CompatibilityModule, NoConflictStyleCompatibilityMode} from './compatibi MdSelectionModule, ], }) -export class MdCoreModule { - /** @deprecated */ - static forRoot(): ModuleWithProviders { - return { - ngModule: MdCoreModule, - providers: [], - }; - } -} +export class MdCoreModule {} diff --git a/src/lib/core/observe-content/observe-content.ts b/src/lib/core/observe-content/observe-content.ts index 217416d41bdd..1b2ea90b7da9 100644 --- a/src/lib/core/observe-content/observe-content.ts +++ b/src/lib/core/observe-content/observe-content.ts @@ -2,7 +2,6 @@ import { Directive, ElementRef, NgModule, - ModuleWithProviders, Output, EventEmitter, OnDestroy, @@ -45,12 +44,4 @@ export class ObserveContent implements AfterContentInit, OnDestroy { exports: [ObserveContent], declarations: [ObserveContent] }) -export class ObserveContentModule { - /** @deprecated */ - static forRoot(): ModuleWithProviders { - return { - ngModule: ObserveContentModule, - providers: [] - }; - } -} +export class ObserveContentModule {} diff --git a/src/lib/core/option/option.ts b/src/lib/core/option/option.ts index 7c9feaddea6e..fcedacf9d53a 100644 --- a/src/lib/core/option/option.ts +++ b/src/lib/core/option/option.ts @@ -5,7 +5,6 @@ import { Input, Output, NgModule, - ModuleWithProviders, Renderer, ViewEncapsulation, Inject, @@ -181,11 +180,4 @@ export class MdOption { exports: [MdOption], declarations: [MdOption] }) -export class MdOptionModule { - static forRoot(): ModuleWithProviders { - return { - ngModule: MdOptionModule, - providers: [] - }; - } -} +export class MdOptionModule {} diff --git a/src/lib/core/overlay/overlay-directives.spec.ts b/src/lib/core/overlay/overlay-directives.spec.ts index 26368a112a7b..4ded247719f8 100644 --- a/src/lib/core/overlay/overlay-directives.spec.ts +++ b/src/lib/core/overlay/overlay-directives.spec.ts @@ -15,7 +15,7 @@ describe('Overlay directives', () => { beforeEach(() => { TestBed.configureTestingModule({ - imports: [OverlayModule.forRoot()], + imports: [OverlayModule], declarations: [ConnectedOverlayDirectiveTest], providers: [ {provide: OverlayContainer, useFactory: () => { diff --git a/src/lib/core/overlay/overlay-directives.ts b/src/lib/core/overlay/overlay-directives.ts index e643256c11cf..23770e1b27c9 100644 --- a/src/lib/core/overlay/overlay-directives.ts +++ b/src/lib/core/overlay/overlay-directives.ts @@ -1,6 +1,5 @@ import { NgModule, - ModuleWithProviders, Directive, EventEmitter, TemplateRef, @@ -297,12 +296,4 @@ export class ConnectedOverlayDirective implements OnDestroy { declarations: [ConnectedOverlayDirective, OverlayOrigin, Scrollable], providers: [OVERLAY_PROVIDERS], }) -export class OverlayModule { - /** @deprecated */ - static forRoot(): ModuleWithProviders { - return { - ngModule: OverlayModule, - providers: [], - }; - } -} +export class OverlayModule {} diff --git a/src/lib/core/overlay/overlay.spec.ts b/src/lib/core/overlay/overlay.spec.ts index 328809e4d272..52c738c71dfe 100644 --- a/src/lib/core/overlay/overlay.spec.ts +++ b/src/lib/core/overlay/overlay.spec.ts @@ -18,7 +18,7 @@ describe('Overlay', () => { beforeEach(async(() => { TestBed.configureTestingModule({ - imports: [OverlayModule.forRoot(), PortalModule, OverlayTestModule], + imports: [OverlayModule, PortalModule, OverlayTestModule], providers: [ {provide: OverlayContainer, useFactory: () => { overlayContainerElement = document.createElement('div'); diff --git a/src/lib/core/overlay/scroll/scroll-dispatcher.spec.ts b/src/lib/core/overlay/scroll/scroll-dispatcher.spec.ts index 1cd3a1b6af40..383e7545439d 100644 --- a/src/lib/core/overlay/scroll/scroll-dispatcher.spec.ts +++ b/src/lib/core/overlay/scroll/scroll-dispatcher.spec.ts @@ -9,7 +9,7 @@ describe('Scroll Dispatcher', () => { beforeEach(async(() => { TestBed.configureTestingModule({ - imports: [OverlayModule.forRoot(), ScrollTestModule], + imports: [OverlayModule, ScrollTestModule], }); TestBed.compileComponents(); diff --git a/src/lib/core/platform/index.ts b/src/lib/core/platform/index.ts index 0009bf35f80f..f37e660b07c2 100644 --- a/src/lib/core/platform/index.ts +++ b/src/lib/core/platform/index.ts @@ -1,19 +1,11 @@ -import {NgModule, ModuleWithProviders} from '@angular/core'; +import {NgModule} from '@angular/core'; import {Platform} from './platform'; @NgModule({ providers: [Platform] }) -export class PlatformModule { - /** @deprecated */ - static forRoot(): ModuleWithProviders { - return { - ngModule: PlatformModule, - providers: [], - }; - } -} +export class PlatformModule {} export * from './platform'; diff --git a/src/lib/core/portal/portal-directives.ts b/src/lib/core/portal/portal-directives.ts index 5e2b8cf8079b..c8a1d753451f 100644 --- a/src/lib/core/portal/portal-directives.ts +++ b/src/lib/core/portal/portal-directives.ts @@ -1,6 +1,5 @@ import { NgModule, - ModuleWithProviders, ComponentRef, Directive, TemplateRef, @@ -128,12 +127,4 @@ export class PortalHostDirective extends BasePortalHost implements OnDestroy { exports: [TemplatePortalDirective, PortalHostDirective], declarations: [TemplatePortalDirective, PortalHostDirective], }) -export class PortalModule { - /** @deprecated */ - static forRoot(): ModuleWithProviders { - return { - ngModule: PortalModule, - providers: [] - }; - } -} +export class PortalModule {} diff --git a/src/lib/core/portal/portal.spec.ts b/src/lib/core/portal/portal.spec.ts index da8dd35f61f5..c646c8feb623 100644 --- a/src/lib/core/portal/portal.spec.ts +++ b/src/lib/core/portal/portal.spec.ts @@ -20,7 +20,7 @@ describe('Portals', () => { beforeEach(async(() => { TestBed.configureTestingModule({ - imports: [PortalModule.forRoot(), PortalTestModule], + imports: [PortalModule, PortalTestModule], }); TestBed.compileComponents(); diff --git a/src/lib/core/projection/projection.spec.ts b/src/lib/core/projection/projection.spec.ts new file mode 100644 index 000000000000..893ab39eb5ca --- /dev/null +++ b/src/lib/core/projection/projection.spec.ts @@ -0,0 +1,88 @@ +import {TestBed, async} from '@angular/core/testing'; +import { + NgModule, + Component, + ViewChild, + ElementRef, +} from '@angular/core'; +import {ProjectionModule, DomProjection, DomProjectionHost} from './projection'; + + +describe('Projection', () => { + beforeEach(async(() => { + TestBed.configureTestingModule({ + imports: [ProjectionModule, ProjectionTestModule], + }); + + TestBed.compileComponents(); + })); + + it('should project properly', async(() => { + const fixture = TestBed.createComponent(ProjectionTestApp); + const appEl: HTMLDivElement = fixture.nativeElement; + const outerDivEl = appEl.querySelector('.outer'); + const innerDivEl = appEl.querySelector('.inner'); + + // Expect the reverse of the tests down there. + expect(appEl.querySelector('cdk-dom-projection-host')).not.toBeNull(); + expect(outerDivEl.querySelector('.inner')).not.toBe(innerDivEl); + + const innerHtml = appEl.innerHTML; + + // Trigger OnInit (and thus the projection). + fixture.detectChanges(); + + expect(appEl.innerHTML).not.toEqual(innerHtml); + + // Assert `` is not in the DOM anymore. + expect(appEl.querySelector('cdk-dom-projection-host')).toBeNull(); + + // Assert the outerDiv contains the innerDiv. + expect(outerDivEl.querySelector('.inner')).toBe(innerDivEl); + + // Assert the innerDiv contains the content. + expect(innerDivEl.querySelector('.content')).not.toBeNull(); + })); +}); + + +/** Test-bed component that contains a projection. */ +@Component({ + selector: '[projection-test]', + template: ` +
+ +
+ `, +}) +class ProjectionTestComponent { + @ViewChild(DomProjectionHost) _host: DomProjectionHost; + + constructor(private _projection: DomProjection, private _ref: ElementRef) {} + ngOnInit() { this._projection.project(this._ref, this._host); } +} + + +/** Test-bed component that contains a portal host and a couple of template portals. */ +@Component({ + selector: 'projection-app', + template: ` +
+
+
+ `, +}) +class ProjectionTestApp { +} + + + +const TEST_COMPONENTS = [ProjectionTestApp, ProjectionTestComponent]; +@NgModule({ + imports: [ProjectionModule], + exports: TEST_COMPONENTS, + declarations: TEST_COMPONENTS, + entryComponents: TEST_COMPONENTS, +}) +class ProjectionTestModule { } + diff --git a/src/lib/core/projection/projection.ts b/src/lib/core/projection/projection.ts new file mode 100644 index 000000000000..afdb08c499a7 --- /dev/null +++ b/src/lib/core/projection/projection.ts @@ -0,0 +1,86 @@ +import {Injectable, Directive, NgModule, ElementRef} from '@angular/core'; + + +// "Polyfill" for `Node.replaceWith()`. +// cf. https://developer.mozilla.org/en-US/docs/Web/API/ChildNode/replaceWith +function _replaceWith(toReplaceEl: HTMLElement, otherEl: HTMLElement) { + toReplaceEl.parentElement.replaceChild(otherEl, toReplaceEl); +} + +/** @docs-private */ +@Directive({ + selector: 'cdk-dom-projection-host' +}) +export class DomProjectionHost { + constructor(public ref: ElementRef) {} +} + + +/** @docs-private */ +@Injectable() +export class DomProjection { + /** + * Project an element into a host element. + * Replace a host element by another element. This also replaces the children of the element + * by the children of the host. + * + * It should be used like this: + * + * ``` + * @Component({ + * template: `
+ * + *
other
+ * + *
+ *
` + * }) + * class Cmpt { + * constructor(private _projector: DomProjection, private _el: ElementRef) {} + * ngOnInit() { this._projector.project(this._el, this._projector); } + * } + * ``` + * + * This component will move the content of the element it's applied to in the outer div. Because + * `project()` also move the children of the host inside the projected element, the element will + * contain the `
other
` HTML as well as its own children. + * + * Note: without `` the projection will project an empty element. + * + * @param ref ElementRef to be projected. + * @param host Projection host into which to project the `ElementRef`. + */ + project(ref: ElementRef, host: DomProjectionHost): void { + const projectedEl = ref.nativeElement; + const hostEl = host.ref.nativeElement; + const childNodes = projectedEl.childNodes; + let child = childNodes[0]; + + // We hoist all of the projected element's children out into the projected elements position + // because we *only* want to move the projected element and not its children. + _replaceWith(projectedEl, child); + let l = childNodes.length; + while (l--) { + child.parentNode.insertBefore(childNodes[0], child.nextSibling); + child = child.nextSibling; // nextSibling is now the childNodes[0]. + } + + // Insert all host children under the projectedEl, then replace host by component. + l = hostEl.childNodes.length; + while (l--) { + projectedEl.appendChild(hostEl.childNodes[0]); + } + _replaceWith(hostEl, projectedEl); + + // At this point the host is replaced by the component. Nothing else to be done. + } +} + + +/** @docs-private */ +@NgModule({ + exports: [DomProjectionHost], + declarations: [DomProjectionHost], + providers: [DomProjection], +}) +export class ProjectionModule {} diff --git a/src/lib/core/ripple/index.ts b/src/lib/core/ripple/index.ts index 21b95a95734d..a6fdabc07210 100644 --- a/src/lib/core/ripple/index.ts +++ b/src/lib/core/ripple/index.ts @@ -1,4 +1,4 @@ -import {ModuleWithProviders, NgModule} from '@angular/core'; +import {NgModule} from '@angular/core'; import {MdRipple} from './ripple'; import {CompatibilityModule} from '../compatibility/compatibility'; import {VIEWPORT_RULER_PROVIDER} from '../overlay/position/viewport-ruler'; @@ -14,12 +14,4 @@ export {RippleConfig, RIPPLE_FADE_IN_DURATION, RIPPLE_FADE_OUT_DURATION} from '. declarations: [MdRipple], providers: [VIEWPORT_RULER_PROVIDER, SCROLL_DISPATCHER_PROVIDER], }) -export class MdRippleModule { - /** @deprecated */ - static forRoot(): ModuleWithProviders { - return { - ngModule: MdRippleModule, - providers: [] - }; - } -} +export class MdRippleModule {} diff --git a/src/lib/core/rtl/dir.ts b/src/lib/core/rtl/dir.ts index 05eaef60c2d2..e00680aa74a6 100644 --- a/src/lib/core/rtl/dir.ts +++ b/src/lib/core/rtl/dir.ts @@ -1,6 +1,5 @@ import { NgModule, - ModuleWithProviders, Directive, HostBinding, Output, @@ -51,12 +50,4 @@ export class Dir { exports: [Dir], declarations: [Dir] }) -export class RtlModule { - /** @deprecated */ - static forRoot(): ModuleWithProviders { - return { - ngModule: RtlModule, - providers: [] - }; - } -} +export class RtlModule {} diff --git a/src/lib/dialog/dialog.spec.ts b/src/lib/dialog/dialog.spec.ts index ec156ae7c3f5..8ed731fc92bb 100644 --- a/src/lib/dialog/dialog.spec.ts +++ b/src/lib/dialog/dialog.spec.ts @@ -34,7 +34,7 @@ describe('MdDialog', () => { beforeEach(async(() => { TestBed.configureTestingModule({ - imports: [MdDialogModule.forRoot(), DialogTestModule], + imports: [MdDialogModule, DialogTestModule], providers: [ {provide: OverlayContainer, useFactory: () => { overlayContainerElement = document.createElement('div'); @@ -492,7 +492,7 @@ describe('MdDialog with a parent MdDialog', () => { beforeEach(async(() => { TestBed.configureTestingModule({ - imports: [MdDialogModule.forRoot(), DialogTestModule], + imports: [MdDialogModule, DialogTestModule], declarations: [ComponentThatProvidesMdDialog], providers: [ {provide: OverlayContainer, useFactory: () => { diff --git a/src/lib/dialog/index.ts b/src/lib/dialog/index.ts index 664f8e4b0ab5..21f4999db5df 100644 --- a/src/lib/dialog/index.ts +++ b/src/lib/dialog/index.ts @@ -1,4 +1,4 @@ -import {NgModule, ModuleWithProviders} from '@angular/core'; +import {NgModule} from '@angular/core'; import { OverlayModule, PortalModule, @@ -42,15 +42,7 @@ import { ], entryComponents: [MdDialogContainer], }) -export class MdDialogModule { - /** @deprecated */ - static forRoot(): ModuleWithProviders { - return { - ngModule: MdDialogModule, - providers: [], - }; - } -} +export class MdDialogModule {} export * from './dialog'; export * from './dialog-container'; diff --git a/src/lib/grid-list/grid-list.spec.ts b/src/lib/grid-list/grid-list.spec.ts index 5cc78dacb03b..d3561a5077ce 100644 --- a/src/lib/grid-list/grid-list.spec.ts +++ b/src/lib/grid-list/grid-list.spec.ts @@ -8,7 +8,7 @@ import {MdGridTile, MdGridTileText} from './grid-tile'; describe('MdGridList', () => { beforeEach(async(() => { TestBed.configureTestingModule({ - imports: [MdGridListModule.forRoot()], + imports: [MdGridListModule], declarations: [ GridListWithoutCols, GridListWithInvalidRowHeightRatio, diff --git a/src/lib/grid-list/index.ts b/src/lib/grid-list/index.ts index 5206d2f7134c..c7c47bca7a37 100644 --- a/src/lib/grid-list/index.ts +++ b/src/lib/grid-list/index.ts @@ -1,4 +1,4 @@ -import {NgModule, ModuleWithProviders} from '@angular/core'; +import {NgModule} from '@angular/core'; import {MdLineModule, CompatibilityModule} from '../core'; import { MdGridTile, MdGridTileText, MdGridTileFooterCssMatStyler, @@ -28,15 +28,7 @@ import {MdGridList} from './grid-list'; MdGridAvatarCssMatStyler ], }) -export class MdGridListModule { - /** @deprecated */ - static forRoot(): ModuleWithProviders { - return { - ngModule: MdGridListModule, - providers: [] - }; - } -} +export class MdGridListModule {} export * from './grid-list'; diff --git a/src/lib/icon/icon.spec.ts b/src/lib/icon/icon.spec.ts index ec94136d117f..178b40ff2c69 100644 --- a/src/lib/icon/icon.spec.ts +++ b/src/lib/icon/icon.spec.ts @@ -36,7 +36,7 @@ describe('MdIcon', () => { beforeEach(async(() => { TestBed.configureTestingModule({ - imports: [MdIconModule.forRoot()], + imports: [MdIconModule], declarations: [ MdIconColorTestApp, MdIconLigatureTestApp, diff --git a/src/lib/icon/index.ts b/src/lib/icon/index.ts index c2b2f7bcba31..d79c440899a2 100644 --- a/src/lib/icon/index.ts +++ b/src/lib/icon/index.ts @@ -1,4 +1,4 @@ -import {NgModule, ModuleWithProviders} from '@angular/core'; +import {NgModule} from '@angular/core'; import {HttpModule} from '@angular/http'; import {CompatibilityModule} from '../core'; import {MdIcon, ICON_REGISTRY_PROVIDER} from './icon'; @@ -10,15 +10,7 @@ import {MdIcon, ICON_REGISTRY_PROVIDER} from './icon'; declarations: [MdIcon], providers: [ICON_REGISTRY_PROVIDER], }) -export class MdIconModule { - /** @deprecated */ - static forRoot(): ModuleWithProviders { - return { - ngModule: MdIconModule, - providers: [], - }; - } -} +export class MdIconModule {} export * from './icon'; diff --git a/src/lib/input/index.ts b/src/lib/input/index.ts index d0a7d8a6532f..7b3832d56d71 100644 --- a/src/lib/input/index.ts +++ b/src/lib/input/index.ts @@ -1,4 +1,4 @@ -import {NgModule, ModuleWithProviders} from '@angular/core'; +import {NgModule} from '@angular/core'; import {MdPlaceholder, MdInputContainer, MdHint, MdInputDirective} from './input-container'; import {MdTextareaAutosize} from './autosize'; import {CommonModule} from '@angular/common'; @@ -27,15 +27,7 @@ import {PlatformModule} from '../core/platform/index'; MdInputDirective ], }) -export class MdInputModule { - /** @deprecated */ - static forRoot(): ModuleWithProviders { - return { - ngModule: MdInputModule, - providers: [], - }; - } -} +export class MdInputModule {} export * from './autosize' diff --git a/src/lib/input/input-container.spec.ts b/src/lib/input/input-container.spec.ts index 541af30cab1f..685e0aa59153 100644 --- a/src/lib/input/input-container.spec.ts +++ b/src/lib/input/input-container.spec.ts @@ -17,8 +17,8 @@ describe('MdInputContainer', function () { beforeEach(async(() => { TestBed.configureTestingModule({ imports: [ - MdInputModule.forRoot(), - PlatformModule.forRoot(), + MdInputModule, + PlatformModule, FormsModule, ReactiveFormsModule ], diff --git a/src/lib/list/index.ts b/src/lib/list/index.ts index 0afe8ac61e30..820292026711 100644 --- a/src/lib/list/index.ts +++ b/src/lib/list/index.ts @@ -1,4 +1,4 @@ -import {NgModule, ModuleWithProviders} from '@angular/core'; +import {NgModule} from '@angular/core'; import {MdLineModule, MdRippleModule, CompatibilityModule} from '../core'; import { MdList, @@ -43,15 +43,7 @@ import { MdNavListTokenSetter, ], }) -export class MdListModule { - /** @deprecated */ - static forRoot(): ModuleWithProviders { - return { - ngModule: MdListModule, - providers: [] - }; - } -} +export class MdListModule {} export * from './list'; diff --git a/src/lib/list/list.spec.ts b/src/lib/list/list.spec.ts index b7a46ec95cdb..6b9a2a1e9c5f 100644 --- a/src/lib/list/list.spec.ts +++ b/src/lib/list/list.spec.ts @@ -8,7 +8,7 @@ describe('MdList', () => { beforeEach(async(() => { TestBed.configureTestingModule({ - imports: [MdListModule.forRoot()], + imports: [MdListModule], declarations: [ ListWithOneAnchorItem, ListWithOneItem, diff --git a/src/lib/menu/index.ts b/src/lib/menu/index.ts index 87b541aca49e..1ff105b8b3c9 100644 --- a/src/lib/menu/index.ts +++ b/src/lib/menu/index.ts @@ -1,4 +1,4 @@ -import {NgModule, ModuleWithProviders} from '@angular/core'; +import {NgModule} from '@angular/core'; import {CommonModule} from '@angular/common'; import {OverlayModule, CompatibilityModule} from '../core'; import {MdMenu} from './menu-directive'; @@ -12,15 +12,7 @@ import {MdRippleModule} from '../core/ripple/index'; exports: [MdMenu, MdMenuItem, MdMenuTrigger, CompatibilityModule], declarations: [MdMenu, MdMenuItem, MdMenuTrigger], }) -export class MdMenuModule { - /** @deprecated */ - static forRoot(): ModuleWithProviders { - return { - ngModule: MdMenuModule, - providers: [], - }; - } -} +export class MdMenuModule {} export * from './menu'; diff --git a/src/lib/menu/menu.spec.ts b/src/lib/menu/menu.spec.ts index 3199b475a2e7..6b0db61a029e 100644 --- a/src/lib/menu/menu.spec.ts +++ b/src/lib/menu/menu.spec.ts @@ -28,7 +28,7 @@ describe('MdMenu', () => { beforeEach(async(() => { dir = 'ltr'; TestBed.configureTestingModule({ - imports: [MdMenuModule.forRoot()], + imports: [MdMenuModule], declarations: [SimpleMenu, PositionedMenu, OverlapMenu, CustomMenuPanel, CustomMenu], providers: [ {provide: OverlayContainer, useFactory: () => { diff --git a/src/lib/module.ts b/src/lib/module.ts index da1eea31c87c..a753937b3511 100644 --- a/src/lib/module.ts +++ b/src/lib/module.ts @@ -1,4 +1,4 @@ -import {NgModule, ModuleWithProviders} from '@angular/core'; +import {NgModule} from '@angular/core'; import { MdRippleModule, @@ -71,54 +71,9 @@ const MATERIAL_MODULES = [ ObserveContentModule ]; -@NgModule({ - imports: [ - MdAutocompleteModule.forRoot(), - MdButtonModule.forRoot(), - MdCardModule.forRoot(), - MdChipsModule.forRoot(), - MdCheckboxModule.forRoot(), - MdGridListModule.forRoot(), - MdInputModule.forRoot(), - MdListModule.forRoot(), - MdProgressBarModule.forRoot(), - MdProgressSpinnerModule.forRoot(), - MdRippleModule.forRoot(), - MdSelectModule.forRoot(), - MdSidenavModule.forRoot(), - MdTabsModule.forRoot(), - MdToolbarModule.forRoot(), - PortalModule.forRoot(), - RtlModule.forRoot(), - ObserveContentModule.forRoot(), - - // These modules include providers. - A11yModule.forRoot(), - MdButtonToggleModule.forRoot(), - MdDialogModule.forRoot(), - MdIconModule.forRoot(), - MdMenuModule.forRoot(), - MdRadioModule.forRoot(), - MdSliderModule.forRoot(), - MdSlideToggleModule.forRoot(), - MdSnackBarModule.forRoot(), - MdTooltipModule.forRoot(), - PlatformModule.forRoot(), - OverlayModule.forRoot(), - CompatibilityModule.forRoot(), - ], - exports: MATERIAL_MODULES, -}) -export class MaterialRootModule { } - @NgModule({ imports: MATERIAL_MODULES, exports: MATERIAL_MODULES, }) -export class MaterialModule { - /** @deprecated */ - static forRoot(): ModuleWithProviders { - return {ngModule: MaterialRootModule}; - } -} +export class MaterialModule {} diff --git a/src/lib/progress-bar/index.ts b/src/lib/progress-bar/index.ts index 89730762bd34..1d717a18def5 100644 --- a/src/lib/progress-bar/index.ts +++ b/src/lib/progress-bar/index.ts @@ -1,4 +1,4 @@ -import {NgModule, ModuleWithProviders} from '@angular/core'; +import {NgModule} from '@angular/core'; import {CommonModule} from '@angular/common'; import {CompatibilityModule} from '../core/compatibility/compatibility'; import {MdProgressBar} from './progress-bar'; @@ -9,15 +9,7 @@ import {MdProgressBar} from './progress-bar'; exports: [MdProgressBar, CompatibilityModule], declarations: [MdProgressBar], }) -export class MdProgressBarModule { - /** @deprecated */ - static forRoot(): ModuleWithProviders { - return { - ngModule: MdProgressBarModule, - providers: [] - }; - } -} +export class MdProgressBarModule {} export * from './progress-bar'; diff --git a/src/lib/progress-bar/progress-bar.spec.ts b/src/lib/progress-bar/progress-bar.spec.ts index d071e0fee566..f5208b321f65 100644 --- a/src/lib/progress-bar/progress-bar.spec.ts +++ b/src/lib/progress-bar/progress-bar.spec.ts @@ -8,7 +8,7 @@ describe('MdProgressBar', () => { beforeEach(async(() => { TestBed.configureTestingModule({ - imports: [MdProgressBarModule.forRoot()], + imports: [MdProgressBarModule], declarations: [ BasicProgressBar, BufferProgressBar, diff --git a/src/lib/progress-spinner/index.ts b/src/lib/progress-spinner/index.ts index 113dc6f84d66..014c52c52cc2 100644 --- a/src/lib/progress-spinner/index.ts +++ b/src/lib/progress-spinner/index.ts @@ -1,4 +1,4 @@ -import {NgModule, ModuleWithProviders} from '@angular/core'; +import {NgModule} from '@angular/core'; import {CompatibilityModule} from '../core'; import { MdProgressSpinner, @@ -24,15 +24,7 @@ import { MdProgressCircleCssMatStyler ], }) -class MdProgressSpinnerModule { - /** @deprecated */ - static forRoot(): ModuleWithProviders { - return { - ngModule: MdProgressSpinnerModule, - providers: [] - }; - } -} +class MdProgressSpinnerModule {} export {MdProgressSpinnerModule}; export * from './progress-spinner'; diff --git a/src/lib/progress-spinner/progress-spinner.spec.ts b/src/lib/progress-spinner/progress-spinner.spec.ts index 0db59707ec16..5e52c6dccc85 100644 --- a/src/lib/progress-spinner/progress-spinner.spec.ts +++ b/src/lib/progress-spinner/progress-spinner.spec.ts @@ -8,7 +8,7 @@ describe('MdProgressSpinner', () => { beforeEach(async(() => { TestBed.configureTestingModule({ - imports: [MdProgressSpinnerModule.forRoot()], + imports: [MdProgressSpinnerModule], declarations: [ BasicProgressSpinner, IndeterminateProgressSpinner, diff --git a/src/lib/radio/index.ts b/src/lib/radio/index.ts index 586a2734c855..6e17f71d948e 100644 --- a/src/lib/radio/index.ts +++ b/src/lib/radio/index.ts @@ -1,4 +1,4 @@ -import {NgModule, ModuleWithProviders} from '@angular/core'; +import {NgModule} from '@angular/core'; import {CommonModule} from '@angular/common'; import {VIEWPORT_RULER_PROVIDER} from '../core/overlay/position/viewport-ruler'; import { @@ -16,15 +16,7 @@ import {MdRadioGroup, MdRadioButton} from './radio'; providers: [UNIQUE_SELECTION_DISPATCHER_PROVIDER, VIEWPORT_RULER_PROVIDER, FocusOriginMonitor], declarations: [MdRadioGroup, MdRadioButton], }) -export class MdRadioModule { - /** @deprecated */ - static forRoot(): ModuleWithProviders { - return { - ngModule: MdRadioModule, - providers: [], - }; - } -} +export class MdRadioModule {} export * from './radio'; diff --git a/src/lib/radio/radio.spec.ts b/src/lib/radio/radio.spec.ts index 238949c9488a..7346f44bdbd4 100644 --- a/src/lib/radio/radio.spec.ts +++ b/src/lib/radio/radio.spec.ts @@ -24,7 +24,7 @@ describe('MdRadio', () => { beforeEach(async(() => { TestBed.configureTestingModule({ - imports: [MdRadioModule.forRoot(), FormsModule, ReactiveFormsModule], + imports: [MdRadioModule, FormsModule, ReactiveFormsModule], declarations: [ RadiosInsideRadioGroup, RadioGroupWithNgModel, diff --git a/src/lib/select/index.ts b/src/lib/select/index.ts index e5390113f94a..90d28734f83b 100644 --- a/src/lib/select/index.ts +++ b/src/lib/select/index.ts @@ -1,4 +1,4 @@ -import {NgModule, ModuleWithProviders} from '@angular/core'; +import {NgModule} from '@angular/core'; import {CommonModule} from '@angular/common'; import {MdSelect} from './select'; import {MdOptionModule} from '../core/option/option'; @@ -10,15 +10,7 @@ import {CompatibilityModule, OverlayModule} from '../core'; exports: [MdSelect, MdOptionModule, CompatibilityModule], declarations: [MdSelect], }) -export class MdSelectModule { - /** @deprecated */ - static forRoot(): ModuleWithProviders { - return { - ngModule: MdSelectModule, - providers: [] - }; - } -} +export class MdSelectModule {} export * from './select'; diff --git a/src/lib/select/select.spec.ts b/src/lib/select/select.spec.ts index a428799717e9..86e5636d0d11 100644 --- a/src/lib/select/select.spec.ts +++ b/src/lib/select/select.spec.ts @@ -27,7 +27,7 @@ describe('MdSelect', () => { beforeEach(async(() => { TestBed.configureTestingModule({ - imports: [MdSelectModule.forRoot(), ReactiveFormsModule, FormsModule], + imports: [MdSelectModule, ReactiveFormsModule, FormsModule], declarations: [ BasicSelect, NgModelSelect, diff --git a/src/lib/sidenav/index.ts b/src/lib/sidenav/index.ts index cd2f2a879f1a..5b475317b93a 100644 --- a/src/lib/sidenav/index.ts +++ b/src/lib/sidenav/index.ts @@ -1,4 +1,4 @@ -import {NgModule, ModuleWithProviders} from '@angular/core'; +import {NgModule} from '@angular/core'; import {CommonModule} from '@angular/common'; import {CompatibilityModule} from '../core'; import {A11yModule} from '../core/a11y/index'; @@ -11,15 +11,7 @@ import {MdSidenav, MdSidenavContainer} from './sidenav'; exports: [MdSidenavContainer, MdSidenav, CompatibilityModule], declarations: [MdSidenavContainer, MdSidenav], }) -export class MdSidenavModule { - /** @deprecated */ - static forRoot(): ModuleWithProviders { - return { - ngModule: MdSidenavModule, - providers: [] - }; - } -} +export class MdSidenavModule {} export * from './sidenav'; diff --git a/src/lib/sidenav/sidenav.spec.ts b/src/lib/sidenav/sidenav.spec.ts index 073a3f5378b5..58e959d39988 100644 --- a/src/lib/sidenav/sidenav.spec.ts +++ b/src/lib/sidenav/sidenav.spec.ts @@ -20,7 +20,7 @@ function endSidenavTransition(fixture: ComponentFixture) { describe('MdSidenav', () => { beforeEach(async(() => { TestBed.configureTestingModule({ - imports: [MdSidenavModule.forRoot(), A11yModule.forRoot(), PlatformModule.forRoot()], + imports: [MdSidenavModule, A11yModule, PlatformModule], declarations: [ BasicTestApp, SidenavContainerTwoSidenavTestApp, diff --git a/src/lib/slide-toggle/index.ts b/src/lib/slide-toggle/index.ts index 2c7409e1c60d..c63cb54c1a00 100644 --- a/src/lib/slide-toggle/index.ts +++ b/src/lib/slide-toggle/index.ts @@ -1,4 +1,4 @@ -import {NgModule, ModuleWithProviders} from '@angular/core'; +import {NgModule} from '@angular/core'; import {FormsModule} from '@angular/forms'; import {HAMMER_GESTURE_CONFIG} from '@angular/platform-browser'; import {GestureConfig, CompatibilityModule} from '../core'; @@ -12,15 +12,7 @@ import {MdRippleModule} from '../core/ripple/index'; declarations: [MdSlideToggle], providers: [{provide: HAMMER_GESTURE_CONFIG, useClass: GestureConfig}], }) -export class MdSlideToggleModule { - /** @deprecated */ - static forRoot(): ModuleWithProviders { - return { - ngModule: MdSlideToggleModule, - providers: [] - }; - } -} +export class MdSlideToggleModule {} export * from './slide-toggle'; diff --git a/src/lib/slide-toggle/slide-toggle.spec.ts b/src/lib/slide-toggle/slide-toggle.spec.ts index 4599ead4f14d..85e1bb26309d 100644 --- a/src/lib/slide-toggle/slide-toggle.spec.ts +++ b/src/lib/slide-toggle/slide-toggle.spec.ts @@ -12,7 +12,7 @@ describe('MdSlideToggle', () => { beforeEach(async(() => { TestBed.configureTestingModule({ - imports: [MdSlideToggleModule.forRoot(), FormsModule, ReactiveFormsModule], + imports: [MdSlideToggleModule, FormsModule, ReactiveFormsModule], declarations: [SlideToggleTestApp, SlideToggleFormsTestApp, SlideToggleWithFormControl], providers: [ {provide: HAMMER_GESTURE_CONFIG, useFactory: () => gestureConfig = new TestGestureConfig()} diff --git a/src/lib/slider/index.ts b/src/lib/slider/index.ts index 7fccc53ea96e..a10669ba61f7 100644 --- a/src/lib/slider/index.ts +++ b/src/lib/slider/index.ts @@ -1,4 +1,4 @@ -import {ModuleWithProviders, NgModule} from '@angular/core'; +import {NgModule} from '@angular/core'; import {HAMMER_GESTURE_CONFIG} from '@angular/platform-browser'; import {CommonModule} from '@angular/common'; import {FormsModule} from '@angular/forms'; @@ -13,15 +13,7 @@ import {RtlModule} from '../core/rtl/dir'; declarations: [MdSlider], providers: [{provide: HAMMER_GESTURE_CONFIG, useClass: GestureConfig}] }) -export class MdSliderModule { - /** @deprecated */ - static forRoot(): ModuleWithProviders { - return { - ngModule: MdSliderModule, - providers: [] - }; - } -} +export class MdSliderModule {} export * from './slider'; diff --git a/src/lib/snack-bar/index.ts b/src/lib/snack-bar/index.ts index 99dfe54532c1..f378b24c67f1 100644 --- a/src/lib/snack-bar/index.ts +++ b/src/lib/snack-bar/index.ts @@ -1,4 +1,4 @@ -import {NgModule, ModuleWithProviders} from '@angular/core'; +import {NgModule} from '@angular/core'; import {OverlayModule, PortalModule, CompatibilityModule, LIVE_ANNOUNCER_PROVIDER} from '../core'; import {CommonModule} from '@angular/common'; import {MdSnackBar} from './snack-bar'; @@ -13,15 +13,7 @@ import {SimpleSnackBar} from './simple-snack-bar'; entryComponents: [MdSnackBarContainer, SimpleSnackBar], providers: [MdSnackBar, LIVE_ANNOUNCER_PROVIDER] }) -export class MdSnackBarModule { - /** @deprecated */ - static forRoot(): ModuleWithProviders { - return { - ngModule: MdSnackBarModule, - providers: [] - }; - } -} +export class MdSnackBarModule {} export * from './snack-bar'; diff --git a/src/lib/snack-bar/snack-bar.spec.ts b/src/lib/snack-bar/snack-bar.spec.ts index 84904665aca4..473c5358b065 100644 --- a/src/lib/snack-bar/snack-bar.spec.ts +++ b/src/lib/snack-bar/snack-bar.spec.ts @@ -28,7 +28,7 @@ describe('MdSnackBar', () => { beforeEach(async(() => { TestBed.configureTestingModule({ - imports: [MdSnackBarModule.forRoot(), SnackBarTestModule], + imports: [MdSnackBarModule, SnackBarTestModule], providers: [ {provide: OverlayContainer, useFactory: () => { overlayContainerElement = document.createElement('div'); @@ -353,7 +353,7 @@ describe('MdSnackBar with parent MdSnackBar', () => { beforeEach(async(() => { TestBed.configureTestingModule({ - imports: [MdSnackBarModule.forRoot(), SnackBarTestModule], + imports: [MdSnackBarModule, SnackBarTestModule], declarations: [ComponentThatProvidesMdSnackBar], providers: [ {provide: OverlayContainer, useFactory: () => { diff --git a/src/lib/tabs/index.ts b/src/lib/tabs/index.ts index eff6d6da7d84..0589b298775b 100644 --- a/src/lib/tabs/index.ts +++ b/src/lib/tabs/index.ts @@ -1,4 +1,4 @@ -import {NgModule, ModuleWithProviders} from '@angular/core'; +import {NgModule} from '@angular/core'; import {CommonModule} from '@angular/common'; import {PortalModule} from '../core'; import {MdRippleModule} from '../core/ripple/index'; @@ -40,15 +40,7 @@ import {SCROLL_DISPATCHER_PROVIDER} from '../core/overlay/scroll/scroll-dispatch ], providers: [VIEWPORT_RULER_PROVIDER, SCROLL_DISPATCHER_PROVIDER], }) -export class MdTabsModule { - /** @deprecated */ - static forRoot(): ModuleWithProviders { - return { - ngModule: MdTabsModule, - providers: [] - }; - } -} +export class MdTabsModule {} export * from './tab-group'; diff --git a/src/lib/tabs/tab-group.spec.ts b/src/lib/tabs/tab-group.spec.ts index 3ae944edcfc9..5a70fe8eafb9 100644 --- a/src/lib/tabs/tab-group.spec.ts +++ b/src/lib/tabs/tab-group.spec.ts @@ -13,7 +13,7 @@ import {FakeViewportRuler} from '../core/overlay/position/fake-viewport-ruler'; describe('MdTabGroup', () => { beforeEach(async(() => { TestBed.configureTestingModule({ - imports: [MdTabsModule.forRoot()], + imports: [MdTabsModule], declarations: [ SimpleTabsTestApp, SimpleDynamicTabsTestApp, diff --git a/src/lib/tabs/tab-nav-bar/tab-nav-bar.spec.ts b/src/lib/tabs/tab-nav-bar/tab-nav-bar.spec.ts index 54d98ad04de5..342a6802db16 100644 --- a/src/lib/tabs/tab-nav-bar/tab-nav-bar.spec.ts +++ b/src/lib/tabs/tab-nav-bar/tab-nav-bar.spec.ts @@ -11,7 +11,7 @@ describe('MdTabNavBar', () => { beforeEach(async(() => { TestBed.configureTestingModule({ - imports: [MdTabsModule.forRoot()], + imports: [MdTabsModule], declarations: [ SimpleTabNavBarTestApp, TabLinkWithNgIf, diff --git a/src/lib/toolbar/index.ts b/src/lib/toolbar/index.ts index ac40454a80ce..534dc1388e12 100644 --- a/src/lib/toolbar/index.ts +++ b/src/lib/toolbar/index.ts @@ -1,4 +1,4 @@ -import {NgModule, ModuleWithProviders} from '@angular/core'; +import {NgModule} from '@angular/core'; import {CompatibilityModule} from '../core'; import {MdToolbar, MdToolbarRow} from './toolbar'; @@ -8,15 +8,7 @@ import {MdToolbar, MdToolbarRow} from './toolbar'; exports: [MdToolbar, MdToolbarRow, CompatibilityModule], declarations: [MdToolbar, MdToolbarRow], }) -export class MdToolbarModule { - /** @deprecated */ - static forRoot(): ModuleWithProviders { - return { - ngModule: MdToolbarModule, - providers: [] - }; - } -} +export class MdToolbarModule {} export * from './toolbar'; diff --git a/src/lib/toolbar/toolbar.spec.ts b/src/lib/toolbar/toolbar.spec.ts index b688ae430c57..6e0c6d4da7cd 100644 --- a/src/lib/toolbar/toolbar.spec.ts +++ b/src/lib/toolbar/toolbar.spec.ts @@ -12,7 +12,7 @@ describe('MdToolbar', () => { beforeEach(async(() => { TestBed.configureTestingModule({ - imports: [MdToolbarModule.forRoot()], + imports: [MdToolbarModule], declarations: [TestApp], }); diff --git a/src/lib/tooltip/index.ts b/src/lib/tooltip/index.ts index 50d1e0df12dc..bbd6c63f2664 100644 --- a/src/lib/tooltip/index.ts +++ b/src/lib/tooltip/index.ts @@ -1,4 +1,4 @@ -import {NgModule, ModuleWithProviders} from '@angular/core'; +import {NgModule} from '@angular/core'; import {OverlayModule, CompatibilityModule} from '../core'; import {PlatformModule} from '../core/platform/index'; import {MdTooltip, TooltipComponent} from './tooltip'; @@ -10,15 +10,7 @@ import {MdTooltip, TooltipComponent} from './tooltip'; declarations: [MdTooltip, TooltipComponent], entryComponents: [TooltipComponent], }) -export class MdTooltipModule { - /** @deprecated */ - static forRoot(): ModuleWithProviders { - return { - ngModule: MdTooltipModule, - providers: [] - }; - } -} +export class MdTooltipModule {} export * from './tooltip'; diff --git a/src/lib/tooltip/tooltip.spec.ts b/src/lib/tooltip/tooltip.spec.ts index a5e3cc932c7d..0496657b3526 100644 --- a/src/lib/tooltip/tooltip.spec.ts +++ b/src/lib/tooltip/tooltip.spec.ts @@ -31,7 +31,7 @@ describe('MdTooltip', () => { beforeEach(async(() => { TestBed.configureTestingModule({ - imports: [MdTooltipModule.forRoot(), OverlayModule], + imports: [MdTooltipModule, OverlayModule], declarations: [BasicTooltipDemo, ScrollableTooltipDemo, OnPushTooltipDemo], providers: [ Platform, diff --git a/yarn.lock b/yarn.lock index 65e91a9da026..55f1edc847fe 100644 --- a/yarn.lock +++ b/yarn.lock @@ -377,18 +377,14 @@ version "1.2.0" resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.0.tgz#69a23a3ad29caf0097f06eda59b361ee2f0639f6" -"@types/node@*": - version "7.0.4" - resolved "https://registry.yarnpkg.com/@types/node/-/node-7.0.4.tgz#9aabc135979ded383325749f508894c662948c8b" +"@types/node@*", "@types/node@^7.0.5": + version "7.0.5" + resolved "https://registry.yarnpkg.com/@types/node/-/node-7.0.5.tgz#96a0f0a618b7b606f1ec547403c00650210bfbb7" "@types/node@^6.0.46": version "6.0.60" resolved "https://registry.yarnpkg.com/@types/node/-/node-6.0.60.tgz#e7e134ebc674ae6ed93c36c767739b110d2c57fc" -"@types/node@^7.0.5": - version "7.0.5" - resolved "https://registry.yarnpkg.com/@types/node/-/node-7.0.5.tgz#96a0f0a618b7b606f1ec547403c00650210bfbb7" - "@types/orchestrator@*": version "0.0.30" resolved "https://registry.yarnpkg.com/@types/orchestrator/-/orchestrator-0.0.30.tgz#dcdda8d647b568b7b1e34178cb1f0b44ac9a98e5" @@ -434,7 +430,7 @@ JSONStream@^1.0.4, JSONStream@^1.0.7: jsonparse "^1.2.0" through ">=2.2.7 <3" -abbrev@1: +abbrev@1, abbrev@1.0.x: version "1.0.9" resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.0.9.tgz#91b4792588a7738c25f35dd6f63752a2f8776135" @@ -707,17 +703,17 @@ async@1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/async/-/async-1.4.0.tgz#35f86f83c59e0421d099cd9a91d8278fb578c00d" -async@2.0.1, async@^2.0.0, async@^2.0.1: +async@1.x, async@^1.3.0, async@^1.4.0, async@^1.4.2, async@^1.5.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" + +async@2.0.1, async@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/async/-/async-2.0.1.tgz#b709cc0280a9c36f09f4536be823c838a9049e25" dependencies: lodash "^4.8.0" -async@^1.3.0, async@^1.4.0, async@^1.4.2, async@^1.5.2: - version "1.5.2" - resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" - -async@^2.1.2, async@^2.1.4: +async@^2.0.0, async@^2.1.2, async@^2.1.4: version "2.1.5" resolved "https://registry.yarnpkg.com/async/-/async-2.1.5.tgz#e587c68580994ac67fc56ff86d3ac56bdbe810bc" dependencies: @@ -1527,16 +1523,7 @@ connect@^2.30.0: utils-merge "1.0.0" vhost "~3.0.1" -connect@^3.3.3: - version "3.5.0" - resolved "https://registry.yarnpkg.com/connect/-/connect-3.5.0.tgz#b357525a0b4c1f50599cd983e1d9efeea9677198" - dependencies: - debug "~2.2.0" - finalhandler "0.5.0" - parseurl "~1.3.1" - utils-merge "1.0.0" - -connect@^3.6.0: +connect@^3.3.3, connect@^3.6.0: version "3.6.0" resolved "https://registry.yarnpkg.com/connect/-/connect-3.6.0.tgz#f09a4f7dcd17324b663b725c815bdb1c4158a46e" dependencies: @@ -1854,7 +1841,7 @@ dashdash@^1.12.0: dependencies: assert-plus "^1.0.0" -dateformat@^1.0.11, dateformat@^1.0.12, dateformat@^1.0.7-1.2.3: +dateformat@^1.0.11, dateformat@^1.0.12, dateformat@^1.0.6, dateformat@^1.0.7-1.2.3: version "1.0.12" resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-1.0.12.tgz#9f124b67594c937ff706932e4a642cca8dbbfee9" dependencies: @@ -1873,9 +1860,9 @@ debug-fabulous@0.0.X: lazy-debug-legacy "0.0.X" object-assign "4.1.0" -debug@2, debug@2.3.3, debug@2.X, debug@^2.2.0: - version "2.3.3" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.3.3.tgz#40c453e67e6e13c901ddec317af8986cda9eff8c" +debug@2, debug@2.6.1: + version "2.6.1" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.1.tgz#79855090ba2c4e3115cc7d8769491d58f0491351" dependencies: ms "0.7.2" @@ -1885,9 +1872,9 @@ debug@2.2.0, debug@~2.2.0: dependencies: ms "0.7.1" -debug@2.6.1: - version "2.6.1" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.1.tgz#79855090ba2c4e3115cc7d8769491d58f0491351" +debug@2.3.3, debug@2.X, debug@^2.2.0: + version "2.3.3" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.3.3.tgz#40c453e67e6e13c901ddec317af8986cda9eff8c" dependencies: ms "0.7.2" @@ -2035,7 +2022,7 @@ dgeni-packages@^0.16.5: stringmap "^0.2.2" typescript "^1.7.5" -dgeni@^0.4.0, dgeni@^0.4.2: +dgeni@^0.4.0: version "0.4.2" resolved "https://registry.yarnpkg.com/dgeni/-/dgeni-0.4.2.tgz#c5f7297922444e9e149368f7d3c3fdb17cc96d28" dependencies: @@ -2048,6 +2035,20 @@ dgeni@^0.4.0, dgeni@^0.4.2: validate.js "^0.9.0" winston "^2.1.1" +dgeni@^0.4.7: + version "0.4.7" + resolved "https://registry.yarnpkg.com/dgeni/-/dgeni-0.4.7.tgz#5070627dd28f88d48006e21f55afb18a9cb8be68" + dependencies: + canonical-path "~0.0.2" + dependency-graph "~0.4.1" + di "0.0.1" + lodash "^3.10.1" + objectdiff "^1.1.0" + optimist "~0.6.1" + q "~1.4.1" + validate.js "^0.9.0" + winston "^2.1.1" + di@0.0.1, di@^0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/di/-/di-0.0.1.tgz#806649326ceaa7caa3306d75d985ea2748ba913c" @@ -2192,13 +2193,13 @@ encodeurl@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.1.tgz#79e3d58655346909fe6f0f45a5de68103b294d20" -end-of-stream@1.0.0, end-of-stream@^1.0.0: +end-of-stream@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.0.0.tgz#d4596e702734a93e40e9af864319eabd99ff2f0e" dependencies: once "~1.3.0" -end-of-stream@^1.1.0: +end-of-stream@^1.0.0, end-of-stream@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.1.0.tgz#e9353258baa9108965efc41cb0ef8ade2f3cfb07" dependencies: @@ -2305,7 +2306,7 @@ escape-string-regexp@^1.0.0, escape-string-regexp@^1.0.2, escape-string-regexp@^ version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" -escodegen@^1.8.0: +escodegen@1.8.x, escodegen@^1.8.0: version "1.8.1" resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.8.1.tgz#5a5b53af4693110bebb0867aa3430dd3b70a1018" dependencies: @@ -2320,7 +2321,7 @@ espree@^2.2.3: version "2.2.5" resolved "https://registry.yarnpkg.com/espree/-/espree-2.2.5.tgz#df691b9310889402aeb29cc066708c56690b854b" -esprima@^2.6.0, esprima@^2.7.1: +esprima@2.7.x, esprima@^2.6.0, esprima@^2.7.1: version "2.7.3" resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" @@ -2542,16 +2543,6 @@ finalhandler@0.4.0: on-finished "~2.3.0" unpipe "~1.0.0" -finalhandler@0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-0.5.0.tgz#e9508abece9b6dba871a6942a1d7911b91911ac7" - dependencies: - debug "~2.2.0" - escape-html "~1.0.3" - on-finished "~2.3.0" - statuses "~1.3.0" - unpipe "~1.0.0" - finalhandler@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.0.0.tgz#b5691c2c0912092f18ac23e9416bde5cd7dc6755" @@ -3010,7 +3001,7 @@ glob@^4.3.1: minimatch "^2.0.1" once "^1.3.0" -glob@^5.0.14, glob@~5.0.0: +glob@^5.0.14, glob@^5.0.15, glob@~5.0.0: version "5.0.15" resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1" dependencies: @@ -3544,7 +3535,7 @@ hammerjs@^2.0.8: version "2.0.8" resolved "https://registry.yarnpkg.com/hammerjs/-/hammerjs-2.0.8.tgz#04ef77862cff2bb79d30f7692095930222bf60f1" -handlebars@^4.0.2: +handlebars@^4.0.1, handlebars@^4.0.2: version "4.0.5" resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.5.tgz#92c6ed6bb164110c50d4d8d0fbddc70806c6f8e7" dependencies: @@ -4067,6 +4058,25 @@ isstream@0.1.x, isstream@~0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" +istanbul@^0.4.0: + version "0.4.5" + resolved "https://registry.yarnpkg.com/istanbul/-/istanbul-0.4.5.tgz#65c7d73d4c4da84d4f3ac310b918fb0b8033733b" + dependencies: + abbrev "1.0.x" + async "1.x" + escodegen "1.8.x" + esprima "2.7.x" + glob "^5.0.15" + handlebars "^4.0.1" + js-yaml "3.x" + mkdirp "0.5.x" + nopt "3.x" + once "1.x" + resolve "1.1.x" + supports-color "^3.1.0" + which "^1.1.1" + wordwrap "^1.0.0" + jasmine-core@^2.5.2, jasmine-core@~2.5.2: version "2.5.2" resolved "https://registry.yarnpkg.com/jasmine-core/-/jasmine-core-2.5.2.tgz#6f61bd79061e27f43e6f9355e44b3c6cab6ff297" @@ -4118,7 +4128,7 @@ js-tokens@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.1.tgz#08e9f132484a2c45a30907e9dc4d5567b7f114d7" -js-yaml@^3.4.3: +js-yaml@3.x, js-yaml@^3.4.3: version "3.7.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.7.0.tgz#5c967ddd837a9bfdca5f2de84253abe8a1c03b80" dependencies: @@ -4257,6 +4267,16 @@ karma-chrome-launcher@^2.0.0: fs-access "^1.0.0" which "^1.2.1" +karma-coverage@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/karma-coverage/-/karma-coverage-1.1.1.tgz#5aff8b39cf6994dc22de4c84362c76001b637cf6" + dependencies: + dateformat "^1.0.6" + istanbul "^0.4.0" + lodash "^3.8.0" + minimatch "^3.0.0" + source-map "^0.5.1" + karma-firefox-launcher@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/karma-firefox-launcher/-/karma-firefox-launcher-1.0.1.tgz#ce58f47c2013a88156d55a5d61337c099cf5bb51" @@ -4747,14 +4767,14 @@ lowercase-keys@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.0.tgz#4e3366b39e7f5457e35f1324bdf6f88d0bfc7306" -lru-cache@2, lru-cache@2.2.x: - version "2.2.4" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-2.2.4.tgz#6c658619becf14031d0d0b594b16042ce4dc063d" - -lru-cache@^2.6.5: +lru-cache@2, lru-cache@^2.6.5: version "2.7.3" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-2.7.3.tgz#6d4524e8b955f95d4f5b58851ce21dd72fb4e952" +lru-cache@2.2.x: + version "2.2.4" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-2.2.4.tgz#6c658619becf14031d0d0b594b16042ce4dc063d" + lru-cache@^4.0.0, lru-cache@^4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.0.2.tgz#1d17679c069cda5d040991a09dbc2c0db377e55e" @@ -4932,7 +4952,7 @@ minimatch@~0.2.11: lru-cache "2" sigmund "~1.0.0" -minimist@0.0.8: +minimist@0.0.8, minimist@~0.0.1: version "0.0.8" resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" @@ -4948,10 +4968,6 @@ minimist@^1.1.0, minimist@^1.1.3, minimist@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" -minimist@~0.0.1: - version "0.0.10" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" - mkdirp-promise@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/mkdirp-promise/-/mkdirp-promise-5.0.0.tgz#b8bc7d6eab71c2b2e37cb06ea48a459d14366ea2" @@ -4960,7 +4976,7 @@ mkdirp@0.3.x, mkdirp@~0.3.5: version "0.3.5" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.3.5.tgz#de3e5f8961c88c787ee1368df849ac4413eca8d7" -mkdirp@0.5, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.1: +mkdirp@0.5, mkdirp@0.5.x, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" dependencies: @@ -5143,30 +5159,7 @@ node-pre-gyp@^0.6.0, node-pre-gyp@^0.6.29: tar "~2.2.1" tar-pack "~3.3.0" -node-sass@^4.2.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/node-sass/-/node-sass-4.3.0.tgz#d014f64595d77b26af99e9f7a7e74704d9976bda" - dependencies: - async-foreach "^0.1.3" - chalk "^1.1.1" - cross-spawn "^3.0.0" - gaze "^1.0.0" - get-stdin "^4.0.1" - glob "^7.0.3" - in-publish "^2.0.0" - lodash.assign "^4.2.0" - lodash.clonedeep "^4.3.2" - lodash.mergewith "^4.6.0" - meow "^3.7.0" - mkdirp "^0.5.1" - nan "^2.3.2" - node-gyp "^3.3.1" - npmlog "^4.0.0" - request "^2.61.0" - sass-graph "^2.1.1" - stdout-stream "^1.4.0" - -node-sass@^4.5.0: +node-sass@^4.2.0, node-sass@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/node-sass/-/node-sass-4.5.0.tgz#532e37bad0ce587348c831535dbc98ea4289508b" dependencies: @@ -5203,7 +5196,7 @@ node-uuid@1.x, node-uuid@^1.4.3, node-uuid@~1.4.7: version "1.4.7" resolved "https://registry.yarnpkg.com/node-uuid/-/node-uuid-1.4.7.tgz#6da5a17668c4b3dd59623bda11cf7fa4c1f60a6f" -"nopt@2 || 3", nopt@~3.0.6: +"nopt@2 || 3", nopt@3.x, nopt@~3.0.6: version "3.0.6" resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9" dependencies: @@ -5300,6 +5293,10 @@ object.omit@^2.0.0: for-own "^0.1.4" is-extendable "^0.1.1" +objectdiff@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/objectdiff/-/objectdiff-1.1.0.tgz#8d7a15be6cb8670df8a490cc6be12a4f05ea82f4" + on-finished@^2.2.0, on-finished@~2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" @@ -5310,7 +5307,7 @@ on-headers@^1.0.0, on-headers@~1.0.0, on-headers@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/on-headers/-/on-headers-1.0.1.tgz#928f5d0f470d49342651ea6794b0857c100693f7" -once@^1.3.0, once@^1.3.1: +once@1.x, once@^1.3.0, once@^1.3.1: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" dependencies: @@ -6215,14 +6212,14 @@ resolve-url@~0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" +resolve@1.1.x, resolve@~1.1.6, resolve@~1.1.7: + version "1.1.7" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" + resolve@^1.1.6, resolve@^1.1.7: version "1.2.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.2.0.tgz#9589c3f2f6149d1417a40becc1663db6ec6bc26c" -resolve@~1.1.6, resolve@~1.1.7: - version "1.1.7" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" - response-time@~2.3.1: version "2.3.2" resolved "https://registry.yarnpkg.com/response-time/-/response-time-2.3.2.tgz#ffa71bab952d62f7c1d49b7434355fbc68dffc5a" @@ -6254,9 +6251,9 @@ right-align@^0.1.1: dependencies: align-text "^0.1.1" -rimraf@2, rimraf@^2.2.8, rimraf@^2.5.2, rimraf@^2.5.4, rimraf@~2.5.1, rimraf@~2.5.4: - version "2.5.4" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.5.4.tgz#96800093cbf1a0c86bd95b4625467535c29dfa04" +rimraf@2, rimraf@^2.5.2, rimraf@^2.5.4, rimraf@^2.6.0: + version "2.6.1" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.1.tgz#c2338ec643df7a1b7fe5c54fa86f57428a55f33d" dependencies: glob "^7.0.5" @@ -6266,9 +6263,9 @@ rimraf@2.4.3: dependencies: glob "^5.0.14" -rimraf@^2.6.0: - version "2.6.1" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.1.tgz#c2338ec643df7a1b7fe5c54fa86f57428a55f33d" +rimraf@^2.2.8, rimraf@~2.5.1, rimraf@~2.5.4: + version "2.5.4" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.5.4.tgz#96800093cbf1a0c86bd95b4625467535c29dfa04" dependencies: glob "^7.0.5" @@ -6707,7 +6704,7 @@ stack-trace@0.0.9, stack-trace@0.0.x: version "0.0.9" resolved "https://registry.yarnpkg.com/stack-trace/-/stack-trace-0.0.9.tgz#a8f6eaeca90674c333e7c43953f275b451510695" -statuses@1, "statuses@>= 1.3.1 < 2", statuses@~1.3.0, statuses@~1.3.1: +statuses@1, "statuses@>= 1.3.1 < 2", statuses@~1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.3.1.tgz#faf51b9eb74aaef3b3acf4ad5f61abf24cb7b93e" @@ -6976,7 +6973,7 @@ supports-color@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" -supports-color@^3.1.2: +supports-color@^3.1.0, supports-color@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.1.2.tgz#72a262894d9d408b956ca05ff37b2ed8a6e2a2d5" dependencies: @@ -7338,7 +7335,7 @@ typescript@~2.0.10: version "2.0.10" resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.0.10.tgz#ccdd4ed86fd5550a407101a0814012e1b3fac3dd" -uglify-js@2.7.x, uglify-js@^2.6: +uglify-js@2.7.x: version "2.7.5" resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.7.5.tgz#4612c0c7baaee2ba7c487de4904ae122079f2ca8" dependencies: @@ -7347,7 +7344,7 @@ uglify-js@2.7.x, uglify-js@^2.6: uglify-to-browserify "~1.0.0" yargs "~3.10.0" -uglify-js@^2.8.7: +uglify-js@^2.6, uglify-js@^2.8.7: version "2.8.7" resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.7.tgz#e0391911507b6d2e05697a528f1686e90a11b160" dependencies: @@ -7755,14 +7752,14 @@ wordwrap@0.0.2: version "0.0.2" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" +wordwrap@^1.0.0, wordwrap@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" + wordwrap@~0.0.2: version "0.0.3" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" -wordwrap@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" - wrap-ansi@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" @@ -7793,20 +7790,13 @@ write-file-stdout@0.0.2: version "0.0.2" resolved "https://registry.yarnpkg.com/write-file-stdout/-/write-file-stdout-0.0.2.tgz#c252d7c7c5b1b402897630e3453c7bfe690d9ca1" -ws@1.1.2: +ws@1.1.2, ws@^1.0.1: version "1.1.2" resolved "https://registry.yarnpkg.com/ws/-/ws-1.1.2.tgz#8a244fa052401e08c9886cf44a85189e1fd4067f" dependencies: options ">=0.0.5" ultron "1.0.x" -ws@^1.0.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/ws/-/ws-1.1.1.tgz#082ddb6c641e85d4bb451f03d52f06eabdb1f018" - dependencies: - options ">=0.0.5" - ultron "1.0.x" - wtf-8@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/wtf-8/-/wtf-8-1.0.0.tgz#392d8ba2d0f1c34d1ee2d630f15d0efb68e1048a"