Skip to content

Commit d282507

Browse files
chuckjazvikerman
authored andcommitted
fix(core): Removed depricated disposePlatform
BREAKING CHANGE: previously deprecated disposePlatform was removed; see deprecation notice for migration instructions.
1 parent 156a52e commit d282507

File tree

6 files changed

+13
-22
lines changed

6 files changed

+13
-22
lines changed

modules/@angular/core/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
export * from './src/metadata';
1515
export * from './src/util';
1616
export * from './src/di';
17-
export {createPlatform, assertPlatform, disposePlatform, getPlatform, coreBootstrap, coreLoadAndBootstrap, PlatformRef, ApplicationRef, enableProdMode, isDevMode, createPlatformFactory} from './src/application_ref';
17+
export {createPlatform, assertPlatform, destroyPlatform, getPlatform, coreBootstrap, coreLoadAndBootstrap, PlatformRef, ApplicationRef, enableProdMode, isDevMode, createPlatformFactory} from './src/application_ref';
1818
export {APP_ID, PACKAGE_ROOT_URL, PLATFORM_INITIALIZER, APP_BOOTSTRAP_LISTENER} from './src/application_tokens';
1919
export {APP_INITIALIZER, ApplicationInitStatus} from './src/application_init';
2020
export * from './src/zone';

modules/@angular/core/src/application_ref.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -123,15 +123,6 @@ export function assertPlatform(requiredToken: any): PlatformRef {
123123
return platform;
124124
}
125125

126-
/**
127-
* Dispose the existing platform.
128-
*
129-
* @deprecated Use `destroyPlatform` instead
130-
*/
131-
export function disposePlatform(): void {
132-
destroyPlatform();
133-
}
134-
135126
/**
136127
* Destroy the existing platform.
137128
*

modules/@angular/platform-browser/test/browser/bootstrap_spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
import {XHR} from '@angular/compiler';
1010
import {APP_INITIALIZER, CUSTOM_ELEMENTS_SCHEMA, Component, Directive, ExceptionHandler, Inject, Input, NgModule, OnDestroy, PLATFORM_DIRECTIVES, PLATFORM_INITIALIZER, PLATFORM_PIPES, Pipe, ReflectiveInjector, createPlatform, createPlatformFactory, provide} from '@angular/core';
11-
import {ApplicationRef, disposePlatform} from '@angular/core/src/application_ref';
11+
import {ApplicationRef, destroyPlatform} from '@angular/core/src/application_ref';
1212
import {Console} from '@angular/core/src/console';
1313
import {ComponentRef} from '@angular/core/src/linker/component_factory';
1414
import {Testability, TestabilityRegistry} from '@angular/core/src/testability/testability';
@@ -121,7 +121,7 @@ export function main() {
121121
beforeEachProviders(() => { return [Log]; });
122122

123123
beforeEach(() => {
124-
disposePlatform();
124+
destroyPlatform();
125125

126126
fakeDoc = getDOM().createHtmlDocument();
127127
el = getDOM().createElement('hello-app', fakeDoc);
@@ -136,7 +136,7 @@ export function main() {
136136
[{provide: DOCUMENT, useValue: fakeDoc}, {provide: Console, useValue: compilerConsole}];
137137
});
138138

139-
afterEach(disposePlatform);
139+
afterEach(destroyPlatform);
140140

141141
it('should throw if bootstrapped Directive is not a Component', () => {
142142
expect(() => bootstrap(HelloRootDirectiveIsNotCmp))

modules/@angular/platform-server/test/integration_spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* found in the LICENSE file at https://angular.io/license
77
*/
88

9-
import {Component, disposePlatform} from '@angular/core';
9+
import {Component, destroyPlatform} from '@angular/core';
1010
import {async} from '@angular/core/testing';
1111
import {BROWSER_APP_PROVIDERS} from '@angular/platform-browser';
1212
import {BROWSER_APP_COMPILER_PROVIDERS} from '@angular/platform-browser-dynamic';
@@ -26,8 +26,8 @@ export function main() {
2626

2727
describe('platform-server integration', () => {
2828

29-
beforeEach(() => disposePlatform());
30-
afterEach(() => disposePlatform());
29+
beforeEach(() => destroyPlatform());
30+
afterEach(() => destroyPlatform());
3131

3232
it('should bootstrap', async(() => {
3333
var body = writeBody('<app></app>');

modules/@angular/upgrade/test/upgrade_spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* found in the LICENSE file at https://angular.io/license
77
*/
88

9-
import {Class, Component, EventEmitter, Inject, NgModule, OpaqueToken, Testability, disposePlatform} from '@angular/core';
9+
import {Class, Component, EventEmitter, Inject, NgModule, OpaqueToken, Testability, destroyPlatform} from '@angular/core';
1010
import {async} from '@angular/core/testing';
1111
import {AsyncTestCompleter, ddescribe, describe, expect, iit, inject, it} from '@angular/core/testing/testing_internal';
1212
import {BrowserModule} from '@angular/platform-browser';
@@ -15,8 +15,8 @@ import * as angular from '@angular/upgrade/src/angular_js';
1515

1616
export function main() {
1717
describe('adapter: ng1 to ng2', () => {
18-
beforeEach(() => disposePlatform());
19-
afterEach(() => disposePlatform());
18+
beforeEach(() => destroyPlatform());
19+
afterEach(() => destroyPlatform());
2020

2121
it('should have angular 1 loaded', () => expect(angular.version.major).toBe(1));
2222

tools/public_api_guard/core/index.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -488,6 +488,9 @@ export declare class DefaultIterableDiffer implements IterableDiffer {
488488
toString(): string;
489489
}
490490

491+
/** @experimental */
492+
export declare function destroyPlatform(): void;
493+
491494
/** @stable */
492495
export declare var Directive: DirectiveMetadataFactory;
493496

@@ -532,9 +535,6 @@ export interface DirectiveMetadataType {
532535
selector?: string;
533536
}
534537

535-
/** @deprecated */
536-
export declare function disposePlatform(): void;
537-
538538
/** @stable */
539539
export declare abstract class DoCheck {
540540
abstract ngDoCheck(): void;

0 commit comments

Comments
 (0)