Skip to content

Commit 60727c4

Browse files
committed
revert(format): Revert "chore(format): update to latest formatter"
This reverts commit 03627aa.
1 parent 03627aa commit 60727c4

File tree

527 files changed

+19359
-14082
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

527 files changed

+19359
-14082
lines changed

gulpfile.js

Lines changed: 345 additions & 379 deletions
Large diffs are not rendered by default.

modules/angular1_router/src/ng_outlet.ts

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ function ngOutletDirective($animate, $q: ng.IQService, $rootRouter) {
7878
result = this.currentController.$routerCanReuse(nextInstruction, this.currentInstruction);
7979
} else {
8080
result = nextInstruction === this.currentInstruction ||
81-
angular.equals(nextInstruction.params, this.currentInstruction.params);
81+
angular.equals(nextInstruction.params, this.currentInstruction.params);
8282
}
8383
return $q.when(result);
8484
}
@@ -110,7 +110,7 @@ function ngOutletDirective($animate, $q: ng.IQService, $rootRouter) {
110110
}
111111

112112
this.controller.$$template = '<' + dashCase(componentName) + ' $router="::$$router"></' +
113-
dashCase(componentName) + '>';
113+
dashCase(componentName) + '>';
114114
this.controller.$$router = this.router.childRouter(instruction.componentType);
115115
this.controller.$$outlet = this;
116116

@@ -165,8 +165,8 @@ function routerTriggerDirective($q) {
165165
var currentComponent = outlet.currentController =
166166
element.controller(ngOutletCtrl.$$componentName);
167167
if (currentComponent.$routerOnActivate) {
168-
promise = $q.when(currentComponent.$routerOnActivate(
169-
outlet.currentInstruction, outlet.previousInstruction));
168+
promise = $q.when(currentComponent.$routerOnActivate(outlet.currentInstruction,
169+
outlet.previousInstruction));
170170
}
171171
promise.then(outlet.deferredActivation.resolve, outlet.deferredActivation.reject);
172172
}
@@ -213,15 +213,14 @@ function ngLinkDirective($rootRouter, $parse) {
213213
function getLink(params) {
214214
navigationInstruction = router.generate(params);
215215

216-
scope.$watch(
217-
function() { return router.isRouteActive(navigationInstruction); },
218-
function(active) {
219-
if (active) {
220-
element.addClass('ng-link-active');
221-
} else {
222-
element.removeClass('ng-link-active');
223-
}
224-
});
216+
scope.$watch(function() { return router.isRouteActive(navigationInstruction); },
217+
function(active) {
218+
if (active) {
219+
element.addClass('ng-link-active');
220+
} else {
221+
element.removeClass('ng-link-active');
222+
}
223+
});
225224

226225
const navigationHref = navigationInstruction.toLinkUrl();
227226
return $rootRouter._location.prepareExternalUrl(navigationHref);
@@ -233,8 +232,8 @@ function ngLinkDirective($rootRouter, $parse) {
233232
let params = routeParamsGetter();
234233
element.attr('href', getLink(params));
235234
} else {
236-
scope.$watch(
237-
() => routeParamsGetter(scope), params => element.attr('href', getLink(params)), true);
235+
scope.$watch(() => routeParamsGetter(scope), params => element.attr('href', getLink(params)),
236+
true);
238237
}
239238

240239
element.on('click', event => {

modules/angular2/core.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,13 @@ export * from './src/core/di';
1010
export * from './src/facade/facade';
1111
export {enableProdMode} from 'angular2/src/facade/lang';
1212
export {platform, createNgZone, PlatformRef, ApplicationRef} from './src/core/application_ref';
13-
export {APP_ID, APP_COMPONENT, APP_INITIALIZER, PACKAGE_ROOT_URL, PLATFORM_INITIALIZER} from './src/core/application_tokens';
13+
export {
14+
APP_ID,
15+
APP_COMPONENT,
16+
APP_INITIALIZER,
17+
PACKAGE_ROOT_URL,
18+
PLATFORM_INITIALIZER
19+
} from './src/core/application_tokens';
1420
export * from './src/core/zone';
1521
export * from './src/core/render';
1622
export * from './src/core/linker';

modules/angular2/examples/core/di/ts/forward_ref/forward_ref.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ expect(door.lock instanceof Lock).toBe(true);
2020
// #enddocregion
2121

2222
// #docregion resolve_forward_ref
23-
var ref = forwardRef(() => 'refValue');
24-
expect(resolveForwardRef(ref)).toEqual('refValue');
25-
expect(resolveForwardRef('regularValue')).toEqual('regularValue');
23+
var ref = forwardRef(() => "refValue");
24+
expect(resolveForwardRef(ref)).toEqual("refValue");
25+
expect(resolveForwardRef("regularValue")).toEqual("regularValue");
2626
// #enddocregion

modules/angular2/examples/core/pipes/ts/async_pipe/async_pipe_example.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@ export class AsyncPipeExample {
2727
if (this.arrived) {
2828
this.reset();
2929
} else {
30-
this.resolve('hi there!');
30+
this.resolve("hi there!");
3131
this.arrived = true;
3232
}
3333
}
3434
}
3535
// #enddocregion
3636

3737
// #docregion AsyncPipeObservable
38-
@Component({selector: 'task-cmp', template: 'Time: {{ time | async }}'})
38+
@Component({selector: "task-cmp", template: "Time: {{ time | async }}"})
3939
class Task {
4040
time = new Observable<number>((observer: Subscriber<number>) => {
4141
setInterval(() => observer.next(new Date().getTime()), 500);

modules/angular2/examples/router/ts/can_activate/can_activate_example.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
import {provide, Component} from 'angular2/core';
22
import {bootstrap} from 'angular2/platform/browser';
3-
import {CanActivate, RouteConfig, ComponentInstruction, APP_BASE_HREF, ROUTER_DIRECTIVES} from 'angular2/router';
3+
import {
4+
CanActivate,
5+
RouteConfig,
6+
ComponentInstruction,
7+
APP_BASE_HREF,
8+
ROUTER_DIRECTIVES
9+
} from 'angular2/router';
410

511
function checkIfWeHavePermission(instruction: ComponentInstruction) {
612
return instruction.params['id'] == '1';

modules/angular2/examples/router/ts/can_deactivate/can_deactivate_example.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
import {provide, Component} from 'angular2/core';
22
import {bootstrap} from 'angular2/platform/browser';
3-
import {CanDeactivate, RouteConfig, RouteParams, ComponentInstruction, ROUTER_DIRECTIVES, APP_BASE_HREF} from 'angular2/router';
3+
import {
4+
CanDeactivate,
5+
RouteConfig,
6+
RouteParams,
7+
ComponentInstruction,
8+
ROUTER_DIRECTIVES,
9+
APP_BASE_HREF
10+
} from 'angular2/router';
411

512
// #docregion routerCanDeactivate
613
@Component({

modules/angular2/examples/router/ts/on_activate/on_activate_example.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
import {Component, provide} from 'angular2/core';
22
import {bootstrap} from 'angular2/platform/browser';
3-
import {OnActivate, ComponentInstruction, RouteConfig, ROUTER_DIRECTIVES, APP_BASE_HREF} from 'angular2/router';
3+
import {
4+
OnActivate,
5+
ComponentInstruction,
6+
RouteConfig,
7+
ROUTER_DIRECTIVES,
8+
APP_BASE_HREF
9+
} from 'angular2/router';
410

511
// #docregion routerOnActivate
612
@Component({template: `Child`})

modules/angular2/examples/router/ts/on_deactivate/on_deactivate_example.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
import {Component, Injectable, provide} from 'angular2/core';
22
import {bootstrap} from 'angular2/platform/browser';
3-
import {OnDeactivate, ComponentInstruction, RouteConfig, ROUTER_DIRECTIVES, APP_BASE_HREF} from 'angular2/router';
3+
import {
4+
OnDeactivate,
5+
ComponentInstruction,
6+
RouteConfig,
7+
ROUTER_DIRECTIVES,
8+
APP_BASE_HREF
9+
} from 'angular2/router';
410

511

612
@Injectable()
@@ -51,6 +57,7 @@ class AppCmp {
5157

5258
export function main() {
5359
return bootstrap(AppCmp, [
54-
provide(APP_BASE_HREF, {useValue: '/angular2/examples/router/ts/on_deactivate'}), LogService
60+
provide(APP_BASE_HREF, {useValue: '/angular2/examples/router/ts/on_deactivate'}),
61+
LogService
5562
]);
5663
}

modules/angular2/examples/router/ts/reuse/reuse_example.ts

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
import {Component, provide} from 'angular2/core';
22
import {bootstrap} from 'angular2/platform/browser';
3-
import {CanActivate, RouteConfig, ComponentInstruction, ROUTER_DIRECTIVES, APP_BASE_HREF, CanReuse, RouteParams, OnReuse} from 'angular2/router';
3+
import {
4+
CanActivate,
5+
RouteConfig,
6+
ComponentInstruction,
7+
ROUTER_DIRECTIVES,
8+
APP_BASE_HREF,
9+
CanReuse,
10+
RouteParams,
11+
OnReuse
12+
} from 'angular2/router';
413

514

615
// #docregion reuseCmp
@@ -44,6 +53,6 @@ class AppCmp {
4453

4554

4655
export function main() {
47-
return bootstrap(
48-
AppCmp, [provide(APP_BASE_HREF, {useValue: '/angular2/examples/router/ts/reuse'})]);
56+
return bootstrap(AppCmp,
57+
[provide(APP_BASE_HREF, {useValue: '/angular2/examples/router/ts/reuse'})]);
4958
}

modules/angular2/examples/testing/ts/testing.ts

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,15 @@
1-
import {describe, fdescribe, xdescribe, it, fit, xit, beforeEach, afterEach, beforeEachProviders, inject} from 'angular2/testing';
1+
import {
2+
describe,
3+
fdescribe,
4+
xdescribe,
5+
it,
6+
fit,
7+
xit,
8+
beforeEach,
9+
afterEach,
10+
beforeEachProviders,
11+
inject
12+
} from 'angular2/testing';
213
import {provide} from 'angular2/core';
314

415
var db: any;
@@ -19,9 +30,8 @@ fdescribe('some component', () => {
1930
// This test will run.
2031
});
2132
});
22-
describe('another component', () => {
23-
it('also has a test', () => { throw 'This test will not run.'; });
24-
});
33+
describe('another component',
34+
() => { it('also has a test', () => { throw 'This test will not run.'; }); });
2535
// #enddocregion
2636

2737
// #docregion xdescribe
@@ -63,10 +73,9 @@ describe('some component', () => {
6373
// #docregion beforeEachProviders
6474
describe('some component', () => {
6575
beforeEachProviders(() => [provide(MyService, {useClass: MyMockService})]);
66-
it('uses MyService', inject(
67-
[MyService], (service: MyMockService) => {
68-
// service is an instance of MyMockService.
69-
}));
76+
it('uses MyService', inject([MyService], (service: MyMockService) => {
77+
// service is an instance of MyMockService.
78+
}));
7079
});
7180
// #enddocregion
7281

modules/angular2/http.ts

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,12 @@ import {BaseResponseOptions, ResponseOptions} from './src/http/base_response_opt
1616
export {Request} from './src/http/static_request';
1717
export {Response} from './src/http/static_response';
1818

19-
export {RequestOptionsArgs, ResponseOptionsArgs, Connection, ConnectionBackend} from './src/http/interfaces';
19+
export {
20+
RequestOptionsArgs,
21+
ResponseOptionsArgs,
22+
Connection,
23+
ConnectionBackend
24+
} from './src/http/interfaces';
2025

2126
export {BrowserXhr} from './src/http/backends/browser_xhr';
2227
export {BaseRequestOptions, RequestOptions} from './src/http/base_request_options';
@@ -150,13 +155,16 @@ export {URLSearchParams} from './src/http/url_search_params';
150155
export const HTTP_PROVIDERS: any[] = [
151156
// TODO(pascal): use factory type annotations once supported in DI
152157
// issue: https://github.com/angular/angular/issues/3183
153-
provide(Http, {
154-
useFactory: (xhrBackend: XHRBackend, requestOptions: RequestOptions) =>
155-
new Http(xhrBackend, requestOptions),
156-
deps: [XHRBackend, RequestOptions]
157-
}),
158-
BrowserXhr, provide(RequestOptions, {useClass: BaseRequestOptions}),
159-
provide(ResponseOptions, {useClass: BaseResponseOptions}), XHRBackend
158+
provide(Http,
159+
{
160+
useFactory: (xhrBackend: XHRBackend, requestOptions: RequestOptions) =>
161+
new Http(xhrBackend, requestOptions),
162+
deps: [XHRBackend, RequestOptions]
163+
}),
164+
BrowserXhr,
165+
provide(RequestOptions, {useClass: BaseRequestOptions}),
166+
provide(ResponseOptions, {useClass: BaseResponseOptions}),
167+
XHRBackend
160168
];
161169

162170
/**
@@ -276,12 +284,14 @@ export const HTTP_BINDINGS = HTTP_PROVIDERS;
276284
export const JSONP_PROVIDERS: any[] = [
277285
// TODO(pascal): use factory type annotations once supported in DI
278286
// issue: https://github.com/angular/angular/issues/3183
279-
provide(Jsonp, {
280-
useFactory: (jsonpBackend: JSONPBackend, requestOptions: RequestOptions) =>
281-
new Jsonp(jsonpBackend, requestOptions),
282-
deps: [JSONPBackend, RequestOptions]
283-
}),
284-
BrowserJsonp, provide(RequestOptions, {useClass: BaseRequestOptions}),
287+
provide(Jsonp,
288+
{
289+
useFactory: (jsonpBackend: JSONPBackend, requestOptions: RequestOptions) =>
290+
new Jsonp(jsonpBackend, requestOptions),
291+
deps: [JSONPBackend, RequestOptions]
292+
}),
293+
BrowserJsonp,
294+
provide(RequestOptions, {useClass: BaseRequestOptions}),
285295
provide(ResponseOptions, {useClass: BaseResponseOptions}),
286296
provide(JSONPBackend, {useClass: JSONPBackend_})
287297
];

modules/angular2/instrumentation.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,7 @@
1-
export {wtfCreateScope, wtfLeave, wtfStartTimeRange, wtfEndTimeRange, WtfScopeFn} from './src/core/profile/profile';
1+
export {
2+
wtfCreateScope,
3+
wtfLeave,
4+
wtfStartTimeRange,
5+
wtfEndTimeRange,
6+
WtfScopeFn
7+
} from './src/core/profile/profile';

modules/angular2/platform/browser.ts

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,27 @@
11
export {AngularEntrypoint} from 'angular2/src/core/angular_entrypoint';
2-
export {BROWSER_PROVIDERS, CACHED_TEMPLATE_PROVIDER, ELEMENT_PROBE_PROVIDERS, ELEMENT_PROBE_PROVIDERS_PROD_MODE, inspectNativeElement, BrowserDomAdapter, By, Title, DOCUMENT, enableDebugTools, disableDebugTools} from 'angular2/src/platform/browser_common';
2+
export {
3+
BROWSER_PROVIDERS,
4+
CACHED_TEMPLATE_PROVIDER,
5+
ELEMENT_PROBE_PROVIDERS,
6+
ELEMENT_PROBE_PROVIDERS_PROD_MODE,
7+
inspectNativeElement,
8+
BrowserDomAdapter,
9+
By,
10+
Title,
11+
DOCUMENT,
12+
enableDebugTools,
13+
disableDebugTools
14+
} from 'angular2/src/platform/browser_common';
315

416
import {Type, isPresent, CONST_EXPR} from 'angular2/src/facade/lang';
5-
import {BROWSER_PROVIDERS, BROWSER_APP_COMMON_PROVIDERS} from 'angular2/src/platform/browser_common';
17+
import {
18+
BROWSER_PROVIDERS,
19+
BROWSER_APP_COMMON_PROVIDERS
20+
} from 'angular2/src/platform/browser_common';
621
import {COMPILER_PROVIDERS} from 'angular2/compiler';
722
import {ComponentRef, platform, reflector} from 'angular2/core';
823
import {ReflectionCapabilities} from 'angular2/src/core/reflection/reflection_capabilities';
9-
import {XHRImpl} from 'angular2/src/platform/browser/xhr_impl';
24+
import {XHRImpl} from "angular2/src/platform/browser/xhr_impl";
1025
import {XHR} from 'angular2/compiler';
1126
import {Provider} from 'angular2/src/core/di';
1227

modules/angular2/platform/browser_static.ts

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,21 @@
11
export {AngularEntrypoint} from 'angular2/src/core/angular_entrypoint';
2-
export {BROWSER_PROVIDERS, ELEMENT_PROBE_PROVIDERS, ELEMENT_PROBE_PROVIDERS_PROD_MODE, inspectNativeElement, BrowserDomAdapter, By, Title, enableDebugTools, disableDebugTools} from 'angular2/src/platform/browser_common';
2+
export {
3+
BROWSER_PROVIDERS,
4+
ELEMENT_PROBE_PROVIDERS,
5+
ELEMENT_PROBE_PROVIDERS_PROD_MODE,
6+
inspectNativeElement,
7+
BrowserDomAdapter,
8+
By,
9+
Title,
10+
enableDebugTools,
11+
disableDebugTools
12+
} from 'angular2/src/platform/browser_common';
313

414
import {Type, isPresent} from 'angular2/src/facade/lang';
5-
import {BROWSER_PROVIDERS, BROWSER_APP_COMMON_PROVIDERS} from 'angular2/src/platform/browser_common';
15+
import {
16+
BROWSER_PROVIDERS,
17+
BROWSER_APP_COMMON_PROVIDERS
18+
} from 'angular2/src/platform/browser_common';
619
import {ComponentRef, platform} from 'angular2/core';
720

821
/**
@@ -16,9 +29,9 @@ export const BROWSER_APP_PROVIDERS: Array<any /*Type | Provider | any[]*/> =
1629
/**
1730
* See {@link bootstrap} for more information.
1831
*/
19-
export function bootstrapStatic(
20-
appComponentType: Type, customProviders?: Array<any /*Type | Provider | any[]*/>,
21-
initReflector?: Function): Promise<ComponentRef> {
32+
export function bootstrapStatic(appComponentType: Type,
33+
customProviders?: Array<any /*Type | Provider | any[]*/>,
34+
initReflector?: Function): Promise<ComponentRef> {
2235
if (isPresent(initReflector)) {
2336
initReflector();
2437
}

modules/angular2/platform/common_dom.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ export {DomRenderer} from 'angular2/src/platform/dom/dom_renderer';
66
export {DOCUMENT} from 'angular2/src/platform/dom/dom_tokens';
77
export {SharedStylesHost, DomSharedStylesHost} from 'angular2/src/platform/dom/shared_styles_host';
88
export {DomEventsPlugin} from 'angular2/src/platform/dom/events/dom_events';
9-
export {EVENT_MANAGER_PLUGINS, EventManager, EventManagerPlugin} from 'angular2/src/platform/dom/events/event_manager';
9+
export {
10+
EVENT_MANAGER_PLUGINS,
11+
EventManager,
12+
EventManagerPlugin
13+
} from 'angular2/src/platform/dom/events/event_manager';
1014
export * from 'angular2/src/platform/dom/debug/by';
1115
export * from 'angular2/src/platform/dom/debug/ng_probe';

0 commit comments

Comments
 (0)