From d036165a191d81955e68620eeed5be74a551d4ba Mon Sep 17 00:00:00 2001 From: Pawel Kozlowski Date: Tue, 13 Dec 2016 21:34:50 +0100 Subject: [PATCH] refactor: remove intl from facades (#13404) The existing intl.ts file is not a facade but rather a set of utils used by i18n-related pipes only. As such moving it back to common module so those utils are not used accidently from other places. --- modules/@angular/common/src/pipes/date_pipe.ts | 5 ++++- modules/@angular/{facade/src => common/src/pipes}/intl.ts | 0 modules/@angular/common/src/pipes/number_pipe.ts | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) rename modules/@angular/{facade/src => common/src/pipes}/intl.ts (100%) diff --git a/modules/@angular/common/src/pipes/date_pipe.ts b/modules/@angular/common/src/pipes/date_pipe.ts index ff85cba0b3..874c2eaf3d 100644 --- a/modules/@angular/common/src/pipes/date_pipe.ts +++ b/modules/@angular/common/src/pipes/date_pipe.ts @@ -7,11 +7,14 @@ */ import {Inject, LOCALE_ID, Pipe, PipeTransform} from '@angular/core'; -import {DateFormatter} from '../facade/intl'; + import {NumberWrapper, isDate} from '../facade/lang'; + +import {DateFormatter} from './intl'; import {InvalidPipeArgumentError} from './invalid_pipe_argument_error'; + /** * @ngModule CommonModule * @whatItDoes Formats a date according to locale rules. diff --git a/modules/@angular/facade/src/intl.ts b/modules/@angular/common/src/pipes/intl.ts similarity index 100% rename from modules/@angular/facade/src/intl.ts rename to modules/@angular/common/src/pipes/intl.ts diff --git a/modules/@angular/common/src/pipes/number_pipe.ts b/modules/@angular/common/src/pipes/number_pipe.ts index 386e69825b..fbfe98750e 100644 --- a/modules/@angular/common/src/pipes/number_pipe.ts +++ b/modules/@angular/common/src/pipes/number_pipe.ts @@ -8,9 +8,9 @@ import {Inject, LOCALE_ID, Pipe, PipeTransform, Type} from '@angular/core'; -import {NumberFormatStyle, NumberFormatter} from '../facade/intl'; import {NumberWrapper, isBlank, isPresent} from '../facade/lang'; +import {NumberFormatStyle, NumberFormatter} from './intl'; import {InvalidPipeArgumentError} from './invalid_pipe_argument_error'; const _NUMBER_FORMAT_REGEXP = /^(\d+)?\.((\d+)(-(\d+))?)?$/;