From 28240625e6a9e1234bd41dff8d0163c63edf0cd5 Mon Sep 17 00:00:00 2001 From: George Kalpakas Date: Thu, 15 Feb 2018 19:14:20 +0200 Subject: [PATCH] refactor(upgrade): use correct paths for imports (#22167) `packages/upgrade/static/src` is anymlink to `packages/upgrade/src`. Still, using the correct paths (e.g. using `@angular/upgrade/static/src/...` for `@angula/upgrade/static` specs ensures that the module loader (e.g. SystemJS) can map the imports to the same instances. PR Close #22167 --- packages/upgrade/test/static/angular1_providers_spec.ts | 4 ++-- .../test/static/integration/change_detection_spec.ts | 2 +- .../test/static/integration/content_projection_spec.ts | 2 +- .../test/static/integration/downgrade_component_spec.ts | 2 +- .../test/static/integration/downgrade_module_spec.ts | 6 +++--- packages/upgrade/test/static/integration/examples_spec.ts | 2 +- packages/upgrade/test/static/integration/injection_spec.ts | 4 ++-- .../upgrade/test/static/integration/testability_spec.ts | 2 +- .../test/static/integration/upgrade_component_spec.ts | 4 ++-- packages/upgrade/test/static/test_helpers.ts | 4 ++-- 10 files changed, 16 insertions(+), 16 deletions(-) diff --git a/packages/upgrade/test/static/angular1_providers_spec.ts b/packages/upgrade/test/static/angular1_providers_spec.ts index 3c9956d82f..b43b524cc0 100644 --- a/packages/upgrade/test/static/angular1_providers_spec.ts +++ b/packages/upgrade/test/static/angular1_providers_spec.ts @@ -6,8 +6,8 @@ * found in the LICENSE file at https://angular.io/license */ -import {Ng1Token} from '@angular/upgrade/src/common/angular1'; -import {compileFactory, injectorFactory, parseFactory, rootScopeFactory, setTempInjectorRef} from '@angular/upgrade/src/static/angular1_providers'; +import {Ng1Token} from '@angular/upgrade/static/src/common/angular1'; +import {compileFactory, injectorFactory, parseFactory, rootScopeFactory, setTempInjectorRef} from '@angular/upgrade/static/src/static/angular1_providers'; { describe('upgrade angular1_providers', () => { diff --git a/packages/upgrade/test/static/integration/change_detection_spec.ts b/packages/upgrade/test/static/integration/change_detection_spec.ts index 465f682b0d..280e9442b4 100644 --- a/packages/upgrade/test/static/integration/change_detection_spec.ts +++ b/packages/upgrade/test/static/integration/change_detection_spec.ts @@ -10,8 +10,8 @@ import {Component, Directive, ElementRef, Injector, Input, NgModule, NgZone, Sim import {async} from '@angular/core/testing'; import {BrowserModule} from '@angular/platform-browser'; import {platformBrowserDynamic} from '@angular/platform-browser-dynamic'; -import * as angular from '@angular/upgrade/src/common/angular1'; import {UpgradeComponent, UpgradeModule, downgradeComponent} from '@angular/upgrade/static'; +import * as angular from '@angular/upgrade/static/src/common/angular1'; import {bootstrap, html} from '../test_helpers'; diff --git a/packages/upgrade/test/static/integration/content_projection_spec.ts b/packages/upgrade/test/static/integration/content_projection_spec.ts index 90c67208ff..0f31b02be0 100644 --- a/packages/upgrade/test/static/integration/content_projection_spec.ts +++ b/packages/upgrade/test/static/integration/content_projection_spec.ts @@ -10,8 +10,8 @@ import {Component, Directive, ElementRef, Injector, Input, NgModule, destroyPlat import {async} from '@angular/core/testing'; import {BrowserModule} from '@angular/platform-browser'; import {platformBrowserDynamic} from '@angular/platform-browser-dynamic'; -import * as angular from '@angular/upgrade/src/common/angular1'; import {UpgradeComponent, UpgradeModule, downgradeComponent} from '@angular/upgrade/static'; +import * as angular from '@angular/upgrade/static/src/common/angular1'; import {bootstrap, html, multiTrim} from '../test_helpers'; diff --git a/packages/upgrade/test/static/integration/downgrade_component_spec.ts b/packages/upgrade/test/static/integration/downgrade_component_spec.ts index 8bc3cd0fa5..c5c91dfaad 100644 --- a/packages/upgrade/test/static/integration/downgrade_component_spec.ts +++ b/packages/upgrade/test/static/integration/downgrade_component_spec.ts @@ -10,8 +10,8 @@ import {ChangeDetectorRef, Compiler, Component, ComponentFactoryResolver, EventE import {async, fakeAsync, tick} from '@angular/core/testing'; import {BrowserModule} from '@angular/platform-browser'; import {platformBrowserDynamic} from '@angular/platform-browser-dynamic'; -import * as angular from '@angular/upgrade/src/common/angular1'; import {UpgradeModule, downgradeComponent} from '@angular/upgrade/static'; +import * as angular from '@angular/upgrade/static/src/common/angular1'; import {$apply, bootstrap, html, multiTrim} from '../test_helpers'; diff --git a/packages/upgrade/test/static/integration/downgrade_module_spec.ts b/packages/upgrade/test/static/integration/downgrade_module_spec.ts index 5a3eba32ce..02cfc2400b 100644 --- a/packages/upgrade/test/static/integration/downgrade_module_spec.ts +++ b/packages/upgrade/test/static/integration/downgrade_module_spec.ts @@ -11,10 +11,10 @@ import {async, fakeAsync, tick} from '@angular/core/testing'; import {BrowserModule} from '@angular/platform-browser'; import {platformBrowserDynamic} from '@angular/platform-browser-dynamic'; import {browserDetection} from '@angular/platform-browser/testing/src/browser_util'; -import * as angular from '@angular/upgrade/src/common/angular1'; -import {$ROOT_SCOPE, INJECTOR_KEY, LAZY_MODULE_REF} from '@angular/upgrade/src/common/constants'; -import {LazyModuleRef} from '@angular/upgrade/src/common/util'; import {downgradeComponent, downgradeModule} from '@angular/upgrade/static'; +import * as angular from '@angular/upgrade/static/src/common/angular1'; +import {$ROOT_SCOPE, INJECTOR_KEY, LAZY_MODULE_REF} from '@angular/upgrade/static/src/common/constants'; +import {LazyModuleRef} from '@angular/upgrade/static/src/common/util'; import {html, multiTrim} from '../test_helpers'; diff --git a/packages/upgrade/test/static/integration/examples_spec.ts b/packages/upgrade/test/static/integration/examples_spec.ts index 319f87d7d7..4796059628 100644 --- a/packages/upgrade/test/static/integration/examples_spec.ts +++ b/packages/upgrade/test/static/integration/examples_spec.ts @@ -10,8 +10,8 @@ import {Component, Directive, ElementRef, Injector, Input, NgModule, destroyPlat import {async} from '@angular/core/testing'; import {BrowserModule} from '@angular/platform-browser'; import {platformBrowserDynamic} from '@angular/platform-browser-dynamic'; -import * as angular from '@angular/upgrade/src/common/angular1'; import {UpgradeComponent, UpgradeModule, downgradeComponent} from '@angular/upgrade/static'; +import * as angular from '@angular/upgrade/static/src/common/angular1'; import {bootstrap, html, multiTrim} from '../test_helpers'; diff --git a/packages/upgrade/test/static/integration/injection_spec.ts b/packages/upgrade/test/static/integration/injection_spec.ts index 128931f92e..12944f2cfb 100644 --- a/packages/upgrade/test/static/integration/injection_spec.ts +++ b/packages/upgrade/test/static/integration/injection_spec.ts @@ -10,9 +10,9 @@ import {InjectionToken, Injector, NgModule, destroyPlatform} from '@angular/core import {async} from '@angular/core/testing'; import {BrowserModule} from '@angular/platform-browser'; import {platformBrowserDynamic} from '@angular/platform-browser-dynamic'; -import * as angular from '@angular/upgrade/src/common/angular1'; -import {$INJECTOR, INJECTOR_KEY} from '@angular/upgrade/src/common/constants'; import {UpgradeModule, downgradeInjectable, getAngularJSGlobal, setAngularJSGlobal} from '@angular/upgrade/static'; +import * as angular from '@angular/upgrade/static/src/common/angular1'; +import {$INJECTOR, INJECTOR_KEY} from '@angular/upgrade/static/src/common/constants'; import {bootstrap, html} from '../test_helpers'; diff --git a/packages/upgrade/test/static/integration/testability_spec.ts b/packages/upgrade/test/static/integration/testability_spec.ts index d52d6c7f4a..ee374c6eb8 100644 --- a/packages/upgrade/test/static/integration/testability_spec.ts +++ b/packages/upgrade/test/static/integration/testability_spec.ts @@ -11,8 +11,8 @@ import {NgZone} from '@angular/core/src/zone/ng_zone'; import {fakeAsync, tick} from '@angular/core/testing'; import {BrowserModule} from '@angular/platform-browser'; import {platformBrowserDynamic} from '@angular/platform-browser-dynamic'; -import * as angular from '@angular/upgrade/src/common/angular1'; import {UpgradeModule} from '@angular/upgrade/static'; +import * as angular from '@angular/upgrade/static/src/common/angular1'; import {bootstrap, html} from '../test_helpers'; diff --git a/packages/upgrade/test/static/integration/upgrade_component_spec.ts b/packages/upgrade/test/static/integration/upgrade_component_spec.ts index 9d96cb0736..61f5863ec7 100644 --- a/packages/upgrade/test/static/integration/upgrade_component_spec.ts +++ b/packages/upgrade/test/static/integration/upgrade_component_spec.ts @@ -10,9 +10,9 @@ import {Component, Directive, ElementRef, ErrorHandler, EventEmitter, Inject, In import {async, fakeAsync, tick} from '@angular/core/testing'; import {BrowserModule} from '@angular/platform-browser'; import {platformBrowserDynamic} from '@angular/platform-browser-dynamic'; -import * as angular from '@angular/upgrade/src/common/angular1'; -import {$SCOPE} from '@angular/upgrade/src/common/constants'; import {UpgradeComponent, UpgradeModule, downgradeComponent} from '@angular/upgrade/static'; +import * as angular from '@angular/upgrade/static/src/common/angular1'; +import {$SCOPE} from '@angular/upgrade/static/src/common/constants'; import {$digest, bootstrap, html, multiTrim} from '../test_helpers'; diff --git a/packages/upgrade/test/static/test_helpers.ts b/packages/upgrade/test/static/test_helpers.ts index c1d12988b1..3afd946fe4 100644 --- a/packages/upgrade/test/static/test_helpers.ts +++ b/packages/upgrade/test/static/test_helpers.ts @@ -7,9 +7,9 @@ */ import {NgZone, PlatformRef, Type} from '@angular/core'; -import * as angular from '@angular/upgrade/src/common/angular1'; -import {$ROOT_SCOPE} from '@angular/upgrade/src/common/constants'; import {UpgradeModule} from '@angular/upgrade/static'; +import * as angular from '@angular/upgrade/static/src/common/angular1'; +import {$ROOT_SCOPE} from '@angular/upgrade/static/src/common/constants'; export * from '../common/test_helpers';