Skip to content

Commit

Permalink
fix(common): remove deprecated support for intl API
Browse files Browse the repository at this point in the history
BREAKING CHANGE:

In v5, we deprecated support for the intl API in order to improve the browser support. We are now removing these deprecated APIs for v8. See the original change here for more info on why: angular#18284.
  • Loading branch information
ocombe committed Mar 7, 2019
1 parent 7060d90 commit f2fb2a4
Show file tree
Hide file tree
Showing 12 changed files with 81 additions and 1,390 deletions.
29 changes: 0 additions & 29 deletions aio/content/guide/browser-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -297,35 +297,6 @@ Here are the features which may require additional polyfills:

</tr>

<tr style="vertical-align: top">

<td>

If you use the following deprecated i18n pipes:


[date](api/common/DeprecatedDatePipe),
[currency](api/common/DeprecatedCurrencyPipe),
[decimal](api/common/DeprecatedDecimalPipe),
[percent](api/common/DeprecatedPercentPipe)

</td>

<td>

[Intl API](guide/browser-support#intl)

</td>

<td>
All but Chrome, Firefox, Edge, IE11 and Safari 10
</td>

</tr>

<tr style="vertical-align: top">

<td>
Expand Down
3 changes: 1 addition & 2 deletions packages/common/src/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,10 @@ export {NgLocaleLocalization, NgLocalization} from './i18n/localization';
export {registerLocaleData} from './i18n/locale_data';
export {Plural, NumberFormatStyle, FormStyle, Time, TranslationWidth, FormatWidth, NumberSymbol, WeekDay, getNumberOfCurrencyDigits, getCurrencySymbol, getLocaleDayPeriods, getLocaleDayNames, getLocaleMonthNames, getLocaleId, getLocaleEraNames, getLocaleWeekEndRange, getLocaleFirstDayOfWeek, getLocaleDateFormat, getLocaleDateTimeFormat, getLocaleExtraDayPeriodRules, getLocaleExtraDayPeriods, getLocalePluralCase, getLocaleTimeFormat, getLocaleNumberSymbol, getLocaleNumberFormat, getLocaleCurrencyName, getLocaleCurrencySymbol} from './i18n/locale_data_api';
export {parseCookieValue as ɵparseCookieValue} from './cookie';
export {CommonModule, DeprecatedI18NPipesModule} from './common_module';
export {CommonModule} from './common_module';
export {NgClass, NgClassBase, NgForOf, NgForOfContext, NgIf, NgIfContext, NgPlural, NgPluralCase, NgStyle, NgStyleBase, NgSwitch, NgSwitchCase, NgSwitchDefault, NgTemplateOutlet, NgComponentOutlet} from './directives/index';
export {DOCUMENT} from './dom_tokens';
export {AsyncPipe, DatePipe, I18nPluralPipe, I18nSelectPipe, JsonPipe, LowerCasePipe, CurrencyPipe, DecimalPipe, PercentPipe, SlicePipe, UpperCasePipe, TitleCasePipe, KeyValuePipe, KeyValue} from './pipes/index';
export {DeprecatedDatePipe, DeprecatedCurrencyPipe, DeprecatedDecimalPipe, DeprecatedPercentPipe} from './pipes/deprecated/index';
export {PLATFORM_BROWSER_ID as ɵPLATFORM_BROWSER_ID, PLATFORM_SERVER_ID as ɵPLATFORM_SERVER_ID, PLATFORM_WORKER_APP_ID as ɵPLATFORM_WORKER_APP_ID, PLATFORM_WORKER_UI_ID as ɵPLATFORM_WORKER_UI_ID, isPlatformBrowser, isPlatformServer, isPlatformWorkerApp, isPlatformWorkerUi} from './platform_id';
export {VERSION} from './version';
export {ViewportScroller, NullViewportScroller as ɵNullViewportScroller} from './viewport_scroller';
Expand Down
17 changes: 1 addition & 16 deletions packages/common/src/common_module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@

import {NgModule} from '@angular/core';
import {COMMON_DIRECTIVES} from './directives/index';
import {DEPRECATED_PLURAL_FN, NgLocaleLocalization, NgLocalization, getPluralCase} from './i18n/localization';
import {COMMON_DEPRECATED_I18N_PIPES} from './pipes/deprecated/index';
import {NgLocaleLocalization, NgLocalization} from './i18n/localization';
import {COMMON_PIPES} from './pipes/index';


Expand Down Expand Up @@ -37,17 +36,3 @@ import {COMMON_PIPES} from './pipes/index';
})
export class CommonModule {
}

/**
* A module that contains the deprecated i18n pipes.
*
* @deprecated from v5
* @publicApi
*/
@NgModule({
declarations: [COMMON_DEPRECATED_I18N_PIPES],
exports: [COMMON_DEPRECATED_I18N_PIPES],
providers: [{provide: DEPRECATED_PLURAL_FN, useValue: getPluralCase}],
})
export class DeprecatedI18NPipesModule {
}
Loading

0 comments on commit f2fb2a4

Please sign in to comment.