Skip to content

Commit 793f31b

Browse files
ocombemhevery
authored andcommitted
feat(common): add an empty DeprecatedI18NPipesModule module
Adding an empty module to ease the migration to the i18n pipes.
1 parent 7e94405 commit 793f31b

File tree

3 files changed

+21
-1
lines changed

3 files changed

+21
-1
lines changed

packages/common/src/common.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
export * from './location/index';
1515
export {NgLocaleLocalization, NgLocalization} from './localization';
1616
export {parseCookieValue as ɵparseCookieValue} from './cookie';
17-
export {CommonModule} from './common_module';
17+
export {CommonModule, DeprecatedI18NPipesModule} from './common_module';
1818
export {NgClass, NgFor, NgForOf, NgForOfContext, NgIf, NgIfContext, NgPlural, NgPluralCase, NgStyle, NgSwitch, NgSwitchCase, NgSwitchDefault, NgTemplateOutlet, NgComponentOutlet} from './directives/index';
1919
export {DOCUMENT} from './dom_tokens';
2020
export {AsyncPipe, DatePipe, I18nPluralPipe, I18nSelectPipe, JsonPipe, LowerCasePipe, CurrencyPipe, DecimalPipe, PercentPipe, SlicePipe, UpperCasePipe, TitleCasePipe} from './pipes/index';

packages/common/src/common_module.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,19 @@ import {COMMON_PIPES} from './pipes/index';
2929
})
3030
export class CommonModule {
3131
}
32+
33+
/**
34+
* I18N pipes are being changed to move away from using the JS Intl API.
35+
*
36+
* The former pipes relying on the Intl API will be moved to this module while the `CommonModule`
37+
* will contain the new pipes that do not rely on Intl.
38+
*
39+
* As a first step this module is created empty to ease the migration.
40+
*
41+
* see https://github.com/angular/angular/pull/18284
42+
*
43+
* @deprecated from v5
44+
*/
45+
@NgModule({declarations: [], exports: []})
46+
export class DeprecatedI18NPipesModule {
47+
}

tools/public_api_guard/common/common.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ export declare class DecimalPipe implements PipeTransform {
3333
transform(value: any, digits?: string): string | null;
3434
}
3535

36+
/** @deprecated */
37+
export declare class DeprecatedI18NPipesModule {
38+
}
39+
3640
/** @stable */
3741
export declare const DOCUMENT: InjectionToken<Document>;
3842

0 commit comments

Comments
 (0)