diff --git a/build.sh b/build.sh index c8d7bc1371..f76161b5ca 100755 --- a/build.sh +++ b/build.sh @@ -116,3 +116,6 @@ do $(npm bin)/uglifyjs -c --screw-ie8 -o ${UMD_ES5_MIN_PATH} ${UMD_ES5_PATH} fi done + +echo "====== COMPILING: \$(npm bin)/tsc -p benchpress/tsconfig.json =====" +$(npm bin)/tsc -p ./modules/benchpress/tsconfig.json diff --git a/modules/benchmarks/src/compiler/compiler_benchmark.ts b/modules/benchmarks/src/compiler/compiler_benchmark.ts index 30f26bd34a..c335391653 100644 --- a/modules/benchmarks/src/compiler/compiler_benchmark.ts +++ b/modules/benchmarks/src/compiler/compiler_benchmark.ts @@ -1,9 +1,9 @@ import {bootstrap} from '@angular/platform-browser'; import {BrowserDomAdapter} from '@angular/platform-browser/src/browser/browser_adapter'; import {DOM} from '@angular/platform-browser/src/dom/dom_adapter'; -import {PromiseWrapper} from '@angular/facade'; -import {ListWrapper, Map, MapWrapper} from '@angular/facade'; -import {DateWrapper, Type, print, isPresent} from '@angular/facade'; +import {PromiseWrapper} from '@angular/facade/src/async'; +import {ListWrapper, Map, MapWrapper} from '@angular/facade/src/collection'; +import {DateWrapper, Type, print, isPresent} from '@angular/facade/src/lang'; import { ComponentResolver, diff --git a/modules/benchmarks/src/compiler/selector_benchmark.ts b/modules/benchmarks/src/compiler/selector_benchmark.ts index 6e02f58402..b6b71f5f84 100644 --- a/modules/benchmarks/src/compiler/selector_benchmark.ts +++ b/modules/benchmarks/src/compiler/selector_benchmark.ts @@ -1,6 +1,6 @@ import {SelectorMatcher} from '@angular/compiler/src/selector'; import {CssSelector} from '@angular/compiler/src/selector'; -import {StringWrapper, Math} from '@angular/facade'; +import {StringWrapper, Math} from '@angular/facade/lang'; import {getIntParameter, bindAction} from '@angular/testing/src/benchmark_util'; import {BrowserDomAdapter} from '@angular/platform-browser/src/browser/browser_adapter'; diff --git a/modules/benchmarks/src/costs/index.ts b/modules/benchmarks/src/costs/index.ts index a2d9264507..f12c6a7d0e 100644 --- a/modules/benchmarks/src/costs/index.ts +++ b/modules/benchmarks/src/costs/index.ts @@ -2,7 +2,7 @@ import {bootstrap} from '@angular/platform-browser'; import {Component, Directive, DynamicComponentLoader, ViewContainerRef} from '@angular/core'; import {NgIf, NgFor} from '@angular/common'; import {ApplicationRef} from '@angular/core/src/application_ref'; -import {ListWrapper} from '@angular/facade'; +import {ListWrapper} from '@angular/facade/src/lang'; import {getIntParameter, bindAction} from '@angular/testing/src/benchmark_util'; var testList = null; diff --git a/modules/benchmarks/src/largetable/largetable_benchmark.ts b/modules/benchmarks/src/largetable/largetable_benchmark.ts index 04c65633c5..b4bdae3b2c 100644 --- a/modules/benchmarks/src/largetable/largetable_benchmark.ts +++ b/modules/benchmarks/src/largetable/largetable_benchmark.ts @@ -1,5 +1,5 @@ import {DOM} from '@angular/platform-browser/src/dom/dom_adapter'; -import {window, document, gc} from '@angular/facade'; +import {window, document, gc} from '@angular/facade/src/browser'; import { getIntParameter, getStringParameter, @@ -13,7 +13,7 @@ import {NgFor, NgSwitch, NgSwitchWhen, NgSwitchDefault} from '@angular/common'; import {ApplicationRef} from '@angular/core/src/application_ref'; import {BrowserDomAdapter} from '@angular/platform-browser/src/browser/browser_adapter'; -import {ListWrapper} from '@angular/facade'; +import {ListWrapper} from '@angular/facade/src/collection'; import {Inject} from '@angular/core/src/di/decorators'; import {reflector} from '@angular/core/src/reflection/reflection'; diff --git a/modules/benchmarks/src/naive_infinite_scroll/app.ts b/modules/benchmarks/src/naive_infinite_scroll/app.ts index c484af3f9e..91fd9c2679 100644 --- a/modules/benchmarks/src/naive_infinite_scroll/app.ts +++ b/modules/benchmarks/src/naive_infinite_scroll/app.ts @@ -1,10 +1,10 @@ -import {isPresent} from '@angular/facade'; +import {isPresent} from '@angular/facade/src/lang'; import {getIntParameter, bindAction} from '@angular/testing/src/benchmark_util'; -import {TimerWrapper} from '@angular/facade'; +import {TimerWrapper} from '@angular/facade/src/async'; import {ScrollAreaComponent} from './scroll_area'; import {NgIf, NgFor} from '@angular/common'; import {DOM} from '@angular/platform-browser/src/dom/dom_adapter'; -import {document} from '@angular/facade'; +import {document} from '@angular/facade/src/browser'; import {Component, Directive} from '@angular/core'; diff --git a/modules/benchmarks/src/naive_infinite_scroll/cells.ts b/modules/benchmarks/src/naive_infinite_scroll/cells.ts index 090d0cd696..0d1303a7cd 100644 --- a/modules/benchmarks/src/naive_infinite_scroll/cells.ts +++ b/modules/benchmarks/src/naive_infinite_scroll/cells.ts @@ -1,4 +1,4 @@ -import {ListWrapper, Map} from '@angular/facade'; +import {ListWrapper, Map} from '@angular/facade/src/collection'; import {Company, Opportunity, Offering, Account, CustomDate, STATUS_LIST} from './common'; import {NgFor} from '@angular/common'; diff --git a/modules/benchmarks/src/naive_infinite_scroll/common.ts b/modules/benchmarks/src/naive_infinite_scroll/common.ts index a1a045bf04..0b7703f515 100644 --- a/modules/benchmarks/src/naive_infinite_scroll/common.ts +++ b/modules/benchmarks/src/naive_infinite_scroll/common.ts @@ -1,6 +1,6 @@ -import {Math} from '@angular/facade'; -import {StringWrapper} from '@angular/facade'; -import {ListWrapper, Map, MapWrapper} from '@angular/facade'; +import {Math} from '@angular/facade/src/math'; +import {StringWrapper} from '@angular/facade/src/lang'; +import {ListWrapper, Map, MapWrapper} from '@angular/facade/src/collection'; export var ITEMS = 1000; export var ITEM_HEIGHT = 40; diff --git a/modules/benchmarks/src/naive_infinite_scroll/random_data.ts b/modules/benchmarks/src/naive_infinite_scroll/random_data.ts index 31cac28c6f..bb1e3db0e0 100644 --- a/modules/benchmarks/src/naive_infinite_scroll/random_data.ts +++ b/modules/benchmarks/src/naive_infinite_scroll/random_data.ts @@ -1,4 +1,4 @@ -import {StringWrapper} from '@angular/facade'; +import {StringWrapper} from '@angular/facade/src/lang'; import { CustomDate, Offering, diff --git a/modules/benchmarks/src/naive_infinite_scroll/scroll_area.ts b/modules/benchmarks/src/naive_infinite_scroll/scroll_area.ts index 3e151829ff..d245b97d68 100644 --- a/modules/benchmarks/src/naive_infinite_scroll/scroll_area.ts +++ b/modules/benchmarks/src/naive_infinite_scroll/scroll_area.ts @@ -1,5 +1,5 @@ -import {ListWrapper} from '@angular/facade'; -import {Math} from '@angular/facade'; +import {ListWrapper} from '@angular/facade/src/collection'; +import {Math} from '@angular/facade/src/math'; import {Component, Directive} from '@angular/core'; diff --git a/modules/benchmarks/src/static_tree/tree_benchmark.ts b/modules/benchmarks/src/static_tree/tree_benchmark.ts index 218bc7dc89..0b152fc288 100644 --- a/modules/benchmarks/src/static_tree/tree_benchmark.ts +++ b/modules/benchmarks/src/static_tree/tree_benchmark.ts @@ -5,7 +5,7 @@ import {ApplicationRef} from '@angular/core/src/application_ref'; import {reflector} from '@angular/core/src/reflection/reflection'; import {ReflectionCapabilities} from '@angular/core/src/reflection/reflection_capabilities'; import {DOM} from '@angular/platform-browser/src/dom/dom_adapter'; -import {window, document, gc} from '@angular/facade'; +import {window, document, gc} from '@angular/facade/src/browser'; import { getIntParameter, getStringParameter, diff --git a/modules/benchmarks/src/tree/tree_benchmark.ts b/modules/benchmarks/src/tree/tree_benchmark.ts index 0712554720..cedebcceca 100644 --- a/modules/benchmarks/src/tree/tree_benchmark.ts +++ b/modules/benchmarks/src/tree/tree_benchmark.ts @@ -7,8 +7,8 @@ import {NgIf} from '@angular/common'; import {ApplicationRef} from '@angular/core/src/application_ref'; import {DOM} from '@angular/platform-browser/src/dom/dom_adapter'; -import {isPresent} from '@angular/facade'; -import {window, document, gc} from '@angular/facade'; +import {isPresent} from '@angular/facade/src/lang'; +import {window, document, gc} from '@angular/facade/src/browser'; import { getIntParameter, getStringParameter, diff --git a/modules/benchpress/src/common_options.ts b/modules/benchpress/src/common_options.ts index fa0986a555..9e376dd5ce 100644 --- a/modules/benchpress/src/common_options.ts +++ b/modules/benchpress/src/common_options.ts @@ -1,5 +1,5 @@ import {OpaqueToken} from '@angular/core/src/di'; -import {DateWrapper} from '@angular/facade'; +import {DateWrapper} from '@angular/facade/src/lang'; export class Options { static get DEFAULT_PROVIDERS(): any[] { return _DEFAULT_PROVIDERS; } diff --git a/modules/benchpress/src/measure_values.ts b/modules/benchpress/src/measure_values.ts index f88480307b..3628550b7e 100644 --- a/modules/benchpress/src/measure_values.ts +++ b/modules/benchpress/src/measure_values.ts @@ -1,5 +1,5 @@ -import {Date, DateWrapper} from '@angular/facade'; -import {Map} from '@angular/facade'; +import {Date, DateWrapper} from '@angular/facade/src/lang'; +import {Map} from '@angular/facade/src/collection'; export class MeasureValues { constructor(public runIndex: number, public timeStamp: Date, diff --git a/modules/benchpress/src/metric.ts b/modules/benchpress/src/metric.ts index 62b74b5931..b71adb77fd 100644 --- a/modules/benchpress/src/metric.ts +++ b/modules/benchpress/src/metric.ts @@ -1,4 +1,4 @@ -import {BaseException, WrappedException} from '@angular/facade'; +import {BaseException, WrappedException} from '@angular/facade/src/exceptions'; /** * A metric is measures values diff --git a/modules/benchpress/src/metric/multi_metric.ts b/modules/benchpress/src/metric/multi_metric.ts index 8b6ecb13e4..7f6639bd89 100644 --- a/modules/benchpress/src/metric/multi_metric.ts +++ b/modules/benchpress/src/metric/multi_metric.ts @@ -1,6 +1,6 @@ import {Injector, OpaqueToken} from '@angular/core/src/di'; -import {StringMapWrapper} from '@angular/facade'; -import {PromiseWrapper} from '@angular/facade'; +import {StringMapWrapper} from '@angular/facade/src/collection'; +import {PromiseWrapper} from '@angular/facade/src/async'; import {Metric} from '../metric'; diff --git a/modules/benchpress/src/metric/perflog_metric.ts b/modules/benchpress/src/metric/perflog_metric.ts index aeefbdd595..0ea6737da0 100644 --- a/modules/benchpress/src/metric/perflog_metric.ts +++ b/modules/benchpress/src/metric/perflog_metric.ts @@ -1,14 +1,7 @@ -import {PromiseWrapper, TimerWrapper} from '@angular/facade'; -import { - isPresent, - isBlank, - StringWrapper, - Math, - RegExpWrapper, - NumberWrapper -} from '@angular/facade'; -import {BaseException, WrappedException} from '@angular/facade'; -import {ListWrapper, StringMapWrapper} from '@angular/facade'; +import {PromiseWrapper, TimerWrapper} from '@angular/facade/src/async'; +import {isPresent, isBlank, StringWrapper, Math, RegExpWrapper, NumberWrapper} from '@angular/facade/src/lang'; +import {BaseException, WrappedException} from '@angular/facade/src/exceptions'; +import {ListWrapper, StringMapWrapper} from '@angular/facade/src/collection'; import {OpaqueToken} from '@angular/core/src/di'; import {WebDriverExtension, PerfLogFeatures} from '../web_driver_extension'; diff --git a/modules/benchpress/src/metric/user_metric.ts b/modules/benchpress/src/metric/user_metric.ts index 9929e974a5..df6efcb46b 100644 --- a/modules/benchpress/src/metric/user_metric.ts +++ b/modules/benchpress/src/metric/user_metric.ts @@ -1,7 +1,7 @@ -import {bind, Provider, OpaqueToken} from 'angular2/src/core/di'; -import {PromiseWrapper, TimerWrapper} from 'angular2/src/facade/async'; -import {StringMapWrapper} from 'angular2/src/facade/collection'; -import {isNumber} from 'angular2/src/facade/lang'; +import {bind, Provider, OpaqueToken} from '@angular/core'; +import {PromiseWrapper, TimerWrapper} from '@angular/facade/src/async'; +import {StringMapWrapper} from '@angular/facade/src/collection'; +import {isNumber} from '@angular/facade/src/lang'; import {Metric} from '../metric'; import {Options} from '../common_options'; diff --git a/modules/benchpress/src/reporter.ts b/modules/benchpress/src/reporter.ts index e835bfcb31..018c1f9590 100644 --- a/modules/benchpress/src/reporter.ts +++ b/modules/benchpress/src/reporter.ts @@ -1,4 +1,4 @@ -import {BaseException, WrappedException} from '@angular/facade'; +import {BaseException, WrappedException} from '@angular/facade/src/exceptions'; import {MeasureValues} from './measure_values'; /** diff --git a/modules/benchpress/src/reporter/console_reporter.ts b/modules/benchpress/src/reporter/console_reporter.ts index f9d67df48c..32497b613f 100644 --- a/modules/benchpress/src/reporter/console_reporter.ts +++ b/modules/benchpress/src/reporter/console_reporter.ts @@ -1,7 +1,7 @@ -import {print, isPresent, isBlank, NumberWrapper} from '@angular/facade'; -import {StringMapWrapper, ListWrapper} from '@angular/facade'; -import {PromiseWrapper} from '@angular/facade'; -import {Math} from '@angular/facade'; +import {print, isPresent, isBlank, NumberWrapper} from '@angular/facade/src/lang'; +import {StringMapWrapper, ListWrapper} from '@angular/facade/src/collection'; +import {PromiseWrapper} from '@angular/facade/src/async'; +import {Math} from '@angular/facade/src/math'; import {OpaqueToken} from '@angular/core/src/di'; import {Statistic} from '../statistic'; diff --git a/modules/benchpress/src/reporter/json_file_reporter.ts b/modules/benchpress/src/reporter/json_file_reporter.ts index 3abf305bf5..3cc5577c8e 100644 --- a/modules/benchpress/src/reporter/json_file_reporter.ts +++ b/modules/benchpress/src/reporter/json_file_reporter.ts @@ -1,5 +1,5 @@ -import {DateWrapper, isPresent, isBlank, Json} from '@angular/facade'; -import {PromiseWrapper} from '@angular/facade'; +import {DateWrapper, isPresent, isBlank, Json} from '@angular/facade/src/lang'; +import {PromiseWrapper} from '@angular/facade/src/async'; import {OpaqueToken} from '@angular/core/src/di'; diff --git a/modules/benchpress/src/reporter/multi_reporter.ts b/modules/benchpress/src/reporter/multi_reporter.ts index 0b54ad15a5..9eb013f1d6 100644 --- a/modules/benchpress/src/reporter/multi_reporter.ts +++ b/modules/benchpress/src/reporter/multi_reporter.ts @@ -1,5 +1,5 @@ import {Injector, OpaqueToken} from '@angular/core/src/di'; -import {PromiseWrapper} from '@angular/facade'; +import {PromiseWrapper} from '@angular/facade/src/async'; import {MeasureValues} from '../measure_values'; import {Reporter} from '../reporter'; diff --git a/modules/benchpress/src/runner.ts b/modules/benchpress/src/runner.ts index b8c4af6a56..a4a0df99e4 100644 --- a/modules/benchpress/src/runner.ts +++ b/modules/benchpress/src/runner.ts @@ -1,6 +1,6 @@ import {ReflectiveInjector} from '@angular/core'; -import {isPresent, isBlank} from '@angular/facade'; -import {PromiseWrapper} from '@angular/facade'; +import {isPresent, isBlank} from '@angular/facade/src/lang'; +import {PromiseWrapper} from '@angular/facade/src/async'; import {Sampler, SampleState} from './sampler'; import {ConsoleReporter} from './reporter/console_reporter'; @@ -93,7 +93,7 @@ var _DEFAULT_PROVIDERS = [ FirefoxDriverExtension.PROVIDERS, IOsDriverExtension.PROVIDERS, PerflogMetric.PROVIDERS, - UserMetric.BINDINGS, + UserMetric.PROVIDERS, SampleDescription.PROVIDERS, MultiReporter.createBindings([ConsoleReporter]), MultiMetric.createBindings([PerflogMetric, UserMetric]), diff --git a/modules/benchpress/src/sample_description.ts b/modules/benchpress/src/sample_description.ts index 5093ad3ca1..9b4a4da51f 100644 --- a/modules/benchpress/src/sample_description.ts +++ b/modules/benchpress/src/sample_description.ts @@ -1,4 +1,4 @@ -import {StringMapWrapper} from '@angular/facade'; +import {StringMapWrapper} from '@angular/facade/src/collection'; import {Validator} from './validator'; import {Metric} from './metric'; import {Options} from './common_options'; diff --git a/modules/benchpress/src/sampler.ts b/modules/benchpress/src/sampler.ts index 43955254f0..9dcdb2d8eb 100644 --- a/modules/benchpress/src/sampler.ts +++ b/modules/benchpress/src/sampler.ts @@ -1,5 +1,5 @@ -import {isPresent, isBlank, Date, DateWrapper} from '@angular/facade'; -import {PromiseWrapper} from '@angular/facade'; +import {isPresent, isBlank, Date, DateWrapper} from '@angular/facade/src/lang'; +import {PromiseWrapper} from '@angular/facade/src/async'; import {Metric} from './metric'; import {Validator} from './validator'; diff --git a/modules/benchpress/src/statistic.ts b/modules/benchpress/src/statistic.ts index 23d00d6d8b..13396203c6 100644 --- a/modules/benchpress/src/statistic.ts +++ b/modules/benchpress/src/statistic.ts @@ -1,4 +1,4 @@ -import {Math} from '@angular/facade'; +import {Math} from '@angular/facade/src/math'; export class Statistic { static calculateCoefficientOfVariation(sample, mean) { diff --git a/modules/benchpress/src/validator.ts b/modules/benchpress/src/validator.ts index c1373a9582..6cea7754dd 100644 --- a/modules/benchpress/src/validator.ts +++ b/modules/benchpress/src/validator.ts @@ -1,4 +1,4 @@ -import {BaseException, WrappedException} from '@angular/facade'; +import {BaseException, WrappedException} from '@angular/facade/src/exceptions'; import {MeasureValues} from './measure_values'; diff --git a/modules/benchpress/src/validator/regression_slope_validator.ts b/modules/benchpress/src/validator/regression_slope_validator.ts index b3bcd1889a..1c9390c0cd 100644 --- a/modules/benchpress/src/validator/regression_slope_validator.ts +++ b/modules/benchpress/src/validator/regression_slope_validator.ts @@ -1,4 +1,4 @@ -import {ListWrapper} from '@angular/facade'; +import {ListWrapper} from '@angular/facade/src/collection'; import {OpaqueToken} from '@angular/core/src/di'; import {Validator} from '../validator'; @@ -55,7 +55,7 @@ var _SAMPLE_SIZE = new OpaqueToken('RegressionSlopeValidator.sampleSize'); var _METRIC = new OpaqueToken('RegressionSlopeValidator.metric'); var _PROVIDERS = [ { - provide: RegressionSlopeValidator + provide: RegressionSlopeValidator, useFactory: (sampleSize, metric) => new RegressionSlopeValidator(sampleSize, metric), deps: [_SAMPLE_SIZE, _METRIC] }, diff --git a/modules/benchpress/src/validator/size_validator.ts b/modules/benchpress/src/validator/size_validator.ts index 7c74c7053e..432bf6ac37 100644 --- a/modules/benchpress/src/validator/size_validator.ts +++ b/modules/benchpress/src/validator/size_validator.ts @@ -1,4 +1,4 @@ -import {ListWrapper} from '@angular/facade'; +import {ListWrapper} from '@angular/facade/src/collection'; import {OpaqueToken} from '@angular/core/src/di'; import {Validator} from '../validator'; diff --git a/modules/benchpress/src/web_driver_adapter.ts b/modules/benchpress/src/web_driver_adapter.ts index e84704871c..964519a5fb 100644 --- a/modules/benchpress/src/web_driver_adapter.ts +++ b/modules/benchpress/src/web_driver_adapter.ts @@ -1,5 +1,5 @@ -import {BaseException, WrappedException} from '@angular/facade'; -import {Map} from '@angular/facade'; +import {BaseException, WrappedException} from '@angular/facade/src/exceptions'; +import {Map} from '@angular/facade/src/collection'; /** * A WebDriverAdapter bridges API differences between different WebDriver clients, diff --git a/modules/benchpress/src/web_driver_extension.ts b/modules/benchpress/src/web_driver_extension.ts index ac91f33526..4cc8c899d9 100644 --- a/modules/benchpress/src/web_driver_extension.ts +++ b/modules/benchpress/src/web_driver_extension.ts @@ -1,7 +1,7 @@ import {Injector, OpaqueToken} from '@angular/core/src/di'; -import {isBlank, isPresent} from '@angular/facade'; -import {BaseException, WrappedException} from '@angular/facade'; +import {isBlank, isPresent} from '@angular/facade/src/lang'; +import {BaseException, WrappedException} from '@angular/facade/src/exceptions'; import {Options} from './common_options'; diff --git a/modules/benchpress/src/webdriver/chrome_driver_extension.ts b/modules/benchpress/src/webdriver/chrome_driver_extension.ts index 22c457a77a..0b43073a1d 100644 --- a/modules/benchpress/src/webdriver/chrome_driver_extension.ts +++ b/modules/benchpress/src/webdriver/chrome_driver_extension.ts @@ -1,4 +1,4 @@ -import {ListWrapper, StringMapWrapper} from '@angular/facade'; +import {ListWrapper, StringMapWrapper} from '@angular/facade/src/collection'; import { Json, isPresent, @@ -6,8 +6,8 @@ import { RegExpWrapper, StringWrapper, NumberWrapper -} from '@angular/facade'; -import {BaseException, WrappedException} from '@angular/facade'; +} from '@angular/facade/src/lang'; +import {BaseException, WrappedException} from '@angular/facade/src/exceptions'; import {WebDriverExtension, PerfLogFeatures} from '../web_driver_extension'; import {WebDriverAdapter} from '../web_driver_adapter'; diff --git a/modules/benchpress/src/webdriver/firefox_driver_extension.ts b/modules/benchpress/src/webdriver/firefox_driver_extension.ts index 51fc547335..d5e66edc7c 100644 --- a/modules/benchpress/src/webdriver/firefox_driver_extension.ts +++ b/modules/benchpress/src/webdriver/firefox_driver_extension.ts @@ -1,4 +1,4 @@ -import {isPresent, StringWrapper} from '@angular/facade'; +import {isPresent, StringWrapper} from '@angular/facade/src/lang'; import {WebDriverExtension, PerfLogFeatures} from '../web_driver_extension'; import {WebDriverAdapter} from '../web_driver_adapter'; diff --git a/modules/benchpress/src/webdriver/ios_driver_extension.ts b/modules/benchpress/src/webdriver/ios_driver_extension.ts index 889504977e..995dcf87d6 100644 --- a/modules/benchpress/src/webdriver/ios_driver_extension.ts +++ b/modules/benchpress/src/webdriver/ios_driver_extension.ts @@ -1,5 +1,5 @@ -import {Json, isPresent, isBlank, RegExpWrapper, StringWrapper} from '@angular/facade'; -import {BaseException, WrappedException} from '@angular/facade'; +import {Json, isPresent, isBlank, RegExpWrapper, StringWrapper} from '@angular/facade/src/lang'; +import {BaseException, WrappedException} from '@angular/facade/src/exceptions'; import {WebDriverExtension, PerfLogFeatures} from '../web_driver_extension'; import {WebDriverAdapter} from '../web_driver_adapter'; diff --git a/modules/benchpress/src/webdriver/selenium_webdriver_adapter.ts b/modules/benchpress/src/webdriver/selenium_webdriver_adapter.ts index dbd9a78531..8f98d89aec 100644 --- a/modules/benchpress/src/webdriver/selenium_webdriver_adapter.ts +++ b/modules/benchpress/src/webdriver/selenium_webdriver_adapter.ts @@ -1,4 +1,4 @@ -import {PromiseWrapper} from '@angular/facade'; +import {PromiseWrapper} from '@angular/facade/src/async'; import {WebDriverAdapter} from '../web_driver_adapter'; import * as webdriver from 'selenium-webdriver'; diff --git a/modules/benchpress/test/metric/multi_metric_spec.ts b/modules/benchpress/test/metric/multi_metric_spec.ts index 25972cf07a..34f1cb60be 100644 --- a/modules/benchpress/test/metric/multi_metric_spec.ts +++ b/modules/benchpress/test/metric/multi_metric_spec.ts @@ -1,15 +1,4 @@ -import { - afterEach, - beforeEach, - ddescribe, - describe, - expect, - iit, - inject, - it, - xit, -} from '@angular/core/testing'; -import {AsyncTestCompleter} from '@angular/core/testing/testing_internal'; +import {afterEach, AsyncTestCompleter, beforeEach, ddescribe, describe, expect, iit, inject, it, xit} from '@angular/core/testing/testing_internal'; import {Metric, MultiMetric, ReflectiveInjector} from 'benchpress/common'; export function main() { diff --git a/modules/benchpress/test/metric/perflog_metric_spec.ts b/modules/benchpress/test/metric/perflog_metric_spec.ts index 16fc3c1f01..cdf982fc6a 100644 --- a/modules/benchpress/test/metric/perflog_metric_spec.ts +++ b/modules/benchpress/test/metric/perflog_metric_spec.ts @@ -1,19 +1,8 @@ -import { - afterEach, - AsyncTestCompleter, - beforeEach, - ddescribe, - describe, - expect, - iit, - inject, - it, - xit, -} from '@angular/testing/testing_internal'; +import {afterEach, AsyncTestCompleter, beforeEach, ddescribe, describe, expect, iit, inject, it, xit} from '@angular/core/testing/testing_internal'; -import {StringMapWrapper} from '@angular/facade'; -import {PromiseWrapper} from '@angular/facade'; -import {isPresent, isBlank} from '@angular/facade'; +import {StringMapWrapper} from '@angular/facade/src/collection'; +import {PromiseWrapper} from '@angular/facade/src/async'; +import {isPresent, isBlank} from '@angular/facade/src/lang'; import { Metric, @@ -46,7 +35,7 @@ export function main() { if (isBlank(microMetrics)) { microMetrics = StringMapWrapper.create(); } - var providers = [ + var providers: any[] = [ Options.DEFAULT_PROVIDERS, PerflogMetric.PROVIDERS, {provide: Options.MICRO_METRICS, useValue: microMetrics}, @@ -63,7 +52,7 @@ export function main() { } ]; if (isPresent(forceGc)) { - providers.push({provide: Options.FORCE_GC, useValue(forceGc)}; + providers.push({provide: Options.FORCE_GC, useValue: forceGc}); } if (isPresent(captureFrames)) { providers.push({provide: Options.CAPTURE_FRAMES, useValue: captureFrames}); diff --git a/modules/benchpress/test/metric/user_metric_spec.ts b/modules/benchpress/test/metric/user_metric_spec.ts index 87cb65937b..a6ebee1bed 100644 --- a/modules/benchpress/test/metric/user_metric_spec.ts +++ b/modules/benchpress/test/metric/user_metric_spec.ts @@ -1,21 +1,10 @@ -import {ReflectiveInjector} from "angular2/core"; -import { - afterEach, - AsyncTestCompleter, - beforeEach, - ddescribe, - describe, - expect, - iit, - inject, - it, - xit -} from 'angular2/testing_internal'; +import {ReflectiveInjector} from '@angular/core'; +import {afterEach, AsyncTestCompleter, beforeEach, ddescribe, describe, expect, iit, inject, it, xit} from '@angular/core/testing/testing_internal'; -import {TimerWrapper} from 'angular2/src/facade/async'; -import {StringMapWrapper} from 'angular2/src/facade/collection'; -import {PromiseWrapper} from 'angular2/src/facade/async'; -import {isPresent, isBlank, Json} from 'angular2/src/facade/lang'; +import {TimerWrapper} from '@angular/facade/src/async'; +import {StringMapWrapper} from '@angular/facade/src/collection'; +import {PromiseWrapper} from '@angular/facade/src/async'; +import {isPresent, isBlank, Json} from '@angular/facade/src/lang'; import { Metric, @@ -46,7 +35,7 @@ export function main() { wdAdapter = new MockDriverAdapter(); var bindings = [ Options.DEFAULT_PROVIDERS, - UserMetric.BINDINGS, + UserMetric.PROVIDERS, bind(Options.USER_METRICS).toValue(userMetrics), provide(WebDriverAdapter, {useValue: wdAdapter}) ]; diff --git a/modules/benchpress/test/reporter/console_reporter_spec.ts b/modules/benchpress/test/reporter/console_reporter_spec.ts index 0cc937a6bb..5bfa2caa6b 100644 --- a/modules/benchpress/test/reporter/console_reporter_spec.ts +++ b/modules/benchpress/test/reporter/console_reporter_spec.ts @@ -1,15 +1,6 @@ -import { - describe, - ddescribe, - it, - iit, - xit, - expect, - beforeEach, - afterEach -} from '@angular/testing/testing_internal'; +import {afterEach, AsyncTestCompleter, beforeEach, ddescribe, describe, expect, iit, inject, it, xit} from '@angular/core/testing/testing_internal'; -import {isBlank, isPresent, Date, DateWrapper} from '@angular/facade'; +import {isBlank, isPresent, Date, DateWrapper} from '@angular/facade/src/lang'; import { SampleState, @@ -40,7 +31,7 @@ export function main() { {provide: ConsoleReporter.PRINT, useValue: (line) => log.push(line)} ]; if (isPresent(columnWidth)) { - bindings.push({provide: ConsoleReporter.COLUMN_WIDTH, useValue(columnWidth)}; + bindings.push({provide: ConsoleReporter.COLUMN_WIDTH, useValue: columnWidth}); } reporter = ReflectiveInjector.resolveAndCreate(bindings).get(ConsoleReporter); } diff --git a/modules/benchpress/test/reporter/json_file_reporter_spec.ts b/modules/benchpress/test/reporter/json_file_reporter_spec.ts index 0e4f6c59e1..0ee1bbe17f 100644 --- a/modules/benchpress/test/reporter/json_file_reporter_spec.ts +++ b/modules/benchpress/test/reporter/json_file_reporter_spec.ts @@ -1,18 +1,7 @@ -import { - afterEach, - AsyncTestCompleter, - beforeEach, - ddescribe, - describe, - expect, - iit, - inject, - it, - xit, -} from '@angular/testing/testing_internal'; +import {afterEach, AsyncTestCompleter, beforeEach, ddescribe, describe, expect, iit, inject, it, xit} from '@angular/core/testing/testing_internal'; -import {DateWrapper, Json, RegExpWrapper, isPresent} from '@angular/facade'; -import {PromiseWrapper} from '@angular/facade'; +import {DateWrapper, Json, RegExpWrapper, isPresent} from '@angular/facade/src/lang'; +import {PromiseWrapper} from '@angular/facade/src/async'; import { ReflectiveInjector, @@ -32,7 +21,7 @@ export function main() { var bindings = [ JsonFileReporter.PROVIDERS, {provide: SampleDescription, useValue: new SampleDescription(sampleId, descriptions, metrics)}, - {provide: JsonFileReporter.PATH, useValue(path)}, + {provide: JsonFileReporter.PATH, useValue: path}, {provide: Options.NOW, useValue: () => DateWrapper.fromMillis(1234)}, { provide: Options.WRITE_FILE, diff --git a/modules/benchpress/test/reporter/multi_reporter_spec.ts b/modules/benchpress/test/reporter/multi_reporter_spec.ts index a83da671d5..386c9d334f 100644 --- a/modules/benchpress/test/reporter/multi_reporter_spec.ts +++ b/modules/benchpress/test/reporter/multi_reporter_spec.ts @@ -1,18 +1,7 @@ -import { - afterEach, - AsyncTestCompleter, - beforeEach, - ddescribe, - describe, - expect, - iit, - inject, - it, - xit, -} from '@angular/testing/testing_internal'; +import {afterEach, AsyncTestCompleter, beforeEach, ddescribe, describe, expect, iit, inject, it, xit} from '@angular/core/testing/testing_internal'; -import {PromiseWrapper} from '@angular/facade'; -import {DateWrapper} from '@angular/facade'; +import {PromiseWrapper} from '@angular/facade/src/async'; +import {DateWrapper} from '@angular/facade/src/lang'; import { Reporter, diff --git a/modules/benchpress/test/runner_spec.ts b/modules/benchpress/test/runner_spec.ts index 6e8ea17985..94191e5b73 100644 --- a/modules/benchpress/test/runner_spec.ts +++ b/modules/benchpress/test/runner_spec.ts @@ -1,15 +1,4 @@ -import { - afterEach, - AsyncTestCompleter, - beforeEach, - ddescribe, - describe, - expect, - iit, - inject, - it, - xit, -} from '@angular/testing/testing_internal'; +import {afterEach, AsyncTestCompleter, beforeEach, ddescribe, describe, expect, iit, inject, it, xit} from '@angular/core/testing/testing_internal'; import { Runner, Sampler, @@ -22,8 +11,8 @@ import { WebDriverAdapter, SampleState } from 'benchpress/common'; -import {isBlank} from '@angular/facade'; -import {PromiseWrapper} from '@angular/facade'; +import {isBlank} from '@angular/facade/src/lang'; +import {PromiseWrapper} from '@angular/facade/src/async'; export function main() { describe('runner', () => { diff --git a/modules/benchpress/test/sampler_spec.ts b/modules/benchpress/test/sampler_spec.ts index dfd66baee8..1ab23ff1a5 100644 --- a/modules/benchpress/test/sampler_spec.ts +++ b/modules/benchpress/test/sampler_spec.ts @@ -1,18 +1,7 @@ -import { - afterEach, - AsyncTestCompleter, - beforeEach, - ddescribe, - describe, - expect, - iit, - inject, - it, - xit, -} from '@angular/testing/testing_internal'; +import {afterEach, AsyncTestCompleter, beforeEach, ddescribe, describe, expect, iit, inject, it, xit} from '@angular/core/testing/testing_internal'; -import {isBlank, isPresent, stringify, Date, DateWrapper} from '@angular/facade'; -import {PromiseWrapper} from '@angular/facade'; +import {isBlank, isPresent, stringify, Date, DateWrapper} from '@angular/facade/src/lang'; +import {PromiseWrapper} from '@angular/facade/src/async'; import { Sampler, diff --git a/modules/benchpress/test/statistic_spec.ts b/modules/benchpress/test/statistic_spec.ts index 1d0e1d5376..fe2d0aa396 100644 --- a/modules/benchpress/test/statistic_spec.ts +++ b/modules/benchpress/test/statistic_spec.ts @@ -1,18 +1,7 @@ -import { - describe, - ddescribe, - it, - iit, - xit, - expect, - beforeEach, - afterEach -} from '@angular/testing/testing_internal'; +import {afterEach, AsyncTestCompleter, beforeEach, ddescribe, describe, expect, iit, inject, it, xit} from '@angular/core/testing/testing_internal'; import {Statistic} from 'benchpress/src/statistic'; -import {NaN} from '@angular/facade'; - export function main() { describe('statistic', () => { diff --git a/modules/benchpress/test/trace_event_factory.ts b/modules/benchpress/test/trace_event_factory.ts index 6f53ce6228..2430959f7d 100644 --- a/modules/benchpress/test/trace_event_factory.ts +++ b/modules/benchpress/test/trace_event_factory.ts @@ -1,4 +1,4 @@ -import {isPresent} from '@angular/facade'; +import {isPresent} from '@angular/facade/src/lang'; export class TraceEventFactory { private _cat: string; diff --git a/modules/benchpress/test/validator/regression_slope_validator_spec.ts b/modules/benchpress/test/validator/regression_slope_validator_spec.ts index dbe1f73095..92a76e6ab0 100644 --- a/modules/benchpress/test/validator/regression_slope_validator_spec.ts +++ b/modules/benchpress/test/validator/regression_slope_validator_spec.ts @@ -1,15 +1,6 @@ -import { - describe, - ddescribe, - it, - iit, - xit, - expect, - beforeEach, - afterEach -} from '@angular/testing/testing_internal'; -import {Date, DateWrapper} from '@angular/facade'; -import {ListWrapper} from '@angular/facade'; +import {afterEach, AsyncTestCompleter, beforeEach, ddescribe, describe, expect, iit, inject, it, xit} from '@angular/core/testing/testing_internal'; +import {Date, DateWrapper} from '@angular/facade/src/lang'; +import {ListWrapper} from '@angular/facade/src/collection'; import { RegressionSlopeValidator, @@ -24,8 +15,8 @@ export function main() { function createValidator({size, metric}) { validator = ReflectiveInjector.resolveAndCreate([ RegressionSlopeValidator.PROVIDERS, - {provide: RegressionSlopeValidator.METRIC, useValue(metric)}, - {provide: RegressionSlopeValidator.SAMPLE_SIZE, useValue(size)} + {provide: RegressionSlopeValidator.METRIC, useValue: metric}, + {provide: RegressionSlopeValidator.SAMPLE_SIZE, useValue: size} ]) .get(RegressionSlopeValidator); } diff --git a/modules/benchpress/test/validator/size_validator_spec.ts b/modules/benchpress/test/validator/size_validator_spec.ts index 39ee8ceb27..853d8d4b9f 100644 --- a/modules/benchpress/test/validator/size_validator_spec.ts +++ b/modules/benchpress/test/validator/size_validator_spec.ts @@ -1,15 +1,6 @@ -import { - describe, - ddescribe, - it, - iit, - xit, - expect, - beforeEach, - afterEach -} from '@angular/testing/testing_internal'; -import {Date, DateWrapper} from '@angular/facade'; -import {ListWrapper} from '@angular/facade'; +import {afterEach, AsyncTestCompleter, beforeEach, ddescribe, describe, expect, iit, inject, it, xit} from '@angular/core/testing/testing_internal'; +import {Date, DateWrapper} from '@angular/facade/src/lang'; +import {ListWrapper} from '@angular/facade/src/collection'; import { Validator, diff --git a/modules/benchpress/test/web_driver_extension_spec.ts b/modules/benchpress/test/web_driver_extension_spec.ts index df5260f472..58c7021b43 100644 --- a/modules/benchpress/test/web_driver_extension_spec.ts +++ b/modules/benchpress/test/web_driver_extension_spec.ts @@ -1,18 +1,7 @@ -import { - afterEach, - AsyncTestCompleter, - beforeEach, - ddescribe, - describe, - expect, - iit, - inject, - it, - xit, -} from '@angular/testing/testing_internal'; +import {afterEach, AsyncTestCompleter, beforeEach, ddescribe, describe, expect, iit, inject, it, xit} from '@angular/core/testing/testing_internal'; -import {isPresent, StringWrapper} from '@angular/facade'; -import {PromiseWrapper} from '@angular/facade'; +import {isPresent, StringWrapper} from '@angular/facade/src/lang'; +import {PromiseWrapper} from '@angular/facade/src/async'; import {WebDriverExtension, ReflectiveInjector, Options} from 'benchpress/common'; diff --git a/modules/benchpress/test/webdriver/chrome_driver_extension_spec.ts b/modules/benchpress/test/webdriver/chrome_driver_extension_spec.ts index d733083192..fee6f80c25 100644 --- a/modules/benchpress/test/webdriver/chrome_driver_extension_spec.ts +++ b/modules/benchpress/test/webdriver/chrome_driver_extension_spec.ts @@ -1,18 +1,7 @@ -import { - afterEach, - AsyncTestCompleter, - beforeEach, - ddescribe, - describe, - expect, - iit, - inject, - it, - xit, -} from '@angular/testing/testing_internal'; +import {afterEach, AsyncTestCompleter, beforeEach, ddescribe, describe, expect, iit, inject, it, xit} from '@angular/core/testing/testing_internal'; -import {PromiseWrapper} from '@angular/facade'; -import {Json, isBlank} from '@angular/facade'; +import {PromiseWrapper} from '@angular/facade/src/async'; +import {Json, isBlank} from '@angular/facade/src/lang'; import { WebDriverExtension, @@ -59,7 +48,7 @@ export function main() { ReflectiveInjector.resolveAndCreate([ ChromeDriverExtension.PROVIDERS, {provide: WebDriverAdapter, useValue: new MockDriverAdapter(log, perfRecords, messageMethod)}, - {provide: Options.USER_AGENT, useValue(userAgent)} + {provide: Options.USER_AGENT, useValue: userAgent} ]) .get(ChromeDriverExtension); return extension; diff --git a/modules/benchpress/test/webdriver/ios_driver_extension_spec.ts b/modules/benchpress/test/webdriver/ios_driver_extension_spec.ts index 40cc3e460c..4781fe4600 100644 --- a/modules/benchpress/test/webdriver/ios_driver_extension_spec.ts +++ b/modules/benchpress/test/webdriver/ios_driver_extension_spec.ts @@ -1,18 +1,7 @@ -import { - afterEach, - AsyncTestCompleter, - beforeEach, - ddescribe, - describe, - expect, - iit, - inject, - it, - xit, -} from '@angular/testing/testing_internal'; +import {afterEach, AsyncTestCompleter, beforeEach, ddescribe, describe, expect, iit, inject, it, xit} from '@angular/core/testing/testing_internal'; -import {PromiseWrapper} from '@angular/facade'; -import {Json, isBlank, isPresent} from '@angular/facade'; +import {PromiseWrapper} from '@angular/facade/src/async'; +import {Json, isBlank, isPresent} from '@angular/facade/src/lang'; import { WebDriverExtension, diff --git a/modules/benchpress/tsconfig.json b/modules/benchpress/tsconfig.json index 13249a24e7..dbaf5b5261 100644 --- a/modules/benchpress/tsconfig.json +++ b/modules/benchpress/tsconfig.json @@ -1,12 +1,23 @@ { - "compilerOptions": { - "emitDecoratorMetadata": true, - "declaration": true, - "module": "commonjs", - "rootDir": ".", - "sourceMap": true, - "sourceRoot": ".", - "target": "ES5", - "outDir": "../../dist/js/cjs" - } + "compilerOptions": { + "baseUrl": ".", + "declaration": true, + "experimentalDecorators": true, + "module": "commonjs", + "moduleResolution": "node", + "outDir": "../../dist/all/benchpress", + "noImplicitAny": false, + "noFallthroughCasesInSwitch": true, + "paths": { + "selenium-webdriver": ["../../node_modules/@types/selenium-webdriver/index.d.ts"], + "rxjs/*": ["../../node_modules/rxjs/*"], + "@angular/*": ["../../dist/all/@angular/*"], + "benchpress/*": ["./*"] + }, + "rootDir": ".", + "inlineSourceMap": true, + "lib": ["es5", "dom", "es2015.promise", "es2015.collection", "es2015.iterable"], + "skipDefaultLibCheck": true, + "target": "es5" + } } diff --git a/modules/benchpress/types.d.ts b/modules/benchpress/types.d.ts new file mode 100644 index 0000000000..d609d4bb8b --- /dev/null +++ b/modules/benchpress/types.d.ts @@ -0,0 +1,14 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +// This file contains all ambient imports needed to compile the modules/ source code + +/// +/// +/// +/// diff --git a/scripts/ci-lite/build.sh b/scripts/ci-lite/build.sh index 286233e1a2..424e60ddbe 100755 --- a/scripts/ci-lite/build.sh +++ b/scripts/ci-lite/build.sh @@ -14,5 +14,6 @@ $(npm bin)/tsc -p tools cp tools/@angular/tsc-wrapped/package.json dist/tools/@angular/tsc-wrapped node dist/tools/@angular/tsc-wrapped/src/main -p modules node dist/tools/@angular/tsc-wrapped/src/main -p modules/@angular/router +$(npm bin)/tsc -p modules/benchpress echo 'travis_fold:end:BUILD' diff --git a/tools/tsc-watch/index.ts b/tools/tsc-watch/index.ts index 0a17718688..0de20c606f 100644 --- a/tools/tsc-watch/index.ts +++ b/tools/tsc-watch/index.ts @@ -71,7 +71,7 @@ if (platform == 'node') { onChangeCmds: [ processOutputEmitterCodeGen, [ - 'node', 'dist/tools/cjs-jasmine', '--', '{@angular,benchpress}/**/*_spec.js', + 'node', 'dist/tools/cjs-jasmine', '--', '@angular/**/*_spec.js', '@angular/compiler-cli/test/**/*_spec.js' ] ]